DSSX_ProcessManager

DSSX_ProcessManager

dssx

1998 12-06


CLASS

DSSX_ProcessManager - provides process control


SYNOPSIS

This class provides distributed process control using DSS. Specific numbers of specific processes may be maintained through this construct.


PROCESS CONTROL ALGORITHM

The process manager consists of a table of DSSX_ProcessEntry objects (currently implemented as a DSSX_Bag).


The tracking of processes is based on the behavior of the DSS STARTWRITE/STOPWRITE operations. When a tracked process registers with process control it is basicly doing a STARTWRITE on a chunk with a unique name. At this point the chunk exists in the process control space in a WAITING state. When a process gracefully deregisters it does a STOPWRITE which causes the chunk to go into a VALID state. If a process dies ungracefully (without deregistering) the chunk is automatically goes into an INVALID state and is eventually garbage collected. Therefore, the state of the chunk corresponding to a process indicates the state of the process as follows:
WAITING process is alive
VALID process has exited gracefully
INVALID process has died ungracefully
non-existent process has died ungracefully
The DSSX_ProcessManager object uses this information to perform its operations. For example, the Check() call updates the number alive and number gracefully exited fields of the process tuples based on the chunk states.


CONSTRUCTOR


MEMBER FUNCTIONS


VIRTUAL MEMBER FUNCTIONS