This project is a simulation of page replacement algorithms used in Operating Systems to manage virtual memory.
When a page fault occurs and memory frames are full, the OS must decide which page to replace.
This simulator demonstrates how different algorithms make that decision.
The program provides a step-by-step visualization of memory frames, clearly showing page hits and page faults.
- FIFO (First In First Out)
- LRU (Least Recently Used)
- Optimal Page Replacement
- Arrays – page frames and reference string
- Counters / index tracking – FIFO
- Time-stamp logic – LRU
- Greedy strategy – Optimal algorithm
- User-defined number of memory frames
- Custom page reference string input
- Step-by-step frame state after each page request
- Page HIT / FAULT identification
- Total page fault calculation for each algorithm
- Clear comparison of algorithm behavior
Page 7 -> 7 - - FAULT Page 0 -> 7 0 - FAULT Page 1 -> 7 0 1 FAULT Page 0 -> 7 0 1 HIT Page 2 -> 2 0 1 FAULT