Comp 374: Operating Systems

Text: Operating Systems: A Modern Perspective, Second editiotn, Gary Nutt.

Certain announcements and individual messages may be sent to you via email. You are expected to receive them; please be sure I have your preferred email address.

Office Hours:Friday 10:30-11:30, Mon and Wed 2:30-4:00.

Grades: There will be one in-class midterm and a final. The midterm will be Wednesday October 18. The final will be Wed, Dec 13, at 10:20 in our usual room. There will also be various programming assignments, and possibly some written exercises. Programming will be in both C (still the standard language for OS development) and Java. We'll review briefly any language prerequisites.

Your grade will be computed by adding up points, weighted by category. The exams will count about 70-75% of your grade, with programs and homework constituting the remainder. The final exam will be worth about 25% more than the midterm; detailed section-by-section summaries of what material might be on the exams will be posted beforehand.

I reserve the right to amend the percentages in your favor if circumstances warrant.

You may be asked to resubmit programs that do not meet certain standards. Late programs will lose about 3-5% per day. Programs will be graded as much on intangibles such as good design, clarity, and appropriate style as on correctness and whether it worked.

More groundrules are here

Study materials

Here is the course notes file, containing a rough outline of what we've covered. I'll update this to some of the more recent material.

The final exam study guide is now available; it lists what sections we covered and includes some sample problems. The solutions are here.

The exam 1 study guide is still available. Solutions are here.

Programming assignment 1 is to make changes to the scheduler simulator. It is due Wednesday, October 25 (changed from 10/23). Detailed instructions are here. You will need scheduler.java, last updated Friday October 20 after class.

The problem with getting messages like "process 2(editor) has exited", followed by further activity for process 2, turns out to be simple: the "process has exited" message is printed at the time of actual exit, but the subsequent call to printstats() still has statistics for the partial final second of the process. The "process has exited" message is not part of the preceding printstats(). I added a blank line and a time value to the output, to help make this separation clearer.

Programming assignment 2 (not "program 3" as it was mistakenly labeled) is to make changes to the Traffic.java file so that it (a) guarantees that there are no collisions in the tunnel (that is, traffic goes in one direction at a time), and (b) guarantees that neither direction of traffic starves, by setting a timer if opposing traffic arrives before the existing direction has had time MAXTIME, and then reversing the direction when the timer expires. Further information can be found in the comments of the Traffic.java file. The program is due FRIDAY, NOVEMBER 17 (extended from Wednesday, November 15).

After handing out the (slightly abbreviated) Traffic.java file on Wednesday, November 1, I made the following changes:

These are easy to add yourself (time() is three lines) if you have already started editing the file. Otherwise, just copy the new version.

Programming assignment 3, Adding Pipes (and waiting) to lsh is now available. Pipe creation is now back in scommand() in lsh.c, as promised in class Friday Dec 1. There were two changes: to add the call to CreatePipe (there's only one), and (about 8 lines before) to add "term=scommand(...)". For the pipe-management portion of the assignment, all you now have to modify is invoke(). If srcfd != LSHSTDIN, you create an inheritable duplicate of srcfd (with hdup()), and set it to be stdin. Then, after CreateProcess, you set stdin back to what it was.

You will need the following files: lsh.c (still the old version), lsh.h, env.c, cd.c. The only one you should make *changes* to is lsh.c! You may also want some precompiled utilities to use to test your program; these are in H:\prof_pub\pld\374\utils. Note that the top directory is prof_pub, not prof as originally recorded.

Goals

The goal of the course is to study both the theoretical aspects of operating systems (processes, scheduling, concurrency, memory management) and to look concretely at some example operating systems (unix, nt). The text by Nutt tends to be much more closely tied to concrete practice than most older texts. There is a great body of now-standard theory about operating systems, pertaining to concurrency, deadlocks, memory management, scheduling and the like. We will look at that stuff, but we'll also try to tie the material to concrete examples. Operating Systems is, in a sense, the archetype for software engineering.