233k views
2 votes
When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called

a) priority inversion
b) priority removal
c) priority exchange
d) priority modification

1 Answer

5 votes

Final answer:

Priority inversion occurs when a lower priority task holds a resource required by a higher priority task, effectively preventing the higher priority task from running.

Step-by-step explanation:

The correct answer is a) priority inversion.

Priority inversion occurs in a multi-tasking operating system when a lower priority task holds a resource required by a higher priority task, effectively preventing the higher priority task from running. This can happen when a medium priority task preempts a high priority task and then gets delayed while waiting for a resource held by a low priority task.

For example, suppose a high priority task (Task A) needs access to a printer, but a low priority task (Task C) currently has the printer occupied. Meanwhile, a medium priority task (Task B) interrupts Task A and needs a resource held by Task C. Task B starts executing and Task A is unable to run until Task C releases the printer, causing a priority inversion.

User Christopher Ellis
by
8.9k points