in Operating System recategorized by
505 views
3 votes
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
in Operating System recategorized by
505 views

1 comment

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

1 Answer

2 votes
2 votes
Answer should be A, which is X. I think here dinners is referring to the philosophers else question not making any sense.

2 Comments

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

 

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

Related questions