This is simplified, but part of the Windows O / S kernel mode is broken into three parts: HAL, Kernel, and Executive Subsystems. Executive subsystems are involved in general policy and operations in the field of O / W. The core discusses specific details of the process architecture for low-level operations (e.g. spinlocks, thread switching), as well as scheduling. HAL deals with differences that occur in specific implementations of the processor architecture (for example, how interrupts are routed on this x86 implementation). All of this is explained in more detail in the book Windows Internals.
When you create a new Win32 process, both the kernel and the executive subsystem want to track it. For example, the kernel wants to know the priority and proximity of threads in the process, because it will affect planning. Executive subsystems want to track the process, because, for example, the Executive security subsystem wants to associate a token with the process so that we can verify security later.
The structure that the kernel uses to track the process is KPROCESS. The structure that Executive Subsystems use to track is EPROCESS. As part of the implementation, KPROCESS is the first field of EPROCESS, so the execution subsystems distribute the EPROCESS structure and then call the kernel to initialize part of KPROCESS. In the end, both structures are part of a process object that represents an instance of a user process. This should also be described in the Windows Internals book.
-Scott
source share