|
|
# Timing the OS overhead with an RMS scheduler.
|
|
|
|
|
|
## Resume and Suspend method
|
|
|
|
|
|
The fastest task has the highest priority and is blocking (cooperative thread)
|
|
|
Other tasks are preemptible. And their priority is tied to their periodicity.
|
|
|
|
|
|
An ISR runs periodically, triggered by PWM clock source.
|
|
|
At each ISR event, the fastest thread is resumed and it executes until it is done
|
|
|
at that point it suspends itself to let lower priority thread execute.
|
|
|
Lower priority threads executes until ISR runs again and preempt them by resuming the
|
|
|
fastest thread.
|
|
|
|
|
|
ISR also resumes preemptible threads at a fixed pace that give their period.
|
|
|
In this exemple Fastest thread executes at 20kHz, app1 executes at 2kHz,
|
|
|
and app2 executes at 200Hz.
|
|
|
|
|
|
OS overhead are measured by looking at gpio state with an oscilloscope.
|
|
|
|