Generic Query (IrqL Level)

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

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.

>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

> 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