Interactive Optimal (Belady's) page replacement simulator with future-lookahead visualization, decision explainer, step controls, statistics, and step history.
Presets
Reference stringdashed outline = next use of a cached page
Step 0 / 0
Idle
Press play or step forward to begin. Optimal looks at all future references and evicts the page whose next use is furthest away (or that's never needed again). It requires future knowledge, so it can't run in practice — it's the lower bound any real algorithm is measured against.
Frames ordered by future need · furthest future → soonest needed