APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/10/30 bottom half

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

Got something to add? Send me email.

Increase ad revenue 50-250% with Ezoic

More Articles by

Find me on Google+

© Tony Lawrence

Kerio Samepage

Have you tried Searching this site?

Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

If you ask "Should we be in space?" you ask a nonsense question. We are in space. We will be in space. (Frank Herbert)

This post tagged: