Misplaced Pages

O(n) scheduler

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Historical scheduler used in the Linux 2.4 kernel
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "O(n) scheduler" – news · newspapers · books · scholar · JSTOR (February 2011) (Learn how and when to remove this message)
Location of the "O(n) scheduler" (a process scheduler) in a simplified structure of the Linux kernel.

The O(n) scheduler is the scheduler 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 and in 2.6.23 by the current Completely Fair Scheduler (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

  1. A short history of Linux schedulers at ibm.com
Linux kernel
Organization
Kernel
Support
Technical
Debugging
Startup
ABIs
APIs
Kernel
System Call
Interface
In-kernel
Userspace
Daemons,
File systems
Wrapper
libraries
Components
Variants
Virtualization
Adoption
Range
of use
Adopters
Category: