Implementation of sporadic scheduler

ibrlas wrote on Wednesday, June 26, 2019:

Hi to all,

I have a question. I want to (try to) implement a sporadic scheduler in FreeRTOS Kernel.
Sporadic scheduler lowers the priority of the task if the task didn’t finish in dedicated time. Task can only continue if there is no tasks ready with the higher priority (after priority degradation). After task period kicks in again, priority is replenished.

What would be the right way to approach this manner?

Best regards

richarddamon wrote on Wednesday, June 26, 2019:

To do that I would likely just set a timer which is kicked off when the task starts a new unit of work, and stopped when it finishes, if the timer exprires then the timer call back can drop the tasks priority. What ever initiates the work unit (possibly a timer) can restore the priority.

ibrlas wrote on Wednesday, June 26, 2019:

Hey. Thanks for your answer. Thats a good idea. I will try that.

ibrlas wrote on Wednesday, June 26, 2019: