且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是linux进程表?它由什么组成?

更新时间:2023-11-11 18:39:34

Linux(例如几乎所有其他操作系统)中的进程表只是计算机RAM中的数据结构.它包含有关操作系统当前正在处理的进程的信息.

The process table in Linux (such as in nearly every other operating system) is simply a data structure in the RAM of a computer. It holds information about the processes that are currently handled by the OS.

此信息包括有关每个过程的一般信息

This information includes general information about each process

  • 进程ID
  • 流程所有者
  • 处理优先级
  • 每个过程的环境变量
  • 父进程
  • 指向进程的可执行机器代码.

进程表中一个非常重要的信息是当前每个进程的状态.该信息对于OS是必不可少的,因为它启用了所谓的多处理功能,即仅在一个处理单元(CPU)上虚拟运行多个进程的可能性.

A very important information in the process table is the state in that each process currently is. This information is essential for the OS, because it enables the so called multiprocessing, i.e. the possibility to virtually run several processes on only one processing unit (CPU).

操作系统使用进程是否正在激活,正在休眠,正在运行等信息来处理进程的执行.

The information whether a process is currently ACTIVE, SLEEPING, RUNNING, etc. is used by the OS in order to handle the execution of processes.

此外,还有一些统计信息,例如进程上次何时运行,以便使操作系统的调度程序能够确定下一个应该运行的进程.

Furthermore there is statistical information such as when was the process RUNNING the last time in order to enable the schedulr of the OS to decide which process should be running next.

因此,总而言之,进程表是操作系统处理所有已启动进程的主要组织元素.

So in summary the process table is the central organizational element for the OS to handle all the started processes.

可以在此线程中找到简短的介绍:

A short introduction can be found in this thread:

http://www.linuxforums.org/forum/kernel/42062-use -process-table.html

***也提供了有关流程的很好的信息:

And wikipedia also has nice information about processes:

http://en.wikipedia.org/wiki/Process_management_(计算)#Process_description_and_control

http://en.wikipedia.org/wiki/Process_table