COS 318: Operating systems  

Fall 2007, Princeton University


Course Summary | Announcement | Administrative | Schedule | Resources | Policies


Course Summary

This course studies the design and implementation of operating systems. The topics include: kernel structure, processes and threads, synchronization, processor scheduling, virtual machine monitor, virtual memory, disk management, file systems, security, protection and introduction to networking.  Students will be working on a series of six projects leading to a small, real operating system that runs on the PC hardware.  The last project is the final project for the course. 

Prerequisites: COS 217 and 226 or instructor's permission.
Text Book: Modern Operating Systems, 2nd Edition, Andrew S. Tanenbaum, Prentice-Hall, 2001
Grading Policies: Course projects (50%), midterm (20%), final project (20%), and reading and participation (10%).


Announcements

  • 9/10: Make sure to subscribe to the course mailing list to get email.
  • 9/18: Precepts will be in room 105 Tuesday and Wed from 8:30 to 9:30pm.
  • 9/25: Zach Devito and David Zaslavsky are our Lab assistants (see below for schedule).
  • 11/25: Stephen Soltesz and Zhe Wang (TA for COS318 in 2005 and 2006) will be helping the class as the TAs for project 5, since David Eisenstat will not be able to serve as TA for emergency reasons.  Stephen and Zhe will provide precepts, office hours, design review and project grading of project 5.  The precepts will be held at the same location and the same times. Their office hours and locations will be announced later.

Administrative Information

Lectures

  • TTH 1:30-2:50pm, Room 105, CS Building

Precepts

  • Tue and Wed: 8:30-9:30pm, Room 105, CS Building

Professor

  • Kai Li, room 321 CS Building, 609-258-4637, li at cs, Office hours: 3:-4:30pm Tue and Thu

Teaching assistants

  • David Eisenstat, room 417, 609-258-6324, deisenst at cs, office hours: Mon TBD, Friday 2-4pm
  • Soner Sevinc, room 103B, 609-258-0944, ssevinc at cs, office hours: Mon and Friday 2-4pm

Lab assistants

  • Zachary (Zach) Devito,  lab hours: Wed 7:30 - 11:30pm, zdevito at princeton.
  • David Zaslavsky, lab hours: Mon 9-11pm and Sunday 7-9pm, dzaslavs at princeton.

Undergraduate Coordinator

  • Donna OLeary: 410 CS Building, 609-258-1746, doleary at cs

Keeping in touch

  • Email to COS 318 staff at cos318 at princeton dot edu
  • Post questions of general interests (especially about project assignments) to our mailing list.  Note that this is a mailing list.  You will need to subscribe to the mailing list. When you send a message, everyone in the mailing list will receive your message.  

Syllabus (Tentative)

September

October

November

December

