CMPS 111: Introduction to Operating Systems

Programming Assignments


There will be four programming assignments, each due about 2 weeks after it is assigned. Due dates are listed with the information about that assignment. All programming assignments are due at midnight on the date specified. Late assignments will not be accepted unless they are the result of an emergency or severe illness, and then only by permission of the instructor. Be forewarned, if you claim to have had an emergency or severe illness, I will require a note from your doctor. One word of advice; these assignments are fairly difficult so it is absolutely essential that you start them early and give yourself enough time to work on them.

Turning in programming assignments

Programming assignments are to be turned in electronically, using submit. The class locker is cmps111-sb.s02 and the assignment name is simply assignmentn, where n is the number of the assignment, i.e. assignment #1 is assignment1.

For example, to submit assignment #1, assuming that you want to submit a file called foo, simply type:

    submit cmps111-sb.s02 assignment1 foo
To submit multiple files, simply execute this command multiple times, specifying the correct file name each time (or a list of files separated by spaces). Alternatively, you can tar your files into single file and submit that. For more information on the tar command, type "man tar".

For more information about how to use submit, just type "submit -m" on one of the cats machines and you will get the instructions.


Design Documents

Your design document for each project should be called DESIGN, and should reside in the project directory with the rest of your code. Your design should describe the design of your assignment in enough detail that a knowledgable programmer could duplicate your work. This includes descriptions of the data structures you're going to use, all non-trivial algorithms and formulas, and a description of each function including its purpose, inputs, outputs, and assumptions it makes about the inputs or outputs.

I have written up an example of a reasonable but not very wordy design, and an adequate if not exceptionally beautiful piece of code that implements it. They show the design and implementation of a tic-tac-toe program. It works, but the I/O is not great. A graphics interface would be a lot nicer. Please note that I really did write the design first, and writing the code was almost as easy as following a recipe. Interestingly, other than typos and poorly formatted output, the only bug was a missing end-of-comment symbol that caused some of my code to disappear.

By the way, this command: "indent -bad -bap -bbb -bbo -br -brs -ce -i2 -cli2 -l80 -lc80 -npcs -npsl -nut ttt.c", produces nicely formatted code that conforms to the coding standards I expect you to use.

Here are the files:

The Design: DESIGN

The Code: ttt.c


Coding Style

Operating Systems are extremely complex software systems. By their very nature they are confusing and difficult to understand. Poor coding style only makes the situation worse. For that reason, I expect exemplary coding practices from everyone in this class. If you fail to follow the guidelines I have provided, you will lose significant points on your assignments even if they are otherwise perfect. As the quarter progresses I may add to this as necessary to account for any particularly bad style that I see being used by members of the class.

C Style Guidelines for CMPS 111 - you must read and follow these guidelines.


Tools and Techniques

Good programming involves more than just good coding. Good practices include using project directories, RCS, good editors (emacs), etc. Accordingly, you are expected to use certain tools and techniques in implementing your solutions to the programming assignments.

Tools and Techniques for CMPS 111 - you must read this and use the tools and techniques listed


DLXOS Information


The Assignments

Assignment
Description:
Solution
Due Date
Writing a Shell
myshell.c
4/9/02
Lottery Scheduling
design document & code
(to decompress and untar the code do "tar -xvzf asg2.tgz")
4/23/02
Multiprogramming and User Processes
code
(to decompress and untar the code do "uncompress asg3.tar.Z; tar -xvf asg3.tar")
5/10/02
File System
 
5/31/02


sbrandt@cse.ucsc.edu