Develop a memory management simulator to simulate various Page Replacement Algorithms: First In First Out (FIFO), Least Recently Used (LRU), Least Frequency Used (LFU), and Optimal algorithms.
-
Programming Language & Structure:
- Implement the simulator using classes and data structures in any chosen programming language.
-
User-Friendly Interface:
- Create an intuitive interface allowing users to:
- Input parameters: Sequence of page references, frames in physical memory, and other relevant settings.
- Visualizations or output mechanisms: Display progression of page replacements and the physical memory state at each step for better comprehension.
- Logging: Record statistics (e.g., page hits, faults) to facilitate analysis and algorithm comparison.
- Create an intuitive interface allowing users to:
-
Page Replacement Log:
- Detailed log of each page replacement action: indicating replaced and newly brought pages into physical memory.
-
Memory State Visualization:
- Visual representation illustrating memory state after each replacement: display pages in physical memory and their states (e.g., recently used, frequency counts).
-
Performance Metrics:
- Clear presentation of key metrics like page hit percentage, fault percentage, and other relevant statistics.
-
Summary Statistics:
- Aggregate statistics summarizing the overall performance of each page replacement algorithm.
Number of Page References:
- Number of page references in the sequence.
Sequence of Page References:
- Sequence of page references (e.g., 1 2 3 4 1 2 5 1 2 3).
Number of Frames in Physical Memory:
- Number of frames in physical memory.
Example:
10 (number of page references)
1 2 3 4 1 2 5 1 2 3 (sequence of page references)
3 (number of frames in physical memory)