Priority Inversion


Priority inversion is a operating system scenario in which a higher priority process is preempted by a lower priority process. This implies the inversion of the priorities of the two processes.

Problems due to Priority Inversion

Some of the problems that occur due to priority inversion are given as follows −

  • A system malfunction may occur if a high priority process is not provided the required resources.
  • Priority inversion may also lead to implementation of corrective measures. These may include the resetting of the entire system.
  • The performance of the system can be reduces due to priority inversion. This may happen because it is imperative for higher priority tasks to execute promptly.
  • System responsiveness decreases as high priority tasks may have strict time constraints or real time response guarantees.
  • Sometimes there is no harm caused by priority inversion as the late execution of the high priority process is not noticed by the system.

Solutions of Priority Inversion

Some of the solutions to handle priority inversion are given as follows −

  • Priority Ceiling

    All of the resources are assigned a priority that is equal to the highest priority of any task that may attempt to claim them. This helps in avoiding priority inversion.

  • Disabling Interrupts

    There are only two priorities in this case i.e. interrupts disabled and preemptible. So priority inversion is impossible as there is no third option.

  • Priority Inheritance

    This solution temporarily elevates the priority of the low priority task that is executing to the highest priority task that needs the resource. This means that medium priority tasks cannot intervene and lead to priority inversion.

  • No blocking

    Priority inversion can be avoided by avoiding blocking as the low priority task blocks the high priority task.

  • Random boosting

    The priority of the ready tasks can be randomly boosted until they exit the critical section.

     

Updated on: 31-Jan-2020

7K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements