Open System Services Programmer's Guide

printf("New nice value = %d\n", pval);
pval = getpri(PRIO_PROCESS, 0);
printf("Process priority set to %d\n", pval);
return(0);
}
Features Unique to OSS Process Management
OSS processes have an OSS process ID and a process handle. An OSS process ID is a
nonnegative integer that uniquely identifies a process within a node. A process handle is a
data structure ten words long that uniquely identifies a process within a NonStop network.
There are HP extension functions. The tdm_fork(), tdm_execve(), tdm_execvep(),
tdm_spawn(), and tdm_spawnp() functions allow you to set attributes when a process is
created that you cannot set with the standard fork() and exec set of functions. For example,
the tdm_fork() function allows you to either retain the attribute values inherited from the
parent or specify other values. The fork() function does not allow you to overwrite the values
of the inherited attributes.
OSS processes have Guardian attributes. In addition to OSS-specific attributes, OSS processes
have a full set of Guardian attributes, such as process handle and Guardian user ID.
Most Guardian process-management procedures can access OSS processes. The process
handle of an OSS process allows most Guardian process-management procedures to
manipulate OSS processes, including changing the priority of a process, getting information
about it, and terminating it.
Some OSS functions can access Guardian processes. For example, OSS functions can provide
the system-dependent system limits, times, and user ID of a Guardian process.
After a process is created, its execution priority cannot be modified using an OSS function.
In the current release, you must use a Guardian procedure to change process priority.
Processes running in the OSS environment have their nice() scheduling priorities determined
using UNIX conventions. The scheduling priority for processes running in the Guardian
environment is defined as increasing as the priority number increases. This convention is the
opposite of the convention used on UNIX systems, where a lower priority number means a
higher scheduling priority.
Process Attributes
All processes, OSS and Guardian, have Guardian attributes and some OSS attributes. OSS
processes are basically Guardian processes with some additional OSS-specific attributes, such as
OSS process ID.
OSS Attributes in Guardian Processes
The OSS attributes of Guardian processes include an extended security block that allows Guardian
processes to access OSS and Guardian objects belonging to other related groups and group IDs.
Guardian processes also have some OSS file system attributes that allow Guardian processes to
access OSS objects and do OSS file system work.
A Guardian process has a process handle but not an OSS process ID. This means that an OSS
process cannot send signals to a Guardian process and that a Guardian process cannot belong
to a process group or session.
Guardian Attributes in OSS Processes
There are many Guardian attributes that an OSS child process inherits from its parent. When you
create a process using the OSS HP extension functions such as tdm_fork(), tdm_execve(),
and tdm_spawn(), you can set or overwrite inherited Guardian attributes by specifying values
Process Attributes 113