Round-robing/timesliced tasks disturbed by rate-monotonic task
Wendell Silva
silvawp at gmail.com
Tue Jun 19 20:08:39 UTC 2012
Hello RTEMS Gurus!
Environment:
- RTEMS 4.10.2
- BSP i386/pc386
Summary:
- ticks per timeslice = 5
- milliseconds per tick = 5
- Task A, PREEMPT | TIMESLICE, priority = 10, "number crusher" never
yield CPU voluntarily.
- Task B, PREEMPT | TIMESLICE, priority = 10, "number crusher" never
yield CPU voluntarily.
- Task C, PREEMPT | NO_TIMESLECE, priority = 5, periodic
(rate-monotonic), period = 5 ticks (25ms), CPU usage = ~50%
What was expected:
- Task C running periodically, as programmed.
- Tasks A and A, using the remaining CPU budget, (~25% each one, in this
configuration).
What was observed:
- Task C running periodically, as programmed (passed).
- Only task A is running.
- Task B never runs.
"Workarounds" applied to achieve the expected behavior:
- 1: decrease ticks per timeslice; or,
- 2: decrease task C CPU budget (larger period or less computations).
I believe the general form of the problem is equivalent to answer:
- Why timesliced tasks gets starved, when:
* ticks per timeslice is equals to a period of a RM task, or
* when the CPU use of RM task is greater than or equals to 50%.
Is the RM scheduling police interfering in timeslice accounting?
Test program attached.
Run with:
- qemu-system-i386 -kernel Debug/exer_rm
(it what tested in a real hardware and the same behavior was observed).
Change system.h and/or task_four to "fix".
Best regards,
--Wendell.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120619/7af174ad/attachment.html>
More information about the users
mailing list