Process, process group, work, conversation

process

Definition: running in a virtual address space program execution entity.
The reason for introducing the process is: to make the program "concurrent" execution and control of the program to be described and "concurrent" execution.


Some special process
ID 0 is usually the process of scheduling process, often referred to as "exchange process" (swapper). This process is part of the kernel, it is not the disk of the program.

ID of the process 1 is init process, the kernel calls when the system bootstrap process ends. The process of the program file is / sbin / init. This process is responsible for starting a Unix system after bootstrap kernel. init usually associated with the system reads the initialization files (/ etc / rc * or / etc / inittab, as well as in /etc/init.d/ file), and the system starts to a state. init process does not terminate, all processes spawned by the init process after the system starts derived.
See other related content 1, Wiki process ; 2, a simple explanation of processes and threads

Process Group

In POSIX-conformant operating systems, a process group denotes a collection of one or more processes. Process groups are used to control the distribution of signals. A signal directed to a process group is delivered individually to all of the processes that are members of the group.

Definition: The process group is a collection of one or more processes are
introduced because of: a control signal for distribution to multiple processes, process group is sent a signal to the process group will occur in every process
related content see 1, Linux process, process group, session period, the control terminal ;

operation

Shell can perform job control, which can run a foreground job and any number of background jobs, each job that can be one or more processes.
The difference between work and process group: If the job is a process and create a child process, the child process does not belong to the job. Once the job run ends, Shell put its own front desk mentioned, if the original foreground process there (if the child process has not terminated), it automatically becomes a background process group.

 

Conversation

Definitions: Session is a collection of one or more of the process group. Typically, a user login session begins and ends at the user exits, all processes during which the user is running the session belong to this period.
Session includes a control process (first session process), a foreground process group and any background process group. Only one session has a control terminal, and generates an input signal on the control terminal is sent to all the foreground process group session in

$proc1 | proc2 &
$proc3 | proc4
那么此时,session中就会有三个进程组存在
分别是{登陆shell(session leader)},{proc1, proc2}, {proc3, proc4}。

 

UNIX process groups, sessions, and job control
Linux process, process group, session period, the control terminal
[basic Linux - Linux management and monitoring process] (basic Linux - Linux management and monitoring processes)

Guess you like

Origin www.cnblogs.com/cangqinglang/p/12110843.html