Open jalinei opened 6 months ago
Big breakthrough this weekend and today. Below is a working example deploying a 2 task RMS with a script to plot the chronograph.
@cfoucher-laas I would love to have you feedback on that. I believe we can extend this principle to finally crack down this major hurdle in our current codebase. https://github.com/jalinei/RMS/tree/master
Is your feature request related to a problem? Please describe.
This RFC covers multiple long time wanted features such as :
RMS It has been found that the simplest optimal scheduler for periodic tasks is called Rate Monotonic Scheduler this finding comes from the book
Hard Real Time Computing Systems
fromC.Buttazzo
.We found out that implementing such a scheduling algorithm is not an easy task using zephyr kernel API. We found that :
We are limited by the context switch overheads of the RTOS.
Zephyr clock source is based on systick timer that is asynchronous from our PWM engine.
In today implementation :
criticalTask
and is running synchronously with either an internal timer or the pwm engine. That task is in fact an interruption that is non preemptible and that is having priority over any other tasks including Zephyr system work queue.k_work
items that are necessary to zephyr driven peripherals such asUSB̀
orlpuart
criticalTask
orsystem work queue
The current method has the following disadvantages :
criticalTask
with a longer period of execution.criticalTask
.For context, this RFC thread is created in order to follow up with multiple issues in gitlab.
https://gitlab.laas.fr/owntech/power-api/core/-/issues/35 https://gitlab.laas.fr/owntech/power-api/core/-/issues/36 https://gitlab.laas.fr/owntech/power-api/core/-/issues/48
Current RFC impacts / involve mostly :
Describe the enhancement you'd like
Describe alternatives you've considered
Workaround is the current scheduling implementation which does not provide full satisfaction.