How mahdeehaq/os-lab-project--memory_simulator works
This C++ memory-simulation project includes page-input helpers, a FIFO page-replacement implementation, a result data model, and a step-table printer. The intended workflow is to enter or load page references and a frame count, run replacement, then inspect hits, faults, and evictions. However, the sampled main function only prints a greeting: no shown code connects input, FIFO, and printing. The README names paging, replacement, and workload analysis, but the tree and excerpts support only FIFO; other algorithms or analysis stages are not represented here.
Main entry points: result.h Simulation result · input.cpp Input validation · fifo.cpp FIFO replacement · print.cpp Step-table output
Components 7
Program entry
- Greeting entry
src/main.cpp
Page input
- Input validation
src/input.cpp
FIFO simulation
- FIFO replacement
src/fifo.cpp
Results and reporting
- Simulation result
include/result.h - Step-table output
src/print.cpp
Other components
- Keyboard user
- Page-reference file
Connections 4
- Keyboard user → Input validation: enters values
src/input.cpp - Page-reference file → Input validation: reads references
src/input.cpp - FIFO replacement → Simulation result: returns result
src/fifo.cpp - Simulation result → Step-table output: reads steps
src/print.cpp