January

  • 1/15  Final project due (Dean's date)

Resources

Getting started

  • You will be using the machines in the lab located in room 010 of the Friends Center for the course projects.  CS staff has setup an account for you on these machines if you have enrolled in this class.  You can use any of these machines to develop and test the operating system projects.  The released files for our projects are in /u/cs318/ on the OIT file server (arizona or phoenix).  For project 1, for example, the files are in /u/cs318/1_pre/* as well as in 1_pre.tar (see the man page of tar for details).  Unfortunately, the machines in the class lab are not able to mount on the OIT file server, but you still need to access the released files and you are required to submit your projects on the OIT fileserver.  We recommend that you use scp or sftp to transfer files between the lab machines and your OIT home directory.  If you happen to have an account on CS machines, CS staff has setup the machines in the 010 friends center lab to allow you to mount your CS home directory: smbumount /u/username/cs_home
     
  • If you would like to set up your own Linux to work on the projects.  Please contact our teaching assistants.

Tutorial and Documentation


Policies

Grading

The course grades will be determined roughly as follows:

  • Course projects (50%)
  • Midterm (20%)
  • Final project (20%)
  • Reading and Participation  (10%)

The course will not be graded on a curve, so students are not competing against each other. Most projects contain extra credits. The midterm is tentatively scheduled on the Thursday of the midterm week.

Projects

We believe that the only way to master the knowledge of operating systems is to build a real operating system kernel. The six projects in this course are designed to do exactly that. At the end of the class, you will have a small, real operating system kernel.  This set of projects were co-developed with colleagues at University of Tromso in Norway and have been used in other institutions such as Yale.

Students will be paired as working groups for the first five projects. You will be regrouped after three projects in order to give you a chance to work with another person for the next two projects.  You will be working alone on the last project. 

Each project has two grading phases: design review and final submission. The design review will be graded at the scale from 0 to 5 and the final submission be at the sale from 0 to 10.  To conduct a graded design review, each working group or student will meet with your TA for 10 minutes one week before the project is due. The main purpose of the design review is to force you start on the projects early. Another purpose is to let you catch design errors to avoid frustrated debugging. Also, it gives you a chance to explain and defend your approach. Each working group needs to prepare a short presentation to show your approach to the TA. You should pretend that you are in the real world and do a design review with your supervisors. My advice is to prepare one or two pages showing your data structures, interfaces, and algorithms instead of showing encrypted code. Drawing diagrams are very helpful. Your presentation should take no more than five minutes and the feedback from the TA will normally take no more than five minutes. Note that you have to sign up for a design review session. No design review session = no grade for the design review. If you don't show up for your design review session, you'll have to make a new appointment and 10% of your design review grade will be subtracted.

The final submission will be done online, following the specific instructions in each project description.  You should include a small README file with your project submission. You should concisely describe your design and implementation.  Also, you need to describe what parts work and what parts don't; and how to compile and run your program (if you are not using the Makefile we provided). You don't have to repeat anything you presented in the design review.  The TA who is in charge of the project will grade the project without correcting your code.  It is your responsibility to figure out how to correct your code by comparing your implementations with the released solutions.

Normally, we will give the same grade to both students in a working group.  If one of the students feel that the other student did more work and deserve more credits, please inform the TA who is in charge of the project by e-mail.

You will be using the Linux PCs in the 010 lab in Friends Center (so called Fishbowl). All the projects will be done on a USB flash memory stick, so please do not write your kernel to the hard disk.  The lab in Friend 010 is reserved for COS 318 students during the whole semester.  When working on the projects, it is helpful to test your implementation using a simulator such as bochs or qemu during the development phase.  After your projects run successfully on a simulator, you should test it on a real PC.  Please share test machines if the lab is full.

Late submission policy

Project submissions are due at 11.59PM on the due date. Late submissions are marked down using a popular function. In this way, an assignment which is only a few hours late doesn't get penalized that much. A late grade is computed as follows:

        grade = original_grade * exp(-time_late/three_days)

Examples: work turned in five minutes late gets 99.9% credit, one hour late gets 98.6% credit, six hours late gets 92.0% credit, one day late gets 71.7% credit, three days late gets 36.8%, and one week late gets 9.7%.

Exceptions will be made only in extreme circumstances and only in advance.

Exams

The midterm exam will be designed to test how well students understand the materials taught in the lectures as well as in the projects.  Please watch the schedule of this web page for the times and the locations of the exams.

Reading and Participation

It is strongly recommended that students read the suggested reading materials before the class.  A number of discussion topics will be provided on the course web page before each class starts.  Students are required to turn in their notes on their thoughts about these questions at the beginning of each class.  These notes are graded. Student will earn 3 points each time: 3 for excellent understanding, 2 for good understanding, 1 for understanding a little, and 0 for no understanding.  If you submit your notes after the class, you will not receive any points.

The participation grades will be based on the students' understanding of the discussion topics shown in their submitted notes and their contributions in the class discussions.   Student can earn up 1 point for participation (0 for no participation) and 0.5 extra point for active participation.

Collaboration Policy

We believe that students can learn quite a bit from each other. We encourage you to help each other understand the materials in the course and in particular, to learn from each other in doing the operating system projects. In order to encourage such cooperation, we will give you the opportunity to tell us those students who helped you the most in understanding the material. Such information will be turned into extra points for the helpers at the end of the class.

You can also earn extra credits by developing useful tools for the projects that can be used by others. To do so, you need to discuss your ideas first with the instructor and the TAs.

There is a clear distinction between cooperation and cheating. Copying other's code or designs are strictly prohibited. We will punish transgressors severely.


Kai Li, COS 318