Whenever you're ready, walk me through how you'd approach this.
What is priority inversion, and how can it be prevented in an RTOS environment?
Explain the scheduling and synchronization sequence that causes it, including the roles of high-, medium-, and low-priority tasks. Describe practical prevention techniques and the trade-offs between priority inheritance and priority ceiling protocols.
Scope: answer in terms of fixed-priority preemptive scheduling, mutexes, and common RTOS primitives such as FreeRTOS mutexes.