牛马是什么意思| quest是什么车| 淀粉样变性是什么病| 大咖是什么意思| 乳腺结节有什么危害| 8月19日是什么星座| 梦见奶奶死了是什么意思| 桥本甲状腺炎有什么症状| 天秤座是什么性格| 男士适合戴什么手串| 冰火两重天什么意思| 头颅mri是什么检查| 断头路是什么意思| 反射弧是什么| 1984年是什么年| 双侧中耳乳突炎是什么意思| ec50是什么意思| 梅菜是什么菜| bp是什么单位| 脾胃虚寒吃什么水果好| esp是什么意思| 幸福是什么的经典语录| 抿嘴是什么意思| 梦见被蛇咬了是什么意思| 字母哥什么位置| 胸口闷闷的有点疼是什么原因| k代表什么| 单核细胞比率偏高说明什么| 死板是什么意思| 立是什么结构的字| 梨状肌综合症吃什么药| 看乳房挂什么科| 来姨妈喝什么比较好| 瘦了是什么原因| 碳水化合物指的是什么| 墨蓝色是什么颜色| 杏有什么作用和功效| 驴板肠是什么部位| prep是什么药| spf50是什么意思| 多囊卵巢综合症吃什么药| 得偿所愿是什么意思| 竣字五行属什么| 贫血打什么针效果最好| 容易长痣是什么原因| 坐骨神经疼有什么症状| 舌苔发白是什么情况| 乌龟和甲鱼有什么区别| 心心相什么| david是什么意思| 哈怂是什么意思| 成手是什么意思| 子宫肌瘤有什么症状表现| 近水楼台是什么意思| 尿液有白色絮状物是什么原因| 晚上总是睡不着觉是什么原因| 跻身是什么意思| 食管憩室是什么病| 增生是什么| 根管治疗是什么意思| 重庆有什么特产| 窜稀吃什么药| 天空为什么会打雷| 再生纤维素纤维是什么面料| 少年白头发是什么原因| 变更是什么意思| 浅表性胃炎伴糜烂用什么药| 认识是什么意思| 梨不能和什么一起吃| 妇科湿疹用什么药膏最有效| 发乎情止乎礼什么意思| 人过留名雁过留声什么意思| 承字属于五行属什么| 高血压可以吃什么肉| 牙痛吃什么药好| 就诊卡号是什么| 创伤性湿肺是什么意思| 农历9月14日是什么星座| 帕金森吃什么药效果好| 吃什么水果对子宫和卵巢好| 上窄下宽的脸型适合什么发型| pd是什么意思| 古代四大发明是什么| 促排卵针什么时候打| 草莓是什么季节的| 夫复何求什么意思| 红细胞计数偏低是什么意思| 心烦焦虑吃什么药| 割包皮属于什么科| 胬肉是什么意思| romoss是什么牌子| s和m是什么意思啊| 梦见系鞋带是什么意思| 10月26日什么星座| 低钾血症吃什么药| 绿豆什么时候收获| 妤字属于五行属什么| 治疗早泄吃什么药| 正常白带是什么颜色| 姓姜的男孩起什么名字好| 靶向治疗是什么意思| 豆腐吃多了有什么坏处| 一直咳嗽不好是什么原因| 滑囊炎吃什么药| her是什么意思| 白细胞低吃什么补| 经常胃胀气是什么原因引起的| 为什么叫丁克| 甲流是什么病| 男鸡配什么属相最好| 受戒是什么意思| 铁塔公司是干什么的| 五位一体是什么| 浑身酸痛什么原因| 睾丸大是什么原因| 无孔不入是什么意思| 紫色五行属什么| 7月6日是什么日子| lomo卡是什么| 鸟加一笔是什么字| 痰的颜色代表什么| r一谷氨酰转移酶高说明什么| 烂好人是什么意思| hpv感染有什么症状女性| xpe是什么材质| 右侧胸口疼是什么原因| 羟氯喹是什么药| 袁隆平是什么家| 皮肤发黄是什么原因| 白发是什么原因引起的| rr过低是什么意思| 支气管炎是什么引起的| nsaids是什么药| 津液是什么| 钙化影是什么意思| 燃烧脂肪是什么感觉| 肛门痒是什么原因| 枫叶是什么颜色| 少许纤维灶是什么意思| 滑石粉有什么作用| 食物中毒吃什么解毒最快| 迂回什么意思| 老是打饱嗝是什么原因| 最大的沙漠是什么沙漠| 血沉高是什么原因| 眼肿是什么原因引起的| 手痒脚痒是什么原因| 咳嗽能吃什么食物| 1957年属什么生肖| 结核抗体阳性说明什么| 为什么叫汉族| 寻常疣是什么样子图片| 启读什么| 吃无花果有什么好处| 8月10日什么星座| 金牛后面是什么星座| 手术后为什么不让睡觉| 关节退行性变是什么意思| 久之的之是什么意思| 小金蛙吃什么| 蜜蜂的尾巴有什么作用| 心脏跳的快是什么原因| 39属什么| 腔梗和脑梗有什么区别| 脐带绕颈有什么症状| 气虚吃什么补最快| 叶公好龙是什么故事| 木命人五行缺什么| 地漏什么牌子的好| 雪蛤是什么| ups是什么快递公司| 梦见给死人烧纸钱是什么意思| 甲状腺欠均匀什么意思| 虚热吃什么药| 亓是什么意思| 儿童病毒感染吃什么药| 嘴上有痣代表什么| 梦见一坨屎是什么意思| 东陵玉是什么玉| 靠山是什么意思| 香菇和什么不能一起吃| 为什么手脚老是出汗| 吗啡是什么| 这个表情是什么意思| 尿液是什么味道| 榴莲和什么食物相克| 松树像什么| mj是什么单位| 尔加玉读什么| 什么蔬菜降血压效果最好| 身上长瘊子是什么原因| 白果是什么| 卵巢囊性回声什么意思| 摩羯座的幸运色是什么| 什么克风| 人是什么生物| 癃闭是什么意思| 生肖羊生什么生肖最好| 梦到自己长白头发是什么意思| 玻璃什么时候传入中国| 什么东西人们都不喜欢吃| 黄连治什么病最好| 下午一点多是什么时辰| ad什么时候吃最好| 经常放屁是什么原因| pm2.5是什么| 甲亢吃什么好的更快| 倒睫是什么意思| 曹休和曹操什么关系| 记忆力减退吃什么药| dbm是什么单位| 喝酒后呕吐是什么原因| 日本什么值得买| 丙肝吃什么药| 脑瘫是什么原因引起的| bp是什么单位| 几天不大便是什么原因| 口蜜腹剑是什么意思| 博字五行属什么| 格力空调se是什么意思| ab型血可以给什么血型输血| 闰月什么意思| 春天有什么特点| 糖类抗原高是什么意思| 偏激是什么意思| 甲钴胺治疗什么病| 11.11什么星座| 幽门杆菌吃什么药最好| 低血压是什么原因引起的| 前世是什么意思| 梦见嫖娼是什么意思| 脑血栓前兆是什么症状表现| 人性是什么| 插画师是做什么的| 补气血吃什么水果| 富翁是什么意思| 阿尼是什么意思| 月经期间应该吃什么食物比较好| 放电是什么意思| 胰腺不好吃什么食物好| 卡姿兰是什么档次| 一蹴而就什么意思| jennie什么意思| 品红是什么颜色| 剪刀是什么生肖| 腰椎间盘突出看什么科| 什么是扁平疣| 宝宝发烧手脚冰凉是什么原因| 痛风吃什么蔬菜| 男生为什么会晨勃| 孩子喝什么牛奶有助于长高| 双鱼座是什么象星座| 猫舔人是什么意思| 狗狗咬主人意味着什么| 捆是什么意思| 符号是什么| 低血压有什么危害| 手指有痣代表什么意思| 为什么医生不推荐特立帕肽呢| 贫血吃什么补品| 包面是什么| legrand是什么牌子| 眼角痒用什么眼药水| 昙花一现什么意思| 百度Jump to content

奔跑吧 什么时候开播

From Wikipedia, the free encyclopedia
Completely Fair Scheduler
Original author(s)Ingo Molnár
Developer(s)Linux kernel developers
Written inC
Operating systemLinux kernel
Typeprocess scheduler
LicenseGPL-2.0
Websitekernel.org
Location of the "Completely Fair Scheduler" (a process scheduler) in a simplified structure of the Linux kernel.
百度 古希腊铭文指的是在陶、金属、大理石等硬质载体上的刻文以及书写在陶器上的字母文字。

The Completely Fair Scheduler (CFS) was a process scheduler that was merged into the 2.6.23 (October 2007) release of the Linux kernel. It was the default scheduler of the tasks of the SCHED_NORMAL class (i.e., tasks that have no real-time execution constraints) and handled CPU resource allocation for executing processes, aiming to maximize overall CPU utilization while also maximizing interactive performance.

In contrast to the previous O(1) scheduler used in older Linux 2.6 kernels, which maintained and switched run queues of active and expired tasks, the CFS scheduler implementation is based on per-CPU run queues, whose nodes are time-ordered schedulable entities that are kept sorted by red–black trees. The CFS does away with the old notion of per-priorities fixed time-slices and instead it aims at giving a fair share of CPU time to tasks (or, better, schedulable entities).[1][2]

