Below is a week-by-week plan for the quarter (not yet finalized). The schedule may change to better balance course material. In the readings listed below, B&O is Computer Systems by Bryant and O'Hallaron; S&K is Principles of Computer System Design: An Introduction by Jerome H. Saltzer and M. Frans Kaashoek.

Week Monday Lecture Wednesday Lecture Friday Lecture Discussion Sections
1 June 24
1. Welcome to CS110
presentation:small Slides
youtube:small Lecture Video
book_1:small Reading: S&K Chapter 2 (especially 2.5)
document:small Handout: CS110 Course Information
document:small Handout: Essential C
document:small Handout: C++ Refresher
document:small Handout: C++ Paraphernalia
notepad:small Assignment 1 released

Introductions, course administration and expectations.

June 26
2. Filesystems, APIs, & System Calls
presentation:small Slides (v2)
youtube:small Lecture Video
book_1:small Reading: S&K Chapter 2 (especially 2.5) and B&O, Chapter 10 (Chapter 2 of the custom course reader), sections 1 - 4, 6 and 7.
code:small Code examples
document:small Handout: CS106B Style Guide

Introduction to Unix file systems. Review C and some UNIX/Linux libraries that offer us programmatic access to the file system.

June 28
3. Filesystem Layout & Assignment 1 Breakdown
presentation:small Slides (v2)
youtube:small Lecture Video
book_1:small Reading: S&K Chapter 2 (especially 2.5)
document:small Resource: Filesystem Demo
document:small Resource: Setting up AFS

How a filesystem is layered over raw hardware. Overview of the first assignment and exploration of a filesystem demo.

Lab 1
Filesystems & System Calls
document:small Lab 1
document:small Solution
2 July 1
4. Filesystems, Data Structures & System Calls
presentation:small Slides (v2)
youtube:small Lecture Video
book_1:small Reading: B&O, chapters 1 (section 7), 8 (sections 1 - 3) and 10 (section 8) of the full textbook.

We'll introduce multiprocessing: how open file sessions are maintained by the OS on a per-process basis and how system calls differ from traditional function calls.

July 3
5. Understanding fork
presentation:small Slides (v3)
youtube:small Lecture Video
book_1:small Continue Reading: B&O chapter 8 (section 4) of the full textbook. Chapter 8 is chapter 1 of the custom course reader.
notepad:small Assignment 1 due tomorrow at noon. NO LATE DAYS ALLOWED.
code:small Code examples

Today we will see how fork works. We'll then introduce the related function waitpid, which is used to synchronize multiple processes from a fork call.

July 5
6. execvp, Pipes, & Interprocess Communication
presentation:small Slides (v4)
youtube:small Lecture Video
book_1:small Reading: Roz's data flow blog post and B&O chapter 10 (sections 9 - 10) of the full textbook (chapter 10 is chapter 2 of the course reader).
code:small Code examples
notepad:small Assignment 2 released

We'll discuss execvp, which transforms processes to run a new executable instead of the one it inherited as part of the fork call. We'll work through the implementation of a tiny shell, much like the one you're using whenever you'll using Unix. We'll then introduce the notion of a pipe as a way to set up communication channels between multiple processes.

Lab 2
Multiprocessing Experimentation
notepad:small Lab 02
notepad:small Solution
Investigate the use of fork, execvp, and waitpid to build a command line utility called exargs. Understand how file descriptors and multiprocessing work together. Practice gdb and valgrind.
3 July 8
7. Signals, Signal Handlers, and Signal Blocks
presentation:small Slides (v3)
youtube:small Lecture Video
book_1:small Reading: B&O, Chapter 8, section 5. Chapter 8 is chapter 1 of the custom course reader.

We'll discuss signals, signal masks, signal blocking, and how they can be used properly to avoid concurrency issues. We'll start with a contrived example where code is technically capable of executing in an order we don't intend, and we'll use signal masks and blocking to fix the problem.

July 10
8. Race Conditions, Deadlock, and Data Integrity
presentation:small Slides
youtube:small Lecture Video
book_1:small Reading: B&O, Chapters 2 and 1 (in that order). Chapters 2 and 1 = Chapters 10 and 8 of the full textbook.
code:small Code

We'll work through some improvements to a simplesh program. We will discuss some subtle yet interesting race conditions that can lead to a state called deadlock, where a process seemingly freezes. We will also talk about how to properly use signal handlers to clean up all children.

July 12
9. Multiprocessing Review
presentation:small Slides (v2)
youtube:small Lecture Video
notepad:small Assignment 2 due at midnight
notepad:small Assignment 3 released

We'll spend time reviewing some multiprocessing concepts so we can transition to a new topic next week: threads. We'll also go over assignment 2's farm in more detail so everyone understands the reasons behind certain things that need to happen.

Lab 3
Parallel Programming
notepad:small Lab 03
notepad:small Solution

We'll explore a parallel implementation of mergesort so you understand its architecture and ultimately believe that it works. You'll also work through a collection of short answer questions to solidify your understanding of process scheduling.

4 July 15
10. Virtual Memory & Threads
presentation:small Slides
youtube:small Lecture Video
book_1:small Reading: B&O, Chapter 9: Virtual Memory (skim sections 1-5 and 8); Chapter 12 (sections 1, 3, and 4). Chapter 12 refers to Chapter 4 of the custom course reader.
code:small C Code
code:small C++ Code

We'll discuss virtual memory, mutlithreading, and the types of concurrency issues that sometimes present themselves because multiple threads are running within a process at the same time. We'll start with C threads and then transition to C++ threads.

