DSA Factory
Free CPU scheduling lessonsCPU scheduling · Stage 1 · Shortest first · Step 1

Shortest job first

Run the shortest waiting job next, see why that minimises average waiting, and how the OS guesses lengths. About 14 minutes.

Quick check

Why can't an operating system run exact shortest-job-first?

  1. AIt doesn't know how long a process's next CPU burst will be
  2. BSorting the ready queue takes too long
  3. CIt would need preemption, which OSes don't support
Show the answer

It doesn't know how long a process's next CPU burst will be. It can only predict the length from past bursts.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve