DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Process management

How the process scheduler works

The following figure shows how the UNIX System V Release 4 process and LWP scheduler works. Fixed Class Priorities overlap the default Time-Sharing Priorities.

The UNIX System V Release 4 process scheduler

When a process or LWP is created, it inherits its scheduler parameters, including scheduler class and a priority within that class. A process or LWP changes class only as a result of a user request. The system manages the priority of an LWP based on user requests and a policy associated with the scheduler class of the LWP.

In the default configuration, the initialization process belongs to the time-sharing class. Because processes inherit their scheduler parameters, all user login shells begin as time-sharing processes in the default configuration.

The scheduler converts class-specific priorities into global priorities. The global priority of an LWP determines when it runs--the scheduler always runs the runnable LWP with highest global priority. Numerically higher priorities run first. Once the scheduler assigns an LWP to the CPU, the LWP runs until it uses up its time slice, sleeps, or is preempted by a higher-priority LWP. LWPs with the same priority run round-robin.

Administrators specify default time slices in the configuration tables, but users may assign time slices to fixed priority LWPs.

You can display the global priority of a process or LWP with the -cl options of the ps(1) command. You can display configuration information about class-specific priorities with the priocntl(1) command and the dispadmin(1M) command.

By default, all fixed priority processes or LWPs have higher priorities than any kernel process, and all kernel processes have higher priorities than any time-sharing process.


NOTE: As long as there is a runnable fixed priority fixed priority process or LWP, no kernel process and no time-sharing process runs.

The following sections describe the scheduling policies of the default classes.


Next topic: Time-sharing class and fixed class
Previous topic: Process scheduling

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004