Unix Process Scheduling

In UNIX Process Scheduling, the kernel allocates the CPU based on the priorities of the process for a time quantum. Preempts the process, when the time quantum expires and adds it back into one of several priority queues. So, UNIX follows a specially designed CPU scheduling algorithm which is called ‘Round Robin with Multi-level feedback priority queues‘. Here the priority is based on process type and execution history. The priority of each process is recomputed once per second with the following formula:

Unix Process Scheduling

[shell]
Priority = base priority+(recent CPU usage/constant)+nice value
[/shell]

where
CPUj(i) = It measure of processor utilization by process j through interval I.
Pj(i) = Priority of process at beginning of interval I, lower values equal higher priorities.
Basej = Base priority of process j
Nicej = User-controllable adjustment factor.