CS 154, Fall 2010: Operating Systems

Instructor: Professor Gabriel Parmer
Office hours: Tuesday 2-4pm
gparmer at gwu
Class Schedule: Tuesday/Thursday 12:45-2:00pm, Tompkins 205

Lab (required attendance): Thursday 6:10-8:00pm, Tompkins 211
TA: Jiguo Song (jiguos at gwu), office hours: Tuesday 10:30-11:30am, Wednesday 10:30-11:30

This course covers the fundamental concepts of operating systems, focusing on resource management and abstraction. This includes OS structure, processes and thread management, communication with peripherals (I/O), synchronization, deadlocks, memory management, virtual memory, file systems, networking (sockets and protocols), and distributed systems.

The workload for this class is heavy and is quite programming intensive.

  • 8/31/10: First day of class. Excitement!
  • 9/17/10: Written homework 1, due 9/28 at 11:59pm
  • 9/23/10: Problem 1 in HW1 has been clarified. Please re-download the file.
  • 10/12/10: As discussed in class, the midterm will be on 10/21/10.
  • 10/12/10: Written homework 2, due 10/19 at 12:30pm. Please note the late policy in the writeup: No late work will be accepted.
  • 10/25/10: Please read the specification for the final projects for this class. You have deadlines soon (i.e. on Wed!)
  • 11/30/10: Written homework 3, due 12/13 at 11:59pm. Please note the late policy in the writeup: No late work will be accepted.
  • 12/16/10: Written exercise 4, I post this as a study aid. This is not due, and you will get no credit for doing it. It may help you study for the last lectures of the class. You can pick up answers for it on Monday 12/20 between 11am and 2pm in my office (720E) if you wish. Additionally, you can pick up the answers for whw3 on Friday 12/17 between 11am-2pm.

Please click on any section to see its contents.

Objectives and Structure

Objectives - In completing this class, students will...
  • understand key concepts involving system resource management, organization, and abstraction
  • understand how an OS manages and interfaces with hardware
  • understand fundamental trade-offs integral to system design
  • experience both development and experimentation in a real OS
Structure - This class is broken into two main activities: lectures and lab.
  • Lectures will discuss the main concepts in systems with reference to implementation details where beneficial. A series of written homeworks and exams (midterm and final) test student's understanding of the lecture's concepts.
  • Labs will help you jump into the Linux kernel and learn how to write and understand code in key subsystems. You will have programming assignments related to lab lectures throughout the semester. In the second half of the class, you will have a large group project involving kernel programming.

Course Prerequisites and Student Responsibilities

  • CS 135, 143
  • Assignments for this class will be done in C, and will require kernel-level programming. Though we do not assume that you have kernel experience, if you aren't somewhat comfortable with C, you will have a very difficult time. Thus, a familiarity with C or a willingness to quickly learn and practice it is required.
Responsibilities - Students must
  1. Attend all classes unless you are sick or there is an emergency.
  2. Interact, ask questions, and generally participate in class discussions.
  3. Attend all labs, and do work assigned therein.
  4. Complete programming problems assigned in lab, and all written assignments individually.
  5. Work productively as a group on an extended and difficult project.

Course Material

Required Text:

  • Operating Systems Concepts, 8th edition, by Silberschatz, Galvin, and Gagne
If you have trouble understanding the Linux source code, I recommend the following books:
  • Linux Kernel Development by Robert Love
  • Professional Linux Kernel Architecture by Wolfgang Mauerer (free pdf should be available)
For kernel development, we will be using VMWare. If you can't install it on your home computer and want to, contact me.

If you're having trouble with C, a good short refresher/introduction is Nick Parlante's Essential C (reproduced from here).


Events are in bold. Note that this schedule is subject to change.

8/31, 9/2 Introduction and OS fundamentals
  • Definitions, Computer Architecture, OS History, OS Structure

Chapter 1,2
9/7, 9/9 Processes, Inter-Process Communcation, Threads
  • Address spaces, I/O, Isolation, and Run-states
Chapter 3, 4
9/14, 9/16 CPU Scheduling and Synchronization
  • Scheduling Mechanisms, Algorithms, and Evaluation. Critical Sections and how they are provided
Chapter 5, 6, 19
9/21, 9/23, 9/28 Synchronization Cont. and Deadlock
  • Semaphores/Monitors, Deadlock conditions and Solutions
Chapter 6, 7
9/30 Memory Management
  • Allocation Algorithms
Chapter 8
10/5, 10/7, 10/12 Paging and Virtual Memory
  • Segmentation, Address Translation, Demand Paging, Page Replacement Algorithms, Thrashing
Chapter 9
10/14 Midterm N/A
10/19, 10/21, 10/26, 10/28 File-Systems and Storage I/O
  • File-System API, Rotating Storage, File-System Layout, Block Device Scheduling
