OS Concepts · Chapter 6

Dining-Philosophers Problem

Five philosophers share five chopsticks around a table — a classic illustration of deadlock from circular waiting.

What's happening

Each chopstick is a semaphore shared by two neighbors. If everyone picks up their left chopstick at once, no one can get their right — deadlock. Breaking the symmetry (one philosopher reaches for the opposite chopstick first) avoids it.

Shared state

Dining-Philosophers Problem

0 / 0
Speed
RICE

Event log