edited by
6,381 views
21 votes
21 votes

Consider the following two scenarios in the dining philosophers problem:

  1. First a philosopher has to enter a room with the table that restricts the number of philosophers to four.
  2. There is no restriction on the number of philosophers entering the room.

Which of the following is true?

  1. Deadlock is possible in (i) and (ii).
  2. Deadlock is possible in (i).
  3. Starvation is possible in (i).
  4. Deadlock is not possible in (ii).
  5. Starvation is not possible in (ii)
edited by

5 Answers

1 votes
1 votes

In dining phyloshopher problem , if the number of phyloshopher is 4 and number of fork is 5, then atleast one fork which is extra , that place 2 philoshopher is not sharing any fork.
 So, circular wait violating. and deadlock not possible. But yes starvation always possible. As each philoshopher have atleast one fork sharing with other.

Now for (ii) unrestricted number of philoshopher is there. and there are only 5 forks. So, each phyloshopher must share their forks. So, Deadlock is obvious there.

Answer:

Related questions