以上的代码中, 因为有了内核抢占( kernel preemption),你可以在任何地方进行抢占。当重新调度时,你可能在使用另外一个cpu并且'cpu'的值不再指向当前的cpu了。
基于64个网页-相关网页
In Chapter 2, we focus on the kernel preemption strategy and scheduling algorithms. For the kernel preemption, we will examine two improved schemes and patches, with emphasis on the analysis of the inserting-preemption-point scheme.
接着本文从Linux的内核抢占和调度机制上进行了重点分析和研究:在内核抢占方面,分析了改进可抢占性的两种方案及补丁,其中重点分析了插入抢占点的方案;在调度机制方面,分析了Linux2.4.18的进程调度部分,讨论了两种经典实时调度算法。
参考来源 - 嵌入式Linux及其调度策略的研究·2,447,543篇论文数据,部分数据来源于NoteExpress
以上来源于: WordNet
So FPU code must always be locked against kernel preemption.
所以FPU代码必须始终被锁定,以防止内核抢占。
The kernel preemption case is handled by the spinlock code itself.
内核的抢占机制被它自己操作自旋锁的代码所控制。
Codezero's scheduler includes kernel preemption for both guest threads and microkernel threads (in addition to time slices for preemption).
Codezero的调度器包含针对来宾线程和微核线程的内核优先(以及用于优先的时间片)。
应用推荐