[Solved]-Solution Dining Philosophers Problem Given Section 146 Suffers Problem Philosopher Could S Q37257685
The solution to the dining philosophers problem given in Section 14.6 suffers from the problem that a philosopher could be starved by the two philosophers on either side of her, if she happened to get unlucky. Add variables to each philosopher which indicate hunger and the last time a philosopher has eaten. If a given philosopher is hungry and has not eaten for longer than her neighbor, her neighbor should not pick up the chopstick they share. Add synchronization tools to enforce this principle of fairness. Note that this solution should not cause deadlock. Although one philosopher may be waiting on another who is waiting on another and so on, some philosopher in the circle must have gone hungry the longest, breaking circular wait. Show transcribed image text The solution to the dining philosophers problem given in Section 14.6 suffers from the problem that a philosopher could be starved by the two philosophers on either side of her, if she happened to get unlucky. Add variables to each philosopher which indicate hunger and the last time a philosopher has eaten. If a given philosopher is hungry and has not eaten for longer than her neighbor, her neighbor should not pick up the chopstick they share. Add synchronization tools to enforce this principle of fairness. Note that this solution should not cause deadlock. Although one philosopher may be waiting on another who is waiting on another and so on, some philosopher in the circle must have gone hungry the longest, breaking circular wait.
Expert Answer
Answer to The solution to the dining philosophers problem given in Section 14.6 suffers from the problem that a philosopher could … . . .
OR

