How kondim23/mmu-page-replacement-simulator works
This C simulator takes two memory-reference traces, alternates processing batches for two processes, translates virtual page references into frame-based physical addresses, and reports paging and disk-I/O statistics. Its main loop coordinates page lookup, page-fault handling, replacement, dirty-page accounting, and trace output. The internal layers are a hashed page table and frame-management code implementing LRU and Second Chance. The README documents these capabilities; the graph omits unsupported links beyond those shown in the excerpts.
Main entry points: simulator.c Trace simulator · pageTable.c Page hash tables · memoryStructure.c Frame manager · bzip.trace Bzip trace
Components 9
Simulation
- Trace simulator
src/simulator.c - Bzip trace
data/bzip.trace - GCC trace
data/gcc.trace
Memory Management
- Page hash tables
src/pageTable.c - Frame manager
src/memoryStructure.c - LRU replacement
src/memoryStructure.c - Second Chance
src/memoryStructure.c
Accounting
- Paging statistics
src/simulator.c
Other components
- Simulator user
Connections 14
- Simulator user → Trace simulator: selects options
README.md - Trace simulator → Bzip trace: reads references
src/simulator.c - Trace simulator → GCC trace: reads references
src/simulator.c - Trace simulator → Page hash tables: searches pages
src/simulator.c - Trace simulator → Page hash tables: updates mappings
src/simulator.c - Trace simulator → Frame manager: updates dirty bits
src/simulator.c - Trace simulator → LRU replacement: dispatches replacement
src/simulator.c - Trace simulator → Second Chance: dispatches replacement
src/simulator.c - LRU replacement → Page hash tables: reads usage counters
src/memoryStructure.c - Second Chance → Page hash tables: reads reference bits
src/memoryStructure.c - Frame manager → Page hash tables: refreshes reference bits
src/memoryStructure.c - Trace simulator → Paging statistics: reports counts
src/simulator.c - Frame manager → Paging statistics: counts dirty frames
src/simulator.c - Trace simulator → Simulator user: prints addresses
src/simulator.c