Linux Process State

TASK_RUNNING : The process is runnalbe, it is either currently running or on a runqueue waiting to run. This is the only possible state for a process executing in user-space, it can also apply to a process in kernel-space that is actively running.

TASK_INTERRUPTIBLE : The process is sleeping(it is blocked), waiting for some condition to exist. When this condition exist, the kernel sets the process's sate to TASK_RUNNING. The process also awakes prematurely and becomes runnable if it receives a signal.

TASK_UNINTERRUPTIBLE : Identical to TASK_INTERRUPTIBLE except that process in this state can't be wake up and become runnable by receiving a signal. This is used in situations where the process must wait without interruption or when the event is expected to occur quite quickly. Because the task in this state does not response to signals, this is why we have those dreaded unkilled processes with state D in ps command's result, because the task will not respond to signal, you can't send it a SIGKILL signal. TASK_UNINTERRUPTIBLE is less often used than TASK_INTERRUPTIBLE.

TASK_ZOMBIE : The task has terminated, but its parent has not yet issued a wait4() system call. The task's process descriptor must remain in case the parent wants to access it. If the parent calls wait4(), the process descriptor is deallocated.

TASK_STOPPED : Process execution has stopped, the task is not running nor is it eligible to run. This occurs if the task receives the SIGSTOP, SIGTSTP, SIGTTIN or SIGTTOU signal or if it receives any signal while it is being debugged.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值