【linux】进程状态

 

【进程状态转移图】

 

 

PROCESS STATE CODES
   R  running or runnable (on run queue)
   D  uninterruptible sleep (usually IO)
   S  interruptible sleep (waiting for an event to complete)
   Z  defunct/zombie, terminated but not reaped by its parent
   T  stopped, either by a job control signal or because
      it is being traced
   [...]
以上参考:https://unix.stackexchange.com/questions/96797/what-does-the-interruptible-sleep-state-indicate

D状态下,进程无法被中断,除非等待进程自己处理完毕,被系统自动唤醒。D状态的进程一般都是没法处理的。S状态出现的最多,mac下面的进程大多数都是S状态。


【S态进程解释】
使用命令:ps aux | grep Sl,可以看到一些处于Sl态的进程。那么这个是什么意思呢?
    <    高优先级
    N    低优先级
    L    有些页被锁进内存
    s    包含子进程
    +    位于后台的进程组;
    l    多线程,克隆线程  multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
以上参考:http://blog.youkuaiyun.com/flyingleo1981/article/details/7739490

【linux的信号】
Term:terminate the process 终止进程信号
Ign:默认动作是,忽略该信号
Core:默认动作是终止该进程,并打印core信息(参考core(5))
Stop:默认动作是stop the process,暂停该进程
Cont:默认动作是如果进程正在被stopped,则continue the process

更多的信号详解参考:http://man7.org/linux/man-pages/man7/signal.7.html



转载于:https://www.cnblogs.com/helww/p/7256074.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值