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

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.

主站蜘蛛池模板: 陆川县| 望江县| 斗六市| 涿州市| 濮阳县| 河南省| 英德市| 慈利县| 墨竹工卡县| 平罗县| 广西| 红桥区| 东阳市| 元氏县| 施甸县| 津市市| 福泉市| 闽侯县| 延安市| 武陟县| 奉节县| 连江县| 栾川县| 平远县| 垣曲县| 珠海市| 湟中县| 康乐县| 安西县| 左贡县| 东安县| 辰溪县| 海城市| 双柏县| 大田县| 尖扎县| 六盘水市| 方山县| 桂东县| 大荔县| 高邮市|