官术网_书友最值得收藏!

Process descriptors

Right from the time a process is born until it exits, it’s the kernel's process management subsystem that carries out various operations, ranging from process creation, allocating CPU time, and event notifications to destruction of the process upon termination.

Apart from the address space, a process in memory is also assigned a data structure called the process descriptor, which the kernel uses to identify, manage, and schedule the process. The following figure depicts process address spaces with their respective process descriptors in the kernel:

In Linux, a process descriptor is an instance of type struct task_struct defined in <linux/sched.h>, it is one of the central data structures, and contains all the attributes, identification details, and resource allocation entries that a process holds. Looking at struct task_struct is like a peek into the window of what the kernel sees or works with to manage and schedule a process.

Since the task structure contains a wide set of data elements, which are related to the functionality of various kernel subsystems, it would be out of context to discuss the purpose and scope of all the elements in this chapter. We shall consider a few important elements that are related to process management.

主站蜘蛛池模板: 明光市| 高淳县| 卓尼县| 巴林左旗| 成武县| 延庆县| 甘孜| 甘孜| 四川省| 建平县| 黄冈市| 太康县| 丹阳市| 曲阳县| 西青区| 泸定县| 扎囊县| 姜堰市| 彩票| 宝鸡市| 富顺县| 淮南市| 忻州市| 荥阳市| 南汇区| 原阳县| 城市| 涟水县| 宜兰县| 武宁县| 元氏县| 北海市| 迭部县| 罗城| 焉耆| 德令哈市| 顺昌县| 深圳市| 台南县| 龙里县| 沙雅县|