This project presents an interactive simulation of three fundamental Page Replacement Algorithms—FIFO, LRU, and OPT (Optimal Replacement)—built using React and TypeScript. Designed for both educational and demonstrative purposes, the application visualizes memory operations with animations, providing an intuitive understanding of how each algorithm behaves.
- React (TypeScript) – A powerful JavaScript library for building interactive user interfaces, enhanced with static typing using TypeScript.
- Framer Motion – A production-ready motion library for React to create smooth, visually appealing animations.
- Electron – A framework for building cross-platform desktop apps using web technologies like HTML, CSS, and JavaScript.
- Node.js + npm – Node.js enables JavaScript to run server-side; npm is its package manager used to install and manage dependencies.
-
FIFO (First-In, First-Out)
- Replaces the page that entered memory first.
-
LRU (Least Recently Used)
- Replaces the page that hasn’t been used for the longest time.
-
OPT (Optimal Replacement)
- Replaces the page that won’t be used for the longest time in the future.
Each simulation visually represents:
- 🟩 Cache Hits
- 🟥 Cache Misses
- 🔄 Page Evictions
- Go to the
executable/
directory. - Download and unzip one of the following based on your OS:
Cache Simulator Setup 1.0.0.exe.zip
Cache Simulator-1.0.0.dmg.zip
- Run the extracted
.exe
(Windows) or.dmg
(macOS) file.
You can also access the application instantly without setup by visiting the live deployment:
https://page-replacement-simulation-zeta.vercel.app
Just open this URL in any modern browser to use the interactive page replacement simulation online.
The full case study is available at:
docs/OS CASE STUDY - Gilbert Cura.pdf
Gilbert Cura Final Project – Chapter 10: Page Replacement Algorithms