Completely Fair Scheduler

from Wikipedia, the free encyclopedia

Completely Fair Scheduler ( CFS ) is a process scheduler designed for Linux and provided as a standard there . Such schedulers are used to manage the priority of program sequences at the kernel level of operating systems . An earlier version of the CFS was first developed by Ingo Molnár and replaced the previously used O (1) scheduler with kernel version 2.6.23 in October 2007 .

The CFS guarantees a fair allocation of the processor time. In contrast to the O (1) scheduler, it dispenses with heuristics and statistics. Ideally, every process with CFS runs quasi-parallel at the same speed. The CFS does not require any runqueue , no time slices and no array switching. Instead, each process is assigned a value called vruntme (virtual runtime), which abstracts its actual runtime to nanoseconds and allows an assessment of how long the process has already been running. The process with the lowest vruntime is selected. A red-black tree sorted according to vruntime is used as the structure .

Extensions in the 2.6.24 kernel

With the 2.6.24 kernel, the CFS supports task groups. This means that several processes are combined into groups and that a fair division takes place between the groups. This can be useful if several users are working on one system.

The following scenario illustrates the situation: User A runs two processes, while User B runs one. All three processes have the same priority. The old O (1) scheduler would give user A two thirds and user B one third of the CPU runtime. In contrast, the CFS allocates 50% of the computing time to both users.

See also

Web links

Individual evidence

  1. ^ A b Ingo Molnár: This is the CFS scheduler. , As of March 13, 2008
  2. ^ Robert Love: Linux Kernel Development . 3rd edition, Addison-Wesley 2010, ISBN 978-0-672-32946-3 . Pp. 41-67