Operating systems notes

CPU Scheduling I: The Basics

Many threads want the CPU and there is only one, the rules the OS uses to decide who runs next. Every section is a drawn page beside a clear written explanation, about 19 minutes in all.

  • Chapter 11 of 37
  • About 19 minutes
  • 9 sections

Sign in with Google or GitHub and you land straight on this page. DSA comes with the all labs plan and every ChaiCode batch.

The first drawn page of CPU Scheduling I: The Basics: The scheduling problem: too many threads, too few CPUs
The chapter's first page: The scheduling problem: too many threads, too few CPUs

In this chapter

  • The scheduling problem: too many threads, too few CPUs
  • When scheduling happens: preemptive vs non-preemptive
  • Scheduling criteria: what "better" even means
  • FCFS: First-Come, First-Served
  • SJF: Shortest Job First
  • SRTF: Shortest Remaining Time First (preemptive SJF)
  • Round Robin: taking turns
  • Priority scheduling & the starvation problem
  • Comparing them, and why engineers care

Next chapters

Read the whole chapter

Sign in and the chapter opens with every drawn page, and all 38 operating systems chapters beside it.

DSA comes with the all labs plan and every ChaiCode batch.