## Process States

The CPU time allocation system automatically assigns programs one of three “states” that describe their current status. Process states are also important for coordinating process execution. A process may be in one and only one state at any instant, although state changes may be frequent. The states are:

ACTIVE: processes which can currently perform useful processing. These are the only processes assigned CPU time.

WAITING: processes which have been suspended until another process terminates. This state is used to coordinate execution of sequential programs. The shell, for example, will be in the waiting state during the time a command program it has initiated is running.

SLEEPING: processes suspended by self-request for a specified time interval or until receipt of a “signal”. Signals are internal messages used to coordinate concurrent processes. This is the typical state of programs which are waiting for input/output operations.

Sleeping and waiting processes are not given CPU time until they change to the active state.