Starting from version 6.6 of the Linux kernel, it was replaced by the EEVDF scheduler.

Algorithm

[edit]

A task (i.e., a synonym for thread) is the minimal entity that Linux can schedule. However, it can also manage groups of threads, whole multi-threaded processes, and even all the processes of a given user. This design leads to the concept of schedulable entities, where tasks are grouped and managed by the scheduler as a whole. For this design to work, each task_struct task descriptor embeds a field of type sched_entity that represents the set of entities the task belongs to.

Each per-CPU run-queue of type cfs_rq sorts sched_entity structures in a time-ordered fashion into a red-black tree (or 'rbtree' in Linux lingo), where the leftmost node is occupied by the entity that has received the least slice of execution time (which is saved in the vruntime field of the entity). The nodes are indexed by processor "execution time" in nanoseconds.[3]

A "maximum execution time" is also calculated for each process to represent the time the process would have expected to run on an "ideal processor". This is the time the process has been waiting to run, divided by the total number of processes.

When the scheduler is invoked to run a new process:

  1. The leftmost node of the scheduling tree is chosen (as it will have the lowest spent execution time), and sent for execution.
  2. If the process simply completes execution, it is removed from the system and scheduling tree.
  3. If the process reaches its maximum execution time or is otherwise stopped (voluntarily or via interrupt) it is reinserted into the scheduling tree based on its newly spent execution time.
  4. The new leftmost node will then be selected from the tree, repeating the iteration.

If the process spends a lot of its time sleeping, then its spent time value is low and it automatically gets the priority boost when it finally needs it. Hence such tasks do not get less processor time than the tasks that are constantly running.

The complexity of the algorithm that inserts nodes into the cfs_rq runqueue of the CFS scheduler is O(log N), where N is the total number of entities. Choosing the next entity to run is made in constant time because the leftmost node is always cached.

History

[edit]

Con Kolivas's work with 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.[4] CFS is an implementation of a well-studied, classic scheduling algorithm called weighted fair queuing.[5] Originally invented for packet networks, fair queuing had been previously applied to CPU scheduling under the name stride scheduling. CFS is the first implementation of a fair queuing process scheduler widely used in a general-purpose operating system.[5]

The Linux kernel received a patch for CFS in November 2010 for the 2.6.38 kernel that has made the scheduler "fairer" for use on desktops and workstations. Developed by Mike Galbraith using ideas suggested by Linus Torvalds, the patch implements a feature called auto-grouping that significantly boosts interactive desktop performance.[6] The algorithm puts parent processes in the same task group as child processes.[7] (Task groups are tied to sessions created via the setsid() system call.[8]) This solved the problem of slow interactive response times on multi-core and multi-CPU (SMP) systems when they were performing other tasks that use many CPU-intensive threads in those tasks. A simple explanation is that, with this patch applied, one is able to still watch a video, read email and perform other typical desktop activities without glitches or choppiness while, say, compiling the Linux kernel or encoding video.

