A frontend web application for simulating various page replacement algorithms used in operating systems memory management.
-
Five Page Replacement Algorithms:
- FIFO (First In First Out)
- LRU (Least Recently Used)
- OPT (Optimal)
- LFU (Least Frequently Used)
- Clock Algorithm
-
Interactive Visualization:
- Step-by-step simulation visualization
- Real-time frame status display
- Hit/Fault statistics
- Detailed explanations for each step
- React 19 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- Tailwind CSS - Styling
├── src/ # Frontend source code
│ ├── components/ # React components
│ ├── utils/ # Utilities (simulator, API wrapper)
│ └── types.ts # TypeScript types
└── package.json # Dependencies and scripts
- Node.js (v18 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd Page-Replacement-Algorithm-Simulator- Install dependencies:
npm installStart the development server:
npm run devThe application will be available at http://localhost:5173 (or next available port).
Build the application:
npm run buildPreview the production build:
npm run preview- Select a page replacement algorithm from the dropdown
- Enter a page request sequence (e.g.,
1,2,3,4,1,2,5,1,2,3,4,5) - Set the memory size (number of frames, 1-10)
- Click "Start Simulation"
- Navigate through steps to see detailed visualization
The project uses:
- Vite for frontend development with hot module replacement
- All simulations run entirely in the browser - no backend required!
MIT