How locdt0190-svg/vme13_pagereplacement_nhom1 works
This is a Tkinter page-replacement simulator. The user loads a CSV containing frame count and page references, selects FIFO, LRU, OPT, or Second-Chance, then steps through or runs the simulation and can export its trace as CSV. The GUI owns input handling, algorithm dispatch, progress, and output; the algorithm module returns per-step frames, hit/fault status, victims, and a fault count. The source shows LRU and Second-Chance currently delegate to FIFO. Relationships are limited to those visible in the excerpts and README.
Main entry points: main.py Algorithm dispatch · algorithms.py Replacement algorithms
Components 10
User interface
- GUI and workflow
source/main.py - Step and run controls
source/main.py - RAM and trace display
source/main.py
Simulation
- Algorithm dispatch
source/main.py - Replacement algorithms
source/algorithms.py
CSV data
- CSV loader
source/main.py - CSV exporter
source/main.py
Other components
- User
- Input CSV
- Output CSV
Connections 10
- User → GUI and workflow: runs
README.md - User → CSV loader: chooses file
source/main.py - Input CSV → CSV loader: reads
source/main.py - CSV loader → Algorithm dispatch: sets inputs
source/main.py - Algorithm dispatch → Replacement algorithms: dispatches to
source/main.py - User → Step and run controls: selects controls
source/main.py - Step and run controls → RAM and trace display: renders step
source/main.py - User → CSV exporter: requests export
source/main.py - CSV exporter → Output CSV: writes
source/main.py - Algorithm dispatch → RAM and trace display: resets display
source/main.py