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

Time-Sharing class

The goal of the time-sharing policy is to provide good response time to interactive LWPs and good throughput to CPU-bound LWPs. The scheduler switches CPU allocation frequently enough to provide good response time, but not so frequently that it spends too much time doing the switching. Time slices are typically a few hundred milliseconds.

The time-sharing policy changes priorities dynamically and assigns time slices of different lengths. The scheduler raises the priority of an LWP that sleeps after only a little CPU use (an LWP sleeps, for example, when it starts an I/O operation such as a terminal read or a disk read); frequent sleeps are characteristic of interactive tasks such as editing and running simple shell commands. On the other hand, the time-sharing policy lowers the priority of an LWP that uses the CPU for long periods without sleeping.

The default time-sharing policy gives larger time slices to LWPs with lower priorities. An LWP with a low priority is likely to be CPU-bound. Other LWPs get the CPU first, but when a low-priority LWP finally gets the CPU, it gets a bigger chunk of time. If a higher priority LWP becomes runnable during a time slice, however, it preempts the running LWP.

The scheduler manages time-sharing processes and LWPs using configurable parameters in the time-sharing parameter table ts_dptbl. This table contains information specific to the time-sharing class.


Next topic: Fixed class
Previous topic: The process scheduler

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