Newsgroups: comp.parallel.pvm,comp.lang.c,comp.parallel,comp.parallel.mpi
From: Kyle_Patrick@twu.ca (Kyle_Patrick)
Subject: The Dining Philosopher
Organization: Trinity Western University
Date: Thu, 9 Feb 1995 17:07:22 GMT
Message-ID: <Kyle_Patrick-0802951610480001@134.87.15.188>

Hello,
I am looking for the alograthim for the Dining Philosopher question posed
and answered by Dijkstra in 1965. I am trying to implement it on an
experimental operating system. I am posting the question below if you know
the question by another name.

Five philosophers are seated around a circular table. Each philosopher has
a plate of noodles. The philosopher needs two forks to eat the noodles.
Between each plate is a fork.
                
              P
            F   F
            P   P
            F   F
            P   P
              F
  
The life of the philosopher consists of alternate periods of eating and
thinking. When a philosopher gets hungry, he tries to acquire his left and
right fork, one at a time, in either order. If successful in acquiring two
fork, he eats for a while, then puts the forks down and continues to
think. Each philosopher should get a fair chance of eating and thinking
and not get stuck (deadlock/mutal exclusion). 

Please respond to Kyle_Patrick@TWU.CA


