DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Tuning CPU resources

Controlling the effective priority of processes -- primove

Until now, the discussion of process priorities has assumed that the scheduler uses a process' calculated priority to decide whether the process should be put on the CPU to run. In the default configuration of the kernel, this is effectively true. In fact, the kernel implements the run queue as separate lists of runnable processes for each priority value. The scheduler examines the priority value assigned to each list rather than the priorities of the processes that they contain when looking for a process to run. Provided the kernel assigns processes to the list corresponding to their priority, the lists are invisible. Under some circumstances, it may be beneficial to performance to allow processes to remain in a list after their priority has been changed.

When the priority of a user process is adjusted, the variable primove controls whether the kernel moves the process to a higher or lower value priority list. The process will only be moved to a new list if its priority differs from the present list priority by at least the value of primove. The effect of increasing primove is to make a process remain at a low or high priority for longer. It also means that the operating system has less work to do moving processes between different lists. The default value of primove is 0 for compliance with POSIX.1b. This means that any change in a process' priority will cause it to be moved to a different list.

For an example of the use of primove, assume that it is given a value of 10. If the priority of a process begins at 51 and rises by at least a value of 10, it is moved to the list corresponding to priority 61. The process does not move between lists until its priority rises by at least the value of primove. So if the process' priority rose to 60, it would remain on the priority 50 list. The kernel, however, would still see the process as having a lower priority than another in the priority 55 list. Conversely, a process in the priority 71 list will stay there until its priority falls to 61.

Increasing the value of primove makes the kernel less sensitive to process priorities.

Reducing the value of primove produces fairer scheduling for all processes but increases the amount of kernel overhead that is needed to manipulate the run queue.


Next topic: Controlling cache affinity -- cache_affinity
Previous topic: Controlling priority calculations -- dopricalc

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003