Priority inversion is an 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 the implementation of corrective measures. These may include the resetting of the entire system.
- The performance of the system can be reduced 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.
Related Questions & Answers
- What are the Process States in Operating System?
- Write about Process Control Block.
- Write Various Operating System Services.
- What is the requirement to solve the Critical Section Problem?
- Write about the Priority Inversion Problem.
- Write various multithreading models.
- Discuss preemptive scheduling.
- Consider the following set of processes........
- Write about Semaphores. Explain its properties along with drawbacks.
- Write necessary conditions for arise of Deadlock.
- Define the following Terms: Mutual Exclusion, Thrashing, Thread
- Explain the features of Time sharing system.
- What is an operating system? Give the view of OS as a resource manager.
- Explain the following UNIX Commands: (a) grep (b) chmod (c) finger (d) cat (e) sort
- What is the thread? Explain thread Structure? And explain any one type of thread in detail.
- What is PCB? Discuss its major fields.
- List the four events that cause processes to be created. Explain each in brief.
- Explain the producer-consumer problem and its solution using the monitor.
- List Deadlock recovery techniques and explain any one of them.
- Write a short note in Critical Section.
- Explain context switching.
- Differentiate between Multi-Programming and Multi-Processing System.
- Write different types of system calls?
- What is a scheduler? Explain queuing diagram representation of process scheduler.
- Define the following Terms: Throughput, Waiting Time, Turnaround Time, Response Time.
- What is deadlock? List the conditions that lead to deadlock.
- Explain Banker’s algorithm for multiple resources with examples.
- What is Semaphore? Give the implementation of Bounded Buffer.
- What is Mutex? Write pseudocode to achieve mutual exclusion using Mutex.
- Explain the IPC problem. Explain the Dining Philosopher problem.