执行体进程--EPROCESS

本文深入探讨执行体层中的EPROCESS概念,它是内核层的重要组成部分,负责管理和协调线程与进程。EPROCESS结构详细解析,揭示其在操作系统中的核心作用。
摘要由CSDN通过智能技术生成

执行体层位于内核层之上,它侧重于提供各种管理策略,同时为上层应用层程序提供基本的功能接口。

// Process structure.
//
// If you remove a field from this structure, please also
// remove the reference to it from within the kernel debugger
// (nt\private\sdktools\ntsd\ntkext.c)
//

typedef struct _EPROCESS {
    KPROCESS Pcb;//KPROCESS内嵌结构体,所以一个进程的KPROCESS和EPROCESS对象地址是相同的。

    //
    // Lock used to protect:
    // The list of threads in the process.
    // Process token.
    // Win32 process field.
    // Process and thread affinity setting.
    //

    EX_PUSH_LOCK ProcessLock;//(push block)用于保护EPROCESS中的数据成员。

    LARGE_INTEGER CreateTime;
    LARGE_INTEGER ExitTime;

    //
    // Structure to allow lock free cross process access to the process
    // handle table, process section and address space. Acquire rundown
    // protection with this if you do cross process handle table, process
    // section or address space references.
    //

    EX_RUNDOWN_REF RundownProtect;

    HANDLE UniqueProcessId;//是进程的唯一编号,在进程创建时设定。

    //
    // Global list of all processes in the system. Processes are removed
    // from this list in the object deletion routine.  References to
    // processes in this list must be done with ObReferenceObjectSafe
    // because of this.
    //

    LIST_ENTRY ActiveProcessLinks;

    //
    // Quota Fields.
    //

    SIZE_T QuotaUsage[PsQuotaTypes];//一个进程内存使用量
    SIZE_T QuotaPeak[PsQuotaTypes];//尖峰使用量
    SIZE_T CommitCharge;//虚拟内存已提交的页面数量

    //
    // VmCounters.
    //

    SIZE_T PeakVirtualSize;
    SIZE_T VirtualSize;//指定一个进程虚拟内存大小

    LIST_ENTRY SessionProcessLinks;
	//当一个进程中的线程发生用户模式异常时,内核的异常处理例程在处理异常过程中,将向该进程的异常端口或调试端口发//送消息,从而使这些端口的接收方(调试器或Windows子系统)能够处理该异常。
    PVOID DebugPort;//指向调试端口
    PVOID ExceptionPort;//指向异常端口
    PHANDLE_TABLE ObjectTable;//进程的句柄表,包含了所有已被该进程打开的那些对象的引用。

    //
    // Security.
    //

    EX_FAST_REF Toke
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值