TWiki> CS385spring12 Web>Homeworks (2012-01-10, Main.jakob)EditAttach


Homeworks are due in the svn repository by start of class on Tuesdays. Make sure that your turn-in is correct by checking it out in a fresh directory, building and running the executables, just like we would.

Homework Schedule

Topic Due 3:30 pm
on Tue
Sorted ascending
1 - types and expressions 1/17 5
2 - functions and memory management 1/24 5
3 - data structures in C 1/31 5
4 - homebrew command line interpreter 2/7 5
5 - elevator controller 2/14 5
6 - elevator scheduler 2/28 10
Midterm 1 3/1 20
7 - homebrew malloc() 3/13 10
8 - make your own debugger 4/3 15
9 - a simple filesystem 4/25 15

Late turn-in policy

Late turn-ins are not accepted, as solutions are often discussed in class immediately after the due date.

If you for whatever technical reason cannot commit your homework to the repository on time, make a tarball of your homework directory and email it to Tim Merrifield <>. Then, commit your homework (unchanged) to the repository ASAP, and let Tim know the revision number. The tarball will not be graded; it simply serves as a time stamp allowing you to commit your code after the due date.

WARNING: Do not change your turn-in between sending the tarball and committing the code. Any differences between your tarball and the indicated revision of the code will be considered cheating.

Tentative homework topics

This list is preliminary and will be updated throughout the course of the semester.

  1. Understanding types and expressions in C
    1. structs, primitive types and typedefs
    2. type casting
    3. create a Virtual Machine and install Linux
    4. start using subversion for turn-in
  2. Functions and memory management
    1. calling conventions and the call stack
    2. stack vs. heap allocation
    3. heap allocation with malloc() / free()
    4. also, compile and install your own Linux kernel
  3. Data structures in C
    1. generic doubly-linked list
    2. generic binary heap
    3. or alternatively, a Rope
    4. debugging with gdb
    5. profiling with gprof
  4. Homebrew command line interpreter
    1. process management with fork / execve / dup2 / open/close
    2. more string handling functions
  5. Concurrent programming and synchronization
    1. multi-threading with pthreads
    2. mutexes / binary semaphores
    3. condition variables
    4. barriers
    5. deadlocks, race conditions, and starvation
  6. Inter-process communication
  7. A faster malloc() and free()
  8. Roll your own file system
  9. Exploiting vulnerabilities and cracking binaries
Topic revision: r1 - 2012-01-10 - 15:32:21 - Main.jakob
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF