Completely Fair Scheduler

The Completely Fair Scheduler (CFS) is the name of a process scheduler which was merged into the 2.6.23 release of the Linux kernel. It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

Con Kolivas's work with CPU scheduling, most significantly his implementation of "fair scheduling" named Rotating Staircase Deadline, inspired Ingo Molnár to develop his CFS, as a replacement for the earlier O(1) scheduler, crediting Kolivas in his announcement.

In contrast to the previous O(1) scheduler used in older Linux 2.6 kernels, the CFS scheduler implementation is not based on run queues. Instead, a red-black tree implements a "timeline" of future task execution. Additionally, the scheduler uses nanosecond granularity accounting, the atomic units by which an individual process' share of the CPU was allocated (thus making redundant the previous notion of timeslices). This precise knowledge also means that no specific heuristics are required to determine the interactivity of a process, for example.

Like the old O(1) scheduler, CFS uses a concept called "sleeper fairness", which considers sleeping or waiting tasks equivalent to those on the runqueue. This means that interactive tasks which spend most of their time waiting for user input or other events get a comparable share of CPU time when they need it.

Read more about Completely Fair Scheduler:  Algorithm, OS Background, Fairer Algorithms

Famous quotes containing the words completely and/or fair:

    ... nothing seems completely to differentiate the poor but poverty. We find no adjectives to fit them, as a whole, only those of which Want is the mother. “Miserable” covers many; “shabby” most, and I am sadly aware that, in a large majority of minds, “disagreeable” includes them all.
    Albion Fellows Bacon (1865–1933)

    The enemy are no match for us in a fair fight.... The young men ... of the upper class are kind-hearted, good-natured fellows, who are unfit as possible for the business they are in. They have courage but no endurance, enterprise, or energy. The lower class are cowardly, cunning, and lazy. The height of their ambition is to shoot a Yankee from some place of safety.
    Rutherford Birchard Hayes (1822–1893)