开发者

Context switches in control paths of a non-preemptive kernel (Linux)

开发者 https://www.devze.com 2022-12-31 22:51 出处:网络
The Linux kernel is non-preempti开发者_开发技巧ve, 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 kern

The Linux kernel is non-preempti开发者_开发技巧ve, 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?


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


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.

0

精彩评论

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