This course ended on
December 15, 2016

CPSC 431: Operating Systems

   Department of Mathematics and Computer Science
   Hobart and William Smith Colleges

   Fall 2016.

   Instructor:  David J. Eck  (

   Course Handout:

   Monday, Wednesday, Friday, 12:20–1:15 PM
       Coxe 7.
       (Some class meetings will be in Rosenberg 009.)

Labs / Assignments
September 5, 2016
Lab 1: C and gdb
September 12, 2016
Lab 2: Memory Management
September 19, 2016
Lab 3: Fork, Exec, Pipe, Files
October 3, 2016
Lab 4: Pintos Sleep
Assignment 5:
Pintos Scheduling
November 7, 2016
Lab 6: Basic Paging
Assignment 7: More Advanced Paging

First Week: August 29 and 31; September 2

Welcome to the course!

We will start the course with an introduction and an overview of operating systems. You can read Chapter 1 from the textbook if you like, but since it's mostly vague generalities, the reading is optional. I will offer my own vague generalities in class. (Knowing something about the history of operating systems, Section 1.3, might be useful.)

You should definitely start reading Chapter 2. Read as much of Sections 2.1 through 2.4 as you can before Wednesday. This is fundamental material.

Just as important, perhaps, we will spend Friday going over the C programming language, especially the parts most relavant to the programming that you will do in the course. You should read the handout on C and the handout on gdb. We will meet next Monday (September 5) in Rosenberg 009 for a lab on C programming and debugging.

Second Week: September 5, 7, and 9

On Monday, we meet in Rosenberg 009 for our first lab.

On Wednesday, we will be working more systematically on Chapter 2, Sections 1 through 4. If you have not already read those sections, you should read them before Wednesday. We will probably continue that discussion on Friday, and then move on to later sections in Chapter 2. You should read Sections 2.5 through 2.8 by Friday. (But you don't need to worry about the details of the x86 architecture in Section 2.5.)

Third Week: September 12, 14, and 16

On Monday, we meet in Rosenberg 009 for our second lab.

For Wednesday, you should finish reading Chapter 2. We have already read the most interesting parts, but it's nice to know something about how a computer boots (Section 2.9) and how virtual machines word (Section 2.10).

For Friday, you should read Section 3.1 and 3.2, which cover some of the typical API for creating processes and for accessing the file system. The lab next week will include some programming with pipes, fork and wait, and perhaps some work with files. We will look at some C programming examples, which can be found in /classes/cs431/fork-and-pipe-examples.

Fourth Week: September 19, 21, and 23

Because C is such an unintuitive language, the schedule for turning in labs has been extended. Lab 2 is now due this Friday, September 23. And Lab 3 is due next Friday, September 30. We will not meet in Rosenberg 009 next Monday, September 26; instead, we will have a regular class.

There is also a short homework assignment due next Monday, September 26.

On Friday, we will be starting Chapter 4, which is also the start of Part 2 of the textbook. Chapter 4 is an overview of threads and how they are implemented. We will not spend much time on it. You should definitely read Sections 4.2 through 4.6. The other sections in Chapter 4 are optional.

Fifth Week: September 26, 28, and 30

This week will continue with Chapter 4 and get a start on Chapter 5. Chapter 5 covers the use of locks and condition variables for synchronizing access to shared data. The required reading will include at least Sections 5.2 to 5.4. We will also have a discussion about where to go with the labs and programming assignments for this course.

The homework assignment that was scheduled to be due on Monday is now due on Wednesday, September 28. Lab 3 is still due on Friday, but might be moved to next Monday.

Sixth Week: October 3, 5, and 7

We are working on Chapter 5, which covers synchronizing access to shared data using lock and condition variables. The required reading is Section 5.2, 5.3, 5.4, and 5.7.

On Monday, October 3, we will be in Rosenberg for Lab 4. This lab includes the first assignment using the Pintos Operating System.

There is a test coming up next week on Friday, October 14. The test will cover through Chapter 5. There could be some questions about C programming and about Pintos OS.

Seventh Week: October 12 and 14

There is a test on Friday, October 14. A study guide is available.

There is no class on Monday because of Fall break. With the test on Friday, we won't get a lot done this week. However, you can start reading Chapter 6. We will cover only a few parts of Chapter 6. Section 6.1 is somewhat technical, but you should read it for the general ideas. The most important idea is deadlock, which is covered in Section 6.5. You should read that section, but you are not responsible for the details of the Banker's Algorithm. I will also want to cover the ideas of two-phase locking and acquire-all/release-all from Section 6.4

Eighth Week: October 17, 19, and 21

We will finish up Part II of the textbook this week or early next week, with parts of Chapter 6 and Chapter 7. The required reading from those sections include 6.5, 7.1, 7.2, and 7.4. We will spend the week talking mostly about deadlock and scheduling. Assignment 5, which is about scheduling in PintOS, is now available; the due date for that assignment will be discussed in class. There is no lab for this assignment.

The second homework assignment will be handed out in class on Friday, and will be due Friday of next week.

Ninth Week: October 24, 26, and 28

We begin Part III of the textbook with an introduction to address translation using segmentation and paging. The reading for the week is Chapter 8, Sections 1 through 3.

There is a homework assignment due on Friday of this week. Next week on Monday, there will be a lab in Rosenberg 009 to get started on Programming Assignment 6. And Programming Assignment 5 will be due Tuesday of next week.

Tenth Week: October 31; November 2 and 4

On Monday, October 31, we meet in Rosenberg 009 for Lab 6. NOTE added later: Lab 6 has been postponed until next week; instead, the class worked on Assignment 5.

We will continue with Chapter 8, Sections 1 through 3. Section 8.4 is optional reading. We will start Chapter 9 (Cacheing and Virtual Memory) before the end of week. You should read Sections 9.1 through 9.3. We will continue with Chapter 9 next week.

Eleventh Week: November 7, 9, and 11

We will be in Rosenberg 009 on Monday, to get you started on Lab 6.

We will spend the rest of the week on Chapter 9, cacheing. It would be worthwhile to read the entire chapter, but the main reading is Section 9.1 through 9.4. We will also cover some topics from the rest of the chapter, including the FIFO, LRU, and LFU replacement policies and the basic ideas of memory-mapped files and swapping (which we have already encountered informally).

Looking ahead, we will cover nothing from Chapter 10 except for the basic idea of zero-copy I/O from Section 10.1. I expect to start the final part of the book, file systems, next week.

Twelfth Week: November 14, 16, and 18

On Monday, we meet in Rosenberg 009 so that you can get started on Assignment 7. We will discuss that assignment further in class on Wednesday. We will also finish up cacheing on Wednesday, which will complete Part 3 of the textbook. By Friday, we will start Part 4, which covers file systems. You can start reading Chapters 11 and 12.

Thirteenth Week: November 21.

There is no class on Wednesday or Friday this week because of Thanksgiving break. On Monday, we will continue with Chapters 11 and 12.

Also, my usual Tuesday office hours are canceled this week.

Homework 3 is due by the end of the break.

Fourteenth Week: November 28 and 30; December 2

After finishing up Chapter 12 with a short discussion of SSDs, we will be working on Chapter 13 this week. The topic is file systems, and we will consider the structure of FAT, FFS, and NTFS file systesm in some detail.

Remember that Programming Assignment 7 is due on Wednesday. Homework 3 should have been turned in before Monday, but I will also accept it in class on Monday.

Fifteenth Week: December 5, 7, and 9

We finish the semester with a look at COW file systems, transactional file systems, and ZFS. The reading is Chapter 14, Section 1. I will also briefly discuss RAID, which is covered in Section 14.2.

Final Exam: December 15

The final exam for this course is Thursday, December 15, at 8:30 AM. a study guild is available.

End of semester office hours, Monday, December 12, through Wednesday, December 14, will be 11:00 AM to 3:00 PM.