The Whole Machine at Once
Study parts separately, but reason about the whole system. Take a simple job: read a key, add one, and store it.
- I/O Event: The keypress arrives via interrupt.
- Encoding: It is stored as bits in memory.
- Execution: The CPU fetches via cache, and the ALU adds.
Every layer of the course appears in one task. Abstractions hide internal complexity behind clean interfaces, letting programmers work at one level while knowing lower layers exist for performance tuning.
Finding the Bottleneck
System performance is governed by its bottleneck: the slowest stage that work must pass through. Speeding up a non-bottleneck yields little.
| Layer Type | Speed Relative to CPU |
|---|---|
| Registers | Fastest (Base) |
| Cache / Main Memory | Moderate to Slow |
| Disk / I/O | Millions of times slower |
Common pitfall: Optimizing the wrong layer. Making CPU arithmetic faster helps nothing if the task is waiting on I/O or a cache miss.