Distributed philosophers

System consists of a set of philosophers. Each philosopher knows his both left and right neighbour. A the begining, each philosopher owns only his right fork. At any time, he can ask a neighbour for the missig fork. If he has both forks, he can eat. At any time, he can be asked by any of his neighbours for a fork. Then he pass the fork to the neighbour, if he can (i.e. if he is not eating). Otherwise, the request is blocked.

The model consists of class DPhilosopher and main class DDinner. Construction of 10 philosophers is specifier recursively in class DDinner.

\epsfig{file=phils001a.eps} \epsfig{file=phils001b.eps}



Vladimir Janousek
2001-01-15