This is always going to refer to some interupt driven driver.
When the kernel gets an interrupt, the appropriate driver is called. As nothing else can happen while that event is being processed, it is important to get done and let the kernel get back to other work as soon as possible. With that thought in mind, the concept of top and bottom half drivers was invented: the top half, the part that gets called initially by the kernel, does the absolute bare minimum that has to be done (anything that involves exclusive access to hardware or other resources and that must be done instantly), and then sets up things so that its bottom half, which will do all the rest of the work, can be executed more leisurely.
Just how and when bottom halves get executed is a matter of kernel design. You might read, for example, that bottom halves are deprecated in recent Linux kernels. That's not exactly true: the concept still very much exists, it's just how they are handled that is different: in the new kernels you actually have choices as to how these things will be run: as softirqs or tasklets, which are very much like they always were, or to stick them in work queues, which is much more like firing off a user process. See I'll Do It Later: Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-06 Tony Lawrence