What is priority inversion?

Answer Posted / saleem

Priority inversion is a situation where in lower priority
tasks will run blocking higher priority tasks waiting for
resource (mutex). For ex: consider 3 tasks. A, B and C, A
being highest priority task and C is lowest. Look at
sequence of context swaps

A goes for I/O . unlocks mutex.
C was ready to run. So C starts running. locks mutex
B is ready to run. Swaps out C and takes mutex.
A is ready to run. but A is blocked as mutex is locked by B.
but B will never relinqishes the mutex as its higher
priority than C.

The solution to priority inversion is Priority inheritance.

Is This Answer Correct ?    56 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category