06Step 6 of 9 · Policy lab

Same trace, every policy

Run one trace through FIFO, LRU, LFU, CLOCK, RANDOM and OPT at seven TLB sizes. When more entries cause more misses, it is Belady’s anomaly, and the lab flags it automatically.

KSame trace, every policy, every size

Fully associative TLB at 1–32 entries. OPT (Belady's optimal) sees the future and is the lower bound on misses. A rising line for FIFO with more entries is Belady's anomaly.

Run the experiment to plot hit ratio against TLB size.