Microsecond delay in Windows
- From: "Arun" <arunkumar.v2@xxxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 16:24:36 +0530
Hello Experts,
In my Win32 application, I need to induce a delay in microsecond. I knew
that it is pretty impossible in Windows 'coz of its multi-tasking nature.
My application's requirement is like this =>
Pesudocode TransmitMessageThread:
While(n times) {
1. Pick a message from TransmitMessageQueue.
2. Send the Message onto the custom N/W (N/W speed is 10MBps)
3. Provide a microsecond delay
n - - ;
}
After some exploration, I got the following (sloppy) solutions.
1. Set the priority of the process to "REALTIME_PRIORITY_CLASS" using
SetPriorityClass.
2. Write a driver routine which will simply induce the required delay in
microseconds.
3. Explore real time extensions for Windows to find out the solution.
I knew that solution #1 simply wont work 'coz the process will be in User
space and time required to do anything in user space is completely
unpredictable hence solution no#1 is ruled out.
I have absolutely no idea about the feasibility of solutions #2 & #3.
"it is only barely possible to have a device driver defeat the scheduler,
and it can do
this only while in the driver, and for a period not exceeding 25us" .even
this statement from an expert vapourises even the last hope I had.
I am literally aware that I'm asking the impossible..Still, Is there any way
out there???
Is there any way I can induce microsecond delay in my Windows application?
It's acceptible for me that to obtain the delay in microsecond the
multi-tasking ability of the Windows needs to be disabled!!! for some
definite interval of time.
Eagerly awaiting for a very positive response :))
Best Regards,
Arun
.
- Follow-Ups:
- Re: Microsecond delay in Windows
- From: fat_boy
- Re: Microsecond delay in Windows
- From: heinz
- Re: Microsecond delay in Windows
- Prev by Date: UDP and TDI crash with DRIVER_IRQL_NOT_LESS_OR_EQUAL
- Next by Date: about
- Previous by thread: UDP and TDI crash with DRIVER_IRQL_NOT_LESS_OR_EQUAL
- Next by thread: Re: Microsecond delay in Windows
- Index(es):
Relevant Pages
|