CS FundamentalsHardGATE CS

In the dining philosophers problem with 5 philosophers, each picks up the LEFT fork and then the RIGHT fork. Which change by itself guarantees freedom from deadlock?

  1. A. Each philosopher waits a fixed 1 ms between picking up the two forks
  2. B. Use a counting semaphore initialised to 5 to limit philosophers at the table
  3. C. Philosopher 4 picks up the right fork first; all others pick left first
  4. D. Make every philosopher put down both forks after eating

Correct answer: C. Philosopher 4 picks up the right fork first; all others pick left first

One asymmetric philosopher breaks the circular wait. A table limit works only with at most 4 (not 5) seated philosophers; fixed delays do not prevent all grabbing their left fork together.

More Operating Systems questions

Exams that ask this topic