CS FundamentalsHardGATE CS

Five dining philosophers each pick up the left fork and then the right fork. Which change removes the possibility of deadlock without a central arbiter?

  1. A. Make every philosopher wait a random time before picking up the left fork
  2. B. Make every philosopher pick up the right fork first instead
  3. C. Make one philosopher pick up the right fork first while the others pick up the left first
  4. D. Let a philosopher put down the left fork after eating

Correct answer: C. Make one philosopher pick up the right fork first while the others pick up the left first

Making one philosopher asymmetric breaks the circular wait: the cycle of everyone holding one fork and waiting for the next can no longer form. Reversing everyone's order just mirrors the same cycle, and random delays only make deadlock less likely.

More Operating Systems questions

Exams that ask this topic