NVIDIA Interview Question
Software Engineer / DevelopersBottom halves (SoftIRQ/tasklet/WorkQueue) are the mechanism to push the work from the interrupt handler. They run at later point of time (with interrupts enabled).
Out of these bottom half mechanism, __only__ workqueue is the mechanism
where sleeping is allowed.
So, in this case the sleeping instruction within the interrupt handler can be pushed to the workqueue BH.
Please note that, it is assumed here, that we are talking about, __non_ *threaded* interrupt handlers !
SoftIRQs and tasklets cannot use any blocking instructions as they run in an interrupt context. Workqueues can only be used from a process context. So, I guess if the ISR is long, it can wake up a kernel thread, and let the kernel thread do the dirty work i.e. use blocking instructions.
- Bandicoot March 19, 2011@Nvidia reject: Thanks for sharing this wealth of questions. What position was this for ?