Deferrable functions, kernel tasklets, and work queues | Linux Today

Deferrable functions, kernel tasklets, and work queues

Written By
Web Webster
Web Webster
Mar 12, 2010

“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
2.6.27.14 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

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.