开发者

linux kernel scheduler CFS

开发者 https://www.devze.com 2023-03-11 22:18 出处:网络
How does linux kernel\'sCFS scheduler schedule开发者_Python百科 all the process within sched_latency_ns time.

How does linux kernel's CFS scheduler schedule开发者_Python百科 all the process within sched_latency_ns time. Is it by traversing though the red black tree or re balancing after every process switch.


Start with the Wikipedia article...

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.[2]


here describe CFS in details together with snippet source code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号