HomeNetworks & Graph TheoryPage Replacement Policies: FIFO, LRU, Clock and Optimal

🗂 Page Replacement Policies: FIFO, LRU, Clock and Optimal

Interactive 3D memory-frame grid where feeding a simulated page-request sequence through FIFO, LRU, clock and optimal algorithms compares page-fault counts side by side.

Networks & Graph Theory3DAdvanced60 FPS
page-replacement-policies-lab ↗ Open standalone

A shared stream of memory-page requests is fed simultaneously into four rows of memory frames, one per replacement policy, so you can watch FIFO, LRU, clock and optimal make different eviction calls on the exact same sequence.

🔬 What It Demonstrates

Each row runs the identical request sequence but keeps its own eviction logic. A box flashes orange on a page fault and green on a hit, and each row's bar grows with its running fault count — making the gap between a cheap heuristic and the optimal bound visible at a glance.

🎮 How to Use

Set the frame count and feed speed, and pick a request pattern — including a Belady worst-case sequence that can make FIFO get worse with more frames. Generate a new sequence any time and compare fault totals across policies.

💡 Did You Know?

The optimal policy (Belady's MIN) is provably fault-minimal but needs to know the future — it's unimplementable in a real OS and exists purely as the yardstick every practical algorithm is measured against.

⚙ Under the hood

Interactive 3D memory-frame grid where feeding a simulated page-request sequence through FIFO, LRU, clock and optimal algorithms compares page-fault counts side by side.

page-replacementlrumemory-managementoperating-systemscomputer-sciencenetworks

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)