“
That calculation is reasonably simple. When a task goes into the run
queue, the current time is noted. As the process waits for the CPU, the
scheduler tracks the amount of processor time it would have been entitled
to; this entitlement is simply the wait time divided by the number of
running processes (with a correction for different priority values). For
all practical purposes, the key is the amount of CPU time due to the
process, with higher-priority processes getting a bit of a boost. The
short-term priority of a process will thus vary depending on whether it is
getting its fair share of the processor or not.
” source...
Loading...