Does it really require launching Media Center, or just launching any program
that does a timeSetEvent that forces the timer to go into its
higher-resolution mode? Sounds like launching Media Center is just one way
to cause this to happen. It might be simpler just to start a service that
does the timeSetEvent, and until that service is running (and it can open
the driver and send down a DeviceIoControl to say “I’ve started a
high-resolution timer”) then the driver cannot depend on having accurate
timings.
joe
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Sunday, July 10, 2011 11:54 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Fast sleep or wait
Followed quickly by “How do I launch Media Center from the MBR?”
Gary G. Little
C 952-454-4629
H 952-223-1349
“Yes, Virginia there really is such a thing as a stupid question.”
On Jul 8, 2011, at 9:27, “Scott Noone” wrote:
> OK, so we should all now be prepared to answer the question, “how can I
launch Media Center from a driver?”
>
> -scott
>
> –
> Scott Noone
> Consulting Associate and Chief System Problem Analyst
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
>
> “Mark Roddy” wrote in message news:xxxxx@ntdev…
>
> Just open Media Center - it goes to fast timer mode for you
>
> Mark Roddy
>
>
>
> On Fri, Jul 8, 2011 at 8:02 AM, wrote:
>> Changing the clock interval using its documented interface is not as bad
as
>> hijacking the clock interrupt. The minimum clock interval on the OS has a
>> hard coded limit which seems to have been reduced from 1000us to 500us in
>> Windows 7.
>>
>> Setting that to the minimum, in combination with a kernel timer allows
you
>> to do a wait of 1ms (plus the extra latency of other DPCs and ISRs
running
>> on the same CPU).
>>
>> The hardware timers are programmable in high resolution, the 8254 has a
>> resolution of 1 us, the HPET has a resolution which is expressed in
>> PETAseconds, can you believe it. A pity that there seems to be no
interface
>> to access hardware based aperiodic timers, there would be many other good
>> purposes for these than just supporting incompatible hardware.
>>
>> //Daniel
>>
>>
>>
>> “Joseph M. Newcomer” wrote in message
>> news:xxxxx@ntdev…
>>> Yep. This is a known problem; the usual solution is to redesign the
>>> hardware so it doesn’t require a wait. For example, if the hardware
>>> generates an interrupt after 1ms this is good. But I’ve had this
argument
>>> before with hardware designers, who say silly things like “Well, all you
>>> need to do is just reprogram the timer chip and hijack the timer
interrupt
>>> vector”, which is what a hardware designer who works on an MS-DOS
machine
>>> or
>>> who works on a bare machine will propose (and hey, it can save
>>> $0.15/board!)
>>> Such designs will not work in any operating system I’ve known of (a few
>>> still have 55ms timers!). Hardware designers often say “the software
will
>>> solve the problem” and don’t know what “the” software is!
>>>
>>> As far as I know, there is no way to do a 1ms delay without doing a
>>> busy-wait, which, as you discovered, hogs the CPU and severely damages
>>> responsiveness.
>>> joe
>>>
>>> -----Original Message-----
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer