Assume:
1) Multi-cpu environment 2) Process that gets interrupted, is the same process that executes the interrupt handler, so I guess technically nothing gets interrupted except what the process was doing before, but it is still executing as it is executing the handler. 3) There is no top or bot开发者_如何学Ctom half, when an interrupt takes place the handler is invoked, executes, then return from interrupt, simple as that.Why would sleeping the handler (puts in sleep queue, context switch to next runnable process) be a bad idea?
Pls refer to Why kernel code/thread executing in interrupt context cannot sleep?
I just posted answer. Hope it makes sense for you.
精彩评论