9.3. The Kernel Sleep/Wakeup Facility
The typical lifetime of a kernel thread includes not only execution time on a processor but also time spent waiting for requested resources to become available. An obvious example is a read or write from disk, when the kernel thread will issue the read(2) or write(2) system call, then sleep so another thread can make use of the processor while the I/O is being processed by the kernel. Once the I/O has been completed, the kernel will wake up the thread so it can continue its work.
Kernel threads that are runnable and waiting for a processor reside on dispatch queues. Kernel threads that must block, waiting for an event or resource, are placed on sleep queues. A kernel thread is placed on a sleep queue when ...
Get Solaris™ Internals: Core Kernel Components 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.