Operating Systems · Chapter 5

CPU Scheduling Simulator

Compare how different CPU scheduling algorithms order processes and how that choice changes waiting time, turnaround time, response time, and completion time.

ProcessArrivalBurstPriorityCompletionTurnaroundWaitingResponse

Gantt Chart

Priority: smaller number means higher priority. SRTF always selects the process with the shortest remaining CPU burst.

Performance Metrics

Average waiting time
Average turnaround time
Average response time
Total finish time

How to read the algorithms

FCFS: runs processes in arrival order. Simple, but a long job can delay everything behind it.

SJF: among arrived processes, chooses the shortest burst. It usually reduces average waiting time, but long jobs may wait.

SRTF: preemptive SJF. A newly arrived shorter job can interrupt the running process.

Priority: chooses the highest-priority arrived process. In this simulator, lower numeric values mean higher priority.

Round Robin: each ready process receives at most one quantum before returning to the ready queue.