CS510 - Operating System Foundations

Winter 2017: Mon/Wed 1130-1320 FAB 10
Instructor: Jonathan Walpole (office hours by appointment)
Teaching Assistant: Amit Joshi (office hours - Friday 1pm - 3pm in the CS Department Fishbowl)


The purpose of this course is to introduce the foundational concepts of operating systems to graduate students who have insufficient background to embark on CS533. It covers the core concepts of operating systems, including processes, threads, scheduling, synchronization, memory management, virtual address translation, file systems, input and output device management and security.

The course will consist of assigned reading, lectures, a midterm and final exam, and a sequence of programming assignments. The goal of the readings and lectures is to introduce the core concepts. The goal of the programming assignments is to give students exposure to reading, understanding and writing concurrent operating system code. Students are expected to participate in in-class discussions.

Students must have previous familiarity with programming in a high-level object-oriented language (such as C++ or Java); assembly language programming; CPU organization, instruction sets, registers; program development in the Unix environment (edit, compile, link, load, execute, makefile, using the shell); the Unix system call interface; basic data structures (lists, trees, graphs); object-oriented concepts (class, object, method). CS 200 (Computer Systems Programming), or equivalent course, is a prerequisite for this class.


The course project, midterm exam and final exam will contribute equally (one third each) to your overall grade.


A sequence of programming assignments introduce students to the challenges of writing concurrent OS kernel code.

Course Materials

Project materials:
        "The BLITZ System", by Harry Porter, approx. 200 pages.

Text book:
        Operating Systems: Three Easy Pieces, Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Arpaci-Dusseau Books, May, 2014, (Version 0.80).

Lecture slides:
        See schedule below for links

Mailing List


