Lably
Skip to content

Priority inversion

Undesireable computing scheduling scenario

  • 4 min read
  • 3 chapters

Related on Lably

Through Computer science, Task (computing) and Mutual exclusion

Formulation

Consider two tasks H and L, of high and low priority, respectively, either of which can acquire exclusive use of a shared resource R. If H attempts to acquire R after L has acquired it, then H becomes blocked until L relinquishes the resource. Sharing an exclusive-use resource (R in this case) in a well-designed system typically involves L relinquishing R promptly so that H (a higher-priority task) does not stay blocked for excessive periods of time. Despite good design, however, it is possible that a third task M of medium priority becomes runnable during L's use of R. At this point, M being higher in priority than L, preempts L (since M does not depend on R), causing L to not be able to relinquish R promptly, in turn causing H—the highest-priority process—to be unable to run (that is, H suffers unexpected blockage indirectly caused by lower-priority tasks like M).

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication