O(n) scheduler
   HOME

TheInfoList



OR:

The O(n) schedulerA short history of Linux schedulers at ibm.com
/ref> is the
scheduler A schedule or a timetable, as a basic time-management tool, consists of a list of times at which possible tasks, events, or actions are intended to take place, or of a sequence of events in the chronological order in which such things are i ...
used in the Linux kernel between versions 2.4 and 2.6. Since version 2.6.0, it has been replaced by the
O(1) scheduler An O(1) scheduler (pronounced "O of 1 scheduler", "Big O of 1 scheduler", or "constant time scheduler") is a kernel scheduling design that can schedule processes within a constant amount of time, regardless of how many processes are running on the ...
and in 2.6.23 by the current
Completely Fair Scheduler The Completely Fair Scheduler (CFS) is a process scheduler that was merged into the 2.6.23 (October 2007) release of the Linux kernel and is the default scheduler of the tasks of the SCHED_NORMAL class (i.e., tasks that have no real-time execution ...
(CFS).


Algorithm

This scheduler divides processor time into epochs. Within each epoch, every task can execute up to its time slice. If a task does not use all of its time slice, then the scheduler adds half of the remaining time slice to allow it to execute longer in the next epoch.


Advantages

This scheduler was better in comparison to the previously used very simple scheduler based on a circular queue.


Disadvantages

If the number of processes is big, the scheduler may use a notable amount of the processor time itself. Picking the next task to run requires iteration through all currently planned tasks, so the scheduler runs in O(n) time, where n is the number of the planned processes.


See also


References

{{Linux kernel Linux kernel process schedulers