Linux on the process process

  

What is a process?
A process is a running instance of an already launched executable. The process has the following components: • The address space of the allocated memory; • Security attributes, including ownership credentials and privileges; • One or more threads of execution of the program code; ? Process status. Programs: Binary files, static /bin/date, /usr/sbin/httpd, /usr/sbin/sshd, /usr/local/nginx/sbin/ngix processes: the process of running the program, dynamic, lifecycle and running status.

Process life cycle


The parent process copies its own address space (fork) to create a new (child) process structure. Each new process is assigned a unique process ID (PID) to meet the needs of tracking security. PID and parent process ID (PPID) are elements of the child process environment. Any process can create child processes. All processes are descendants of the first system process: Centos5/6: init Centos7: systemd child process inherits the security of the parent process Sexual identity, past and current file descriptors, port and resource privileges, environment variables, and program code. Subsequently, the child process may exec its own program code. Typically, the parent process is in a sleeping state while the child process is running. When the child process completes, it issues an exit request. On exit, the child process has closed or dropped its resource environment, and the rest is called zombie (Zombie). The parent process wakes up when the child process exits, cleans up the remaining structure, and continues to execute its own program code. Process Status: In a multitasking operating system, each CPU (or core) can only process one process at a single point in time. As the process runs, its requirements for CPU time and resource allocation are constantly changing, assigning a state to the process that changes with the environment.



Copyright © Windows knowledge All Rights Reserved