Michel Doyon wrote:
>
> Hi there
>
> I am trying to perform some timing test using rtl 2.0 and an SMP system.
> I have 4 threads each running at different rates (1,2,4,8 khz), they all
> have the same priority. For now I
> am putting all threads on the same CPU.
>
> Is there a way of knowing when the slow threads are interrupted ? I have
> an idea of using gethrtime() at the beginning and exit of each threads and
> analyze these times to see how things get called and interrupted.
>
> any suggestions ?
>
> how is the scheduler work in such a situation ? does it allow the fastest
> thread to interrupt the slower threads ? I have balanced the load to
> ensure that I have enough CPU time to execute them all in one of their
> cycles but I would like to confirm that somehow.
>
> Thank you
>
> Michel
Hi Michel,
I have attached a preemption test that prints ascii 1's and 0's to show
when 2 tasks are active. You should be able to adapt this to analyse
the 4 tasks you have on a uniprocessor.
Regards, Stuart
preempt.tgz