FreeRTOS/FreeRTOS-Kernel

[Feature Request] Dynamic Prioritization

svenbieg opened this issue ยท 6 comments

The problem is to define the priority on a task-level. Every task can call a critical function, so the priority has to be raised there.

My solution is a task-lock that works with a mutex. The task is marked exclusive, so interrupts are kept disabled after the task-switch until the task-lock is released.

You can take a look at the heap for example. It is used by every task and is a critical function. I'm using a task-lock there.

Best regards,

Sven Bieg

Please create a post in the FreeRTOS Forums explaining your feature request in more detail, possibly with sequence diagrams to help us understand your request.

This time i'm sorry. You can find the detais here:

https://github.com/svenbieg/Core

I'm happy to see You again, looking forward to my Christmas holidays. My kernel took me two weeks, it's really easy with know-how.
Your vTaskSuspendAll is too expensive, You need a mutex there that can be locked up to high priority.

Good luck, to the whole FreeRTOS-team!

I'm really sorry i don't have time at the moment,

Sven Bieg

Thank you for sharing your implementation. I assume you do not need anything from FreeRTOS for your implementation as your implementation does not depend on FreeRTOS.

Semaphore sounds like a german joke.
"Seh'ma vor" is bavarian dialect for "we foresee". Mutex meaning is obvious, mutual exclusive.

You are right, exclusive mutual exclusion may sound funny at first, but it is exactly what You are missing.
If we have 100 tasks, access the heap, a high priority task is waiting, and the system timer interrupts, the high priority task has to wait for 100 task-switches.
What about mutex_lock, mutex_lock_shared and mutex_lock_up?

FIFO-task-management