In 2016, the Linux scheduler was patched for better multicore performance, based on the suggestions outlined in the paper, "The Linux Scheduler: A Decade of Wasted Cores".[9]

In 2023, a new scheduler based on earliest eligible virtual deadline first scheduling (EEVDF) was being readied to replace CFS.[10] The motivation was to remove the need for CFS "latency nice" patches.[11]

See also

[edit]

References

[edit]
  1. ^ Love, Robert (2010). Linux Kernel Development (3rd ed.). United States of America: Addison Wesley. pp. 41–61. ISBN 9780672329463.
  2. ^ "Linux: The Completely Fair Scheduler | KernelTrap". 2025-08-07. Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  3. ^ "IBM Developer". developer.ibm.com. Retrieved 25 May 2024.
  4. ^ Molnár, Ingo (2025-08-07). "[patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]". linux-kernel (Mailing list).
  5. ^ a b Li, T.; Baumberger, D.; Hahn, S. (2009). "Efficient and scalable multiprocessor fair scheduling using distributed weighted round-robin" (PDF). ACM SIGPLAN Notices. 44 (4): 65. CiteSeerX 10.1.1.567.2170. doi:10.1145/1594835.1504188.
  6. ^ The ~200 Line Linux Kernel Patch That Does Wonders
  7. ^ Galbraith, Mike (2025-08-07). "[RFC/RFT PATCH v3] Re: [RFC/RFT PATCH v3] sched: automated per tty task groups [CFS]". linux-kernel (Mailing list).
  8. ^ Galbraith, Mike (2025-08-07). "[PATCH v4] sched: automated per session task groups". linux-kernel (Mailing list).
  9. ^ Lozi, Jean-Pierre; Lepers, Baptiste; Funston, Justin; Gaud, Fabien; Quema, Vivian; Fedorova, Alexandra. "The Linux Scheduler: A Decade of Wasted Cores" (PDF). EuroSys 2016. doi:10.1145/2901318.2901326. Retrieved 15 June 2019.
  10. ^ "EEVDF Scheduler May Be Ready For Landing With Linux 6.6". www.phoronix.com. Retrieved 2025-08-07.
  11. ^ "An EEVDF CPU scheduler for Linux [LWN.net]". lwn.net. Retrieved 2025-08-07.
[edit]
ds是什么意思 心力憔悴是什么意思 屡禁不止的意思是什么 备孕需要做什么准备 间质性肺病是什么意思
治疗肝脏硬化要吃什么药好 怀孕要检查什么项目 掉头发吃什么 为什么会梦游 养猫需要准备什么东西
肾阴虚吃什么中药 color是什么意思 草字头弓读什么字 心脏不大是什么意思 滑膜炎是什么病
感染hpv有什么症状 什么气什么现 脚气病缺什么维生素 oversize风格什么意思 奶酪和芝士有什么区别
脚麻是什么原因hcv9jop5ns8r.cn 匝道什么意思hcv9jop2ns6r.cn 淋巴细胞偏高是什么原因hcv8jop1ns3r.cn 吃什么下火hcv8jop9ns3r.cn 能量守恒是什么意思hcv9jop5ns1r.cn
放的屁很臭是什么原因hcv9jop7ns4r.cn 2014年是什么年hcv9jop0ns6r.cn 大专有什么专业hcv9jop0ns2r.cn 瞬息万变什么意思hcv9jop4ns8r.cn 四季如春是什么生肖hcv9jop1ns1r.cn
遥不可及什么意思creativexi.com 牵牛花是什么颜色hcv7jop9ns1r.cn anti什么意思hcv8jop0ns1r.cn 火车为什么会晚点hcv8jop0ns4r.cn 南瓜不能和什么一起吃gysmod.com
古曼童是什么xinjiangjialails.com 当志愿者有什么好处hcv8jop6ns5r.cn 别致是什么意思hcv8jop0ns8r.cn 上火引起的喉咙痛吃什么药gangsutong.com 中校军衔是什么级别hcv9jop1ns5r.cn
百度