Dispatch routine IRQL and thread Context

Source: Internet
Author: User

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.

  • TheDispatchread
    ,Dispatchwrite
    , AndDispatchdevicecontrol
    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.

    TheDispatchread
    And/orDispatchwrite
    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 or be part of a driver's
    Pageable-image section; they must not access any pageable memory

    . Furthermore, they shoshould not be dependent on any blocking CALS (suchKewaitforsingleobject
    With a nonzero time-out ).

  • TheDispatchpower
    Routine of drivers in the hibernation and/or paging paths can be called at IRQL = dispatch_level.Dispatchpnp
    Routines of such drivers must be prepared to handle PNP irp_mn_device_usage_notification requests.
  • TheDispatchpower
    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 (Cipher t paging I/O) Passive_level Nonarbitrary
Devicecontrol (paging I/O path) Apc_level Arbitrary
Directorycontrol Apc_level Arbitrary
Flushbuffers Passive_level Nonarbitrary
Fscontrol (generation T 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 (partition t 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 (writable t paging I/O) Passive_level Nonarbitrary
Write (paging I/O path) Apc_level Arbitrary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.