The Gateway to Computer Science Excellence
+5 votes

Which of the following strategy is employed for overcoming the priority inversion problem?

  1. Temporarily raise the priority of lower priority level process
  2. Have a fixed priority level scheme.
  3. Implement Kernel pre-emption scheme.
  4. Allow lower priority process to complete its job. 
in Operating System by Boss (30.9k points) | 2.4k views

7 Answers

+6 votes
Best answer

Answer is A).

In aging problem , lower priority processes lead to starvation .

Priority inversion is a problematic scenario in scheduling, in which a high priority task is indirectly preempted by a lower priority task effectively "inverting" the relative priorities of the two tasks.

by Veteran (50.9k points)
selected by
+8 votes

The priority-based model of execution states that a task can only be preempted by another task of higher priority.

However, scenarios can arise where a lower priority task may indirectly preempt a higher priority task, This is called "priority inversion", and usually occurs when resource sharing is involved.

The classic example to explain priority inversion is to imagine a system with three active threads, each at three different thread priorities

When the system begins execution, thread T1 is released and executes immediately since there are no other higher priority threads executing. Shortly after it starts, it acquires a lock on resource R1.

At time t=1.5, thread T3 is released and preempts thread T1 since it's of higher priority.

At time t=3, thread T2, a medium priority thread, is released but doesn't execute because higher priority thread T3 is still executing.

Shortly afterward, however, thread T3 attempts to acquire a lock on resource R1, but cannot since thread T1 (a lower priority thread) still owns it.

This allows thread T2 to execute in its place, which effectively violates the priority-order execution of the system, resulting in what we call priority inversion.


priority boosting ::: temporarily Increase priority of a lower priority thread that acquires a lock to ensure that it will complete its execution, and release its lock, as quickly as possible!!

by Boss (33k points)
edited by
+4 votes
The answer is 'a', as far I know.

Its also called priority inheritance, it is used to solve the priority inversion problem.

Check the example in the below wikipedia page.

Also see
by (149 points)
0 votes

i guess it is a) only then the lower priorty process can increase its priorty and get the cpu and the job and leave the data item for high priorty process waiting 

b) is not flexible 

d) is definitely not possible 

c) i am not sure.. but dnt think kernel premption can slove this prob

by Junior (777 points)
0 votes
The whole problem is due to dragging away the process out of cpu so . answer wil be d . a can solve but all low level will go up and the high priority process will run after a lot more time.  A and d will be the answer if a is for that process only . i think a is for processes. Not process
by Boss (16.1k points)
how d

cpu holds and execute higher priorty one it will not execute lower priority since it is lower

now cpu waits for lower priorty to finish but it will never happpen as it is holing higher priority one
priority inversion take place when a low priority process which have hold locks on resource which is required by higher priority process. but it have o wit till lower process finishes and release the resource if the higer process preempt then there will a spin lock so the solution is to just complete the lower level process. it can be done in any of the above ways . make it priority high so that in can complete or just let it finish . same lead to same result . i.e completion of lower priority process first.
0 votes
Option a is the answer
by Loyal (9.9k points)
0 votes

Answer is A

we have to raise the priority temporarily so that process will get chance to execute. 

by Active (3.9k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,391 answers
105,442 users