[Date Prev][Date Next] [Chronological] [Thread] [Top]

[rtl] Scheduling 2 tasks



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.

Cheers,

  Volker
--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/