2. Sleeping/Waiting State (S)
The Sleeping or Waiting state represents processes that are waiting for some event to occur or a resource to become available. This is one of the most common states for processes in a Unix system, as processes frequently need to wait for input/output operations, user input, or synchronization with other processes.
There are two types of sleep states in Unix systems. Interruptible sleep (S) allows the process to be awakened by signals, making it responsive to system events or user interventions. Uninterruptible sleep (D), also known as disk sleep, occurs when a process is waiting for I/O operations that cannot be interrupted, typically involving disk or network operations.
Processes enter the Sleeping state voluntarily when they make system calls that require waiting, such as reading from a file, waiting for network data, or sleeping for a specified time period. The kernel maintains wait queues for different resources, and sleeping processes are placed in appropriate queues until their waiting condition is satisfied.
Author is a passionate Blogger and Writer at Dlightdaily . Dlightdaily produces self researched quality and well explained content regarding HowToGuide, Technology and Management Tips&Tricks.