Discussion
A solution to the Dining Philosophers Problem which avoids deadlock is
Answer: C
The deadlock-free solution is to let one particular philosopher pick up the left fork first, while all the others pick up the right fork first.
Deadlock occurs when every philosopher holds one fork and waits for the next, forming a cycle. If all of them pick up forks in the same order, left first or right first, that cycle can form. Making one philosopher take the forks in the opposite order breaks the circular wait, so at least one philosopher can always get both forks.
So the first two options both allow deadlock, and since option C works, 'None of the above' is wrong.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development