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

Clock ticks and time slices

The system motherboard has a programmable interval timer which is used as the system clock; this generates 100 clock interrupts or clock ticks per second (this value is defined as the constant HZ in the header file /usr/include/sys/param.h).

The tunable kernel parameter MAXSLICE sets the maximum time slice for a process. Its default value is 100 clock ticks (one second). The range of permissible values is between 25 and 100 (between one quarter of a second and one second).

The effect of reducing MAXSLICE is to allow each process to run more often but for a shorter period of time. This can make interactive applications running on the system seem more responsive. However, you should note that adjusting the value of MAXSLICE may have little effect in practice. This is because most processes will need to sleep before their time slice expires in order to wait for an I/O resource. Even a calculation-intensive process, which performs little I/O, will tend to be replaced on the CPU by processes woken when an I/O resource becomes available.


Next topic: Context switching
Previous topic: Main process states in a system and the transitions between them

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