A modern, interactive, and responsive web application designed for operating systems analysis. Simulate, visualize, and compare CPU scheduling algorithms with interactive Gantt timelines, calculated performance metrics, and dynamic mathematical verdicts.
Created by: Joel & Hiyailen
- 🚀 Supported Algorithms:
- FCFS (First-Come, First-Served) — Non-preemptive scheduling order.
- SJF (Shortest Job First) — Non-preemptive or Preemptive SRTF (Shortest Remaining Time First).
- Priority Scheduling — Non-preemptive (default) & Preemptive modes with customizable priority ranking (Lower number = Higher priority, or vice versa).
-
Round Robin (RR) — Preemptive scheduling with a customizable Time Quantum (
$Q$ ).
- 📊 Interactive Execution Timeline (Gantt Chart):
- Color-coded process blocks with staggered spring entrance animations.
- Precise hover tooltips displaying start/end execution times and total duration.
- CPU Idle state visualization with striped patterns.
- 📈 Comprehensive Process Metrics:
- Calculates Completion Time (CT), Turnaround Time (TAT), Waiting Time (WT), and Response Time (RT) per process.
- Animated statistics cards for Average WT, Average TAT, Average RT, and CPU Utilization %.
- 🏆 Side-by-Side Algorithm Comparison & Verdict Engine:
- Runs all four algorithms on the exact same process dataset simultaneously.
- Side-by-side metric comparison tiles featuring
BESTperformance highlight badges. - Dynamic Performance Verdict: Automatically generates plain-English analysis identifying which algorithm mathematically performed best for the given workload.
- Chart.js Visual Analytics: Bar charts comparing Average WT, TAT, and RT across all algorithms.
- 💡 Built-in Workload Presets:
- Sample Default Batch
- Convoy Effect (FCFS CPU-bound lag demonstration)
- SRTF Advantage (Demonstration of preemptive shortest job efficiency)
- Priority Starvation (Demonstrates priority queue lag)
- Equal Arrival Times
- 🎨 Monochromatic Modern Design:
- High-contrast typography featuring Space Grotesk, Inter, and JetBrains Mono.
- Fully responsive grid layout for desktop, laptop, and mobile screens.
The simulator executes exact calculations based on standard Operating System principles:
OS Lab/
├── assets/ # Application UI screenshots
│ ├── fcfs-view.png
│ ├── sjf-view.png
│ ├── priority-view.png
│ ├── rr-view.png
│ └── comparison-verdict.png
├── index.html # Main HTML structure, layout, and tabs
├── styles.css # Monochromatic styling, CSS grid, and animations
├── server.js # Lightweight Node.js static HTTP file server
├── package.json # Project metadata and start scripts
└── js/
├── scheduler.js # Core OS scheduling logic & metric calculator
├── charts.js # Gantt chart renderer & Chart.js integration
└── app.js # App controller, event handlers, and animation logic
Make sure you have Node.js (v14 or higher) installed on your system.
-
Clone the Repository:
git clone https://github.com/your-username/cpu-scheduling-simulator.git cd cpu-scheduling-simulator -
Run the Application: Start the built-in lightweight Node server:
node server.js
or using npm script:
npm start
-
Open in Browser: Navigate to
http://localhost:8080/in your web browser.
Developed with ❤️ for Operating Systems Lab by:
- Joel
- Hiyailen
This project is licensed under the MIT License.




