当前位置:网站首页>Process basic properties
Process basic properties
2022-06-24 13:18:00 【Chen Bucheng I】
One . brief introduction
This article mainly introduces the basic properties of a process , Basic attributes include : process ID、 The parent process ID、 Process group ID、 Session and control terminals
Two . Process properties
1. process ID(PID) Each process has a unique process represented by a nonnegative integer ID(PID). Like our ID cards , Everyone's ID number is unique . Because of the process ID Identifiers are always unique , It is often used as part of other identifiers to ensure its uniqueness . process ID(PID) It cannot be changed at the user level .
stay Linux In the system ,PID by 0 The process of is usually a scheduling process . It is often called an exchange process , It is also the first system process . The first user process is init process . Its PID by 1.
2. The parent process ID(PPID) No matter what process ( except init process ) Are created by another process . This process is called the parent process of the created process . The process that is created is called a child process . The parent process ID Cannot change at the user level . The process of the parent process ID It is the parent process of the child process ID(PPID).
3. Process group ID(process group ID PGID) stay Linux In the system . Every user is a user ID(UID) User group ID(GUID). identical , Processes also have their own processes ID(PID) And process groups ID(PGID). A process group is a collection of one or more processes ; They are related to the same assignment . Each process group has a unique process group ID(PGID), Process group ID(PGID) Can be changed at the user level . example . Add a process to another process group , Is the use of setpgid() Function changes its process group ID.
A process can only set up process groups for itself or its child processes ID(PGID), Suppose... Is called in its child process exec() And so on , The process group of the child process can no longer be changed ID(PGID).
4. conversation (session) A session is a collection of one or more process groups . System call function getsid() Used to get the session of a process ID(SID).
such as , We go through SSH logon server , Will open a control terminal (TTY), This control terminal corresponds to a session . And the commands we run in the terminal and their child processes , It forms process groups one by one , among , Commands running in the background , Make up a background process group ; Commands running in the foreground , Constitute the foreground process group .
边栏推荐
- [live broadcast of celebrities] elastic observability workshop
- Implement Domain Driven Design - use ABP framework - create entities
- J'a i ouvert quelques mots d'un ami et quelques réflexions personnelles sur le livre des six ancêtres
- Optimization of MP4 file missing seconds caused by TS files when downloading videos from easydss video platform
- Attack popular science: DDoS
- One article explains R & D efficiency! Your concerns are
- Implement Domain Driven Design - use ABP framework - create entities
- Getting started with the lvgl Library - colors and images
- 谁是鱼谁是饵?红队视角下蜜罐识别方式汇总
- Sinomeni vine was selected as the "typical solution for digital technology integration and innovative application in 2021" of the network security center of the Ministry of industry and information te
猜你喜欢
我从根上解决了微信占用手机内存问题
Comparator 排序函数式接口
爱可可AI前沿推介(6.24)
Babbitt | metauniverse daily must read: 618 scores have been announced. How much contribution has the digital collection made behind this satisfactory answer
Getting started with the lvgl Library - colors and images
谁是鱼谁是饵?红队视角下蜜罐识别方式汇总
LVGL库入门教程 - 颜色和图像
Getting started with the lvgl Library - colors and images
I have fundamentally solved the problem of wechat occupying mobile memory
Teach you how to use airtestide to connect your mobile phone wirelessly!
随机推荐
Comparator sort functional interface
I enlighten a friend and my personal understanding of the six patriarchs' Tan Jing
“有趣” 是新时代的竞争力
The difference between apt and apt get
How does Argo family bucket make Devops easier?
Several common DoS attacks
问个sql view的问题
How to do research on plant endophytes? Special topic on Microbiology
关于被黑数据库那些事
go Cobra命令行工具入门
Getting started with the go Cobra command line tool
Metamask项目方给Solidity程序员的16个安全建议
用一个软件纪念自己故去的母亲,这或许才是程序员最大的浪漫吧
1. Snake game design
华为AppLinking中统一链接的创建和使用
[highlights] summary of award-winning activities of Tencent cloud documents
系统测试主要步骤
一文讲透植物内生菌研究怎么做 | 微生物专题
[live broadcast of celebrities] elastic observability workshop
Sqlserver 2000 has long-lasting vitality