Process Management (1)
Process management 1. Process 1. Process concept
A process is a program with certain independent functions, a process that is dynamically executed on a data set. The process is an independent unit for resource allocation and scheduling in the operating system, and it is the carrier for the application program to run. The process is generally composed of three parts: program, data and process control block.
The program is used to describe the function to be completed by the process, and it is the instruction set that controls the execution of the process; the data is the data and work area needed by the program when it is executed; the program control block contains the description information and control information of the process is the only sign of the existence of the process. 2. Process view 1. Ps and pstree
The ps command is used to view snapshot information of the current process
Usage: ps [option]
-u user-centric organization process status information display
-a terminal-related process
-x processes independent of the terminal
-e shows all processes
-f displays full format program information
Ps-aux
Output format description
Field describes USER user name% CPU process% CPU%% MEM%% memory% VSZ the amount of virtual memory used by the process (KB) RSS the fixed amount of memory consumed by the process (KB) (number of pages residing) the status of the STAT process START the process is triggered startup time TIME the time that the process is actually running using CPU
Status code description
Status codes describe the uninterruptible sleep state of D (usually IO processes); R is running but traversable in queue; S is dormant; T is stopped or tracked; W enters memory swapping (invalid since kernel 2.6); X dead processes (basically rare); Z zombie processes