Interactive Optimal (Belady's) page replacement simulator with future-lookahead visualization, decision explainer, step controls, statistics, and step history.

Presets
Reference string dashed 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
evict
(furthest)
soonest
needed
Speed
Page faults
0
Page hits
0
Hit ratio
0%
Step historylatest 2 steps
# Page Frames after Result
No steps yet