next up previous
Next: monitor Up: simioprocess Previous: ioprocess

Semaphore


     NAME
	  semaphore - counting Semaphore for synchronization of
	  IOProcesses

     DESCRIPTION
	  Semaphore is an implementation of  a	generalized  semaphore
	  based	on an integer.

     EXAMPLES
	  See the users	manual in simioprocess.ps

     AUTHOR
	  Boris	Magnusson, Lund	Institute of Technology.

     DETAILED INTERFACE
	     PriorityQ class Semaphore(PMG);
	     ref(ProcessManager) PMG;
	  This	class  is  used	 for  traditional  Dijkstra  Semaphore
	  synchronization.   Supply reference to the ProcessManager as
	  parameter.

	   Supers: PriorityQ, SortedPool, Simset
	   Kind: Instantable
	   Init: PMG must reference the	SingleObject ProcessManager.
	   Sequencing: (Signal / Wait)*

     OPERATIONS
     Signal
	     procedure Signal;
	  Normal meaning for Semaphores	- Start	 one  waiting  process
	  (if any), increase resources.

     Wait
	     procedure Wait;
	  Normal  meaning  for	Semaphores   -	 Suspend   caller   if
	  resources=0, decrease	resources.