Announcements
- Happy Holidays!
Administrative Information
Professor
Fabián E. BustamanteTechnological Institute, L465
+1 847 491-2745
This email address is being protected from spambots. You need JavaScript enabled to view it.
TAs
John RulaFord Design Building, 2-230
+1 847 467-3250
This email address is being protected from spambots. You need JavaScript enabled to view it.
Zach Bischof
Ford Design Building, 2-217
+1 847 467-3250
This email address is being protected from spambots. You need JavaScript enabled to view it.
Location and Time
Lectures: Tuesdays and Thursdays 11:00AM-12:20PM
F. Searle 1421
Discussion Sessions: Wednesdays 6:00-7:00PM (Labs)
Professor Office Hours: by appointment
TA Office Hours: Monday and Friday 3:00 - 5:00PM (Wilkinson)
Final Exam: Tuesday Dec. 10, 12-2PM
Course Description
Catalog Description: Fundamental overview of operating systems. Operating systems structures, processes, process synchronization, deadlocks, CPU scheduling, and memory management.
Detailed Description: Operating systems control all of a computer's resources and present users with the equivalent of virtual machines that are easier to program than their underlying hardware. This course provides an overview of fundamental operating system principles, complemented with discussions of concrete modern systems to help you understand how these principles are applied in real OSs. Topics covered include an overview of the components of an operating system, mutual exclusion and synchronization, implementation of processes, scheduling algorithms, memory management and file systems.
Although the main learning objective of the course is to understand the requirements, design and implementation of modern operating systems, at a higher level the course aims to provide you with a good grasp of basic abstractions employed in system-level software (such as processes, threads, virtual memory, caching, etc.), while uncovering the "magic" that happens inside the box.
The course has a strong project component intended to provide essential experience in designing and implementing complex systems and working as part of a team. In designing the projects and estimating their required effort/hours, I am assuming you are (1) familiar with basic computer organization and data structures and (2) capable of programming in C in UNIX (or UNIX-like) systems (experience with pointers, explicit dynamic memory allocation, multi-file projects, etc.).
In compliance with Section 504 of the 1973 Rehabilitation Act and the Americans with Disabilities Act, Northwestern University is committed to providing equal access to all programming. Students with disabilities seeking accommodations are encouraged to contact the office of Services for Students with Disabilities (SSD) at +1 847 467-5530 or This email address is being protected from spambots. You need JavaScript enabled to view it. . SSD is located in the basement of Scott Hall. Additionally, I am available to discuss disability-related needs during office hours or by appointment.
Course Prerequisites
- EECS-311 Data structures and data management.
- EECS-213 Introduction to Computer Systems or
EECS-205 Fundamental of Computer Systems Software and
EECS-231 Advanced Programming for Computer Engineers. - Familiarity with basic computer architecture concepts and proficiency in C programming in UNIX systems.
Communication Channels
There are a number of communication channels set up for this class:
- We will use the course web site to post homework assignments, projects, course-related announcements, etc. You should check this regularly.
- We will use the Google Group EECS 343 at Northwestern for class discussion. This particular channel is intended to foster communication among you, the students. You'll find that someone else in the class will have thought of the same problem that you have and will perhaps have some valuable insight that will prove helpful. The staff will be monitoring the discussion threads and will step in with guidance when appropriate. If you don't have a subscription already, you can request one:
- Finally, there is always email for questions that would be inappropriate to post on the newsgroup (source code being a good example).When using email to contact the staff, please start your subject line with "eecs343: helpful-comment" to ensure a prompt response.
Course Organization
The course is organized as a series of lectures, TA sessions, reading, homework, projects and exams:
- Lectures - A set of lectures through which I present the core of the material.
- TA Sessions - Discussion sessions held by the TAs to answer questions about the lecture, readings, homework assignments, and projects.
- Readings - Textbook reading in preparation for (not substitution of) the lecture and additional reading for those interested in delving further into some topics. The outline includes the reading assignments. Each exam, midterm and final, will include two extra credit questions based on the reading list.
- Homework - Four homework assignments with questions from (or similar to those in) your textbook, aimed at reinforcing the material covered in the reading and the lectures. A last homework assignment on the reading material for our last lecture.
- Projects - Three to four programming projects to give you a better understanding of the subject matter and some experience with system level programming including thread-level programming.
- Exams - Two exams: a midterm and a final exam. These exams cover the material presented in the lecture, homework assignments and projects. Each exam, midterm and final, will include two extra credit questions based on the reading list. You'll be able to bring one page of notes to assist you during the exam.
Exams
There will be a midterm and a final exam. Exams will be in-class, closed-book (except for one page of notes you are allowed to bring in), and will cover materials from lecture, required readings and projects. The final exam will not be cumulative.
Grading
I use a criterion-referenced method to assign your grade; in other words, your grade will be based on how well you do relative to predetermined performance levels, instead of in comparison with the rest of the class. Thus, if a test has 100 possible points, anyone with a score of 90 or greater will get an A, those with scores of 80 or greater will get a B, those with scores of 70 or greater will get a C, and so on. Notice that this means that if everyone works hard and gets >90, everyone gets an A.
Total scores (between 0 and 100) will be determined, roughly, as follows:
- Homework 20%
- Projects 40%
- Exams (20% each) 40%
A note about class participation: while not explicitly included as an item in the previous list, your participation in class will be taken into consideration throughout the quarter and when granting partial and final scores/grades.
To check your grades you can use this form.
Policies
Late policy:
Unless otherwise indicated, homework assignments and projects are due by midnight on their due date. If you hand in an assignment late, we will take off 10% for each day (or portion thereof) it is late. Assignments that are three or more days late receive no credit.
Cheating vs. Collaboration:
Collaboration is a really good thing and we encourage it. On the other hand, cheating is considered a very serious offense. When in doubt, remember that it's OK to meet with colleagues, study for exams together, and discuss assignments with them. However, what you turn in must be your own (or for group projects, your group's own) work. Copying code, solution sets, etc. from other people or any other sources is strictly prohibited.
Course Outline and Approximate Dates
Because one has to be an optimist to begin an ambitious project, it is not surprising that underestimation of completion time is the norm.
-- Fernando J. Corbató, ``On Building Systems that Will Fail'', 1990 Turing Award Lecture.
Date | Topic (slides) | Reading |
---|---|---|
09/24 | Introduction [pdf] | 1 |
09/26 | Architectural Support for Operating Systems [pdf] | 2 |
10/01 | Operating System Concepts & Structure [pdf] | 2; Paper 1 |
10/03 | Processes [pdf] | 3 (3.6 excluded) |
10/08 | Scheduling [pdf] | 6 (6.4 excluded); Paper 2 |
10/10 | Scheduling [pdf] | 6 (6.4 excluded); Paper 2 |
10/15 | Memory Management [pdf] | 8; Paper 4 (optional) |
10/17 | Virtual Memory 1 [pdf] | 8 |
10/22 | Virtual Memory 2 [pdf] | 9; Paper 3 |
10/24 | Virtual Memory 3 [pdf] | 9; Paper 3 |
10/29 | Virtual Memory 3 [pdf] | 9; Paper 5 |
10/31 | Midterm | Midterm |
11/05 | Virtual Machines [pdf] | 16 |
11/07 | Threads [pdf] | 4; Paper 6 |
11/12 | Thread Synchronization [pdf] | 5 and 6.4; Paper 7 |
11/14 | Synchronization II [pdf] | 9 |
11/19 | Deadlocks [pdf] | 7 |
11/21 | I/O [pdf] | 10, 13 |
11/26 | File Systems Interface [pdf] | 11 |
11/28 | Thanksgiving break | - |
12/03 | File systems Implementation [pdf] | 12; Paper 8 |
12/03 | Distributed Systems [pdf] | 16 |
12/05 | Research in Operating Systems | - |
12/11 | Final (Sample) | - |
Calendar
This calendar shows the dates for the course, including lectures, assignments, exams, etc.
Homework & Projects
Homework
There will be two kinds of homework assignments given throughout the class: reading assignments and textbook-style questions. You should have finished the assigned reading before coming to lecture. In addition, there will be a set of written homework assignments that must be done alone and turned in by midnight on the due date (see course policies below).
Homework | Out | In | Solution |
---|---|---|---|
1: Operating Systems and Processes | 09/26 | 10/10 | |
2: Memory Management and Virtual Memory | 10/17 | 10/29 | |
3: Threads and Synchronization | 11/07 | 11/18 | |
4: I/O and File Systems | 11/25 | 12/06 | -- |
5: Research in Operating Systems | 12/05 | 12/05 | -- |
To submit your homework solutions (ASCII text only!) use the following page: SUBMISSIONS.
Projects
As you can deduce from the allocation of weights for grading, programming projects make up a major portion of this class. There will be four (4) projects. All projects are to be done by teams of two to three (2-3) people. Team members should work cooperatively on the design, implementation, and testing of their solution.
The following table of deadlines should serve you as a guideline for planning your quarter. Note that the first project has two deadlines, the first one just a week after the project is assigned. After that, you are given about two weeks per project. This should be plenty of time if managed carefully. Keep in mind that projects cannot be handed in more than three days late (check the course late policy for details).
You can get a copy of the handout and skeleton for any of your projects here. The skeleton for any project would be available in the format blah.tar.gz. You should save (transfer) this file to your Unix box and run % gunzip blah.tar.gz and % tar xvf blah.tar, in that order. This will create a skeleton directory that will include the source code and makefile for the skeleton as well as the associated regression testing framework.
Info on the EECS Wilkinson and T labs.
To submit your projects use the following page: SUBMISSIONS.
Project | Out | In | Grade | News |
---|---|---|---|---|
Project 1: Tiny Shell | 09/25 | 10/18 | - | |
Project 2: Kernel Memory Allocator | 10/15 | 10/28 | 11/01 | - |
Project 3: Multi-threaded Server | 11/08 | 11/22 | 11/? | - |
Project 4: File System | 11/22 | 12/09 | 12/12 | - |
Materials
Textbook
- Operating System Concepts, 9th Ed., A. Silberschatz, P. Galvin and G. Gagne. John Wiley & Sons, 2012. (Textbook).
Reference Material
- Advanced Programming in the Unix Environment, R. Stevens, Addison-Wesley, 1992. A fantastic reference book for anyone writing programs that run under Unix (Highly recommended). There is also a nicely updated second edition out there.
- The Practice of Programming, Brian W. Kernighan and Rob Pike. Addison-Wesley, 1999. There is more to writing a program than getting the syntax right, fixing the bugs you have noticed, and making it run fast enough. Programs are read not only by computers but also by programmers. A well-written program is easier to understand, grade, and modify than a poorly-written one. This book is packed with great practical advice on style, design, interfaces, testing and debugging, maintenance, ...; all issues that programmers must deal with in the real world.
- The C Programming Language, 2nd Ed., B. W. Kernighan and D. M. Ritchie, Prentice Hall, 1988. ``The'' reference book.
- Chapter 12 Kernel Memory Allocation, In UNIX Internals: The new frontier, Uresh Vahalia, 1996. A nice presentation of KMA, algorithms and their evaluation.
- Concurrent Data Structures, Mark Moir and Nir Shavit, In Handbook of Data Structures and Applications, CRC Press, 2004. A useful reference, if a bit out-of-date, on concurrent data structures.
Reading List
A set of papers providing a deeper historical perspective of operating systems, in-depth treatment of some of the topics I can only briefly cover in class, and some useful practical advice in designing and implementing complex systems.
When reading papers it is normally useful to write down a summary of about a page. Your summary should include at least:
- Paper title and its author(s).
- Brief one-line summary.
- A paragraph of the most important ideas: perhaps a combination of their motivations, observations, interesting parts of the design, or clever parts of their implementation.
- A paragraph of the largest flaws; maybe an experiment was poorly designed or the main idea had a narrow scope or applicability. Being able to assess weaknesses as well as strengths is an important skill for this course and beyond.
- A last paragraph where you state the relevance of the ideas today, potential future research suggested by the article, etc.
You may find the following brochure useful: Efficient reading of papers in Science and Technology by Michael J. Hanson, 1990, revised 2000 Dylan McNamee.
- The nucleus of a multiprogramming system, Per Brinch Hansen, Communications of the ACM, April 1970. OS
- Lottery scheduling: Flexible proportional-share resource management, Carl Waldspurger and William Weihl, Proc. of First USENIX Symoium on Operating Systems Design and Implementation, November 1994. Processes and Scheduling
- Virtual Memory management in the VAX/VMS Operating System, H. Levy and P. Lipman, IEEE Computer, March 1982. (Optional)Memory Management
- The Slab Alloctor: An Object-Caching Kernell Memory Allocator, J. Bonwick, In Proc. of USENIX Summer, 1994. (Optional)Memory Management
- The Working Set Model for Program Behavior, Peter J. Denning, Proc. of the First ACM Symposium on Operating Systems Principles, October 1967. Memory Management
- Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism, Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska and Henry M. Levy, Proc. of the ACM Symposium on Operating Systems Principles, October 1991. Threads
- Experiences with Processes and Monitors in Mesa, Butler W. Lampson and David D. Redell, Communications of the ACM, 23(2):105-117, February 1980. Process Synchronization
- Design and implementation of the log-structured file system, Mendel Rosenblum and John Ousterhout, Proc. of the ACM Syposium on Operating Sytstems Principless, October 1991 File Systems
- Cells: A Virtual Mobile Smartphone Architecture, J. Andrus et al., Proc. of the ACM Syposium on Operating Systems Principless, October 2011
This is a must read. We will discuss this paper in our last day of classes.
Potentially useful links and tools
Here is a list of potentially useful links:
- Setup instructions for class Virtual Machine: here.
- Working with Unix/Linux.
- Peter Dinda's Unix Systems Programming In A Nutshell.
- Emacs/XEmacs -- while you can use whatever editor you like best, XEmacs has some useful libraries for C programming.
- A very nice, short tutorial from Remzi and Andrea Arpaci-Dusseau's book Laboratory: Tutorial
- C power:
- Learn C The Hard Way.
- C Programming.
- C Traps by A. Koenig.
- Writing Makefiles -- Peter Dinda's Make Introduction.
- gdb to the rescue -- a nice short tutorial.
- Pair programming and how to do it.
- Keeping track of changes with version control system software -- a short introduction to CVS.