Page Replacement 2D — LRU, FIFO & Optimal
Canvas2D page-replacement simulator: run FIFO, LRU, Clock and Optimal against a reference string, count page faults live, and reproduce Bélády's anomaly.
This 2D companion ports the same FIFO, LRU, Clock and Optimal page-replacement logic from the 3D version onto a plain canvas frame table: each column is one reference, each row a memory frame, hits are green and faults red, and clicking any column scrubs the animation straight to that step.
Canvas2D frame-table animation running the same fault-counting algorithms as the original — FIFO, LRU, Clock and Bélády's Optimal — including the classic Bélády's-anomaly preset.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install
Frequently asked questions
How is this different from the 3D version?
Same FIFO/LRU/Clock/Optimal algorithms and the same Bélády's-anomaly preset, rendered as a flat Canvas2D frame table instead of a WebGL scene — lighter to load and easier to read at a glance.
What is Bélády's anomaly?
The counter-intuitive case where giving FIFO more frames produces more page faults, not fewer. Load the preset button, run at 3 frames then 4, and compare the fault counts.