DSA Factory
All free lessons
Operating systems

Free CPU scheduling lessons

9 lessons, about 2 hours in all. Each teaches one idea with a visual, then gives you a problem or a few questions on it. Read the lessons here, then create a free account to practise and keep your progress.

Stage 0The scheduler's job

  1. Why the OS needs a schedulerSee why processes take turns on the CPU, who decides, and when the decision happens.12 min
  2. Measuring a scheduleRead turnaround, waiting and response times off a Gantt chart, plus throughput and utilisation.14 min
  3. First come, first servedRun processes in arrival order, and see how one long job can hold up everyone behind it.12 min

Stage 1Shortest first

  1. Shortest job firstRun the shortest waiting job next, see why that minimises average waiting, and how the OS guesses lengths.14 min
  2. Shortest remaining time firstLet a shorter arrival interrupt the running process, and weigh the better averages against more switching.13 min

Stage 2Priorities and taking turns

  1. Priority schedulingRun the most important process first, see how low priorities starve, and how aging fixes it.14 min
  2. Round robinGive every process a short turn in rotation, and choose the time quantum that balances response and overhead.14 min

Stage 3Real schedulers

  1. Multilevel feedback queuesLet the scheduler learn which processes are interactive by watching how they use their turns.14 min
  2. Real systems, and choosing a policySee what Linux and Windows actually do, how multicore changes things, and how to pick a policy for a job.15 min

All of CPU scheduling is free

That’s the whole topic, from the first idea to the mastery stage, with no card needed. Create a free account to practise, keep your progress and carry on to the next topic.

Create your free account