Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
16 - 1
16
Creating and Managing Processes
This section shows how to use Guardian procedures to manage Guardian processes.
First, it describes how the operating system manages the process environment; then it
goes on to discuss how to perform the following operations in an application process:
Create new Guardian processes, including naming the new process, running the
process in a waited or nowait manner, and setting the various attributes that a
process can have, including whether the process runs at a high PIN or low PIN
(PROCESS_LAUNCH_ and PROCESSNAME_CREATE_ procedures).
Send the startup sequence of messages to a process.
Monitor a child process to make sure that it is still running (CHILD_LOST_
procedure).
Delete your own or some other process (PROCESS_STOP_ procedure) or control
which processes have the authority to delete your process (SETSTOP procedure).
Suspend and activate processes (PROCESS_SUSPEND_ and
PROCESS_ACTIVATE_ procedures).
Get and set information about specified processes (PROCESS_GETINFO[LIST]_,
PROCESS_SETINFO_, and PROCESS_SETSTRINGINFO_ procedures).
Manipulate process identifiers, including retrieving information from a process
handle (PROCESSHANDLE_DECOMPOSE_ procedure) and converting between
process handles and process file names (FILENAME_TO_PROCESSHANDLE_,
PROCESSHANDLE_TO_FILENAME_, and PROCESSHANDLE_TO_STRING
procedures).
Control the placement of processes onto IPUs (IPUAFFINITY_GET_,
IPUAFFINITY_SET_, and IPUAFFINITY_CONTROL_).
Refer to the Guardian Procedure Calls Reference Manual for complete details on the
procedure calls indicated above.
Process Management Overview
When any program runs on the system, it is called a process. The term “program”
refers to a static group of instruction codes and initialized data (like the output of a
compiler); the term “process” identifies the dynamically changing states of an executing
program.
The same program (whether an application or system program) can be concurrently
executing several times in the same CPU or in different CPUs. Each execution is
considered a separate process.