July 17
11. More on Threads
presentation:small Slides
youtube:small Lecture Video
book_1:small Reading: B&O, Chapter 12, sections 1, 3, and 4 (skip section 2). Chapter 12 refers to Chapter 4 of the custom course reader.
code:small C++ Code

We'll see how the mutex can be used to mark the boundaries of critical regions so that at most one thread is within it at any one moment.

July 19
12. Midterm Review
presentation:small Slides
youtube:small Lecture Video
notepad:small Assignment 3 due tomorrow at midnight

We'll review material for the midterm.

Lab 4
assign2 Redux & Threads
notepad:small Lab 04
notepad:small Solution

We'd like to spend this week's lab reviewing everything about Assignment 2 that made it challenging. We'll also review multithreading.

5 July 22
13. Threads, Condition Variables, Semaphores
book_1:small Reading: B&O, Chapter 12, sections 1, 3, and 4 (skip section 2). Chapter 12 refers to Chapter 4 of the custom course reader.
code:small Code

We'll review a new example—the dining philosophers simulation—to illustrate how a system can arrive at deadlock and forever starve all threads of from CPU time. That'll be our opportunity to introduce the condition variable and the semaphore as a means of preventing deadlock from ever happening. I'll then move on to a few different inter-thread communication patterns you've not seen prior.

notepad:small Assignment 4 will be released tomorrow
MIDTERM EXAM TOMORROW
calendar_ok:small Tuesday July 23rd
alarm:small 6 pm - 8 pm
map:small Hewlett 201
July 24
14. Ice Cream Store Simulation
book_1:small Reading: B&O, Chapter 12, sections 1, 3, and 4 (skip section 2). Chapter 12 refers to Chapter 4 of the custom course reader.

We'll finish up the final implementation of the myth-buster example from the last lecture before moving on to one huge multithreaded simulation that brings in every single concurrency pattern and relies on virtually every concurrency directive we're learned. This final example is so large that it comes with its very own handout

July 26
15. Introduction to Networking
book_1:small Reading: B&O, Chapter 11 and chapter 12, section 2. Chapter 11 refers to Chapter 3 of the custom course reader. Chapter 12 refers to Chapter 4 of the custom course reader.

After a bit of multithreading wrapup, we'll move on to formally introduce networking, the client-server idiom, request-response, and argue why a network connection is little more than a bidirectional pipe between processes on different machines.

Lab 5
rwlocks and Hello Servers

We'll work through the implementation of a rwlock class, which is like a traditional mutex, except that it allows multiple threads to be in a critical region, provided none of them need to change any shared data structures. Once we work through those, we'll tinker with a simple server and exploit the fact that server sockets and client sockets are internally managed as descriptors.

6 July 29
16. Networking, Clients
book_1:small Reading: B&O, Chapter 11 and chapter 12, section 2. Chapter 11 refers to Chapter 3 of the custom course reader. Chapter 12 refers to Chapter 4 of the custom course reader.
notepad:small Assignment 4 due tomorrow at midnight
notepad:small Assignment 5 will be released tomorrow

We are going to move from implementing our first client into an emulation of the wget utility that downloads web pages from the Internet. We are then going to move on to building an API server using threads and processes.

July 31
17. Network System Calls
book_1:small Reading: B&O, Chapter 11 and chapter 12, section 2. Chapter 11 refers to Chapter 3 of the custom course reader. Chapter 12 refers to Chapter 4 of the custom course reader.

We will provide an overview of networking and explain why it's really just a distributed form of function call and return. We'll then speak a bit about HTTP to the extent we need it for the next assignment. We'll discuss the various data structures, system calls, and Linux library functions needed to implement createClientSocket and createServerSocket.

August 2
18. HTTP Web Proxy Discussion
book_1:small Reading: B&O, Chapter 11 and chapter 12, section 2. Chapter 11 refers to Chapter 3 of the custom course reader. Chapter 12 refers to Chapter 4 of the custom course reader.

We'll talk more about your HTTP Web Proxy and Cache assignment.

Lab 6
ThreadPool & Networking

We'll go over some nuances of any operational ThreadPool implementation. And then we'll implement a collection of simple servers.

7 August 5
19. MapReduce
notepad:small Assignment 5 due tomorrow at midnight
notepad:small Assignment 6 will be released tomorrow

We'll discuss the MapReduce algorithm, and then discuss your final assignment, which is to implement MapReduce. MapReduce relies on every major topic we've relied on this quarter.

August 7
20.

Coming soon.

August 9
21. Non-blocking I/O

Today, we'll introduce the idea of I/O event-driven programming and how it can be used to complement nonblocking I/O techniques. Linux provides I/O event detection facilities via its epoll (short for event polling) library.

Lab
proxy Redux

We'll discuss aspects of the HTTP proxy you built for us this past week, and how things could have been implemented differently. This is the last week of section!

8 August 12
22.
notepad:small Assignment 6 due tomorrow at midnight.
NO LATE DAYS ALLOWED.


Coming soon.

August 14
23. Course Recap & Final Exam Review

Last day of class. Today we'll embark on a recap of all of the general systems design principles we've been exposed to over the course of the quarter and try to make it clear that a system's design is often more intellectually captivating than its implementation. We'll also review material for the final exam.

August 16
FINAL EXAM TODAY
alarm:small 12:15 - 3:15 pm
map:small Hewlett 201

Alternate Final Exam
alarm:small Saturday, Aug. 17, 12:15 - 3:15 pm
map:small Hewlett 201

Practice exams coming soon.

Lab
No lab this week.