← 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
024681011131416182022
Step 1: P1 runs from 0 to 2.