CS240: Advanced Topics in Operating Systems

Winter 2005 -- Dawson Engler


(1) We've put the correct version of the Therac-25 paper up in PDF.

(2) The first quiz will be on Friday, Feb. 4th in class. Wednesday, Feb 2nd, will be a review session.

Quiz 1

Post your quiz questions, one for each paper, to the newsgroup by Tuesday 11:59PM

Here are some sample questions and answers culled from the applicable parts of previous quarters' quizes. Note that you are responsible for figuring out which answers correspond to which questions.

Quiz 1 Stats:

Mean: 35
STD deviation: 5.73
Median: 36
Mode: 39
Min: 21
Max: 44

Quiz 2

The second quiz will be on Monday, Feb. 28th in class.

*UPDATED* Post your quiz questions, one for each paper (8), to the newsgroup by Friday, Feb 25th, 11:59PM PST

Here are some sample questions and answers culled from the applicable parts of previous quarters' quizes. Note that you are responsible for figuring out which answers correspond to which questions.

Note: This was the first year that the MapReduce paper and the Model Checking papers were assigned, so there are not practice questions for these.

Quiz 2 Stats:

Mean: 27.5
STD deviation: 4.02
Median: 27
Mode: 27
Min: 18
Max: 35

Quiz 3

The final quiz has been canceled, all rejoice!

Quiz Solutions


Class Abstract

Students will study advanced operating system topics and be exposed to recent developments in operating systems research. This course involves readings and lectures on classic and new papers. Topics: virtual memory management, synchronization and communication, file systems, protection and security, operating system structure and extension techniques, fault tolerance, and history and experience of systems programming.

Class Times

Section 1: MWF 1:15-2:05 in Skilling Auditorium
Section 2: MWF 2:15-3:05 in
Herrin T175
(You may choose which section you wish to attend.)

Course Staff


Dawson Engler
Office: 314 Gates
Telephone: (650) 723-0762
E-mail: engler@cs.stanford.edu
Office hours: By appointment

Teaching Assistant

Mike Houston
Office: 381 Gates
Telephone: (650) 723-0618
E-mail: cs240-win0405-staff@lists.stanford.edu
Office hours: Monday 11:00AM - 12:00PM and Thursday 11:00AM - 12:00PM.
Extra office hours before exams and by appointment.

Course Secretary

Wanda Washington
Office: 303 Gates
Phone: (650) 725-3726
E-mail: wandaw@csl.stanford.edu


To contact the staff, please send email to cs240-win0405-staff@lists.stanford.edu and prefix the subject line with "CS240" for a prompt response. Announcements from the staff will be sent via the cs240-win0405-students@lists.stanford.edu mailing list to which any registered student will automatically be added.


The prerequisite for this class is CS 140 (previously CS 240A) or the equivalent. It is necessary to have this background before taking the class, as we'll read a lot papers quickly without much time for catching up on the basics. The course assumes an understanding of topics in operating systems such as synchronization, virtual memory management, scheduling, and file systems.

The other requirement is that students be able to send and receive email, access the class newsgroup, access the class web page, and download and print postscript from the class web page. There will be very few handouts in the course, since most of the notes and other materials will be available only on the class web page.

Course Organization and Workload

The course consists of lectures, readings, and three exams. As the quarter progresses there may be ways to get extra credit. The two most important things to know about the class: (1) the main goal is to have interesting in-class discussions and (2) we recommend you read each paper at least twice, preferably more than a day in advance so that it sinks in.

Most of the work in this course consists of reading journal and conference papers. We will cover one paper for each class meeting. This class will be primarily discussion based (rather than organized around lectures). Active discussion will (hopefully) give you a non-trivial understanding of the material. The only way this approach can work is if you read the papers carefully. To encourage this, 40% of your class grade will come from class participation: this includes talking in class, as well as how you do on pop quizzes and (possibly) pop presentations. Class time will not be used to rehash the material in the papers. Instead, it will be used to highlight the important points and discuss some of the more interesting features. There will be as much as 10-15 hours of reading per week. Do not take this course unless you are willing and able to do a lot of reading.


There is no textbook for this course. The course is based on a collection of journal and conference papers that describe the history and state of the art in operating systems. Papers will be discussed in class in approximately the order that they appear on the reading list. You must read the papers before class. At a minimum we recommend two close readings. We will provide most papers online; those that are only available in hardcopy will be provided about a week before they are needed.

