Lecture Goals


OS Structure & Processes

Understand how the OS is structured, and introduce the idea of a process.  Understand the difference between users, programs, and processes. Cover the distinction between kernel space and user-space/user-level.  Discuss how memory and address space is divided/shared, and discuss separation of stacks, etc.
Preparatory reading: Sec 1.0, 1.1, 1.2, 1.3
 

System calls & Libraries

Introduce the concept of a system call and show some examples. Cover the concept of protection, and how system calls provide protection. Discuss the separation of concerns between the system and libraries, the resulting design and performance implications. Discuss some of the philosophy behind how different systems address these ideas. Discuss the directionality of passing information, including signals.
Preparatory reading: Sec 1.4, 1.5
 

Filesystem Introduction

Learn the basics of the filesystem - file organization,  structured versus unstructured files, various historical approaches to files. Conclude with the "stream of bytes" model. Discuss some of the ways files are accessed by applications, and the difference between files and file descriptors. Explain file tables, per-process and global.
Preparatory reading: Sec 5.0, 5.1, 5.2
 

Filesystems continued - metadata

Talk about the concept of data versus metadata, and the various kinds of metadata. Introduce the idea that some kinds of metadata are stored as data, and that the distinction is how it is used. Discuss the fields of an indoe and what they mean in practice. Also show how some updates are synchronous while others can be asynchronous. Introduce the idea of metadata consistency and what mechanisms are used to ensure it.
Preparatory reading: Sec 5.3, 5.4, 5.5
 

Mounting, paths, caching

Discuss how disks are partitioned,  why this makes sense versus large disks, and how disk partitions and multiple disks can be accessed via mounting.  Relative versus absolute paths, and path traversal. Discuss how various kinds of caching reduce the impact of traversals, metadata lookups, etc.
Preparatory reading: this
 

Virtual memory

Discuss virtual memory versus physical memory and why virtual memory makes sense in many environments. Discuss the hardware necessary for virtual memory support, and how operating systems support it. Discuss the memory hierarchy and the tradeoffs involved. Cover what sort of programming approaches are bad for virtual memory systems.
Preparatory reading: 4.0, 4.1, 4.2, 4.3
 

Page replacement algorithms

Cover the basics of page replacement, and the various kinds of algorithms and their approximations. Discuss global versus local algorithms, and the various factors that are involved in eviction decisions. Discuss paging and swapping, readahead and other optimizations.
Preparatory reading: 4.4, 4.5
 

Memory-mapped files

Describe what memory-mapped files are, what their costs are in terms of setup and access, what mechanisms are needed in order to implement, how they interact with processes and the rest of the operating system, and their uses, both in dense and sparse environment as well as lazy/eager allocation.
Preparatory readings: TBA
 

Unified file/VM systems

Discuss what happens when the file system and VM system get merged. Discuss the special handling of metadata, and the new steps that need to be taken to preserve overall system stability. Also discuss why this approach makes sense and its benefits.
Preparatory readings: TBA
 

Fork and exec

Describe the process of creating new processes in Unix. At this point, we have enough information to describe the overheads involved. Discuss various approaches for reducing these overheads while still maintaining the same semantics.  Discuss the parent/child relationship of processes, and return codes/zombies.
Preparatory readings: 2.0, 2.1
 

Process scheduling

The CPU is shared by all of the processes - discuss running, runnable, and blocked processes. Describe what mechanisms are needed to maintain this information and what kinds of activities cause processes to move from one state to another. Revisit the issue of signals. Cover cooperative scheduling, its benefits, and its drawbacks. Introduce yield and directed yield.
Preparatory readings: 2.4
 

Pre-emptive scheduling

Introduce pre-emptive schedule and discuss the benefits. Also discuss the extra mechanisms needed to support it. Cover both how it simplifies multiprogramming, and how it complicates resource sharing. Introduce priorities, aging, and other mechanisms used to ensure fairness.
Preparatory readings: TBA
 

Threads and critical sections

Discuss the difference between threads and processes, and how things are similar. Discuss the concept of critical sections and some of the mechanisms used to enforce them. Discuss how multiple processes also encounter the same issues when sharing resources.
Preparatory readings: 2.2, 2.3
 

Race conditions and deadlocks

More issues related to race conditions, critical sections, and means of enforcing them. Some issues related to deadlock, what it is, how it arises, how it's unavoidable in certain situations.
Preparatory readings: 3.3
 

Basic networking

Introduce the basics of networking, the new semantics versus standard file system calls, and how this affects the programming model. Discuss network basics such as naming, ports, connections, protocols, etc.
Preparatory readings: TBA
 

Interprocess communication

Show how "networking" is useful within a single machine to communicate data. Give examples of different domains, how they are implemented, and the effects within the kernel. Show how networking and interprocess communication can be used to allow easy distribution of applications.
Preparatory readings: TBA
 

Device drivers, expandability, customization

Discuss kernel modularity and complexity, and how hardware choices keep increasing. Introduce the concept of "pluggable" systems, and show how a simple interface can be used to let the kernel talk to a host of devices. Also show the ioctl back door that allows applications to talk to devices without significant kernel intervention. Discuss how device driers and kernel structure interact - monolithic versus microkernel.
Preparatory readings: 3.0, 3.1, 3.2, 3.7
 

Event-driven programming

Discuss the difference between standard programming styles and event-driven (or "callback" programming). Show the difference between structuring servers using processes and application-level multiplexing. Discuss the benefits and drawbacks of each approach.
Preparatory readings: TBA
 

NFS, distributed system issues

Introduce Network File System and the issues of mounting and caching in this environment. Discuss the benefits and drawbacks. Cover idempotent operations, the issue of stateful and stateless servers, and crash recovery.
Preparatory readings: TBA
 

pick up slack

TBA
 

Wrapup

What we learned.