DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Application programming

Process management and scheduling

Beginning with System V Release 4.2 MP (SVR4.2 MP), the schedulable entity is always a lightweight process (LWP). Scheduling priorities and classes are attributes of LWPs and not processes. When scheduling system calls accept a process on which to operate, the operation is applied to each LWP in the process. The UnixWare system scheduler determines when LWPs run. It maintains priorities based on configuration parameters, process behavior, and user requests; it uses these priorities to assign LWPs to the CPU.

UnixWare gives users absolute control over the sequence in which certain LWPs run, and the amount of time each LWP may use the CPU before another LWP gets a chance.

By default, the scheduler uses a time-sharing policy similar to the policy used in previous releases. A time-sharing policy adjusts priorities dynamically in an attempt to provide good response time to interactive LWPs and good throughput to CPU-intensive LWPs.

A fixed class scheduling policy is available, also. It is similar to the time-sharing policy except that the time slices given to fixed class processes or LWPs do not degrade over time.

The scheduler offers a fixed priority scheduling policy as well as a time-sharing policy. Fixed priority scheduling allows users to set fixed priorities on a per-process or LWP basis. The highest-priority fixed priority LWP always gets the CPU as soon as it is runnable, even if system processes are runnable. An application can therefore specify the exact order in which LWPs run. An application may also be written so that its fixed priority LWPs have a guaranteed response time from the system.

For most UNIX environments, the default scheduler configuration works well and no fixed priority LWPs are needed: administrators should not change configuration parameters and users should not change scheduler properties of their applications. However, for some applications with strict timing constraints, fixed priority LWPs are the only way to guarantee that the application's requirements are met.

Where to find more information

``Process management'' gives detailed information on the process scheduler, along with relevant code examples. See also priocntl(1), priocntl(2), and dispadmin(1M).


Next topic: Interprocess communication
Previous topic: Where to find more information

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