Dispatch Routine IRQL and Thread Context

本文概述了文件系统过滤驱动程序调度例程的IRQL和线程上下文要求。详细介绍了不同类型的调度例程(如读取、写入、设备控制等)在不同情况下的调用者IRQL级别及线程上下文要求。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  The following table summarizes the IRQL and thread context requirements for file system filter driver dispatch routines.

DriverEntry routines are called in the context of a system thread at IRQL = PASSIVE_LEVEL.

  Most drivers' dispatch routines are called in an arbitrary thread context at IRQL = PASSIVE_LEVEL, with the following exceptions:

  • Any highest-level driver's dispatch routines are called in the context of the thread that originated the I/O request, which is commonly a user-mode application thread.

    In other words, the dispatch routines of file system drivers and other highest-level drivers are called in a nonarbitrary thread context at IRQL = PASSIVE_LEVEL.

  • The DispatchRead , DispatchWrite , and DispatchDeviceControl routines of lowest-level device drivers, and of intermediate drivers layered above them in the system paging path, can be called at IRQL = APC_LEVEL and in an arbitrary thread context.

    The DispatchRead and/or DispatchWrite routines, and any other routine that also processes read and/or write requests in such a lowest-level device or intermediate driver, must be resident at all times . These driver routines can neither be pageable nor be part of a driver's pageable-image section; they must not access any pageable memory . Furthermore, they should not be dependent on any blocking calls (such as KeWaitForSingleObject with a nonzero time-out).

  • The DispatchPower routine of drivers in the hibernation and/or paging paths can be called at IRQL = DISPATCH_LEVEL. The DispatchPnP routines of such drivers must be prepared to handle PnP IRP_MN_DEVICE_USAGE_NOTIFICATION requests.
  • The DispatchPower routine of drivers that require inrush power at start-up can be called at IRQL = DISPATCH_LEVEL.

 

Dispatch Routine Caller's IRQL: Caller's Thread Context:
Cleanup PASSIVE_LEVEL   Nonarbitrary
Close APC_LEVEL Arbitrary
Create PASSIVE_LEVEL Nonarbitrary
DeviceControl (except paging I/O) PASSIVE_LEVEL Nonarbitrary
DeviceControl (paging I/O path) APC_LEVEL Arbitrary
DirectoryControl APC_LEVEL Arbitrary
FlushBuffers PASSIVE_LEVEL Nonarbitrary
FsControl (except paging I/O) PASSIVE_LEVEL Nonarbitrary
FsControl (paging I/O path) APC_LEVEL Arbitrary
LockControl PASSIVE_LEVEL Nonarbitrary
PnP PASSIVE_LEVEL Arbitrary
QueryEa PASSIVE_LEVEL Nonarbitrary
QueryInformation PASSIVE_LEVEL Nonarbitrary
QueryQuota PASSIVE_LEVEL Nonarbitrary
QuerySecurity PASSIVE_LEVEL Nonarbitrary
QueryVolumeInfo PASSIVE_LEVEL Nonarbitrary
Read (except paging I/O) PASSIVE_LEVEL Nonarbitrary
Read (paging I/O path) APC_LEVEL Arbitrary
SetEa PASSIVE_LEVEL Nonarbitrary
SetInformation PASSIVE_LEVEL Nonarbitrary
SetQuota PASSIVE_LEVEL Nonarbitrary
SetSecurity PASSIVE_LEVEL Nonarbitrary
SetVolumeInfo PASSIVE_LEVEL Nonarbitrary
Shutdown APC_LEVEL Arbitrary
Write (except paging I/O) PASSIVE_LEVEL Nonarbitrary
Write (paging I/O path) APC_LEVEL Arbitrary
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值