The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
255 views

question : 

asked in Operating System by Veteran (57.5k points)
retagged by | 255 views

1 Answer

+3 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 (23.2k points)
edited by


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,115 questions
36,926 answers
91,928 comments
34,782 users