CS 461 — Operating Systems
Processes, threads, synchronization, scheduling, memory management, file systems, and virtualization — the core abstractions that let multiple programs share a machine safely and efficiently.
-
Introduction to Operating Systems
A first look at what operating systems are, why they matter, and the key design choices (monolithic vs. micro-kernel) that shape every real-world OS. Sets up the xv6 development environment used throughout the course.
-
Tools, Code Exploration, and Kernel Debugging
Master the essential development tools used in OS kernel work: git for version control, cscope for navigating large codebases, tmux for managing terminal sessions, and GDB for debugging the xv6 kernel. Also covers how xv6 boots and how to write user-space utilities inside it.
-
Boot Loading and CPU Isolation
Trace the full boot sequence from BIOS to the xv6 kernel, then see how x86 CPU rings and segmentation enforce the kernel/user isolation that makes an OS secure.
-
System Calls and CPU Privilege Rings
Learn how the x86 hardware enforces the user/kernel boundary through privilege rings, and trace the complete path a system call takes from user-space wrapper through the kernel and back.
-
Virtual Memory I: Address Translation and Paging
Explores how x86 hardware translates virtual addresses to physical ones using page tables, the MMU, and the TLB. Covers logical vs. linear vs. physical addresses, two-level paging, and how the kernel programs the MMU via CR3.
-
Virtual Memory 2: x86-64 Paging and xv6 VM
Extends paging from 32-bit to x86-64's 4-level structure, dissects PTE flag fields, and traces how xv6 builds and walks kernel and user page tables in code.
-
Virtual Memory III: Page Table Walk and VM Usage
Dives into xv6's concrete page-table implementation—how the kernel builds its own mapping with kvmalloc, how user processes are set up with walkpgdir and mappages, and how VM features like page deduplication and copy-on-write exploit the indirection that page tables provide.
-
Physical Page Management and Interrupts
Learn how xv6 allocates and frees physical memory pages using a free list, understand when contiguous pages are required and how the buddy system addresses that, then see how hardware interrupts work from the PIC/APIC all the way to xv6's IDT initialization.
-
HW3 Hints: Page Deduplication, CoW, and Interrupt Handling
Covers the two HW3 sub-problems—page deduplication and copy-on-write—and walks through how xv6 sets up and dispatches interrupts from the IDT through the C trap handler.
-
Interrupt Handling and Device Drivers
Explore how xv6 handles keyboard and UART interrupts, how the CGA display works through memory-mapped I/O, and how the 'everything is a file' philosophy connects device drivers to the ioctl system call.
-
VGA Device Driver
Learn how xv6 drives text and graphics output through CGA and VGA hardware using memory-mapped I/O, and how the ioctl() system call and devsw table connect user programs to device-specific driver functions.
-
Processes
Understand what a process is, how xv6 represents processes with struct proc, and how fork() creates a child process by copying the parent's state.
-
Process Lifetime & Scheduling
Traces the complete lifecycle of an xv6 process—from fork and exec through exit and wait—and examines how the scheduler and context-switch machinery keep processes running. Covers the ZOMBIE state, process states, sleep/wakeup, and the swtch() context switch.
-
CPU Scheduling
Explore how xv6 and Linux decide which process runs next. Covers the round-robin scheduler, context switching via swtch(), process states, cooperative vs. preemptive multitasking, priority scheduling, and the Linux Completely Fair Scheduler (CFS).
-
CFS and Signals
Learn how Linux's Completely Fair Scheduler (CFS) uses virtual runtime to give every process a proportional share of the CPU, then explore Unix signals — the kernel's mechanism for asynchronously notifying processes of events.
-
Atomic Instructions and xv6 Locks
Explores why locks are necessary for concurrent code, how atomic CPU instructions (like xchg) prevent race conditions, and how xv6 implements spinlocks using those primitives.
-
Kernel Synchronization: Spinlocks, Sleeplocks, Deadlocks, and Multi-core Boot
Deep dive into how xv6 implements kernel-level synchronization — spinlocks, sleeplocks, read/write locks — and how it safely boots multiple cores. Covers deadlock conditions, memory barriers, and scalability trade-offs.
-
Introduction to Filesystems
Explore why filesystems exist, how Unix names files with inodes and paths, and how xv6 organizes disk layout through superblocks, bitmaps, inodes, and directories.
-
Superblock and Inode
How xv6 organizes filesystem metadata: the superblock records global disk layout, while on-disk inodes (dinode) and their in-memory mirrors track per-file metadata and data block addresses.
-
Directories, VFS, and Write-Ahead Logging
Explore how xv6 represents directories as files of dirent structs, how the Virtual File System (VFS) abstracts multiple concrete filesystems under one interface, and how Write-Ahead Logging ensures filesystem operations are atomic even during a crash.
-
Buffer Cache and Write-Ahead Logging
Filesystem operations require multiple disk writes that must succeed or fail together. This module explains how xv6 uses a buffer cache and write-ahead log to guarantee atomic transactions, keeping the filesystem consistent even after a crash.
-
xv6 Comprehensive Review
A structured review of the full xv6 OS design — processes, scheduling, traps, kernel synchronization, and the filesystem. Ideal preparation for Midterm 2.