Below is a programmer's view of default LWP priorities. Fixed Class Priorities overlap the default Time-Sharing Priorities.
Process priorities (programmer view)
From a user or programmer's point of view, a process or LWP priority has meaning only in the context of a scheduler class. You specify an LWP priority by specifying a class and a class-specific priority value. The class and class-specific value are mapped by the system into a global priority that the system uses to schedule LWPs.
The ``user priority limit'' is the configuration-dependent maximum value of the user priority. You may set a user priority to any value below the user priority limit. With appropriate privilege, you may raise the user priority limit. Zero is the default user priority limit.
You may lower the user priority of a process or LWP to give the process or LWP reduced access to the CPU or, with the appropriate privilege, raise the user priority to get better service. Because you cannot set the user priority above the user priority limit, you must raise the user priority limit before you raise the user priority if both have their default values of zero.
An administrator configures the maximum user priority independent of global time-sharing priorities. In the default configuration, for example, a user may set a user priority only in the range from -20 to +20, but 60 time-sharing global priorities are configured.
A system administrator's view of priorities is different from that of a user or programmer. When configuring scheduler classes, an administrator deals directly with global priorities. The system maps priorities supplied by users into these global priorities. See ``Process scheduling''.
The ps -cel command reports global priorities for all active processes and LWPs. The priocntl command reports the class-specific priorities that users and programmers use.
The priocntl(1) command and the priocntl(2), priocntllist(2), and priocntlset(2) system calls set or retrieve scheduler parameters for processes and LWPs. Setting priorities is similar for all these functions:
You specify the target processes and LWPs using an ID type and an ID. The ID type tells how to interpret the ID. (This concept of a set of processes and LWPs applies to signals as well as to the scheduler; see sigsend(2)). The following is a list of the valid priocntl ID types that you may specify.
|parent process ID
|process group ID
|effective user ID
|effective group ID
These IDs are basic properties of UNIX processes and LWPs. (See intro(2)). The class ID refers to the scheduler class of the process or LWP. priocntl works only for the time-sharing, fixed class, and the fixed priority classes, not for the system class. Processes in the system class have fixed priorities assigned when they are started by the kernel.