Chapter 10, 11, 12, 13
11/2, 11/4 The Networking Stack
  • IP, UDP/TCP, Socket API, Device Drivers, DMA
Chapter 16
11/9, 11/11, 11/16 Distributed Coordination
  • Consistency/Event Ordering, Synchronization, Election Algorithms
Chapter 18
11/18, 11/23 Spare Days
11/24-11/28 Thanksgiving Break N/A
11/30 Protection and Security
  • Fault tolerance, Access control, Security policies
Chapter 14
12/2 Course Reflection N/A
??? Final Exam N/A


  • 8/31/10 - Class Introduction, OS definition and history [pdf]
  • 9/2/10 - 9/7/10 - System Architecture and Structure [pdf]
  • 9/7/10 - Processes [pdf]
  • 9/9/10 - Threads and Communication [pdf]
  • 9/14/10 - 9/16/10 - Scheduling I [pdf]
  • 9/21/10 - Real-Time Scheduling [pdf]
  • 9/23/10 - 9/30/10 - Synchronization [pdf]
  • 10/4/10 - Deadlocks [pdf]
  • 10/6/10 - Memory Management [pdf]
  • 10/12/10 - 10/14/10 - Memory Management II [pdf]
  • 11/2/10 - Virtual Memory I [pdf]
  • 11/4/10 - Virtual Memory II [pdf]
  • 11/9/10 - 11/11/10 - File Systems I [pdf]
  • 11/11/10 - 11/16/10 - File Systems II [pdf]
  • 11/18/10 - Disk Scheduling [pdf]
  • 11/23/10 - 11/30/10 - Distributed Systems: Networking [pdf]
  • 12/03/10 - Distributed Systems [pdf]
  • 12/09/10 - Protection [pdf]


Grades will be assigned with the following proportions:

Homeworks and Quizes: 50%
Midterm: 20%
Final: 20%
Class and Lab Participation: 10%

Homeworks include smaller programming assignment, written responses, and a long final programming project.

Participation will be graded not only on attendance (50%), but also on interactivity and involvement (50%).

Late Policy:

  • 66% credit: up to 24 hours late
  • 33% credit: up to 48 hours late
  • 0% credit: later than that
Because homeworks are every week, or every other week, it is too harmful to get behind on them. Thus the late policy is quite strict to discourage procrastination.

Academic Honesty

Just as you can do a google search for code online, it is trivial for us to do the same. We have caught numerous people cheating in the past in this way. If you feel pressured about an assignment, please come see me instead of cheating.

You are not allowed to collaborate on the homeworks and the lab assignments. The group projects require collaboration amidst each group, but no collaboration between teams is permitted. Please refer to the academic integrity policy linked from the course web page. This policy will be strictly enforced. If you're having significant trouble with an assignment, please contact me.
Academic Integrity Policy
Credit: I'd like to thank Prof. Narahari for the first versions of this academic honesty policy.

Additional Material

If you're interested in Composite, the OS we are developing here at GW, don't hesitate to contact me.

In addition to the contents of the class, what follows is a list of resources that will allow you to go beyond what you've learned. This material is not mandatory for the class and is meant to give you a springboard if you wish to pursue the ideas further. Many of these are blog posts or articles for easy reading. However, because of the informal format, please take the contents with a grain of salt. I can point you to more thorough content if you want it. If you find an website/article/tool that you think is worthy of being in this list, let me know.

Websites geared toward systems topics (or that have subsections on systems):

  • Linux Weekly News: Free content is that which is at least a week old.
  • Two brilliant classes on microkernel construction.
  • Arstechnica: geek news, often with a high-level overview of systems/architectural topics.
  • OKLabs videos. A microkernel company. Specifically, see the series titled, "Advanced OS with Gernot Heiser".
  • OSDev Wiki: the resource on practical OS construction and hardware manipulation.
  • Agner's blog: What's happening in those processors of ours? See more architecture discussions at real world tech.

Blogs and articles:

Really. cool. tools:

  • DynamoRIO: Because it rocks to modify a program as its executing.
  • SQLite: a small, well written, data-base. Use it, read it, and be merry.
  • Lua: a tiny language with a runtime of about 10K LOC. If you want to know what a language does under the wraps, here's a good place to find out (just ignore some of the syntax oddities).
  • Valgrind: Ever wonder what your program's been doing in its spare time? This will tell you. Required for debugging large C/C++ programs.
  • LLVM: A beautiful compiler backend. If you want to write a language, this will make your life so much easier.
  • FUSE: Want to write a file-system, but aren't sure about all of that kernel programming? And what if you need to use high-level libraries? No problem; do it is user-space!
  • Daikon: Because who doesn't want to use machine learning to infer their own program's behavior?