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 programming intensive.
- 8/29: First day of class. We so excited! Fun, fun, fun, fun!
(Note, first class is not on Friday.)
- 10/6: Midterm will be on 10/20.
- 10/6: Final is on Tues, Dec 20th, 12:40-2:40
- 10/25: Final project
- 12/13: The practice
homework is available.
Please click on any section below 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
- experience both development and experimentation in a real
Structure - This class is broken into two main activities: lectures
- 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
- Attend all classes unless you are sick or there is an emergency.
- Interact, ask questions, and generally participate in class discussions.
- Attend all labs, and do work assigned therein.
- Complete programming problems assigned in lab, and all written
- Work productively as a group on an extended and difficult project.
- 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, here is a list of references:
It is your responsibility to get up to speed in C, so please use
Once you are more advanced in C, it will be useful to read the
style guide for Composite, our research OS here at GWU.
Events are in bold. Note that this schedule is subject
Introduction and OS fundamentals
- Definitions, Computer Architecture, OS History, OS Structure
Processes, Inter-Process Communcation, Threads
- Address spaces, I/O, Isolation, and Run-states
|Chapter 3, 4|
CPU Scheduling and Synchronization
- Scheduling Mechanisms, Algorithms, and Evaluation. Critical
Sections and how they are provided
|Chapter 5, 6, 19|
|9/20, 9/22, 9/27||
Synchronization Cont. and Deadlock
- Semaphores/Monitors, Deadlock conditions and Solutions
|Chapter 6, 7|
|10/4, 10/6, 10||
Paging and Virtual Memory
- Segmentation, Address Translation, Demand Paging, Page
Replacement Algorithms, Thrashing
File-Systems and Storage I/O
- File-System API, Rotating Storage, File-System Layout, Block Device Scheduling
|Chapter 10, 11, 12, 13|
The Networking Stack
- IP, UDP/TCP, Socket API, Device Drivers, DMA
|11/8, 11/10, 11/15||
- Consistency/Event Ordering, Synchronization, Election Algorithms
Protection and Security
- Fault tolerance, Access control, Security policies
- 8/30 - Class Introduction, OS definition and history
- 9/1, 9/6 - System Architecture and Structure
- 9/8 - Structure and Processes [pdf]
- 9/15 - 9/19 - Threads and Communication [pdf]
- 9/20 - 9/12 - Scheduling I [pdf]
- 9/27 - Real-Time Scheduling [pdf]
- 9/29 - 10/11 Synchronization [pdf]
- 10/13 - 10/18 Deadlocks [pdf]
- Memory Management I [pdf]
- Memory Management II[pdf]
- Virtual Memory [pdf]
- Virtual Memory II [pdf]
- File System API[pdf]
- File System Implementation [pdf]
- I/O Scheduling [pdf]
- Protection [pdf]
- Summary [pdf]
Grades will be assigned with the following proportions:
Homeworks and Quizes: 50%
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%).
- 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.
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.
Credit: I'd like to thank Prof. Narahari for the first versions of
this academic honesty policy.
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
- Linux Weekly News:
Free content is that which is at least a week old (see the
- Two brilliant
on microkernel construction.
- Arstechnica: geek news, often
with a high-level overview of systems/architectural topics.
videos. A microkernel company. Specifically, see the series
titled, "Advanced OS with Gernot Heiser".
- OSDev Wiki:
the resource on practical OS construction and hardware
- Agner's blog:
What's happening in those processors of ours? See more
architecture discussions at real world tech.
- From low-level embedded system hacking, to robotics, to
Blogs and articles (remember that these are not authoritative sources!):
- On binaries and understanding process layout: A
Whirlwind Tutorial on Creating Really Teensy ELF Executables for
Linux, and playing
- On memory
look at how malloc works on the Mac, and memory allocation
- On transactional memory (a synchronization mechanism):A
(brief) retrospective on transactional memory
- Concurrency via events or threads? Why
And how do you provide
- A great email
about efficient IPC implementation.
- What every programmer should know about memory.
Seriously. He's not kidding. Read this. And look at the
- Like file systems? Get some history.
- Higher-level description of a modern filesystem, ZFS
- On the hardware manipulations necessary to boot an OS: Roll your own
toy UNIX-clone OS.
- A simple UNIX clone: xv6.
- Correct use of virtual memory: You're Doing
- Intricacies of
...and you thought C was simple.
- How do they build the large-scale distributed systems at
- A history of networking physical level
and a great history
- Interface design is difficult. Where did UNIX get it wrong? Must read for
anyone thinking about designing an interface.
- On the
Brokenness of File Locking, or
interface design matters".
- A great resource
- Browsers don't do magic either! They are just
very, very, very
- Why low-level
programming matters even if you don't plan on doing it in
- Premature optimization may be
the root of
all evil. But
how to do it is essential.
- Coding style matters. Read how others have decided on a
- Reasonable lists
publications that have defined computing as we know it.
Really. cool. tools:
- DynamoRIO: Because it rocks
to modify a program as it's 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!
Because who doesn't want to use machine learning to infer their
own program's behavior?
- More powerful link-time
- A great C library for simple machine learning operations such