Linux process management and monitoring and performance evaluation

1. Linux process management

The basic definition of a process is: an independent program running in its own virtual address space. From the perspective of the operating system, all things running on the system can be called a process.

Classification of processes:

  • System process: It can perform management tasks such as memory resource allocation and process switching; moreover, the operation of this process is not subject to user intervention, even the root user cannot interfere with the operation of the system process.
  • user process: A process spawned by the execution of a user program, an application program, or a system program outside the kernel, which can be run or shut down under the control of the user.
  • Interactive process: A process started by a shell terminal. During execution, it needs to interact with the user. It can run in the foreground or in the background.
  • Batch process: This process is a collection of processes responsible for starting other processes in sequence.
  • Daemon process: A daemon process is a process that runs all the time. It is often started when the Linux system starts and terminates when the system is shut down. For example, the httpd process is always running, waiting for user access. There is also the frequently used crond process, which is similar to the scheduled tasks of windows, and can periodically execute certain tasks set by the user.

In the Linux system, the process ID (indicated by PID) is the unique identifier to distinguish different processes. Their size is limited, and the maximum ID is 32768. UID and GID are used to represent the user and user group that started the process respectively. All processes are descendants of the init process with PID 1 (the centos7.x version is the systemd process). The kernel starts the init process at the last stage of system startup. Therefore, this process is the parent process of all processes under Linux, and the parent process is represented by PPID.

おすすめ

転載: blog.csdn.net/qq_35029061/article/details/131951654