Dave Edwards <Dave.edwards@abicom-international.com> wrote:
I’m currently seeing my ISR routines executing with around 1ms
resolution, these are triggered by an isr deliver event signal with a
high priority.After a long period of experimentation I found that this delay was
reduced by using the ClockPeriod function.I don’t claim to know or understand what is going on here, but it
appears to me that the servicing of the interrupt via the event
mechanism occurs at the rate of the microkernel tick period.Since this discovery, I’ve tried operating within the HW ISR itself (By
writing my own function), this works better but it can still take 1 tick
time to pass control over to the software isr.
Let’s be fair. No one is more addictd to the speed of QNX4 over QNX6
then I am. But your judging one thing and comparing it to another.
There are two issues involved here.
- The clock period, or tick(size). This is typically 1 ms. If the
clock ticked 10 us ago, it ain’t going to go off again for another
990 us no matter what else your software demands of it.
BUT . . .
- When you talking about (or should be talking about) is interrupt
latency. Latency is defined as the time between when a piece of
hardware generates an interrupt and when the ISR begins to execute.
Under QNX6 the latency (while not quite as impressive as QNX4) is
still much better than many (most) other OSs.
Typically, there is also another latency involved here. With QNX the
philosophy is to do as little work as possible in the ISR and then cause
a non-ISR process/thread to do most of the work. So there is a latency
between scheduling that process/thread to start and it’s actually
starting. This latency is also not as good as QNX4’s, but still isn’t bad.
The real problem most people have is adjusting the priorities of all of
the processes/threads in the system so that the time critical events
are process in a timely manner and the lower priority threads still
have enough CPU to do their thing.
It sounds like your using a timer interrupt (which is limited to the 1 ms
resolution and comparing it to what you expect from a hardware
interrupt. That apples and oranges and it just not fair.
–
Bill Caroselli – Q-TPS Consulting
1-(626) 824-7983
qtps@earthlink.net