Slow event responses (~400ms)
Joel Sherrill
joel.sherrill at oarcorp.com
Thu Jan 25 15:04:44 UTC 2007
rg wrote:
> Remailed with an intelligent subject..
>
> Hi
>
> I have just started programming rtems.
> And I see a slow response to events in the order
> of 400ms or on my system 80 ticks
> (50MHz Leon2 CPU) RTEMS 4.6
>
> I need a event response time closer to 10 ms, or 2 ticks.
>
> I am measuring the response time by setting an IO output
> just after sending the event and clearing it after receiving it
> in the receiving task..and then I measure on a oscillioscope....
> (difficult to spell that one...)
>
> Ive tested by sending the event from a ISR and also a task...
> all tasks have the same priority and are preemptive, tested to have
> the receiving task no preemptive..this gives slightly better results
> otherwise the results are the same.
>
>
This is the problem. You have a lot of tasks at the same priority and
preemption
really isn't going to be the factor. Tasks are in a FIFO per priority
and every task
ahead of the one receiving the event will have to run and give up the
CPU (block or
yield) before the task receiving the event will run.
If you made the task receiving the event higher priority than the other
tasks and
those lower priority tasks were preemptive, the number would be MUCH lower.
Most of the time, the higher priority task would execute immediately
after the ISR
exits.
This is an application design/tuning issue which could occur on any
priority based
operating system.
--joel
> mrr
>
>
>
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
More information about the users
mailing list