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 2
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 3
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 (v2)
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 4
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
No lecture today
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.

No lecture today. Happy studying!

MIDTERM EXAM TOMORROW
calendar_ok:small Tuesday July 23rd
alarm:small 6 pm - 8 pm
map:small Hewlett 201
July 24
13. Threads, Condition Variables, Semaphores
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 Code
notepad:small Assignment 4 released

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.

July 26
14. Multithreading Wrap-Up
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 Code

I'll discuss a few different inter-thread communication patterns and then review some midterm questions.

Lab 5
Ice Cream Store Simulation
code:small Code

We'll review 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.
6 July 29
15. Introduction To Networking
presentation:small Slides
youtube:small Lecture Video
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.
code:small Code

We'll 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. We are going to move from implementing our first client into an emulation of the wget utility that downloads web pages from the Internet.

July 31
16. Network System Calls
presentation:small Slides
youtube:small Lecture Video
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.
code:small Code
notepad:small Assignment 4 due tonight at midnight
notepad:small Assignment 5 will be released tomorrow

We are going to build an API server using threads and processes. 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
17. HTTP Web Proxy Discussion
presentation:small Slides (ignore version 4 and mapreduce slides at the end)
youtube:small Lecture Video
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 about your HTTP Web Proxy and Cache assignment.

Lab 6
ThreadPool & Networking
notepad:small Lab 6
notepad:small Solution

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

7 August 5
No Lecture Today

Happy studying!

August 7
18. Non-blocking I/O
presentation:small Slides
youtube:small Lecture Video
code:small Code
notepad:small Assignment 5 due tonight
notepad:small Assignment 6 will be released tomorrow night

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.

August 9
19. Course Recap + MapReduce
presentation:small Principles of System Design Slides
presentation:small MapReduce Slides
youtube:small Lecture Video
book_1:small MapReduce diagram
code:small Code

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 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.

Lab
proxy Redux
notepad:small Lab 7
notepad:small Solution

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
No lecture today

Exam review session tomorrow at 3:30 in Gates B01. Video here

presentation:small Review slides

August 14
No lecture today
notepad:small Assignment 6 due tomorrow night at midnight.
NO LATE DAYS ALLOWED.


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 handout

Lab
No lab this week.