DSA Factory
Free Synchronization lessonsSynchronization · Stage 2 · The classic problems · Step 3

The dining philosophers

See how each philosopher grabbing a fork can freeze everyone, and the standard ways to prevent it. About 13 minutes.

Quick check

Which condition does "always pick up the lower-numbered fork first" break?

  1. ACircular wait
  2. BMutual exclusion
  3. CNo preemption
Show the answer

Circular wait. With a single global order, a cycle of waits can't form.

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