While you can not get _guaranteed_ 1 ms response from standard Windows
or Linux (or in fact from any system with virtual memory, without
locking all referenced pages into memory), but perhaps 95 % to 99 % of
all events.
One way to test response times is to run a half duplex slave protocol
in the device to be tested. This will test the latencies from the
serial card to kernel mode device driver into the user mode protocol
code and then back to the device. Observe the pause between the last
character of the request and the first character of the response with
an oscilloscope or serial line analyzer. With 1 ms serial line
analyser time stamp resolution, the two way latency was somewhere
between 0 and 2 ms (or 1-2 character times at 9600 bit/s).
Oh I am sure nobody can even dream of 1mS latency with windows.
Some time ago, when they had only NT, a guy told me 22 mS was
the best achievable (he was living in a windows world, though, so
I don't know if this was possible or wishfull thinking).
A few years ago I did some tests with NT4 on 166 MHz and the 20 ms
periodic wakeup occurred within +/-2 ms more than 99 % of the time,
provided that no user interactions happened at the same time. With
user interactions, the worst case wakeup observed was about 50 ms.
Of course, any application using SetTimer can be delayed by seconds,
if the user grabs a window and shakes it all over the screen
.
Paul