当前位置:网站首页>Process management command
Process management command
2022-04-23 17:57:00 【*Flowers bloom on the street】
process : One is in progress ( function ) The program ( Dynamic )
Program : It consists of one instruction after another
Process by operating system management
pcb Process control block ( Store the attribute information of the process ) struct task_struct;
int pid Unique identification of the process Process id Number
The process consists of three states : be ready function Blocking
The difference between program and process :
1、 A program is an ordered collection of instructions , It's a static concept , Its ability has no meaning of operation . A process is an execution of a program on a processor , It's a dynamic concept .
2、 The program can be stored as a kind of software data for a long time , The process has a certain life cycle , It can produce and die dynamically .
3、 A process is a unit that can run independently , Can work in parallel with other processes .
4、 Process is the basic unit that competes for the limited resources of computer system , It is also the basic unit for processor scheduling . The program has no such concept .
5、 There is no one-to-one correspondence between processes and programs . Different processes can contain the same program , Multiple processes can also be generated during the execution of the same program .
6、 A program is an ordered collection of instructions recorded on a medium , The process is controlled by the program 、 Data and process control blocks 3 Part of it is made up of .
One 、ps Check the process bash command interpreter
which See where the program is located
ps By default, only Current terminal Process in (ppid The parent process id, The parent process produces a child process )
ps -e View all process information
ps -A View all process information
ps -f See more processes
ps -ef See more details
ps -L Displays the linearity of the process ID
pstree Print out the displayed process information in the form of tree view
shell Is the general term of command interpreter ,(eg: Student ) bash One of the command interpreters (eg: Zhang San . Li Si )
Two 、kill end ( Kill ) process
( To end a process, you need to know the of the process pid Number )(kill Send semaphores to the process )
kill pid Number ( Programs running in the background and foreground can kill )
ctrl+c( Can only kill the foreground running )
-9(-SIGKILL) Force the end of a process
-STOP Suspend a process ( Actively suspend the execution of the process ,CPU No longer allocate resources to this process )
sleep sleep ( Commands are executed one by one ,sleep After execution, the next program can be executed )
for example : We're going to end sleep 200 This process , We need to know its pid( You can find it at another terminal pid), End it again
3、 ... and 、 Stop the process ( Stop the process , But don't end it )
ctrl+z
Four 、jobs Check the system backstage Running commands ( Displays the tasks of the current terminal )
5、 ... and 、 Force kill process
kill -9 pid Number
6、 ... and 、pkill End process by name
End a group of processes with the same name
pkill Process name
pkill -9 Process name ( End of the mandatory )
7、 ... and 、 & Running programs in the background
command &
command &
The default command is executed in the foreground , Only one at a time , The next... Cannot be executed until the previous one is executed
Programs running in the background can only use kill Kill ,Ctrl+c Cannot end a program running in the background
8、 ... and 、 The foreground task is transferred to the background
bg % task number
Nine 、 The task is transferred from the background to the foreground
fg % task number
Ten 、top View system resource usage and process information
( amount to windows Task manager )
Select the process number and press f Displays detailed information about the selected process
Press q sign out
11、 ... and 、 User management command
版权声明
本文为[*Flowers bloom on the street]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230547207523.html
边栏推荐
- 油猴网站地址
- Yolov4 pruning [with code]
- Transfer learning of five categories of pictures based on VGg
- 编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)
- Tell the truth of TS
- C1 notes [task training chapter I]
- Oil monkey website address
- Future usage details
- Ring back to origin problem - byte jumping high frequency problem
- cv_ Solution of mismatch between bridge and opencv
猜你喜欢
Clion installation tutorial
Fashion classification case based on keras
Client example analysis of easymodbustcp
Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)
C network related operations
Click Cancel to return to the previous page and modify the parameter value of the previous page, let pages = getcurrentpages() let prevpage = pages [pages. Length - 2] / / the data of the previous pag
Applet learning notes (I)
48. Rotate image
Nat Commun|在生物科学领域应用深度学习的当前进展和开放挑战
On the method of outputting the complete name of typeID from GCC
随机推荐
cartographer_ There is no problem compiling node, but running the bug that hangs directly
The method of changing a value in the array and a value in the object of wechat applet
Leak detection and vacancy filling (6)
C language loop structure program
Vite configure proxy proxy to solve cross domain
This point in JS
Type judgment in [untitled] JS
Operators in C language
C#字节数组(byte[])和字符串相互转换
Detailed deployment of flask project
cv_ Solution of mismatch between bridge and opencv
高德地图搜索、拖拽 查询地址
Nat Commun|在生物科学领域应用深度学习的当前进展和开放挑战
SystemVerilog (VI) - variable
列表的使用-增删改查
440. The k-th small number of dictionary order (difficult) - dictionary tree - number node - byte skipping high-frequency question
Dry goods | how to extract thumbnails quickly?
土地覆盖/利用数据产品下载
394. String decoding - auxiliary stack
Yolov4 pruning [with code]