In the dining philosophers problem, what can happen if every philosopher picks up the left chopstick at the same moment?
Correct answer D. Deadlock, because each waits forever for the right chopstick
If all five philosophers grab their left chopstick together, every chopstick is held and each waits for the right one, which a neighbour holds: a circular wait, so deadlock. Fixes include letting at most four sit at the table, picking up both chopsticks only when both are free, or having an odd-numbered philosopher pick up left first and an even one right first to break the cycle.
Answer checked How we write and check questions
Discussion