A web-based CPU scheduling simulator built with HTML, CSS, and JavaScript for Operating System final project. Visualize and compare FCFS, SJF, SRTF, Priority, and Round Robin algorithms with interactive Gantt charts and performance metrics.
This simulator lets you:
- Define processes (PID, arrival time, burst time, priority, time quantum).
- Run and step through multiple scheduling algorithms.
- View dynamic Gantt charts and key metrics: turnaround time, waiting time, throughput, CPU utilization.
- Process CRUD: Add, edit, delete processes on the fly.
- Algorithms Supported:
- First-Come, First-Served (FCFS)
- Shortest Job First (SJF)
- Shortest Remaining Time First (SRTF)
- Priority Scheduling (preemptive & non-preemptive)
- Round Robin (RR)
- Interactive Controls:
- Next Step
- Run to Completion
- Reset Simulation
- Real-Time Metrics: Automatic calculation and display of average turnaround & waiting times, throughput, and CPU utilization.
- Clone the repository
git clone https://github.com/leighTOR/CMSC314.git cd CMSC314/process-scheduling-simulator
- Open
index.html
in your browser.
No server or build tools required—purely client-side.
-
Add Processes – Click + to create a new row, enter PID, arrival, burst, (optional) priority/quantum.
-
Select Algorithm – Choose from the dropdown.
-
Run Simulation
- Next: advance one decision
- Run: complete all steps
- Reset: clear chart and metrics
-
Analyze Results – Gantt chart shows scheduling order. – Metrics panel updates in real time.
CMSC314/
└── process-scheduling-simulator/
├── css/
│ ├── bootstrap-simplex.css
│ ├── cpu-scheduler.css
│ └── explanation.css
├── js/
│ ├── bootstrap-slider.js
│ ├── bootstrap.min.js
│ ├── cpu-scheduler.js
│ ├── MathJaxSetup.js
│ └── new.js
├── index.html
└── README.md
Improvements, bug fixes, and new features are welcome:
- Fork the repo
- Create a feature branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -m "Add ..."
) - Push to your branch (
git push origin feature/your-feature
) - Open a Pull Request
Please include screenshots for any UI changes and update this README accordingly.
For educational purposes only.
These pages are deliberately designed to look like real banking sites—do not deploy them publicly or use them to collect data. Always practice safe browsing habits and report suspicious sites to the proper authorities.