20. Task Queues
In this chapter, we discuss task queues in Solaris.
20.1 Overview of Task Queues
It is common for you, the kernel programmer, to postpone the processing of some tasks and delegate their execution to another kernel thread. There may be several reasons for doing this:
- You have a task that isn’t time-critical, but a current code path that is.
- You have a task that may require grabbing locks that a thread already holds.
- You have a task that needs to block (for example, to wait for memory), but you have a thread that cannot block in its current context.
- You have a code path that can’t complete because of a specific condition but also can’t sleep or fail. In this case, the task is immediately queued ...
Get Solaris™ Internals: Solaris 10 and OpenSolaris Kernel Architecture, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.