Linux Today: Linux News On Internet Time.

More on LinuxToday

Deferrable functions, kernel tasklets, and work queues

Mar 12, 2010, 13:02 (0 Talkback[s])
(Other stories by M. Tim Jones)


How to Help Your Business Become an AI Early Adopter

"Summary: For high-frequency threaded operations, the Linux® kernel provides tasklets and work queues. Tasklets and work queues implement deferrable functionality and replace the older bottom-half mechanism for drivers. This article explores the use of tasklets and work queues in the kernel and shows you how to build deferrable functions with these APIs.

"This article explores a couple of methods used to defer processing between kernel contexts (specifically, within the Linux kernel). Although these methods are specific to the Linux kernel, the ideas behind them are useful from an architectural perspective, as well. For example, you could implement these ideas in traditional embedded systems in place of a traditional scheduler for work scheduling.

"Before diving into the methods used in the kernel to defer functions, however, let's start with some background on the problem being solved. When an operating system is interrupted because of a hardware event (such as the presence of a packet through a network adapter), the processing begins in an interrupt. Typically, the interrupt kicks off a substantial amount of work. Some amount of this work is done in the context of the interrupt, and work is passed up the software stack for additional processing (see Figure 1)."

Complete Story

Related Stories:

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.