【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.csdn.net/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



posted on 2017-07-29 15:29  awildfish  阅读(513)  评论(0编辑  收藏  举报

导航