Paranoia is the whole design: the OS wants your program to run at full speed and wants to be able to stop it at any instant.
Why this matters
Those two demands cannot both be met in software. A program running at full speed is one the OS is not watching, so every mechanism in Part I is a piece of hardware β modes, traps, a timer β bought to make interruption possible without supervision.Eight chapters of mechanisms and policies deserve a debrief. The Professor asks the loaded question; the Student, to everyoneβs relief, has answers.
The whole CPU-virtualization stack, one picture
Part Iβs CPU half, assembled: paranoid philosophy, enforced by mechanisms, with policies (from FIFO to MLFQ and fair share, even on multiprocessors) deciding who runs.
Tip: Avoid disaster (Lampson, again)
This is the second time Lampson has headlined a tip β chapter 5 gave us βget it right.β The pairing is the whole engineering worldview of this book: get the mechanism right (fork/exec, traps, switches), and where no right answer exists (scheduling policy, voo-doo constants), be pragmatic and avoid disaster. If the Studentβs EC2 scheme worries you: chapter 8βs Rule 4 is what disaster-avoidance looks like in practice.If you remember only three things
-
βResource managerβ is what the paranoia looks like from outside. The Student reaches the bookβs own term by reasoning from the philosophy, which is why the question what is an OS is worth asking only after eight chapters of what it does.
-
A readerβs first instinct on meeting an exploit is to look for a real one. The Student goes straight from a scheduling trick to someone elseβs cloud account β which is precisely why chapter 8 stopped at Rule 4 rather than at Rule 4b.
-
A debrief is a test you set yourself. If the list of mechanisms does not come back unprompted β traps, handlers, timer interrupts, saving and restoring state β then Part I has not landed yet, and rereading beats moving on.
Check yourself
1.The Student diagnoses the OS's philosophy as 'paranoid.' What design does that paranoia explain?
2.Why does the Professor doubt there's a 'right answer' in the scheduler policy wars (CFS vs BFS vs O(1))?
3.The Student plans to game schedulers on EC2. Which Part I idea is the countermeasure?