Open System Services Management and Operations Guide (G06.25+, H06.03+)
Operating the OSS Environment
Open System Services Management and Operations Guide—527191-002
2-30
Managing OSS Process Scheduling
Managing OSS Process Scheduling
A frequently used process might not obtain adequate processor time when it runs with
a default priority. If that happens, you can assign a nondefault priority to the process.
In the Guardian environment, you would write a CMON process to control the
scheduling of other processes. In the OSS environment, you can start processes with
nondefault priorities using the OSS nice command. You can also use a shell script or
a shell alias to achieve this result.
Normal Guardian environment mechanisms for changing process priorities also can be
used on OSS processes.
An OSS program can modify its own scheduling priority by changing its nice value.
Note that the priority value assigned using the nice() function in an OSS program or
using the nice command is not the same value as that used for Guardian environment
commands. Whether an increased value indicates an increased or decreased priority
depends on the environment in which you use a command. The Guardian environment
convention for relative scheduling priority is the opposite of the UNIX convention used
in the OSS environment.
Using the nice Command
The nice command lets you start an OSS process at a modified priority. All users can
lower the execution priority of a process, but only the super ID can increase the
execution priority of a process.
Priority values in a traditional UNIX system have a significance opposite that of the
values used on a NonStop S-series or NonStop NS-series server. For a description of
the relationship among the nice value of a process, the OSS scheduling priority for
the process, and the Guardian priority for the process, see the run(1), nice(1), and
nice(2) reference pages either online or in the Open System Services Shell and
Utilities Reference Manual and Open System Services System Calls Reference
Manual.
You can use the nice command to adjust the response time of servers that run in the
OSS environment. For example, to start the inetd process at a priority slightly higher
than the default priority, enter:
nice -n -1 /usr/ucb/inetd
To specify a lower priority for the inetd process, enter:
nice -n 15 /usr/ucb/inetd
This command executes the inetd process and decreases the priority by 15, which is
a priority even lower than the default priority set by nice.