In: Computer Science
The state of a process is defined by:
The state of the process is defined by current activity of the processs, It is the state field in the process descriptor.
A process descriptor is a task_struct-type data structure whose fields contain all of the information about a single process. A process, also referred to as a task, is an instance of a program in execution.
The state field in the process descriptor describes what is currently happening to a process. This field contains one of the following five flags (i.e., values):
TASK_RUNNING: The process is runnable, and it is either currently running or it is on a runqueue waiting to run.
TASK_INTERRUPTIBLE: The process is sleeping (i.e., blocked), waiting for some condition to exist or for some signal to arrive.
TASK_UNINTERRUPTIBLE: This is identical to TASK_INTERRUPTIBLE except that the process will not awaken and become runnable if it receives a signal.
TASK_ZOMBIE: The process has terminated, but its parent process (i.e., the process that spawned it) has not yet issued a wait4() system call.
TASK_STOPPED: Process execution has stopped; the process is not running nor is it eligible to run.