Linux内核使用什么调度算法?

发布于 2024-08-08 07:17:43 字数 73 浏览 7 评论 0原文

Linux内核使用什么调度算法?

我在哪里可以获得有关 Linux 内核的更多信息? (操作系统第一课...学生级)

What scheduling algorithms does Linux kernel use?

Where can I get more info about linux's kernel? (OS first course... student level)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

因为看清所以看轻 2024-08-15 07:17:43

Linux 内核有几种不同的可用调度算法,用于进程调度和 I/O 调度。从 www.kernel.org 下载并致电

make menuconfig

您将获得带有内置选项的所有可用选项的完整列表帮助。
Con Kolivas 曾经提出过 O(1) 调度程序。一定要看看他做了什么。我曾经是一个伟大的突破。

The linux kernel has several different available scheduling algorithms both for the process scheduling and for I/O scheduling. Download it from www.kernel.org and call

make menuconfig

You will get a full list of all available options with a built-in help.
One guy that once came up with his O(1) scheduler is Con Kolivas. Definitively have to have a look at what he did. I was once a great break-through.

日久见人心 2024-08-15 07:17:43

注意: 正如 Abdullah Shahin 指出的,这个答案是关于 IO 队列调度程序的,而不是针对进程的。

如果您只想检查您的 Linux 系统正在使用什么调度程序以及哪些调度程序可用,您可以运行以下命令:

cat /sys/block/sda/queue/scheduler

[] 之间的调度程序是当前正在使用的调度程序。其他的都可用。
更改它:

sudo bash -c 'echo deadline > /sys/block/sda/queue/scheduler'

不过,请小心将其设置回默认值,除非您知道自己在做什么和想要什么。

默认值(至少在较新的 Ubuntu 发行版中)是 CFQ(完全公平调度):

http://en.wikipedia .org/wiki/CFQ

对创建者 (Jens Axboe) 的采访:

http://kerneltrap.org /节点/7637

Note: As Abdullah Shahin noted, this answer is about IO queing scheduler, not for processes.

If you just want to check what scheduler your linux system is using and which are available you can run the following command:

cat /sys/block/sda/queue/scheduler

The one between the [] is the one it's using at the moment. The other ones are available.
To change it:

sudo bash -c 'echo deadline > /sys/block/sda/queue/scheduler'

Be carefull to set it back to default though, unless you know what you are doing and want.

Default (in newer Ubuntu distros at least) is CFQ (Completely Fair Scheduling):

http://en.wikipedia.org/wiki/CFQ

Interview with the creator (Jens Axboe):

http://kerneltrap.org/node/7637

挽容 2024-08-15 07:17:43

正如其他人已经提到的,根据预期用途,有多种可用的调度算法。

如果您想了解有关 Linux 中调度的更多信息,请查看本文

As others have already mentioned, there are several scheduling algorithms available, according to the intended use.

Check this article if you want to learn more about scheduling in Linux.

热风软妹 2024-08-15 07:17:43

我相信“完全公平的调度程序”正在与最新的内核一起使用。我认为如果你在谷歌中搜索,你可以得到大量的信息。

链接:http://en.wikipedia.org/wiki/Completely_Fair_Scheduler

i believe "completely fair scheduler" is in use with latest kernels. I think you can good amount of information if you just search for it in google.

link : http://en.wikipedia.org/wiki/Completely_Fair_Scheduler

浮云落日 2024-08-15 07:17:43

Linux 内核的新成员是 EDF(最早截止日期优先),以保证实时支持
http://lkml.org/lkml/2009/9/22/186
http://www.evidence.eu.com/content/view/313 /390/

A new addition to Linux Kernel is EDF (Earliest Deadline First) for guaranteed RealTime support
http://lkml.org/lkml/2009/9/22/186
http://www.evidence.eu.com/content/view/313/390/

再浓的妆也掩不了殇 2024-08-15 07:17:43

我认为 Linux 内核实际上有一些不同的调度程序,您可以在编译时进行选择。要了解有关 Linux 内核的更多信息,您可以下载内核源代码(或在线浏览)并在 Documentation 目录中查找。例如,scheduler 子目录可能会有所帮助。显然,您也可以只查看代码本身。

I think the Linux kernel actually has a few different schedulers you can choose from at compile-time. To find out more about the Linux kernel, you can download the kernel source code (or browse it online) and look in the Documentation directory. For example, the scheduler subdirectory might be helpful. You can also just look at the code itself, obviously.

惯饮孤独 2024-08-15 07:17:43

现代 GNU/Linux 发行版使用 CFS(完全公平调度程序)。您可以在本书的第四章中阅读更多相关内容:
Linux 内核开发第三版,作者:Robert Love

您会发现许多有趣且易于理解的内容理解那里的解释。我很享受。

Modern GNU/Linux distributions use CFS (Completely Fair Scheduler). You may read more on that in the 4th chapter of this book:
Linux Kernel Development 3rd Edition by Robert Love

You will find many interesting and easy to understand explanations there. I enjoyed a lot.

天赋异禀 2024-08-15 07:17:43

Linux 内核允许三种不同的调度算法,主要是

  1. 最短作业优先
  2. 、循环调度、
  3. 基于优先级的抢占式调度算法。

第三种调度方式,与2.4等较低版本的Linux版本不同

Linux Kernel allows three different scheduling algorithms mainly

  1. shortest job first
  2. Round Robin Scheduling
  3. Priority based preemptive scheduling algorithm.

The third scheduling method which it differs with lower version of Linux versions such as 2.4

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文