Next | Prev | Up | Top | Contents | Index

slice_size

Description

slice_size is the default process time slice, expressed as a number of ticks of the system clock. The frequency of the system clock is expressed by the constant Hz, which has a value of 100. Thus each unit of slice_size corresponds to 10 milliseconds. When a process is given control of the CPU, the kernel lets it run for slice_size ticks. When the time slice expires or when the process voluntarily gives up the CPU (for example, by calling pause(2) or by doing some other system call that causes the process to wait), the kernel examines the run queue and selects the process with the highest priority that is eligible to run on that CPU.

The slice_size parameter is defined in /var/sysgen/mtune/disp and has the following formula:

#define slice_size Hz / 30 int slice_size = slice_size

Since slice_size is an integer, the resulting value is 3. This means that the default process time slice is 30 milliseconds.

Value

Default: 3

Range: 1-100

When to Change


If you use the system primarily for compute-intensive jobs and interactive response is not an important consideration, you can increase slice_size. For example, setting slice_size to 10 gives greater efficiency to the compute jobs, since each time they get control of the CPU, they are able to run for 100 milliseconds before getting switched out.

In situations where the system runs both compute jobs and interactive jobs, interactive response time will suffer as you increase the value of slice_size.


Next | Prev | Up | Top | Contents | Index