EM19 · Sem 7 · Real-time systems
Priority inversion and inheritance
Aim: Reproduce the Mars Pathfinder bug and fix it with priority inheritance.
🧪 Live simulation🧊 Real-time 3D bench⚠ Simulated values, not physical measurements
🔬 Virtual lab
Starting the lab…
📘 Theory
A low task holds a mutex a high task needs; a medium task pre-empts the low task, so the high task waits for the medium one: priority inversion. Priority inheritance temporarily raises the low task’s priority while it holds the mutex.
blocking time bounded by the critical section length (with inheritance)
🧰 Apparatus (virtual)
- RTOS scheduler simulator with a shared mutex
📝 Procedure
🎤 Viva questions
What happened on Mars Pathfinder
A watchdog kept resetting the computer until priority inheritance was switched on remotely.
What is the priority ceiling protocol
Each mutex has the priority of its highest user, avoiding chained blocking.
🛡️ Safety
Virtual board. On real hardware, check supply voltages and pin current limits, and power motors and servos from a separate supply.