|
|
The kernel assigns its demon and housekeeping processes to the system scheduler class. Users may neither add processes or LWPs to nor remove processes or LWPs from this class, nor may they change the priorities of these processes or LWPs. The command ps -cel lists the scheduler class of all processes or LWPs. Processes in the system class are identified by a SYS entry in the CLS column.
If the workload on a machine contains fixed priority processes or LWPs that use too much CPU, they can lock out system processes, which can lead to all sorts of trouble. Fixed priority applications must ensure that they leave some CPU time for system and other processes and LWPs.
Scheduler class, priority, and other scheduler parameters are inherited across the fork(2) and exec(2) system calls.
The nice(1) command and the nice(2) system call work as in previous versions of the UNIX system. They allow you to change the priority of only a time-sharing process or LWP. You still use lower numeric values to assign higher time-sharing priorities with these functions.
To change the scheduler class of a process or LWP or to specify a fixed priority, you must use one of the priocntl functions. Use higher numeric values to assign higher priorities with the priocntl functions.
The init process (process ID 1) may be assigned to any class configured on the system. Because most processes and LWPs normally inherit the scheduler properties of init, init must be the only process specified by idtype and id or by the procset structure. However, init should be assigned to the time-sharing class unless there are compelling reasons to do otherwise.