In this lesson, you will learn how latency from hardware devices forces processes into an "uninterruptible sleep" state, causing them to stall while waiting for data.
Understanding Uninterruptible Sleep (D state)
When a process requests data from a disk or sends a packet over a network, the CPU is significantly faster than the hardware. Rather than wasting CPU cycles "busy-waiting" (constantly checking if the data has arrived), the Linux kernel puts the process to sleep.
When a process is waiting for hardware I/O (Input/Output), it enters a special state known as D (Uninterruptible Sleep). Unlike other sleep states, a process in state D cannot be woken up by signals—not even by a kill -9. It is essentially "locked" until the hardware finishes its task and informs the kernel.
Why Latency Causes Blocking
If your disk is slow (e.g., a failing drive) or your network connection is congested, the time it takes for that I/O operation to complete increases. Because the process is blocked and cannot move forward until the hardware responds, it stays in the D state for the duration of that latency.
You can observe this by running top or ps. In ps, the STAT column shows the current state:
# Look for the 'D' character in the STAT column
ps aux | grep ' D '
The Ripple Effect
When many processes are blocked waiting for the same slow hardware, your system's Load Average will spike. Even if your CPU is mostly idle, the system becomes sluggish because new processes trying to perform I/O get queued behind the blocked ones. This creates a bottleneck: your processes aren't "busy" using the processor, but they are "blocked" from completing their execution path.
In summary, the time a process spends in D state is a direct reflection of hardware latency. If you see high I/O wait times in your system monitor, it is a signal that your storage or network subsystem is struggling to keep up with the demands of your running applications.
Key Takeaway: Processes enter the uninterruptible D state to wait for hardware I/O; because they cannot be interrupted, excessive hardware latency will cause these processes to stall and inflate your system load.