关于 OS 中的进程控制块 [英] about Process control block in OS

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

问题描述

我最近回顾了操作系统概念.关于进程控制块,是一个操作系统上只有一个全局ONE,还是每个进程都有一个PCB?

I recently reviewed OS concepts. About Process control block, is there just a global ONE on one OS , or there is one PCB for each process?

另外,这个PCB是否只存在于RAM中?

Also, does this PCB only exist in RAM?

[我假设我的问题是针对 Linux 或 Unix.]谢谢,

[I assume my question is target on Linux or Unix.] Thanks,

推荐答案

一次回答一个问题:

  1. 每个工艺是否有一个 PCB?是的.从广义上讲,进程控制块应该包含进程的信息(调度、内存、时间会计等).此通知用于各种与任务相关的活动

Linux 中的 PCB 被实现为一个称为 task_struct 的结构(请查看 http://lxr.linux.no/linux+v3.12.6/include/linux/sched.h#L1023)

PCB in linux is implemented as a structure known as task_struct(Please check the code at http://lxr.linux.no/linux+v3.12.6/include/linux/sched.h#L1023)

您可以阅读更多关于任务及其内部的@http://linuxgazette.net/133/saha.html

You can read a more about tasks and their internal @ http://linuxgazette.net/133/saha.html

  1. 它基本上比内存或磁盘更复杂.据我所知,它依赖于架构.请查看其他答案:task_struct 存储在哪里?我认为这直接回答了你的问题
  1. Its basically more complicated than in memory or on disk. As far as I know, It is architecture dependent. Please check other answers : Where is task_struct stored? I think this answers your question directly

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

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