The AMDC v1 firmware uses a cooperative scheduling approach, meaning all system tasks run in the same time slice at the same priority. The relative ordering is determined by the order the tasks are registered with the scheduler--the first registered is always run first in each time slice.
This is ok, but causes extra jitter for tasks which are NOT the first one, since they must wait for the other tasks to run before they run.
This becomes problematic for controller tasks which rely on precise timing for proper control. When commands are ran from the CLI, the execution of the command handler takes some time, which causes jitter in the control task.
This could be easily avoided if the control task was the first task in the queue to run each time slice.
TODO
Fix this by adding a new scheduler task register function called scheduler_tcb_register_high_priority(task_control_block_t *tcb)
The original non-high-priority code puts the new task at the END of the linked list, while this new high-priority register function will place the new task at the HEAD of the linked list, thus it runs first.
The AMDC
v1
firmware uses a cooperative scheduling approach, meaning all system tasks run in the same time slice at the same priority. The relative ordering is determined by the order the tasks are registered with the scheduler--the first registered is always run first in each time slice.This is ok, but causes extra jitter for tasks which are NOT the first one, since they must wait for the other tasks to run before they run.
This becomes problematic for controller tasks which rely on precise timing for proper control. When commands are ran from the CLI, the execution of the command handler takes some time, which causes jitter in the control task.
This could be easily avoided if the control task was the first task in the queue to run each time slice.
TODO
Fix this by adding a new scheduler task register function called
scheduler_tcb_register_high_priority(task_control_block_t *tcb)
The original non-high-priority code puts the new task at the END of the linked list, while this new high-priority register function will place the new task at the HEAD of the linked list, thus it runs first.