___ ___ _ _ _ ___ ___ _ _ _ _
| _>| . \| | | < > | . \ ___ ___ ___ | . || | ___ ___ _ _ <_> _| |_ | |_ ._ _ _ ___
| <__| _/| ' | /.\/ | _/<_> |/ . |/ ._> | || |/ . |/ . \| '_>| | | | | . || ' ' |<_-<
`___/|_| `___' \_/\ |_| <___|\_. |\___. |_|_||_|\_. |\___/|_| |_| |_| |_|_||_|_|_|/__/
<___' <___'
A simple program for analyzing and visualizing CPU scheduling and page replacement algorithms, with automated data generation and reporting.
-
CPU Scheduling Algorithms:
- SJF (Shortest Job First, preemptive & non-preemptive)
- Round Robin (configurable quantum)
- Priority-based scheduling
- Automated workload generation
-
Page Replacement Algorithms (configurable frames):
- LRU (Least Recently Used)
- LFU (Least Frequently Used)
- Automated sequence generation
-
Data Generation:
- Custom distributions for processes and page references
- CSV and JSON export for input datasets
- Batch generation for multiple test sets
-
Performance Analysis:
- Average turnaround, waiting, completion and response times
- Page hit/miss rates and execution time
- Comparative analysis across algorithms and datasets
-
Visualization:
- Gantt charts for CPU scheduling
- Performance graphs and histograms
- Automated report and chart export (PNG, CSV, TXT)
- Python 3.13
- Required packages:
matplotlib>=3.9.2 pandas>=2.2.2 numpy>=1.26.4
-
Install dependencies:
pip install -r requirements.txt
-
Run simulations:
- CPU Scheduling:
python cpu_scheduling/cpu_RUN.py
- Page Replacement:
python page_replacement/page_RUN.py
- CPU Scheduling:
README.md
cpu_scheduling/
cpu_generate.py
cpu_RUN.py
cpu_simulate.py
SJF.py
SRTF.py
RR.py
input_data/
output_data/
page_replacement/
page_generate.py
page_RUN.py
page_simulate.py
LRU.py
LFU.py
input_data/
output_data/
This project is released under the MIT License.