上一篇篇幅有点长,所以补一篇
上一篇我们说道,时间片中断会导致线程切换,但并不是说只要有时钟中断就一定切换线程,时钟中断时,会有两种情况导致线程切换:
线程时间片存储在_KTHREAD.Quantum,所以每次切换时,都会对这个值进行初始化
这个值被设置时,即使当前线程的CPU时间片没有到期,仍然会被切换,参考KiDispatchInterrupt