What is priority inversion ? and What is the solution ?

Answer Posted / vallari trivedi

Priority inversion is an RTOS issue.
RTOS allows resource sharing among processes and implements priority based scheduling.

according to the priority based scheduler the highest priority process (suppose A) should run first.
But it shares a resouce(a memory buffer, timer..etc) with a
low priority task(suppose B),

So at present task A is in pending state and task B is running.

Meanwhile another task(suppose C) having priority higher than B but lower than A preempts running task B, leads to a situation in which the high priority task remains in the pending state for a longer period of time in-spite of the fact that it is of higher priority.
this situation is know as--priority inversion.

There are two solutions found to this issue, the one being priority inheritance,

In this the low priority task B inherits high priority status from any high priority task pending for the resource and as soon as it inherits high priority it is executed, thus releasing the resource.
and regains its priority level thereafter.


another being the priority ceiling which I will discuss later.

Is This Answer Correct ?    15 Yes 1 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