Project: UNIX Shell
Our first major programming assignment for my introductory computer systems course, 15-213, was to write a UNIX shell. Specifically, the meat of the lab assignment was to code, in C, a program which would receive a command and execute it as a job in either the background or the foreground based on what the user specified.
The jobs themselves were managed using a simple array data structure, but the difficult part of the assignment was actually running the jobs. From a high-level, my program spawned a new process (different from a thread) for each job. Only foreground jobs were given control of stdin, or the keyboard input. Also, the user could suspend jobs, resume jobs, switch jobs between the background and the foreground, and redirect input and output to and from jobs.
Coding this shell taught me a lot about computers themselves. I learned about system level file I/O, signal handling, and processes, and was able to package all of my knowledge neatly into a handy shell. In addition, I learned about the dangers of concurrent programming and how to deal with race conditions, both of which were essential for the proxy lab.