CS140 Course Information

Instructor

Bob Lantz <rlantz@cs.stanford.edu>
Office hours spot: Gates 316
Telephone: (650) 723-9549

Teaching Assistant

Akbar Mehdi <samehdi@stanford.edu>
Office hours spot: Gates B24A
See the Office Hours page for more information.

Lectures

Monday/Wednesday/Friday 1:15 - 2:30PM in Terman Auditorium, 153 Terman Engineering Center.

Overview

CS 140 covers the fundamentals of Operating Systems and Systems Programming, revealing the mysteries of the software layer between application programs and hardware, and covering techniques and algorithms for dealing with thorny problems of resource management, sharing, and protection, as well as concurrency and complex systems. Perhaps best of all, four programming projects give you the chance to implement important and realistic subsystems of a small operating system kernel.

Between the lectures, reading, and programming assignments, we hope that CS 140 will help you become not only an OS expert and/or kernel hacker, but also a better programmer and user of computer systems, and a better computer scientist who has insight into managing complex and concurrent interactions within and between hardware and software systems!

Materials

The course is organized around lecture notes, rather than a specific textbook. The notes will be distributed in lecture. They are available in electronic format on the Lecture Notes page. Extra paper copies (if any) will be left in the filing cabinets in the middle area on the third floor of Gates.

Readings will be assigned in the dinosaur book, Operating System Concepts, 7th Edition, by Silberschatz, Galvin, and Gagne, John Wiley & Sons, 2002. Two copies of this book are on permanent reserve in the Math and Computer Science Library on the fourth floor of Building 380 in the quad. The 6th Edition is sufficient for the course, but chapter numbering has changed, and readings will be given using the numbering of the 7th Edition. Material for the midterm and final exams will be taken from the reading, the lectures, and the projects.

Prerequisites

This course assumes familiarity with basic computer organization and assembly language, as covered in CS 107 or EE 108B.

We also assume you understand the issues of concurrent programming as presented in CS 107. Concurrency and synchronization will be a big part of the lecture material and programming assignments; therefore, if you lack sufficient background, it will be easy to fall behind. In particular, you should be familiar with the material in Ch. 6 of Silberschatz et. al. For additional information, we recommend A. Birrell's paper, "An Introduction to Programming with Threads", available here.

The assignments (Pintos) are written in C. We assume you know or will be able to quickly pick up C.

Resources

Computing

The programming assignments for this course require the use of the Unix (Linux) machines in the Terman or Gates Computer Clusters. These machines are generally x86/Linux machines running Ubuntu/Debian. (There may also be a couple of remaining SPARC/Solaris machines left, but, after the first project the Linux systems will be much faster, if you use the qemu simulator instead of Bochs.)

Most of you will already have SUnet accounts; if you do not, go to http://www.stanford.edu/group/itss/services/sunetid/. The SUnet account also gives you access to the course newsgroup.

We cannot provide support for projects developed on machines other than Stanford's Unix cluster machines. If you decide to work on your own machine, you will have to be able to handle it yourself. (If so, be sure to look at the files in `pintos/src/misc' in the source distribution.)

However, all is not lost if you wish to program somewhere other than the Stanford clusters. You can connect remotely via ssh or VNC. (ssh clients for Windows can be found here, and VNC for OS X can be found here.).

As a bonus for being in the class, all students in the course will get at least 100 MB of additional quota on their Unix accounts. Quota increases are based on study lists filed on Axess, so after you officially add the course, you will receive the quota increase.

Programming Assignments

As part of the course, you will complete four large programming projects that each highlight a major subsystem of modern operating systems. Starting with a minimally featured instructional operating system, you will add more functionality over the course of the quarter until you have a small, fairly functional OS.

You are allowed to work in groups of up to three. Because of the scope of the projects, and because in the Real World projects tend to have more people, we highly recommend working with a full group. Groups of two (or one, which is highly discouraged) are acceptable, but be aware the size of the assignments is the same regardless of the size of the group. Team members will all receive the same grade on the programming assignments.

Project Topics

  1. Threads
  2. User Programs
  3. Virtual Memory
  4. File Systems

Project Grading

These projects are a fundamental part of this course: we believe you cannot learn some of the most important concepts in OSes without actually hacking on one. Moreover, each project requires a significant amount of time due to the nontrivial and open-ended nature of some of the problems. CS 140 has a reputation for being hard and time consuming, and this reputation is well-deserved. You should be prepared to spend 10-20 hours or more per week on these assignments and to start well over a week before they are due.

We will grade your assignments on the following scale:

Late Policy

Any given group may choose to turn in any two of the assignments no more than 24 hours late each. Late days may not be combined to give a 48 hour extension. Other late work will not be accepted.

If group memberships change, then the group is considered to have turned in late as many projects as the member who has already had the most late days. That is, if any member of a group has already turned in two projects late, then that group is not entitled to any more late days.

Exams

Midterm Exam

The midterm exam will be held in class on Friday, July 18th, as shown on the class schedule. It will take the entire class period. Local SCPD students are expected to come to campus and take the midterm in class. Any student with a conflict for the midterm should let the course staff know promptly, so that an alternate time can be arranged.

Final Exam

The final exam will be held on Saturday, August 16th (12:15am-3:15pm). Local SCPD students are expected to come to campus and take the final. If you have a conflict for the final exam, let the course staff know promptly, so that an alternate time can be arranged.

Grading Policy

Grades will be assigned as follows:

Programming Assignments: 50%
Midterm Exam: 17%
Final Exam: 33%