09-25-17 Course Overview and Introduction to Operating Systems
Course outline. Overview of course project and expectations. What is an operating system? Abstract machines. Resource managers. Simple model of computer hardware operation. Introduction to the required hardware support for secure operating systems: timers, memory protection, privileged mode execution, interrupts, faults, traps, and exceptions, saving and restoring CPU state.
Slides: [ .ppt .pdf ] Reading: [ Chapter 2 ]
Start Project 1 (due 10-02-17): [ Student Resources for Blitz ] [ Handout.pdf ] [ Directory Containing Files ]
09-25-17 Operating Systems Related Hardware
Expand simple model of computer hardware: pipelined and super-scalar CPUs, caches, memory hierarchies, paged virtual memory, memory relocation and address translation, I/O devices, interrupts, DMA, disks and file systems. Overview of the key operating system abstractions and the use of system calls to manipulate them.
Slides: [ .ppt .pdf ] Reading: [ Chapter 2 ]
10-02-17 The Process Concept
Program execution, the process concept, process-related state, the process table, saving and restoring process state, the role of the scheduler. The process creation and program execution system calls (fork and exec), processes on a multiprocessor, lightweight processes and threads, kernel-level threads vs user-level threads, thread-switching vs interrupt handling, many different kinds of context switch.
Slides: [ .ppt .pdf ]
Reading: Chapters 4, 5, 6
Start Project 2 (due 10-18-17): [ Handout.pdf ] [ Directory Containing Files ]
10-04-17 Threads and Concurrency
True concurrency vs pseudo concurrency, operating systems as concurrent programs, the role of interrupt disabling and scheduler preemption disabling in controlling concurrency on uniprocessor systems, race conditions and solutions based on mutual exclusion.
Slides: [ .ppt .pdf ]
Reading: Chapters 26, 27
10-09-17 Synchronization Primitives
Implementing synchronization primitives based on interrupt disabling and atomic instructions, implementation and use of spinlocks, blocking locks, mutex semaphores, counting semaphores. The Producer-Consumer problem and possible solutions.
Slides: [ .ppt .pdf ]
Reading: Chapters 28, 29, 30, 31
10-11-17 Classic Synchronization Problems
Classic synchronization problems and their solutions: Producer Consumer, Dining Philosophers, Readers and Writers, Sleeping Barber.
Slides: [ .ppt .pdf ]
Reading: Chapter 32
10-16-17 Monitors
Monitors, condition variables, and their use in solutions to classic synchronization problems: Producer Consumer, Dining Philosophers, Readers and Writers, Sleeping Barber.
Slides: [ .ppt .pdf ]
Reading: Chapters 29, 30
10-18-17 Monitor Semantics, Message Passing, Thread-Safe Functions
Hoare and Mesa semantics for monitors and condition variables, message passing, thread-safety, comparative review of concurrency problems and synchronization mechanisms covered so far.
Slides: [ .ppt .pdf ]
10-23-17 Deadlock
Deadlock, livelock, deadlock detection, avoidance, and prevention.
Slides: [ .ppt .pdf ]
Reading: Chapter 32
Start Project 3 (due 11-06-17): ] Handout.pdf ] [ Directory Containing Files ]
10-25-17 Midterm Exam
In class, closed-book exam based on material covered so far.
10-30-17 Scheduling
Separation of policy from mechanism, scheduling mechanisms, preemptive vs non-preemptive scheduling, example scheduling policies, FIFO, round-robin, shortest job first, priority scheduling, Unix-style feedback scheduling, proportional share scheduling, lottery scheduling.
Slides: [ .ppt .pdf ]
Reading: Chapters 7, 8, 9, 10
11-01-17 Memory Management
Memory addresses and binding, static and dynamic addresses translation, address translation using base and limit registers, memory management algorithms using linked lists and bitmaps, external and internal fragmentation, paged virtual memory.
Slides: [ .ppt .pdf ] Reading: Chapters 13, 14
11-06-17 Virtual Memory 1
Physical address spaces, virtual address spaces, page table design, single-level and multi-level page tables, hardware support for dynamic address translation using a TLB, hardware and software managed TLB refill.
Slides: [ .ppt .pdf ]
Reading: Chapters 15, 16, 17, 18, 19, 20, 23
Start Project 4 (due 11-15-17): [ Handout.pdf ] [ Directory Containing Files ]
11-08-17 Virtual Memory 2
Inverted page tables, the memory hierarchy, TLB miss faults, segmentation faults, protection faults, page faults, hardware support for memory protection, segmentation.
Slides: [ .ppt .pdf ]
Reading: Chapters 15, 16, 17, 18, 19, 20, 23
11-13-17 Virtual Memory 3
Implementation issues, page sharing, copy-on-write, page fault handling, segmentation, segmentation with paging.
Slides: [ .ppt .pdf ]
Reading: Chapters 15, 16, 17, 18, 19, 20, 23
11-15-17 Paging Algorithms
Demand paging, swapping, placement and replacement algorithms, memory hierarchy revisited, overview of cache architecture, performance modeling for memory management systems.
Slides: [ .ppt .pdf ]
Reading: Chapters 21, 22
Start Project 5 (due 11-29-17): [ Handout.pdf ] [ Directory Containing Files ]
11-20-17 Secondary Storage Management
Disks, sectors, tracks, blocks, disk head scheduling algorithms, the file abstraction, directories, links.
Slides: [ .ppt .pdf ]
Reading: Chapters 37, 38
11-22-17 File Systems 1
File system architecture, file system data structures and system calls.
Slides: [ .ppt .pdf ]
Reading: Chapters 39, 40, 41, 42, 43, 44
11-27-17 File Systems 2
File system architecture and design criteria.
Slides: [ .ppt .pdf ]
Reading: Chapters 39, 40, 41, 42, 43, 44
11-29-17 Security
Protection domains and mechanisms, access control lists, capabilities, user authentication, encryption, common internal and external attacks.
Slides: [ .ppt .pdf ]
Final Exam 1230-1420

Back to Jonathan Walpole's home page