Five philosophers sit at a round table with a bowl of


Problem

Five philosophers sit at a round table, with a bowl of spaghetti in the middle and a plate in front of each. They alternate between eating and thinking. Five forks are available, one placed between each two plates. Spaghetti is slippery stuff and must be taken with two forks to maintain good table manners. In order to eat, each philosopher must pick up both adjacent forks. Having picked up a fork, he will not put it down until he has eaten. There are not enough forks to let them all eat at once. Being devoted to the greatest good of the greatest number, each philosopher puts down both his forks when he has finished eating, then he starts to think.

(a) Construct a train of events in which the philosophers all deadlock and so die of hunger.

(b) Construct a train of events in which only some philosophers starve, both literally and technically!

(c) Instantiate the Banker generic package as necessary, and use it to program a solution in ADA that avoids both problems.

Request for Solution File

Ask an Expert for Answer!!
Dissertation: Five philosophers sit at a round table with a bowl of
Reference No:- TGS02659941

Expected delivery within 24 Hours