What really happened on Mars? Priority Inversion and Mars Pathfinder
Notes on the history of the Priority Inversion problem
Yodaiken: Against Priority Inheritance
Rebuttal to Yodaiken
What is Priority Inversion? Why You Care and What to Do About It
Wikipedia: the Dining Philosophers Problem
Consider the problem that the Mars Pathfinder had (priority inversion) and whether it si possible to solve it without using the solution that the Mars Pathfinder team used (priority inheritance).
From the URL avove:
"Pathfinder contained an 'information bus', which you can think of as a shared memory area used for passing information between different components of the spacecraft. A bus management task ran frequently with high priority to move certain kinds of data in and out of the information bus. Access to the bus was synchronized with mutual exclusion locks (mutexes).
"The meteorological data gathering task ran as an infrequent, low priority thread, and used the information bus to publish its data. When publishing its data, it would acquire a mutex, do writes to the bus, and release the mutex. If an interrupt caused the information bus thread to be scheduled while this mutex was held, and if the information bus thread then attempted to acquire this same mutex in order to retrieve published data, this would cause it to block on the mutex, waiting until the meteorological thread released the mutex before it could continue. The spacecraft also contained a communications task that ran with medium priority.
"Most of the time this combination worked fine. However, very infrequently it was possible for an interrupt to occur that caused the (medium priority) communications task to be scheduled during the short interval while the (high priority) information bus thread was blocked waiting for the (low priority) meteorological data thread. In this case, the long-running communications task, having higher priority than the meteorological task, would prevent it from running, consequently preventing the blocked information bus task from running. After some time had passed, a watchdog timer would go off, notice that the data bus task had not been executed for some time, conclude that something had gone drastically wrong, and initiate a total system reset.
"This scenario is a classic case of priority inversion."
Can the above priority inversion problem be solved without using priority inheritance?