Priority inversion in a real-time control loop
mediumsubjectivesystem design
General
On a robot's microcontroller you run three tasks under a fixed-priority preemptive RTOS: a high-priority motor-control task , a medium-priority telemetry task , and a low-priority logging task . Both and access a shared SPI bus guarded by the same mutex. You observe that occasionally misses its deadline even though the CPU is far from fully loaded. Explain the mechanism causing this, why makes it worse, and how you would fix it. Also state one way you would detect or measure the problem on real hardware.