Process

May 18, 2018

Process Starts and Terminates

Process Starts and Terminates

Process Identifiers

Identifier Name 中文名称
pid process ID 进程 ID
ppid parent process ID 父进程 ID
uid real user ID 进程实际用户 ID
euid effective user ID 进程有效用户 ID
gid real group ID 进程实际组 ID
egid effective group ID 进程有效组 ID
sid session ID 会话 ID
pgid process group ID 进程组 ID
tpgid controlling tty process group ID 终端进程组 ID

实际 ID 与 有效 ID 的区别: 通常有效 ID 是用户实际的 ID,但是可以通过设置 st_mode 来特殊地指定执行时的有效 ID

Process Status

State Explanation Comment
I idle
S interruptible sleep waiting for an event to complete
R running or runnable
T stopped either by a job control signal or because it is being traced
U/D in uninterruptible wait usually IO
Z dead / zombie terminated but not reaped by its parent

Linux Process States

Fork Process

Sharing of open files between parent and child after fork

Unix File Table

Network Logins

Network Logins

References

[1]. Advanced Programming in the UNIX® Environment

[2]. Linux process states


Profile logo

Written by Alvie Zhang

If you're going through hell, keep going