[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] Scheduling 2 tasks
Hi Paolo,
thanks for your quick response. But my problem was not equal priorities.
The tasks have unequal priorities.
After some more testing I think, I have another problem:
I was running the new experimental version 0.7 of RT and the task
with higher priority didn't interrupt the other.
I just tested it with "normal" RT 0.6, and it worked.
Thus, I think, the bug in RT 0.7.
Do you or anybody else know sth. about this ?
Cheers,
Volker
> From owner-rtl@rtlinux.cs.nmt.edu Wed Jun 10 14:42 MET 1998
> Date: Wed, 10 Jun 1998 13:08:41 +0200
> From: Paolo Mantegazza <mantegazza@aero.polimi.it>
> Mime-Version: 1.0
> To: rtl@rtlinux.cs.nmt.edu
> Subject: Re: [rtl] Scheduling 2 tasks
> Content-Transfer-Encoding: 7bit
>
> Volker Zahn wrote:
>
> > Hi RT-Freaks!
> >
> > I've got a question about scheduling of periodic tasks.
> > I tested an example with two periodic tasks, first one has a
> > scheduling time of 500us, second of 2000us withan offset of 250us
> > between them, so that they never come at the same time:
> >
> > rt_task_make_periodic(&task1, now + 3000, TIME_US(2000));
> > rt_task_make_periodic(&task2, now + 3250, TIME_US(500));
> >
> > I tested the execution times by toggling bits on the parallel port
> > an watching them with an oszilloscope. Worked! :)
> >
> > But now I tested what happens, if task1 calculates longer than 250us.
> > I thought, task2 should interrupt task1, but it didn't. It came to
> > execution after the task_wait of task1. Is this correct, or do I things
> > wrong?
> >
> > Of course, task2 is of higher priority, but I did change priorities with
> > same result.
> >
>
> It is correct if the second task is less important (lower priority, i.e.
> higher priority number), it is questionable, in my opinion wrong, if the
> second task has the same priority.
> If you agree the fix to the latter is simple. Just edit rt_prio_sched.c
> and look at the "preemptor" search in function "rt_schedule" ,change
> "task->priority < prio" into "task->priority <= prio".
> Ciao, Paolo.
>
> --- [rtl] ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
>
--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/