generated from OPCODE-Open-Spring-Fest/template
-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
Description
So, what is it about?
📌 Description
Implement a Page Replacement Algorithm Simulator in C++ that mimics how an operating system handles memory pages when a page fault occurs.
The simulator should allow users to enter:
- Number of frames
- A sequence of page requests
- Choice of algorithm (FIFO, LRU, Optimal)
Then it should simulate page hits/misses and show the frame table after each request.
This feature should be implemented in a single C++ file with no external libraries.
🎯 Expected Outcome
A console-based tool that:
- Takes input for frames and page requests
- Runs page replacement using:
- FIFO (First-In-First-Out)
- LRU (Least Recently Used)
- Optimal Page Replacement
- Displays:
- Frame table after each request
- Hit/Miss status for each request
- Final total hits, total misses, and hit ratio
- Keeps the code simple and readable for beginners
Suggested difficulty: hard
Code of Conduct
- I agree to follow this project's Code of Conduct