关于进程的pid [英] About the pid of the process

查看:27
本文介绍了关于进程的pid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有点愚蠢的问题,如果我创建了一系列进程......这些不一定是某种继承,进程的 pid 必须是数字连续或随机 pids ?

I've a somewhat silly question, if i have a series of processes that are created ... these are not necessarily some sort of inheritance, the pid of the processes have to be numbers continuous or random pids ?

推荐答案

这由操作系统决定.

一般来说,它们通常由操作系统按顺序分配.但是,这种行为并不是决策的依据,因为大多数操作系统规范都声明进程 ID 分配不是确定性的(即:它可能是随机的,并且可能在未来版本中发生变化等).

In general, they are usually sequentially assigned by the OS. However, this behavior is not something to base decisions upon, since most operating system specifications state that the process ID allocation is not deterministic (ie: it could be random, and could change in a future version, etc).

这篇关于关于进程的pid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