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

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.

主站蜘蛛池模板: 远安县| 南丰县| 青冈县| 桦南县| 永胜县| 双辽市| 德庆县| 民勤县| 安达市| 潜江市| 资中县| 思茅市| 手游| 北安市| 大悟县| 天柱县| 蒙自县| 新和县| 夹江县| 邵东县| 淮阳县| 宁化县| 汨罗市| 宣化县| 修文县| 修文县| 梁山县| 交城县| SHOW| 高雄市| 得荣县| 蓬安县| 广州市| 浦江县| 墨脱县| 丰县| 延安市| 五常市| 香河县| 安宁市| 梨树县|