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!
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.
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.
Course Webpage: http://cs140.stanford.edu
All vital information will appear on the course webpage, including lecture notes and programming assignments.
Mailing list: cs140-sum0708-students@lists.stanford.edu
The mailing list is read-only for the students. Course staff will post time-critical information to it (as well as posting it on the webpage).
Newsgroup:
su.class.cs140Questions about the assignments, general questions which might be of interest to many and student discussion should first be posted to the newsgroup . This helps you as students because you are likely to obtain a faster response, and us as your course staff because it eases our workload; consequently we will endeavor to respond to questions posted to the newsgroup more frequently than those sent to the email helpline. We strongly encourage you to utilize the newsgroup (especially when forming groups at the beginning of the quarter) and you may answer any posted questions if you like, but please keep in mind the Honor Code and don't post your code to a solution to the newsgroup.
If you are unclear about how to configure Thunderbird to read the newsgroup, please follow these instructions for Mac or Windows. On Linux, we assume you can figure it out yourself (it's about the same.) If Thunderbird doesn't work for you, you can log on to one of Stanford's Unix machines (e.g. pod.stanford.edu - see "Computing" below if you're not sure how to do that remotely) and use either mozilla (whose mail and news window works like Thunderbird) or one of the text-based clients like tin or trn. If you still can't figure it out, ask the TA or come to office hours.Email Helpline: cs140-sum0708-staff@lists.stanford.edu
The staff email is where you should send questions regarding course administration and any questions which would be inappropriate if posted publicly to the newsgroup (i.e. questions that contain your code or other private information).
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.
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.
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:
Implementation: 50%.
This will be based on our test scripts. We have provided you the test scripts that we will use in the project materials. Thus, you should know the exact score you will receive for implementation before you turn in your project.
Please don't try to take advantage of our generosity. Your code has to work properly in the general case, not just for the test cases we supply. For example, it is unacceptable to put in special-case code that checks the name of the running test case and changes Pintos behavior based on that. Such attempts to side-step the test cases will receive no credit. If you think your solution may be in a gray area here, please ask us about it.
It is possible to pass a few of the tests without modifying any code. If you didn't actually implement one of these parts of a project, don't expect to receive the points.
We reserve the right to fix bugs in our test cases and grading scripts as they are discovered. We will notify you when we do so.
For more information, see the Pintos manual.
Design: 50%.
We will judge your design based on your design documentation and your source code. We will read all of your design documentation and much of your source code.
For more information, see the Pintos manual.
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.
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.
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.
Grades will be assigned as follows:
| Programming Assignments: | 50% |
| Midterm Exam: | 17% |
| Final Exam: | 33% |