Controlling process preemption -- preemptive
On multiprocessor systems, the scheduler looks for a
CPU on which to run a process when that
process becomes runnable, or when its time slice has
expired.
The scheduler first looks for an idle CPU.
If it cannot find an idle CPU, it next
considers preempting the process on the current
CPU if it has a lower priority; it is quicker to preempt
the current process as this does not require an interprocessor interrupt.
With some application mixes, however, this can
increase the number of context switches.
For example, when a database
server
wakes a client,
it may be more efficient, in terms of system resources, for the
server to continue to run for a period of time after that wakeup.
To prevent the scheduler from preempting the current processor, change the value of preemptive to 0.