Hello RTEMS Gurus!<div><br></div><div>Environment:</div><div> - RTEMS 4.10.2</div><div> - BSP i386/pc386</div><div><br></div><div>Summary:</div><div> - ticks per timeslice = 5</div><div> - milliseconds per tick = 5</div>
<div> - Task A, PREEMPT | TIMESLICE, priority = 10, "number crusher" never yield CPU voluntarily. </div><div> - Task B, PREEMPT | TIMESLICE, priority = 10, "number crusher" never yield CPU voluntarily.
</div><div> - Task C, PREEMPT | NO_TIMESLECE, priority = 5, periodic (rate-monotonic), period = 5 ticks (25ms), CPU usage = ~50%</div><div><br></div><div>What was expected:</div><div> - Task C running periodically, as programmed.</div>
<div> - Tasks A and A, using the remaining CPU budget, (~25% each one, in this configuration).</div><div><br></div><div>What was observed:</div><div> - Task C running periodically, as programmed (passed).
</div><div> - Only task A is running.</div><div> - Task B never runs.</div><div><br></div><div>"Workarounds" applied to achieve the expected behavior:</div><div> - 1: decrease ticks per timeslice; or,</div>
<div> - 2: decrease task C CPU budget (larger period or less computations). </div><div><br></div><div>I believe the general form of the problem is equivalent to answer: </div><div> - Why timesliced tasks gets starved, when:</div>
<div> * ticks per timeslice is equals to a period of a RM task, or</div><div> * when the CPU use of RM task is greater than or equals to 50%.</div><div><br></div><div>Is the RM scheduling police interfering in timeslice accounting?</div>
<div><br></div><div>Test program attached.</div><div><br></div><div>Run with: </div><div> - qemu-system-i386 -kernel Debug/exer_rm</div><div><br></div><div>(it what tested in a real hardware and the same behavior was observed).</div>
<div><br></div><div>Change system.h and/or task_four to "fix".</div><div><br></div><div>Best regards,</div><div><br></div><div>--Wendell.</div><div><br></div>