Lab · Lecture 6

Scheduling simulator

See how each CPU scheduling algorithm decides who runs next, and check your own Gantt charts against the machine.

Theory first? Read Lecture 6
  1. 1

    Pick an algorithm at the top. Load a slide example from the preset menu or type your own arrival and burst times.

  2. 2

    Press Play under the Gantt chart. The CPU box, the ready queue and the event log explain every decision tick by tick.

  3. 3

    Switch to Practice. You get a random problem, fill in the table by hand, and the simulator marks each cell.

Try this first: keep the FCFS slide preset, switch the algorithm to SJF, and watch the average waiting time drop from 17 to 3.

Algorithm

First come, first served.

The convoy effect: two short jobs wait behind one long one. Avg WT 17, avg TAT 27.

Processes

3 / 10
IDArrivalBurstRemove
P1
P2
P3

Gantt chart

P1 P2 P3
P1P2P3idle
t = 30 / 30
CPU
done
Ready queue (front first)
empty
t=30: P3 completes (CT 30). All processes complete

Metrics

TAT = CT - ATWT = TAT - BTRT = first start - ATutilisation = busy / total
ProcessATBTCTTATWTRT
P1024242400
P20327272424
P30330302727
Average271717
Context switches
2
Total time
30
CPU utilisation
100.0%
Throughput
0.10 / unit

Compare algorithms

Same processes, all six policies. RR uses q = 2.
AlgorithmAvg WTAvg TATAvg RTSwitches
FCFScurrent1727172
SJF31332
SRTF31332
Priority NP1727172
Priority P1727172
RR6.3316.3326