indexMachine Model#machine-model#cpu#memory#foundations

Machine Model

For years a runtime caught your mistakes: a garbage collector freed your memory, a VM normalized your integers, exceptions unwound your stack. This branch removes that floor. Before any C, assembly, or kernel, you rebuild the mental model of the bare machine — the CPU, its registers, the memory hierarchy, and how bits become behavior — so that everything later has something concrete to attach to.

The reset: there is no runtime watching your back anymore. The machine does exactly what the bytes say, including the wrong thing, at the speed of a few nanoseconds per cache miss. This branch is almost code-free — it's the substrate.

Planned notes

Core sources

  • Bryant & O'Hallaron — Computer Systems: A Programmer's Perspective (CS:APP) — the spine of this branch. csapp.cs.cmu.edu
  • Charles Petzold — Code: The Hidden Language of Computer Hardware and Software — builds the machine from relays up; pure intuition.
  • Ben Eater — Build an 8-bit computer from scratch — a CPU on breadboards; the deepest mental model. eater.net/8bit
  • Agner Fog — microarchitecture manuals — advanced detail on how real CPUs execute. agner.org/optimize

Connects to: C from the Metal · Pointers & Memory · Assembly & Compiler Output