The talk, then the spine of the semester in an hour — weighted to the third command.
Three sentences, and the class is their derivation: fourteen weeks of building hypster, selfie's hypervisor, into an operating system.
The purpose is shared with the companion classes: principles deep enough to position generative AI, and whatever comes next, properly.
Ten autograded extensions of selfie, from an assembler to a lock-free stack. In week 10 a new one: a model checker finds the input that breaks your own systems code.
What is Intelligence? The Computing chapter is this class. Read the Introduction and the Selfie chapter this week.
Countable. The machine, its privilege levels and exceptions, the assembler as a regular language. Weeks 2 and 3: everything still decidable.
Uncountable. Isolation. Memory, time, and the kernel that must isolate itself. Weeks 4 to 9: paging, scheduling, self-hosting, processes, threads, garbage collection — and Gödel, Turing and Rice at each of them.
Cost. Verifying systems code with a solver, and the price of everything in caches, cycles and joules. Weeks 10 and 11. Then universality for systems, agents as processes, and the definition.
The compiler class. Here only its lesson: a system that agrees with itself has certified nothing, and the outside check is the rule.
An emulator that runs every program for its machine, itself included. The operating system by emulation, and the executable specification of the one by virtualization.
A hypervisor whose virtual machines can run the hypervisor. The kernel must be isolated from the things whose isolation it provides. Gödel's second theorem, run as an operating system. This class.
By emulation the guest is read; by virtualization it is run, on the kernel's own processor. Same guest, same 86,380 instructions, same output. Only the host's bill differs: ×2,593 against ×208.
So virtualization is only for performance, bought with self-reference: the kernel needs what it provides.
Most courses show only the virtualized design and never name the loop. Here it is named first.
| wk | lecture | assignment |
|---|---|---|
| 2 | The machine again; the assembler | assembler-parser |
| 3 | Emulation: mipster as universal machine | self-assembler |
| 4 | Virtual memory: paging | — |
| 5 | Time-sharing: the timer, scheduling | processes |
| 6 | Self-hosting: hypster, Gödel II, the TCB | fork-wait |
| 7 | Processes: fork, wait, exit | fork-wait-exit |
| 8 | Concurrency: threads, locks, lr/sc | lock, threads |
| wk | lecture | assignment |
|---|---|---|
| 9 | Runtime systems: malloc, garbage collection | threadsafe-malloc |
| 10 | Verifying systems code: rotor, bitme | treiber-stack, rotor-bounds |
| 11 | Cost: caches, energy, Goodhart | — |
| 12 | Universality: halting, Rice, deadlock | — |
| 13 | Agents as processes: the gate | — |
| 14 | What a system is; the definition | — |
The machine again, from the kernel's side: privilege, exceptions, system calls, machine contexts — and the assembler, which is your first assignment and a regular language.
Wagner · Das Rheingold — Boulez, Chéreau, Bayreuth. One E flat in the double basses, held for 136 bars, and the whole world of the Ring boots from it. The spine of a systems class: everything from one state, and the price paid for it later.
Operating Systems: Principles and Practice — Anderson and Dahlin: the textbook of this class, kernels, processes, concurrency, memory and file systems, in depth. And, more technical, The UNIX Time-Sharing System — Ritchie and Thompson, 1974: the operating system in eleven pages, and the design taste every kernel since has copied.