Linux Kernel: Targeted Latency vs Minimum Granularity
Asked Answered
C

1

8

In context of CFS Scheduler of Linux Kernel what are the most important differences between Targeted Latency and Minimum Granularity.

Or how do we define Targeted Latency and Minimum Granularity.

  • Mathematical explanation is highly appreciated.
Cozy answered 27/1, 2014 at 20:38 Comment(0)
M
14

how do we define Targeted Latency and Minimum Granularity.

From "Linux kernel development" by Robert Love:

1)

CFS sets a target for its approximation of the “infinitely small” scheduling duration in perfect multitasking. This target is called the targeted latency.

2)

Note as the number of runnable tasks approaches infinity, the proportion of allotted processor and the assigned timeslice approaches zero. As this will eventually result in unacceptable switching costs, CFS imposes a floor on the timeslice assigned to each process.This floor is called the minimum granularity.

So, targeted latency is the period in which all run queue tasks are scheduled at least once. And the minimum granularity is the minimum time a task will be be allowed to run on CPU before being pre-empted out.

References:

Melia answered 10/9, 2014 at 18:26 Comment(1)
The 1st link has been very useful.Parsifal

© 2022 - 2024 — McMap. All rights reserved.