3 3 votes In Dining philospher problem, there are X number of dinners and Y number of chopsticks. What is the minimum number of chopsticks required to insure that there will be no deadlock? A) X B) Y - X C) Y - X + 1 D) [Y/2] + 1 Operating System barc-2022 operating-system process-synchronization + – Udit Narayan 889 views answer comment Share Follow Print See 1 comment 1 1 comment reply Vishnu__ commented Jul 6, 2022 reply Follow flag As options b,c,d result in values which are lesser than Y, it cannot be the case. So the answer is option a. Please correct me if Im wrong ;) 0 0 replyShare Please log in or register to add a comment.
2 2 votes Answer should be A, which is X. I think here dinners is referring to the philosophers else question not making any sense. amitraj123 answered Apr 5, 2022 amitraj123 comment Share Follow See all 2 Comments 2 2 Comments reply Udit Narayan commented Apr 5, 2022 reply Follow flag Hii amitraj, in Dining philospher problem, if number of philosphers are n then number of spoons should be n+1. In case of n spoons, there may be a deadlock if all the philosphers pick up one spoon of thier right hand side ( or left hand side also) . So if there is one extraa spoon then we can insure that there will be no deadlock. Please verify this doubt. 1 1 replyShare amitraj123 commented Apr 5, 2022 reply Follow flag Yes. With n+1 spoon there will no deadlock. Except option A, no other options are making sense here. Read this. Dining Philosophers Problem (DPP) (tutorialspoint.com) 0 0 replyShare Please log in or register to add a comment.