dpc vs work item

Hi,
i have a dpc timer object which gets invoked every 10ms. (i m asking it to
fire every 1 ms but the log shows it gets fired every 10ms …can anything
be done about that?) now each time, this dpc queues an io work item to do
some work.

the question is , is it possible that two dpcs could operate back to back
before a work item has performed operation even once. can somebody throw
some light on this ?

kutty

It absolutely can be the case that two DPC’s can be called before a work
item. DPC’s run at the transition from DISPATCH_LEVEL to a lower IRQL,
while work items run when the worker queue is scheduled. These are totally
independant of one another (except that worker threads run at
PASSIVE_LEVEL).

On the timer you can use ExSetTimerResolution, but that is going to impact
the performance of the whole system.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

“Kutty Banerjee” wrote in message news:xxxxx@ntdev…
> Hi,
> i have a dpc timer object which gets invoked every 10ms. (i m asking it
to
> fire every 1 ms but the log shows it gets fired every 10ms …can anything
> be done about that?) now each time, this dpc queues an io work item to do
> some work.
>
> the question is , is it possible that two dpcs could operate back to back
> before a work item has performed operation even once. can somebody throw
> some light on this ?
>
> kutty
>
>
>

On Tue, 2004-08-17 at 15:10, Kutty Banerjee wrote:

Hi,
i have a dpc timer object which gets invoked every 10ms. (i m asking it to
fire every 1 ms but the log shows it gets fired every 10ms …can anything
be done about that?)

See a recent post from Neal Christensen about this. I think it was
August 9, subject “Windows Timers”. There are also lots of other posts
in the archives about this.

now each time, this dpc queues an io work item to do
some work.

the question is , is it possible that two dpcs could operate back to back
before a work item has performed operation even once.

Yep, it is possible. All DPCs are handled before any PASSIVE_LEVEL work
is done on a given CPU. It is possible that you have more than 10ms of
DPC work to do before the dispatcher is unlocked to schedule your
thread. Also, other threads could get scheduled before yours; a thread
quantum is more than your timeout, so I’d imagine this isn’t even that
unlikely.

-sd

The DPC latency is undetermined.

You cannot rely on the fact that the DPC will really be called in 10ms. It
can be called, say, in 50ms.

Windows is not a realtime OS. Live with it.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Kutty Banerjee”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, August 18, 2004 12:10 AM
Subject: [ntdev] dpc vs work item

> Hi,
> i have a dpc timer object which gets invoked every 10ms. (i m asking it to
> fire every 1 ms but the log shows it gets fired every 10ms …can anything
> be done about that?) now each time, this dpc queues an io work item to do
> some work.
>
> the question is , is it possible that two dpcs could operate back to back
> before a work item has performed operation even once. can somebody throw
> some light on this ?
>
> kutty
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com