GATE CSE
First time here? Checkout the FAQ!
x
0 votes
195 views

question : 

asked in Operating System by Veteran (51.4k points)  
retagged by | 195 views

1 Answer

+2 votes

To avoid deadlock in Dining Philosophers Problem there are two simple solutions . Consider there are N philisophers

  1.   (N-1) Philosopers First Take Left Fork then Right Fork , Last Philosopher Take Right and then Left
  2.  All philoposher sitting in ODD position take Left Fork then Right Fork , All philosophers sitting in EVEN position take right fork first then Left Fork .

Assuming option b is telling the point number 2 . hence both should be correct .

Reference

answered by Veteran (21.3k points)  
edited by


Top Users Sep 2017
  1. Habibkhan

    6836 Points

  2. Arjun

    2310 Points

  3. Warrior

    2306 Points

  4. rishu_darkshadow

    2058 Points

  5. A_i_$_h

    1990 Points

  6. nikunj

    1980 Points

  7. manu00x

    1750 Points

  8. Bikram

    1744 Points

  9. SiddharthMahapatra

    1718 Points

  10. makhdoom ghaya

    1690 Points


26,037 questions
33,646 answers
79,694 comments
31,069 users