In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how the process management of linux system is". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. The concept of process and thread
Source Baidu encyclopedia:
Process is a running activity of a program in a computer on a certain data set, the basic unit of resource allocation and scheduling of the system, and the basis of the structure of the operating system. In the contemporary thread-oriented computer architecture, the process is the container of threads. A program is a description of instructions, data and its organizational form, and a process is the entity of a program. It is a running activity of a program in a computer about a certain data set, the basic unit of resource allocation and scheduling of the system, and the basis of the structure of the operating system. A program is a description of instructions, data and its organizational form, and a process is the entity of a program.
Thread is the smallest unit that the operating system can schedule operations. It is included in the process and is the actual operating unit of the process. A thread refers to a single order of control flow in a process, where multiple threads can be concurrent in a process, and each thread performs different tasks in parallel.
2. What is process management
What on earth is the process?
A process is a program or command being executed, each process is a running entity, has its own address space, and occupies a certain amount of system resources.
So what is a program?
A program is a collection of codes written by people in computer language that can achieve specific goals or solve specific problems.
Let's put it another way:
A program is a collection of codes written by people in computer language, which can achieve certain functions and can be executed. A process is a program in progress. When the program is executed, the executor's permissions and attributes, as well as the code of the program will be loaded, such as memory, the operating system assigns an ID number to the process, and we call it PID (process ID).
3. The role of process management
Judge the health status of the server: the main job of the operation and maintenance engineer is to ensure the safe and stable operation of the server. Ideally, when there is a problem with the server, but before the server is down or out of service, the problem is solved by human intervention. The main task of process management is to judge whether the server is running healthily and whether human intervention is needed. If the CPU occupancy rate and memory occupancy rate of the server are too high, human intervention is needed to solve the problem.
Look at all the processes in the system: we need to look at all the running processes in the system, through which we can determine which services are running in the system and whether there are illegal services running.
Kill the process: this is the least commonly used tool in process management. When I need to stop the service, I stop the service with the correct shutdown command (for example, the apache service can be shut down through service httpd stop). Only when the correct means of terminating the process fail, will you consider using the kill command to kill the process (you are not a killer, do not use kill to terminate all processes, otherwise it will easily cause the server to crash)
4. Several states of the Linux process
D: a sleep state that cannot be awakened, usually used in the case of Iripple O.
R: the process is running.
S: the process is asleep and can be awakened.
T: stop state, which may be paused in the background or the process is in a debug state.
W: memory interaction state (invalid since 2.6 kernel).
X: a dead process (it should not happen).
Z: zombie process. The process has been terminated, but some programs are still in memory.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.