Grading Policy

The class is graded on a rough curve with an average grade being a B+. 40% of your grade will come from class participation, the other 60% will be based on the two midterm exam scores and the final exam score. All three exams count. Note this is different from previous years' grading policy where only the best two exams counted.


Two midterm exams and a final exam will be given in class. They will be open book . The midterm exams are not cumulative, but the final exam is cumulative. A sample exam will be available along with sample solutions. Review sessions will be held before each exam.


There is a class newsgroup, su.class.cs240, that can be used by members of the class to converse with each other. All course announcements will be put on to the class web page. The news group is a good place to advertise for study groups, ask questions of other students, etc.

Course Outline

This course makes no attempt to cover all the interesting topics in operating systems. Instead, we will cover a few topics in depth. The course is divided into the following general topic areas:

Virtual memory management
Discussions of virtual memory management implementations and recent work in virtual memory for multiprocessors, NUMA machines, large virtual address spaces, and other topics.
Synchronization and communication
Discussions of synchronization with an emphasis on monitors. Communication using remote procedure call.
File systems
Discussions of file system interfaces and disk storage management techniques.
Protection and security
Discussions of data security and authentication.
Extensions and fault tolerance
Discussions of mechanisms for implementing OS services at user level, OS structure and performance, reliability and availability of OS services.
History and experience
Historically important papers and experience reports by senior researchers in the field.

Reading List

Patterson, Gibson, and Katz
Category/Date Title Author(s)
(1/5) The Rise of "Worse is Better" Richard Gabriel
Conc. (1/7) An Investigation of the Therac-25 Accidents Leveson and Turner
Conc. (1/10) Eraser: A Dynamic Data Race Detector for Multithreaded Programs Stefan Savage
Conc. (1/12) Experience with Processes and Monitors in Mesa Butler Lampson
Conc. (1/14) Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, George C. Necula, and Eric Brewer
Why Threads Are a Bad Idea (for most purposes) John Ousterhout
Cooperative Task Management without Manual Stack Management (up to and including Section 3) Atul Adya, Jon Howell, Marvin Theimer, William J. Bolosky, John R. Douceur
VM (1/19) Virtual Memory Management in the VAX/VMS Operating System Levy and Lipman
VM (1/21) Practical, Transparent, Operating System Support for Superpages Navarro, Iyer, Druschel, and Cox
VM (1/24) Memory Resource Management in VMware ESX Server Waldspurger
(1/26) Improving the Reliability of Commodity Operating Systems Swift, Bershad, Levy
(1/28) A Dynamic Technique for Eliminating Buffer Overflow Vulnerabilities (and Other Memory Errors) Rinard, Cader, Dumitran, Roy, Leu
Enhancing Server Availability and Security Through Failure-Oblivious Computing Rinard, Cader, Dumitran, Roy, Leu, Beebee
(1/31) Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler Nieh, Vaill, Zhong
(2/2) Quiz 1 review
(2/4) Quiz 1
N/W (2/7) Eliminating Receive Livelock in an Interrupt-Driven Kernel Mogul and Ramakrishnan
FS (2/9) Design and Implementation of the SUN Network Filesystem Sandberg et al.
FS (2/11) Leases: An Efficient Fault-Tolerant Mechanism for Distributed File Cache Consistency Gray and Cheriton
FS (2/14) A Low-Bandwidth Network File System Muthitacharoen, Chen, and Mazieres
FS (2/16) The Design and Implementation of a Log-Structured File System Rosenblum and Ousterhout
FS (2/18) Using Model Checking to Find Serious File System Errors Yang, Twohey, Engler, Musuvathi
(2/23) A Case for Redundant Arrays of Inexpensive Disks (RAID)
(2/25) MapReduce: Simplified Data Processing on Large Clusters Dean and Ghemawat
(2/28) Quiz 2
Experience (3/2) Disco: Running Commodity Operating Systems on Scalable Multiprocessors Bugnion, Devine, Govil, and Rosenblum
Experience (3/4) Application Performance and Flexibility on Exokernel Systems Kaashoek et. al
Experience (3/7) Bugs as Deviant Behavior: A General Approach to Inferring Errors in Systems Code Engler, Chen, Hallem, Chou, and Chelf
Experience (3/9) Hints for Computer System Design Butler W. Lampson
(3/11) Quiz 3

Class Websites from Previous Quarters

Webpage maintained by Mike Houston