Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 3
Programs and Processes
Process Handles
A process handle can be considered to be the address at which a process resides.
The process handle is 10 words long and contains the following information:
The process identification number (PIN) which is unique among all current
processes on a given CPU. PIN values range from 0 to 65534. PINs 0 through
255 are called low PINs; PINs 256 through 65534 are called high PINs.
Processes on a D-series system can run at a high PIN or a low PIN. Processes
on a C-series system can run only at a low PIN.
Note that PIN 255 is a special-case low PIN that is used by high-PIN processes to
communicate with an unconverted C-series process. The range of usable low
PINs is therefore 0 through 254.
The ID of the CPU on which the process runs.
A verifier to uniquely identify a process over time.
A process pair index that enables the operating system to find the other member of
a process pair.
A type field that identifies whether the process is named or unnamed and whether
the system on which the process runs is a D-series system or a C-series system.
Like process file names, a process handle is returned by the system when you create a
process. Process handles, however, are not file names; they are used to identify the
process to other process-related procedure calls, such as PROCESS_ACTIVATE_ and
PROCESS_SUSPEND_.
To obtain the information contained in a process handle, you can use the
PROCESS_GETINFO_ procedure as described later in this section.
Programs and Processes
A program is a sequence of instructions and data that become a process when
executed.
A program file is an executable object file. It contains primarily executable code, but
may also contain other components such as initial or read-only data and linkage
information. Unlike other object files, a program file has a main procedure.
Object files are produced by compilers that translate the source program, written in a
language such as TAL or C, into object code. They are also produced by linkers, such
as the Binder and nld utilities (on TNS/R systems) or eld utilities (on TNS/E
systems) which link object files together. For execution, the code and some of the data
in the object file are mapped into the virtual memory of the CPU.
Kinds of Programs
These kinds of programs run on native CPUs. They are: