Formula sheet

The cheat boxes of 38 lessons on one page: 360 rows of formulas and rules, each a name and what you would write next to it.

Every box below is the cheat box from the "Key take-aways" of one lesson, copied here unchanged. A row is a name and a formula — CPI, speedup, AMAT, miss rate, code efficiency — or a name and a rule: when an instruction may issue in Tomasulo’s machine, what a cache does on a read miss, how the home directory answers a request. The heading above a box leads to the lesson that explains it with worked examples.

At the exam you may bring one A4 page, front side only, with formulas in 12-point type or larger and no copies of past exercises or slides (the rules are in the exam trainer). The 360 rows here will not fit on one side at that size, so this page is where you choose what goes on yours.

Revise with it like this. Read a name, cover what follows it, write the formula or the rule from memory, then compare. What you rebuild without effort can stay off your A4; what you get wrong twice goes on it. When a row does not match, open the lesson and redo its worked example.

Module 1 · Pipelining and performance

Notes, chapters 1 and 4 · the RISC-V pipeline, hazards, forwarding, the metrics every exercise ends with

Lesson 1 · The assembly line in silicon

Lesson 2 · When the line jams: hazards and forwarding

Lesson 3 · What “faster” means: the Iron Law, Amdahl and pipeline arithmetic

To the lesson list ↑

Module 2 · Branch prediction

Notes, chapter 2 · control hazards, static schemes and the delay slot, history tables, correlating predictors

Lesson 4 · Why the pipeline hates branches: static prediction and the delay slot

Lesson 5 · Learning from the past: 1-bit and 2-bit history tables, and the BTB

Lesson 6 · Branches that talk to each other: correlating and two-level predictors

To the lesson list ↑

Module 3 · Instruction-level parallelism

Notes, chapter 3.1–3.5 · dependences, multi-cycle pipelines and exceptions, multiple issue and the superscalar recipe

Lesson 7 · Three ways instructions collide, and pipelines where EX takes more than a cycle

Lesson 8 · Doing more per cycle: superscalar, static vs dynamic scheduling, the limits of ILP

To the lesson list ↑

Module 4 · Dynamic scheduling: scoreboard, Tomasulo, reorder buffer

Notes, chapter 3.6–3.9 and the past papers · the three algorithms the exam tables are built on

Lesson 9 · The chalkboard that beat the pipeline: the scoreboard

Lesson 10 · 62 cycles, one at a time: the scoreboard example and the exam table

Lesson 11 · Names, not values: Tomasulo’s architecture

Lesson 12 · Issue, execute, write result: the three stages and the exam table

Lesson 13 · Tomasulo cycle by cycle, and what it fixes compared with the scoreboard

Lesson 14 · Tomasulo under pressure: structural squeezes and CDB fights

Lesson 15 · Same names, no conflicts: unrolling, renaming and scheduling

Lesson 16 · Tomasulo meets a loop: eighteen cycles of renaming in action

Lesson 17 · Guess now, pay later: speculation, precise exceptions and the reorder buffer

Lesson 18 · The speculative Tomasulo algorithm, stage by stage — and the ROB exam table

To the lesson list ↑

Module 5 · VLIW and static scheduling

Notes, chapter 5 and the past papers · bundles, dependence graphs, list scheduling, unrolling, software pipelining, trace scheduling

Lesson 19 · The compiler takes the wheel: what a VLIW is

Lesson 20 · Graphs, critical paths and the exam table: list scheduling

Lesson 21 · Same loop, three shapes: unrolling, software pipelining and betting on the hot path

To the lesson list ↑

Module 6 · Memory hierarchy

Notes, chapter 6 and 4.4 · caches, the AMAT formulas of the formula sheet, nineteen optimisations, virtual memory

Lesson 22 · The memory wall and the illusion of a fast, big memory

Lesson 23 · Anatomy of a cache: the four questions and the exam cache table

Lesson 24 · Misses, penalties and the design space: the second level, the 3 C’s, from misses to seconds

Lesson 25 · Fewer misses: size, blocks, ways, victims, prediction, prefetching and the compiler

Lesson 26 · Cheaper misses: reads first, the critical word, caches that do not block, the second level

Lesson 27 · Virtual memory in one lesson, and VIPT: start the cache before the TLB answers

Lesson 28 · Hit time is the critical path: small L1, pipelined writes, and the nineteen-technique scorecard

To the lesson list ↑

Module 7 · Threads, vectors and GPUs

Notes, chapters 7–9 · multithreading, SIMD and vector machines, VMIPS and convoys, GPUs, tensor cores and NPUs

Lesson 29 · Multithreading: fine-grained, coarse-grained, SMT, and the exam’s per-thread CPI

Lesson 30 · Why Cray threw away the cache: Flynn, SIMD and the vector idea

Lesson 31 · VMIPS and the art of counting convoys: chaining, lanes, lengths, masks and banks

Lesson 32 · SIMD today: packed extensions, GPUs, tensor cores and NPUs

To the lesson list ↑

Module 8 · Multiprocessors and cache coherence

Notes, chapter 10 and the past papers · interconnects, shared vs distributed memory, snooping MSI / MESI, directory protocols

Lesson 33 · One machine, many brains: multiprocessors, buses and topologies

Lesson 34 · Where does the memory live? UMA, NUMA, DSM, clusters and programming models

Lesson 35 · The day the caches disagreed: coherence, snooping and the MSI machine

Lesson 36 · The E in MESI, and the exam table

Lesson 37 · The librarian: directory-based protocols, roles and messages

Lesson 38 · Four nodes, one block: directory walkthroughs and the exam exercise

To the lesson list ↑