非抢占式内核控制路径中的上下文切换 (Linux)

发布于 2024-09-02 05:43:00 字数 70 浏览 9 评论 0原文

Linux 内核是非抢占式的,但我刚刚读到不同的控制路径中可能存在上下文切换。这是否与 Linux 内核的非抢占式特性相矛盾?

The Linux kernel is non-preemptive, but I just read that there could be context-switches in different control paths. Doesn't that contradict the non-preemptive nature on the Linux kernel?

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

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

发布评论

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

评论(2

原谅过去的我 2024-09-09 05:43:00

不,这并不矛盾,因为最新的 Linux 内核是抢占式的。

No, it does not contradict this, because the latest Linux kernels are pre-emptive.

你与清晨阳光 2024-09-09 05:43:00

Linux 内核使用了几种不同的抢占模型,其中包括旧的“不可抢占”模型 - 这意味着,一般来说,内核代码不能被抢占(我的意思是当不调用 Schedule()、sleep_on() 时等等)

还有其他几种程度的可抢占性。查看内核文档以获取更多信息。

There were / are several different preemption models used by the Linux kernel, which included the old "non-preemptable" model - which means, in general, that kernel code cannot be preempted (I mean when not calling schedule(), sleep_on() etc)

There are also several other degrees of preemptability. Look at the kernel documentation for more information.

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