Nested Interrupt Handling
在Understanding the Linux Kernel的4.3节上有这么一段话。
The price to pay for allowing nested kernel control paths is that an interrupt handler must never block, that is, no process switch can take place until an interrupt handler is running. In fact, all the data needed to resume a nested kernel control path is stored in the Kernel Mode stack, which is tightly bound to the current process.
意思是说:
中断处理是可以嵌套进行的,但是代价是interrupt handler不能被block——也就是不能在其中发生进程切换。
这里我有几个疑问:
1. Preemptive multi-task不就是在timer interrupt handler中进行
进程切换吗?
2. Linux的interrupt handler是通过interrupt gate调用的,而Intel
CPU触发interrupt gate的时候会自动清除IF。如果是这样,又如
何会产程嵌套的中断处理呢?
3. 这里的interrupt handler,我猜是指狭义的interrupt——就是不
包括exception。是吗?