
Chopstick |
ptolemy.domains.csp.demo.DiningPhilosophers.Chopstick |
Chopstick in the Dining Philosophers demo. Each Chopstick can only be
used by one philosopher at a time. When it is not being used it can be
claimed by either of the two philosophers next to it. Once it has been
claimed, it is not available until it is released by the philosopher
holding it.
<p>
This actor has four ports, each of width one: two are used to communicate
with the philosopher on the left, and two are used to communicate with
the buffer on the right. Two ports are needed to communicate with each
philosopher as the philosopher holds the chopstick for some random time.
<p>
Author(s): Neil Smyth
Version:$Id: Chopstick.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Red (nsmyth)
Pt.Accepted Rating:Red (cxh)
leftIn
The port through which the left philosopher
releases access to this chopstick.
leftOut
The port through which the left philosopher
receives access to this chopstick.
rightIn
The port through which the right philosopher
releases access to this chopstick.
rightOut
The port through which the right philosopher
receives access to this chopstick.