monitor - relaxed P.B. Hansen kind, for synchronization
Monitors are used to implement critical regions as an
object. Only one IOProcess is allowed to access the
internals of he Monitor at the same time. In this version of
monitors several IOProcess can be started at the same time
(or just one). The string process is allowed to finish
before the started IOProcess(s) are allowed to enter the
See the users manual in simioprocess.ps
Boris Magnusson, Lund Institute of Technology.
PriorityQ class Monitor(PMG);
This class is an implementation of (almost) traditional
monitors. Monitors are used to synchronize processes
operating on shared data by means of the Monitor operations.
Only one IOProcess is allowed to execute a Mointor operation
at the time. Supply a reference to the ProcessManager as
Supers: PriorityQ, SortedPool, Simset
Init: PMG must reference the SingleObject ProcessManager.
Sequencing in Mointor operations (where c is a Condition
REQUIERED OPERATIONS TO CALL FROM ACCESSABLE
Must be called at the entry of each monitor operation.
Must be called at the exit of each monitor operation.
LOCAL NESTED CLASS
This class is local to the Monitor. Create object of this
class to represent conditions (to wait for) in the monitor.
Sequencing: (Await / CauseOne / CauseAll)*;
OPERATIONS ON CONDITIONS
Await the conditon to be fullfiled.
The condition is true, start (at most) one waiting
The condition is true for all waiting processes - Start