Rust · clap only · no fabricated numbers

Gantt charts, run for real,
not sketched on a whiteboard.

Chronos is a CPU scheduler in Rust. It simulates FIFO, SJF, round-robin, priority, and MLFQ over a set of processes and reports the actual completion, turnaround, waiting, and response times. Here is the real algorithm, running in your browser.

PIDArrivalBurstPriority
PIDArrivalBurstCompletionTurnaroundWaitingResponse

How each scheduler decides.

The same five algorithms the Rust binary runs, ported line for line into the demo above.

1

FIFO

Sorted by arrival time, ties by id. Runs each process to completion in that order, no interruption.

2

SJF

Non-preemptive. Among processes that have arrived, always picks the smallest remaining burst next.

3

Round robin

Every ready process gets a fixed quantum, cycling through the queue until each one finishes.

4

Priority

Non-preemptive. Picks the lowest priority value among arrived processes, lower value runs first.

5

MLFQ

Three levels, quantum 4 then 8 then FCFS. A process that burns its whole quantum gets demoted a level.

6

Metrics

Completion, turnaround, waiting, and response are computed from the real timeline, then averaged.

Run it from the command line.

The same simulation, printed as a Gantt chart and a metrics table.

# round robin, quantum 2, three processes
cargo run -- run --algo rr --quantum 2 --procs "0:5,1:3,2:8"