An intelligent machine learningβdriven page replacement simulator that predicts future memory accesses to reduce page faults in virtual memory management. This project compares ML-based predictions with traditional algorithms such as LRU and FIFO.
- Predicts optimal page eviction using machine learning
- Simulates memory access traces
- Compares performance with LRU and FIFO algorithms
- Measures hit ratio and page fault rates
- Visualizes performance using graphs
- Python
- NumPy
- Pandas
- Scikit-learn
- Matplotlib
ml-page-replacement/
β
βββ data/ # Memory trace datasets
βββ models/ # Trained ML models
βββ src/
β βββ simulator.py # Page replacement simulator
β βββ ml_model.py # ML training and prediction
β βββ utils.py # Helper functions
β
βββ results/ # Performance outputs and graphs
βββ README.md
- Clone the repository:
git clone https://github.com/prashant1039/ml_page_replacement.git
cd ml_page_replacement- Install dependencies:
pip install numpy pandas scikit-learn matplotlibRun the simulator:
python src/simulator.pyThe program will:
- Train the ML model
- Simulate memory access patterns
- Compare results with LRU and FIFO
- Display performance graphs
The ML-based approach improves prediction of future page accesses and demonstrates:
- Reduced page faults
- Higher hit ratio
- Better adaptability to access patterns
- Understanding of virtual memory management
- Application of machine learning to systems problems
- Performance benchmarking and evaluation
- Data preprocessing and model training
Contributions are welcome! Feel free to fork the repository and submit pull requests.
This project is open source and available under the MIT License.
Prashant Singh