Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Generic Query (IrqL Level)

NtDev_GeekNtDev_Geek Member - All Emails Posts: 100
As i know that all the user mode threads execution take place at Passive_Level irql. so an interrupt above Passive_Level can block the execution of the thread with highest priority.??

Is it true for both in Kernel as well as in user mode thread case ??
If possible please shed some light with an example.

Thanks,
nT

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,007
    xxxxx@gmail.com wrote:
    > As i know that all the user mode threads execution take place at Passive_Level irql. so an interrupt above Passive_Level can block the execution of the thread with highest priority.??
    >
    > Is it true for both in Kernel as well as in user mode thread case ??

    Absolutely.  IRQL is the first level of priority.  At a given IRQL,
    threads are selected based on scheduling priorities.  The highest
    priority thread at PASSIVE_LEVEL cannot run if there is a DISPATCH_LEVEL
    thread ready to run.

    This is why ISRs and DPCs must run quickly.  You must minimize time
    spent as DISPATCH_LEVEL if you want the system to be responsive.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,284
    >At a given IRQL, threads are selected based on scheduling priorities.

    Well... Not really, no.

    IRQL is a concept entirely PRELIMINARY to (above) the realm of scheduling. Windows will run the highest IRQL activity pending on a given processor. When the IRQL is IRQL PASSIVE_LEVEL, the Windows Dispatcher will choose which thread to run based on dispatcher objects, priorities, and other vagaries of the Windows scheduling algorithm.

    Another way to think of this: Within IRQL PASSIVE_LEVEL Dispatcher Objects govern what happens. Above IRQL PASSIVE_LEVEL Control Objects rule.

    Peter
    OSR
    @OSRDrivers

    Peter Viscarola
    OSR
    @OSRDrivers

  • anton_bassovanton_bassov Member Posts: 5,013
    > Within IRQL PASSIVE_LEVEL Dispatcher Objects govern what happens.
    > Above IRQL PASSIVE_LEVEL Control Objects rule.


    You meant to say "Within IRQL PASSIVE_LEVEL and APC_LEVEL Dispatcher Objects govern what happens.Above IRQL APC_LEVEL Control Objects rule.", right?

    Anton Bassov
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA