Authors: Aditya Pandey, Kartik, Vivek, Gaurang
This guide will get you up and running with the VMM Simulator in 5 minutes!
cd guipython3 -m http.server 8000Navigate to: http://localhost:8000
- Configure RAM size and algorithm in the configuration panel
- Click "Generate Trace" to create a memory access pattern
- Click "Run Simulation" to watch the visualization in real-time
- Observe TLB, page table, and frame visualizations update live!
That's it! No compilation needed.
makemake traces./bin/vmm -r 64 -p 4096 -t traces/working_set.trace -a LRU -T 64The simulation will output performance metrics to the console:
- Page faults and fault rate
- TLB hits/misses
- Swap I/O statistics
- Average memory access time
./bin/vmm -r 16 -p 4096 -t traces/sequential.trace -a FIFO -T 16Expected: High page fault rate with limited memory
./bin/vmm -r 128 -p 4096 -t traces/locality.trace -a LRU -T 128Expected: Low fault rate, excellent TLB hit rate
# Run with each algorithm
for algo in FIFO LRU CLOCK OPT; do
./bin/vmm -r 32 -p 4096 -t traces/random.trace -a $algo -T 32 \
--csv results_$algo.csv --config-name $algo
doneResult: CSV files for each algorithm that you can compare
==================== SIMULATION SUMMARY ====================
Memory Accesses:
Total: 10000
Reads: 8000 (80.0%)
Writes: 2000 (20.0%)
Page Faults:
Total: 324
Major: 42 (required swap-in)
Minor: 282 (no I/O)
Fault Rate: 3.24% ← Lower is better
TLB Performance:
Hits: 9456
Misses: 544
Hit Rate: 94.56% ← Higher is better
Swap I/O:
Swap-ins: 42
Swap-outs: 38
Replacements: 324
Average Memory Access Time:
AMT: 145.32 ns ← Lower is better
-
Fault Rate < 5%: Excellent - your RAM is sufficient
-
Fault Rate 5-20%: Good - reasonable performance
-
Fault Rate > 20%: Poor - thrashing likely occurring
-
TLB Hit Rate > 90%: Excellent locality
-
TLB Hit Rate 70-90%: Good
-
TLB Hit Rate < 70%: Poor locality or TLB too small
make testThis runs 10 comprehensive tests including:
- Algorithm correctness
- TLB effectiveness
- Multi-process handling
- Thrashing scenarios
- Read README.md for complete feature list
- Check DESIGN.md for architecture details
- See API.md to extend the simulator
- Try different trace patterns (sequential, random, locality)
- Compare algorithms with the same trace
- Vary RAM size and see impact on performance
- Test different page sizes (4KB vs 8KB vs 16KB)
- Generate your own traces with
./bin/trace_gen - Create custom trace files (format:
pid op addr) - Modify replacement algorithms in
src/replacement.c - Add new metrics in
src/metrics.c
# Ensure you have GCC installed
gcc --version
# Clean and rebuild
make clean
make# Generate them
make traces- Try a different browser (Chrome recommended)
- Check if port 8000 is available
- Use a different port:
python3 -m http.server 8080
- Check TESTPLAN.md for expected behavior
- Read error messages carefully
- Enable debug mode:
./bin/vmm ... -D - Run with valgrind:
make valgrind
Developed by: Aditya Pandey, Kartik, Vivek, Gaurang
For educational and research purposes.
Enjoy exploring virtual memory management! 🎉