This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: DSR Scheduling Problem
> The test begins by transmitting data, which is looped back to the receiver.
> It starts out with:
> TX ISR -> TX DSR
> TX ISR -> TX DSR
> ...
> TX-ISR -> TX DSR
>
> Then I get the RX ISR during the TX DSR, which just schedules
> the RX DSR. However, the RX DSR does not run until 39 ms
> later,
And TX DSRs are running during that entire 38ms?
> resulting in an overrun error. During this time period, the
> TX ISR and TX DSR continue their work transmitting the
> remaining data. After all of the data has been sent, THEN the
> RX DSR runs.
It appears you don't have enough CPU time to run all of the
DSRs you want in the alloted time.
> Looking at the code post_dsr() and call_dsr() in
> hal/common/current/src/drv_api.c, I noticed that the DSRs are
> queued at the head of the list, and dequeued also from the
> head of the list.
Yup. DSRs are scheduled in a LIFO manner.
> This seems wrong,
It seems to work for everybody else. ;)
> as it can (and apparently does) cause DSRs to get delayed by
> other DSRs that are queued later. Seems like it would be
> better to queue them on the end of the list and dequeue them
> from the head of the list, so that the DSRs would get run in
> the order in which they are queued.
If the DSRs that you're scheduling require 150% of the
available CPU time, then something's going to fail.
In your particular case, perhaps it is better to fail in manner
B than in manner A. But, very few eCos users have the option of
failing, so nobody put in much extra effort to make things fail
in manner B rather than in manner A.
Did that make sense?
--
Grant Edwards grante Yow! I'm having an
at EMOTIONAL OUTBURST!! But,
visi.com uh, WHY is there a WAFFLE
in my PAJAMA POCKET??
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss