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

Home NTDEV

Before Posting...

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

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Re: About time spend when processing Dispatch routine-?

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Yes well, there is a phrase: "suitability for purpose" that should be
applied to any design issues that consider the time constraints described
below.

If, for example, your hardware requires that you do x,y,z before you
complete your interrupt processing, then you have to do x,y,z and you don't
have to consider how many units of 50us x,y,z consume. You may have to
describe the performance impact of installing your hardware on a system, but
your hardware overrides this arbitrary timing constraint.

Likewise, outside of J. Hanrahan, I have never heard of or seen a driver
that considers the time spent inside its DPC routine. About the last thing I
would put into my dpc 'loop' is a test for elapsed time.

The timing constraint on spinlocks is equally problematic. One should
minimize serialized code segments. This is good programming practice. But I
have a really hard time with arbitrary, plucked out of the air (or perhaps
elsewhere) time limits. I can imagine some poor programmer counting assembly
instructions (at least this is now down to one processor family) and trying
to decide which clock speed ought to be used and then trying to re-arrange
code and sprinkle in arbitrary release and re-acquire (and recalculate
state) operations to satisfy what should have been stated as a more general:
"minimize time spent within code segments serialized by spinlocks."

-----Original Message-----
From: Sriram [mailto:[email protected]]
Sent: Tuesday, May 30, 2000 12:56 AM
To: NT Developers Interest List
Subject: [ntdev] Re: About time spend when processing Dispatch routine?


These are some of the time constraints..

Not more than 50 Microseconds at Device IRQL

Not more than 25 Microseconds while holding any DISPATCH_LEVEL Spinlocks...

Not more than 1 Millisecond at DISPATCH_LEVEL (Dpc routine, startio routine,
I/o timer routine, I/o Completion Call backs, AdapterControl Routines...)

-Sriram


Integra Micro Systems (P) Ltd.
[email protected]
www.integramicro.com



-----Original Message-----
From: Prekupec Boris < [email protected]
>
To: NT Developers Interest List < [email protected]
>
Date: Monday, May 29, 2000 9:13 PM
Subject: [ntdev] About time spend when processing Dispatch routine?


Can someone tell me how long can driver be on a Dispatch_LEVEL, I mean time
in seconds (inside Dispatch routine)? I don't remeber if I have read this in
DDK.

Regards,
Neno


---
You are currently subscribed to ntdev as: [email protected]

To unsubscribe send a blank email to $subst('Email.Unsub')
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online