Back to the work
Operating Systems · Developer

CPU Scheduling Visualizer.

An interactive web visualizer for 9 CPU scheduling algorithms: build a process set with CPU and I/O bursts, run any algorithm, and compare them on a Gantt chart by average completion, turnaround, waiting, and response time.

Role
Developer
When
2021
Stack
JavaScript, HTML, CSS, Node.js
Scale
9 algorithms schedulers
CPU Scheduling Visualizer preview9 algorithms · Gantt
9 algorithmsschedulers
4 metricscompared
1,105 linesvanilla JS
IEEE 2021paper implementation

The problem

CPU scheduling algorithms are easy to state and hard to feel: the difference between FCFS, Round Robin, and HRRN only becomes intuitive when you watch the same processes scheduled different ways and compare the numbers. The goal was a browser tool to do exactly that, build a process set, run any of the standard algorithms, and see the schedule and its metrics side by side.

What it does

  1. Implements 9 algorithms, FCFS, SJF, SRTF, LJF, LRTF, Priority (non-preemptive and preemptive), Round Robin, and HRRN, as one discrete-event scheduler driven by a per-tick ready queue.
  2. Models each process with both CPU and I/O bursts, arrival time, and priority, with configurable context-switch time, time quantum, and a high/low priority preference.
  3. Renders the resulting schedule as a Gantt and timeline chart and compares all algorithms by average completion, turnaround, waiting, and response time, including a Round Robin sweep across time quanta.
  4. Extracts the core scheduling logic into a Node-runnable test suite covering all 9 algorithms, so the engine can be verified outside the browser.

Impact

  • Runs entirely in the browser on GitHub Pages: define a custom process set and try every algorithm on it with no setup.
  • Turns scheduling theory into a side-by-side comparison, making the trade-offs between algorithms visible on the same input.
  • Built as the implementation behind a published IEEE paper (AIMV 2021) that applied CPU-scheduling ideas to vaccine-distribution scheduling.