Course Calendar
Week | Monday | Wednesday | Friday (or Lab Th/Fr) | |
---|---|---|---|---|
1 | January 6 1. Welcome to CS110 / Intro to Filesystems notepad:small Assignment 1 released (Tuesday) (due: 1/15, midnight)
presentation:small Slides, [PDF] document:small Handout: CS110 Course Syllabus book_1:small Reading: Skim S & K Chapter 2 Introductions, course administration and expectations. We will introduce Unix file systesms today, as well. |
January 8 2. File Systems, APIs, and System Calls presentation:small Slides, [PDF] code:small Code (lambdas) code:small Code (file systems) We need to invest some time learning about some C and some UNIX/Linux libraries that offer us programmatic access to the file system. There are a few data structures and a collection of Linux library functions that allow us to crawl over the tree of files and directories, and there are even more functions that grant us raw, low-level access to the file contents. We'll invest some time discussing these functions and data structures—enough that we can implement a collection of obvious and not-so-obvious programs that emulate some of the terminal/shell builtins you've been using your entire UNIX lives. |
January 10 3. (Lecture) More on Filesystems APIs presentation:small Slides, [PDF] book_1:small Reading: S & K Chapter 2 We'll work through a few more UNIX Filesystem API examples before advancing on to a discussion of how the raw hardware of a disk is leveraged to look like the filesystem you've taken for granted for the entirety of your UNIX and programming careers. Our hope is that by the end of the day you'll have gained a familiarity with the filesystem APIs and begin to understand how filesystems work under the hood. |
|
2 | January 13 4. Filesystems Data Structures and System Calls presentation:small Slides, [PDF] book_1:small Reading: Begin Bryant & O'Hallaron, Chapters 2 and 1 (in that order). Chapters 2 and 1 correspond to Chapters 10 and 8 of the full textbook. code:small Code We need to work through the rest of our discussion of how a filesystem is layered over raw hardware. We started to explain how basic files—be they text files, audio files, executable images, etc— are segmented into blocked and distributed across free sectors of the hardware. We need to advance that discussion to be clear how filesystem supplorts the notion of a directory, and how an absolute path name like /usr/class/cs110/WWW/index.html can be parsed and translated to an inode number, which is the location within the inode table that stores metainformation about that file and where all of its payload blocks live.We'll then discuss a few things as a way of transitioning to multiprocessing: how open file sessions are maintained by the OS on a per-process basis, and how system calls differ from traditional function calls. And time permitting, we'll introduce a new system call that's used to spawn new processes. |
January 15 5. Understanding execvp presentation:small Slides, [PDF] book_1:small Reading: Begin: Bryant & O'Hallaron, Chapters 2 and 1 (in that order). Chapters 2 and 1 correspond to Chapters 10 and 8 of the full textbook. code:small Code notepad:small Assignment 2 released (due 1/23, midnight)
This past Monday we introduced |
January 16/17 Lab / Discussion 01. File System Experimentation notepad:small Lab 01: File Systems and System Calls (solution)
Your first lab will have you discuss the various ways you can exploit a file system design to implement other functions. You'll also get a chance to play with the |
|
3 | January 20 No class -- Martin Luther King, Jr., Day |
January 22 6. execvp , Pipes, Interprocess Communicationpresentation:small Slides, [PDF] book_1:small Reading: Continue Reading: Bryant & O'Hallaron, Chapters 2 and 1 (in that order). Chapters 2 and 1 correspond to Chapters 10 and 8 of the full textbook. code:small Code Last time, we introduced execvp as the one system call that reboots a process to execute the main function of a new executable. We need to advance that discussion today by working 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.
|
January 23/24 notepad:small (Thursday) Assignment 3 released (due 2/2, midnight) (Overview Video)
Lab / Discussion 02: Multiprocessing Experimentation notepad:small Lab 02 Solution
This week we'll investigate the use of
The lab handout includes a collection of laptop exercises to elevate your |
|
4 | January 27 7. Signals, Signal Handlers, and Signal Blocks presentation:small Slides, [PDF] book_1:small Reading: Begin: Bryant & O'Hallaron, Chapters 2 and 1 (in that order). Chapters 2 and 1 correspond to Chapters 10 and 8 of the full textbook. code:small Code We need to discuss 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. We'll then advance to work through a series of improvements to the simplesh program that we wrote last time.
|
January 29 8. Race Conditions, Deadlock, and Data Integrity presentation:small Slides, [PDF] book_1:small Reading: Begin: Bryant & O'Hallaron, Chapters 2 and 1 (in that order). Chapters 2 and 1 correspond to Chapters 10 and 8 of the full textbook. code:small Code 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. |
January 30/31 Lab / Discussion 03: Parallel Programming notepad:small Lab 03: Parallel Processing notepad:small Lab 03 Solution We'd like you to spend the 80 minutes studying a parallel implementation of mergesort so you understand its architecture and ultimately believe that it works. Time permitting, we'd like you to work through a collection of short answer questions to solidify your understanding of virtual memory and process scheduling. |
|
5 | February 3 9. Introduction to Threads notepad:small Assignment 4 released (due 2/12, 11:59PM)
presentation:small Slides, [PDF] We'll then move on to our discussion of mutlithreading and begin to work through the lecture examples We've provided today. |
February 5 10. Threads and Mutexes Midterm Information presentation:small Slides, [PDF] book_1:small Reading: Continue reading: Bryant & O'Hallaron, Chapters 4, skipping section 4.2. Chapter 4 refers to Chapter 12 of the full textbook. code:small Code We started in on threading last time, and we need to continue talking about it by working through a collection of introductory examples that illustrate how threads work and the types of concurrency issues that sometimes present themselves because multiple threads are running within a process at the same time.
|
February 6/7 Lab / Discussion 04: assign3 Redux, Threads notepad:small Lab 04: assign3 Redux, Threadsnotepad:small Lab 04 Solution We'd like to spend this week's lab reviewing everything about Assignment 3 that made it challenging. By now, you're well aware how difficult multiprocessing and concurrency can be, and we want to take time to review some of the most important concepts. Problem 1 has you revisit those programs and work through why they needed to be written the way they were. The remaining three questions all deal with multithreading. We think all three questions are instructive, but it's probably more important to work through problems 2 and 3. Problem 4 is a coding question, and that can be managed independently, outside of lab time. |
|
6 | February 10 11. Threads, Condition Variables, Semaphores presentation:small Slides, [PDF] book_1:small Reading: Continue reading: Bryant & O'Hallaron, Chapters 4, skipping section 4.2. Chapter 4 refers to Chapter 12 of the full textbook. code:small Code We need to finish up the image processing example from this past Monday and understand 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.We'll then move on to 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. |
February 12 12. Semaphores and Multithreading Design Patterns notepad:small Assignment 5 released (due 2/22, 11:59PM)
presentation:small Slides, [PDF] |
February 14 Midterm Exam, In class
|
|
7 | February 17 No class -- Presidents' Day |
February 19 13. More Threading Examples presentation:small Slides, [PDF] book_1:small Reading: Finish Reading: Bryant & O'Hallaron, Chapters 4, skipping section 4.2. Chapter 4 refers to Chapter 12 of the full textbook. Today we will talk more about common multithreading patterns, including an in-depth ice cream store example. |
February 21 notepad:small Assignment 6 released (due 2/29, 11:59PM)
Lab / Discussion 05: notepad:small Lab 05 Solution
We'll work through the implementation of a Once we work through that, we'll move on to another threading construct, called an Event Barrier, for modeling lifting a barrier for threads to continue. |
|
8 | February 24 14. Introduction to Networking presentation:small Slides, [PDF] book_1:small Reading: Continue Reading: Bryant & O'Hallaron, Chapter 3 and Section 4.2. Chapter 3 of the reader corresponds to Chapter 11 of the full textbook. code:small Code 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. |
February 26 15. API Servers presentation:small Slides, [PDF] book_1:small Reading: Continue Reading: Bryant & O'Hallaron, Chapter 3 and Section 4.2. Chapter 3 of the reader corresponds to Chapter 11 of the full textbook. code:small Code We are going to spend some time on to building an API server using threads and processes. We will then dig deeper into some network system calls. |
February 28 Lab / Discussion 06: Networking notepad:small Assignment 7 released (due 3/6, 11:59PM) notepad:small Lab 06: Networking notepad:small Lab 06 Solution This week's lab will invest some time understanding more about networking. And then we'll work together to implement a collection of simple servers. |
|
9 | March 2 16. Network System Calls presentation:small Slides, [PDF] book_1:small Reading: Finish Reading: Bryant & O'Hallaron, Chapter 3 and Section 4.2. Chapter 3 of the reader corresponds to Chapter 11 of the full textbook. code:small Code We'll advance on to discuss the various data structures, system calls, and Linux library functions needed to implement createClientSocket and createServerSocket. We'll also give an overview of Assignment 7. |
March 4 17. Overview of MapReduce presentation:small Slides, [PDF] book_1:small Reading: Finish Reading: Bryant & O'Hallaron, Chapter 3 and Section 4.2. Chapter 3 of the reader corresponds to Chapter 11 of the full textbook. code:small Code we'll pivot in a short overview of how MapReduce works. We do so because it's an easily described distributed system that relies on every major topic we've relied on this quarter, and it's a huge victory to fully understand how something like this can be implemented using everything you've learned in CS110. MapReduce is your final assignment, and we want you to be prepared to tackle it, as well. |
March 6 Lab / Discussion 07: ThreadPool and Proxy notepad:small Lab 07: ThreadPool and Proxy notepad:small Assignment 8 released (not graded) notepad:small Lab 07 Solution We'll spend some time talking about aspects of the ThreadPool assignment and the Proxy assignment, specifically how things for the proxy could have been implemented differently. This is the last week of section! |
|
10 | March 9 18. Principles of System Design presentation:small Slides, [PDF], Screencast 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. |
March 11 No Lecture notepad:small CS110 Final Exam Information
|
March 13 No Lecture |
|
-- | March 18 Final Exam calendar_ok:small Wed. March 18 alarm:small 3:30pm-6:30pm map:small Location: TBA
|
Icons by Piotr Kwiatkowski