Why kernel code/thread executing in interrupt context cannot sleep? -


I'm reading the following article by Robert Love

It says

"... Let's discuss the fact that the working queues move in the context of the process. This is in contrast to other lower half mechanisms, which go in the context of all intervals or blocks, because the interrupt context There is no banking process with which it has been rescheduled so that, because the handler in between Riya is not connected, so the scheduler has nothing to sleep and more importantly, the scheduler is nothing to wake up ... "

I do not get it. AFAIK, the scheduler in the kernel, is O (1), which is implemented through bitmap. So what prevents sceptmaster from sleeping and to take the next scheduling process and pass it control?

I think this is a design idea.

Of course, you can prepare a system that you can sleep in between, but except that the system has to be understood and complicated (many situations in which you have to keep account), this is nothing If not help, with a design view, declare interrupt handler like it can not sleep very clear and easy to implement.


From Robert Love (a kernel hacker):

You can not sleep in the interrupt handler because Interrupt does not have a reference to the banking process, and thus rescheduling in In other words, in other words, the handlers in the middle are not associated with the task, so there is nothing to do "wake up" and (more importantly) "nothing to wake up" they are atomically Should walk

This is not the opposite of other operating systems In most operating systems, the interrupts are not threaded. Half of the bottom part often happens, however.

Due to the page fault handler may sleep that it is implemented only by code which is in the context of the process because the kernel is not able to get its memory, due to user-space memory access only Page may be faulty. Thus, only certain locations (like copy_ {to,}) can cause a page fault within the kernel; those places should be done by all the code that can be asleep (i.e., the context Context, no lock, etc.).


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -