← CS Visual Lab · Operating Systems

⏱️ CPU scheduling

💡 The ideaMany processes want one CPU. The scheduler decides who runs next. FCFS serves in arrival order, SJF picks the shortest job, SRTF is SJF that can interrupt, Round Robin gives each a fixed time slice, Priority picks the most important.
🏠 In real lifeA bank counter: FCFS is a normal queue; SJF lets the person with one cheque go first; Round Robin gives everyone 2 minutes and sends them to the back.

🎬 Watch it work

Step 1 of 12
P1
024681011131416182022

Step 1: P1 runs from 0 to 2.

✅ Check yourself (2 of 3 to pass)

1. Which algorithm gives the minimum average waiting time when all jobs arrive together?
2. Turnaround time =
3. A very large time quantum makes Round Robin behave like:
Next: Page replacement →Get a free certificate in Operating Systems