IRQL and thread priority

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Raj (r_konjeti_at_mailcity.com)
Date: 06/08/04


Date: 8 Jun 2004 08:29:39 -0700

1) Threads of different thread priorities call separate dispatch
routines of my driver using DeviceIoControl(). Does the dispatch
routine called by high priority thread executes "preempting" dispatch
routine code of lower priority thread. But all dispatch routines are
at PASSIVE_IRQL. Since these dispatch routines are runnning at thread
context, will they also get respective thread priority.

2) I know thread priorities are for scheduler only. But CPU has to
make decision of what code to service (whether influenced by scheduler
or not). Some driver code runs at arbitrary thread which means user
thread priorities dont affect those segments of driver code execution.

3) Is it code at APC_LEVEL and above is always prefered by CPU than
any high priority of user mode thread code. Even this may not be true
because MSDN is reluctant Applications using REAL_TIME_THREAD_PRIORITY
because that can effect file data flushing to disk etc.

Thanks.



Relevant Pages

  • Re: A confusion about the stream interface driver
    ... No. Driver code is no different than any other code. ... thread priorities, which you can use if your thread needs to be higher than ... the ISR runs in kernel mode and the IST typically runs ...
    (microsoft.public.windowsce.embedded)
  • Re: IRQL and thread priority
    ... > 1) Threads of different thread priorities call separate dispatch ... > routine code of lower priority thread. ... > thread priorities dont affect those segments of driver code execution. ...
    (microsoft.public.development.device.drivers)