Both of these concepts come under Priority scheduling in Operating System. But are they same ?
In one line, Priority Inversion is a problem while Priority Inheritance is a solution. Literally, Priority Inversion means that priority of tasks get inverted and Priority Inheritance means that priority of tasks get inherited. Both of these phenomena happen in priority scheduling. Basically, in Priority Inversion, higher priority task (H) ends up waiting for middle priority task (M) when H is sharing critical section with lower priority task (L) and L is already in critical section. Effectively, H waiting for M results in inverted priority i.e. Priority Inversion. One of the solution for this problem is Priority Inheritance. In Priority Inheritance, when L is in critical section, L inherits priority of H at the time when H starts pending for critical section. By doing so, M doesn’t interrupt L and H doesn’t wait for M to finish. Please note that inheriting of priority is done temporarily i.e. L goes back to its old priority when L comes out of critical section.
More details on these can be found here.
Please do Like/Tweet/G+1 if you find the above useful. Also, please do leave us comment for further clarification or info. We would love to help and learn 🙂
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Priority Inversion : What the heck !
- Difference between Preemptive Priority based and Non-preemptive Priority based CPU scheduling algorithms
- Priority Inheritance Protocol (PIP) in Synchronization
- Difference between FCFS and Priority CPU scheduling
- Difference between Priority Scheduling and Round Robin (RR) CPU scheduling
- Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
- Difference between Priority Scheduling and Longest Job First (LJF)
- Difference between Multi Level Queue Scheduling (MLQ) and Priority Scheduling
- Relation in FCFS and Preemptive Priority Scheduling Algorithm
- Program for Priority CPU Scheduling | Set 1
- Priority CPU Scheduling with different arrival time - Set 2
- Program for Preemptive Priority CPU Scheduling
- Implementation of Non-Preemptive Shortest Job First using Priority Queue
- CPU Scheduling in Operating Systems using priority queue with gantt chart
- Fixed-priority pre-emptive scheduling
- Priority Assignment to Tasks in Operating System
- Types of Priority Inversions under PCP
- Thread Priority in Kotlin & Android
- Difference between User Level thread and Kernel Level thread
- Difference between 32-bit and 64-bit operating systems