in Operating System edited by
814 views
1 vote
1 vote

Que- Consider the following statements about the dining philosopher problem.
1. There should be at least 6 chopsticks to avoid deadlock for 6 philosophers.
2. If the asymmetric solution is implemented then $1^{st}$ philosopher picks up her right chopstick first while $6^{th}$ philosopher picks up her left chopstick first.

Which of the above statement is correct?
a. Only 1
b. Only 2
c. Both I and II
d. None of the above

in Operating System edited by
814 views

6 Comments

i think only a
0
0
there are 3 types of solution for dining philosopher problem

1) using semaphores

2) form two groups as alternative persons are in one group (i.e., 1-3-5-... in one group, 2-4-6-... in another group.)

     one group has first pick Left fork then Right fork

     another group should has to first pick Right fork then Left fork

3) philosophers are numbered as 0 to n-1, as similar to second one, where 0,....n-2 philosophers in one group, n-1$^{th}$ as one group.

      that single person has to first pick Right fork then Left fork, remaining are first pick Left fork then Right fork.
2
2

Thanks, @Shaik sir.
@Deepanshu @Shaik sir, Can you please give an example for deadlock in case of $2^{nd} statement$?

0
0
i mean to say, answer is option C
0
0
Ohh..Ok.. I too think so.  Thank you.
In made easy solution, they gave-  option A .
0
0
they have to specify more things so that option c is correct

they are just telling about 1st and 6th only ..

so what about 2nd ,3rd,4th 5th

they can either go right either left ......now for one case( right one )there can  be deadlock and they are not specifying about them so i think a
0
0

1 Answer

0 votes
0 votes
Yes c is the correct option

Related questions