owntech-foundation / Core

A comprehensive API for power electronics based on Zephyr RTOS
https://www.owntech.org/
GNU Lesser General Public License v2.1
3 stars 10 forks source link

[RFC] Adding synchronous tasks to schedulingAPI. #50

Open jalinei opened 6 months ago

jalinei commented 6 months ago

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 from C.Buttazzo.

image

We found out that implementing such a scheduling algorithm is not an easy task using zephyr kernel API. We found that :

In today implementation :

The current method has the following disadvantages :

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.

jalinei commented 5 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