This schedule is tentative more than two weeks in advance.

Textbook chapters that should cover similar material are given from Anderson and Dahlin, Operating Systems: Principles and Practice, Second Edition, our recommended textbook; from Arpaci-Dusseau, Operating Systems: Three Easy Pieces, which is freely and legally available online; and from Silberchartz, Galvin, and Gagne, Operating Systems Concepts, Ninth Edition. (I've tried to keep the readings up-to-date as I move topics around in the schedule, but I may not always have succeeded.)

DateTopicAssignment
Week 1
Tue 27 Aug

What are OSes? / Logistics

 [  ]
Anderson&Dahlin: 1.1-2
Arpaci-Dusseau: 2, 3
Silberchartz: 1, 2.1-5, 3.1

Sorry, no recordings due to technical difficulties. Last semester’s first lecture is similar.

  • What is an operating system
  • Dual-mode operation; protection; exceptions
  • process VMs
  • Process = thread + address space
  • the Unix/Monolithic kernel design
  • xv6 and Unix
  • System calls (in xv6)
  • logistics
Thu 29 Aug

Multiprogramming and Dual-Mode Operation

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 2.1-6
Arpaci-Dusseau: 3.2, 4.1, 4.3-5, 6.2-3
Silberchartz: ???
  • System calls in xv6 (review)
  • Other exception handling
  • Context switches generally
  • Context switches in xv6 (start)
Quiz 01 (post-quiz for week 1) released, due 2019-09-03 16:45
Fri 30 Aug
xv6 introduction released
Week 2
Tue 03 Sep

The Unix API 1

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 3.5, 2.7, 3.1-3
Arpaci-Dusseau: 4.2, 4.5, 5, 6.2-4
Silberchartz: 3.3-4?, 11.1
  • Context switches in xv6 (finish)
  • Process control blocks
  • POSIX versus Unix
  • Process creation and management: fork(), exec*(), wait()
Quiz 01 (post-quiz for week 1) due 16:45 (released 2019-08-29)
Thu 05 Sep

The Unix API 2

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 3.2-3, 4.5-6
Arpaci-Dusseau: [missing POSIX API], 7.1
Silberchartz: 11.2, 6.1

Due to a technical issue, the last 20 minutes of audio are missing from the recording. Similar material was covered in the last 5 minutes of last semester’s 24 January lecture and the first section of last semester’s 29 January lecture (up to the slide 11), for which full audio/video is available.

  • Shells, generally
  • Shell assignment
  • Unix: everything is a file, stdio, stdout
  • stdio.h versus system calls
  • POSIX file API: pipe(), open(), read(), write(), close()
Fri 06 Sep
xv6 introduction due at 11:59pm
shell released
Week 3
Tue 10 Sep

The Unix API 3 / Scheduling 1

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 7.1, 7.5
Arpaci-Dusseau: 7.2-9
Silberchartz: 3.2, 6.2-3

(add deadline)

  • POSIX API: pipe() (finish)
  • xv6 creating the first process
  • threads versus processes
  • queues of processes and schedulers
    • aside: non-CPU scheduling
  • alternating I/O and CPU bursts
  • the process state machine
Quiz 02 (post-quiz for week 2) due 16:45 (released 2019-09-05)
Thu 12 Sep

Scheduling 2

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 7.1,
Arpaci-Dusseau: 8, 9, 25,
Silberchartz: 6.7
  • scheduling metrics: fairness, response time, throughput
  • FCFS, RR
  • priority scheduling
  • SJF, SRTF
Quiz 03 (post-quiz for week 3) released, due 2019-09-17 16:45
Fri 13 Sep
shell checkpoint due at 11:59pm
Week 4
Tue 17 Sep

Scheduling 3

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 7.4, 4.1-4, 5.1
Arpaci-Dusseau: 26.-26.5, 27.1-2
Silberchartz: 5.1-4
  • approximating SJF: multi-level feedback scheduling
  • proportional share scheduling
    • lottery scheduling
  • Linux’s Completely Fair Scheduler
  • (if time) real-time scheduling
Quiz 03 (post-quiz for week 3) due 16:45 (released 2019-09-12)
Thu 19 Sep

Threads / Synchronization 1: Locks 1

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 5.1, 5.3, 5.7
Arpaci-Dusseau: 28.1-14
Silberchartz: 5.4
  • pthreads API — pthread_create, pthread_join
  • some pthreads examples
  • bank account synchronization example / lost write
  • race conditions
  • building locks is tricky: too much milk
  • mutual exclusion / critical sections
  • locks
  • aside: standard container rules
  • disabling interrupts for locks
Quiz 04 (post-quiz for week 4) released, due 2019-09-24 16:45
Fri 20 Sep
shell due at 11:59pm
lottery scheduler released
Week 5
Tue 24 Sep

Synchronization 2: Locks 2, Mutexes

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 5.3-4, 5.8
Arpaci-Dusseau: 30, 31
Silberchartz: 5.5-8
  • disabling interrupts for locks, continued
  • load/store reordering
  • cache coherency, MSI and snooping
  • atomic operations: test-and-set, CAS
  • xv6’s spinlock
  • test-and-test-and-set
  • false sharing
  • avoiding busy-waits: mutexes
Quiz 04 (post-quiz for week 4) due 16:45 (released 2019-09-19)
Thu 26 Sep

Synchronization 3: Monitors and Semaphores

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 5.5, ?6.2
Arpaci-Dusseau: 29, 31.5
Silberchartz: 5.7-9

Some example solutions for the monitor exercise I got to at the very end of lecture (but didn’t really finish explaining) are at the end of the slides.

  • barriers
  • monitors
    • producer/consumer with monitors
  • intuition for using monitors
  • monitor exercises (just started)
Quiz 05 (post-quiz for week 5) released, due 2019-10-01 16:45
Fri 27 Sep
lottery scheduler due at 11:59pm
life released
Week 6
Tue 01 Oct

Synchronization 4: Semaphores and Monitors con't / Reader+Writer Locks

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 6.2, 6.5
Arpaci-Dusseau: 32
Silberchartz: 7.1-6
  • monitor exercises (continued)
  • counting semaphores
    • producer/consumer with counting semaphores
  • relating monitors and counting semaphores
  • reader/writers problem
    • reader/writers with monitors
    • reader or writer priority
  • POSIX rwlocks
Quiz 05 (post-quiz for week 5) due 16:45 (released 2019-09-26)
Thu 03 Oct

Synchronization 5: Reader+Writer con't / Deadlock

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 4.9, 6.3, 8.2-3
Arpaci-Dusseau: 33
Silberchartz: 4.5
  • reader/writers problem (con’t)
  • deadlock
    • definition: resources and conditions
    • examples
  • deadlock prevention
  • deadlock detection and resource acquisition graphs
Quiz 06 (post-quiz for week 6) released, due 2019-10-10 16:45
Fri 04 Oct
life due at 11:59pm
pool released
Week 7
Tue 08 Oct

(reading day)

(no class)
Thu 10 Oct

Alternatives to Threads / Virtual Memory 1

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 8.2-3, 9.6-7
Arpaci-Dusseau: 13, 15, 18-20
Silberchartz: 8.1-2, 8.5-7, 9.3, 9.7
  • (briefly) event-based programming/message passing
  • review(???): what is virtual memory?
  • xv6 paging (start)
Quiz 07 (post-quiz for week 7) released, due 2019-10-15 16:45
Quiz 06 (post-quiz for week 6) due 16:45 (released 2019-10-03)
Fri 11 Oct
pool due at 11:59pm
Week 8
Tue 15 Oct

Virtual Memory 2: page table tricks

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 9.6, 9.5
Arpaci-Dusseau: 21-22.4
Silberchartz: 9.7, 9.2, 9.4-6

(drop deadline)

  • xv6 paging (con’t)
  • page table tricks
    • allocate on demand
    • copy-on-write
  • (if time) demand paging
  • (if time) the page cache, high-level
Quiz 07 (post-quiz for week 7) due 16:45 (released 2019-10-10)
Thu 17 Oct

Midterm Review

 [ 
screencapture (webm; browser) | audio only
 ]
Fri 18 Oct
Week 9
Tue 22 Oct

Midterm

(withdraw deadline)

Wed 23 Oct
xv6 paging+protection released
Thu 24 Oct

Virtual Memory 3: mmap, page cache (intro)

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 9.5
Arpaci-Dusseau: 22.5-22.12
Silberchartz: 9.6, 9.9-10
  • memory mapped files, POSIX mmap
    • /proc/$$/maps
  • demand paging
  • the page cache
  • Linux process memory map data structures
  • page replacement algorithms (ideal)
    • ideal: Belady’s MIN
    • ideal possible: LRU
  • working set model
  • accessed bits and simulating them
  • dirty bits and simulating them
Quiz 08 (post-quiz for week 9) released, due 2019-10-29 16:45
Fri 25 Oct
Week 10
Tue 29 Oct

Virtual 4 / I/O 0

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 11.3, 13.2-3
Arpaci-Dusseau: 36, 39, 40.1-4
Silberchartz: 13.2-5, 11.1, 12.1-4
  • accessed bits
  • page replacement algorithms (possible)
    • second chance
    • SEQ
    • clock algorithm and variants
  • non-LRU replacement
    • handling scanning and readahead
    • (if time) fairness and page replacement
  • start device files
Quiz 08 (post-quiz for week 9) due 16:45 (released 2019-10-24)
Wed 30 Oct
xv6 paging+protection checkpoint due at 11:59pm
Thu 31 Oct

I/O 1 / Filesystems 1

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 13.2, 13.3 (FAT), 13.4
Arpaci-Dusseau: 36, [missing FAT], 40
Silberchartz: 12.4-6, 10.2, 10.4
  • continue device files
  • device drivers and interrupts
    • “top” and “bottom” halves
    • device interface
    • devices as magic memory
    • aside on I/O space
    • direct memory access
  • disk interface: sectors
  • FAT: linked lists on disk (start)
Quiz 09 (post-quiz for week 10) released, due 2019-11-05 16:45
Fri 01 Nov
Week 11
Tue 05 Nov

Filesystems 2

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 12.1-2, 13.3 (FAT, FFS), 13.4
Arpaci-Dusseau: 37, 44, 39-41
Silberchartz: 12.4-6
  • FAT: linked lists on disk (con’t)
  • hard disks
  • SSDs
  • the inode concept (start)
Quiz 09 (post-quiz for week 10) due 16:45 (released 2019-10-31)
Thu 07 Nov

Filesystems 3

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 13.3 (NTFS), 13.5, 14.1-2
Arpaci-Dusseau: 37, 41
Silberchartz: 12.4-12.7, 10.7
  • the inode concept (con’t)
  • double- and triply-indirect blocks
  • sparse files
  • hard links and symbolic links
  • locality: block groups
  • extents
  • trees on disk
Quiz 10 (post-quiz for week 11) released, due 2019-11-12 16:45
Fri 08 Nov
xv6 paging+protection due at 11:59pm
FAT reading released
Week 12
Tue 12 Nov

Filesystems 4

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 14.1, 13.3(copy-on-write FSs)
Arpaci-Dusseau: 42, 47
Silberchartz: 12.7, 17.1, 17.3-5
  • ordering writes carefully
  • fsck, etc.
  • write-ahead logging and journaling filesystems
  • mirroring
  • snapshots
Quiz 10 (post-quiz for week 11) due 16:45 (released 2019-11-07)
Thu 14 Nov

Sockets / Distributed Systems 1

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: [missing]
Arpaci-Dusseau: 48
Silberchartz: 17.6?
Quiz 11 (post-quiz for week 12) released, due 2019-11-20 16:45
Fri 15 Nov
FAT reading checkpoint due at 11:59pm
Week 13
Tue 19 Nov

Distributed Systems 2: RPC / Failure

 [  |
screencapture (webm; browser) | audio only
 ]
  • remote procedure calls
  • fail-stop
  • two-phase commit (start)
Thu 21 Nov

Distributed Systems 3: Failure / Network filesystems

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin:
Arpaci-Dusseau: 49-50
Silberchartz:
  • two-phase commit
  • two-phase assignment
  • very briefly: distributed consensus
  • network filesystems
  • stateful versus stateless
  • caching in network filesystems
    • open-to-close consistency
    • callbacks
Quiz 12 (post-quiz for week 13) released, due 2019-11-26 16:45
Fri 22 Nov
FAT reading due at 11:59pm
twophase released
Week 14
Tue 26 Nov

Access Control

 [  |
screencapture (webm; browser) | audio only
 ]
  • access control lists
  • user IDs on Unix
  • /bin/login
  • set-user-ID
  • (briefly) capabilities
Quiz 12 (post-quiz for week 13) due 16:45 (released 2019-11-21)
Thu 28 Nov
(no class)
Fri 29 Nov
(no class)
Week 15
Tue 03 Dec

Virtual Machines

 [  |
screencapture (webm; browser) | audio only
 ]
Anderson&Dahlin: 10.2
Arpaci-Dusseau: B
Silberchartz:
  • trap and emulate
  • reflecting exceptions
  • software support for virtualized virtual memory
  • (if time) hardware virtualization support
Quiz 13 (post-quiz for week 15) released, due 2019-12-06 23:59
Wed 04 Dec
twophase due at 11:59pm
Thu 05 Dec

Final Exam Review

 [ 
screencapture (webm; browser) | audio only
 ]

notes drawing

Fri 06 Dec
Quiz 13 (post-quiz for week 15) due 23:59 (released 2019-12-03)
Week 16
Wed 11 Dec

Final Exam

9AM.