Process State Tracking Facility
Original Publication Date: 1995-Jan-01
Included in the Prior Art Database: 2005-Mar-29
Hidalgo, DS: AUTHOR [+2]
Disclosed is a facility that can be used to track the state of cooperating processes in a multiprocessing operating environment, and to allow the exchange of information between those processes.
a facility that can be used to track the state of
cooperating processes in a multiprocessing operating environment, and
to allow the exchange of information between those processes.
It is typical
of processes that stay active for long period of
times providing their services on a per-request basis (daemon
processes) to undergo state changes throughout their execution. In
many cases it is necessary for other processes that use the services
of those daemons to know the current state of a daemon. An example
of this is when daemon processes are being started in the OS/2*
Distributed Computing Environment (DCE)** product. Other cases may
involve the monitoring of the daemon processes' state for
reasons. This all indicates the need for a facility that allows the
definition, setting and querying of daemon processes' states.
to the tracking of process state information, it is
necessary for the emulation of several UNIX*** system calls in OS/2
(i.e., kill(), signal(), etc), that a shared memory mechanism be
that allows those emulations to exchange interprocess information.
invention provides a facility that can be used to track
the state of cooperating processes, and to allow the exchange of
other interprocess information. The facility consists of: (1) A set
of interface function calls. (2) A basic design that is to be used
to implement the set of interface function calls.
The set of interface function calls consists of:
interface can be added to a process default startup
routine (i.e., a DLL initialization routine in OS/2) to automatically
query the process' id from the system, and add an entry for the
process in the tracking facility's process table.
interface can be added to a process default termination
routine (i.e., a DLL termination routine in OS/2) to automatically
remove the process entry from the tracking facility's process table.
int dceos2_set_process_state(char * pname, int pid, int state);
is called to set the indicated state for the
calling process, which may identify itself by name, by process id, or
both. The value of the state parameter is the state that will be
returned by calls to dceos2_get_process_state().
int dceos2_get_process_state(int waitsecs, char * pname,
int * pid, int * state);
is called to get the current state for the
process indicated by either the pname parameter, the pid parameter,
or both. When the indicated process isn't found, the value 0 is
returned, otherwise the current state is returned in the state
parameter and as the function return value.
int dceos2_add_sig_semid(int pid, HEV esem);
is provided to support the emulation of the