Which of the following strategy is employed for overcoming the priorit...
Priority inversion is a scenario in scheduling when a higher priority process is indirectly preempted by a lower priority process, thereby inverting the relative priorities of the process. This problem can be eliminated by temporarily raising the priority of lower priority level process, so that it can not preempt the higher priority process.
Option (A) is correct.
View all questions of this test
Which of the following strategy is employed for overcoming the priorit...
Priority Inversion Problem
The priority inversion problem is a situation in which a higher priority task is delayed or blocked by a lower priority task. This can occur in a multitasking system where tasks with different priorities are running concurrently.
Strategies for Overcoming Priority Inversion
There are several strategies that can be employed to overcome the priority inversion problem. One of the commonly used strategies is to temporarily raise the priority of the lower priority level process. Let's discuss this strategy in detail:
1. Temporarily raising the priority of lower priority level process:
- When a higher priority task needs to access a shared resource that is currently being used by a lower priority task, the priority of the lower priority task is temporarily raised.
- By raising the priority of the lower priority task, the higher priority task can gain access to the shared resource without waiting for the lower priority task to complete its job.
- Once the higher priority task has finished using the shared resource, the priority of the lower priority task is restored to its original level.
- This strategy ensures that the higher priority task is not delayed or blocked by the lower priority task, thereby overcoming the priority inversion problem.
2. Fixed priority level scheme:
- In this scheme, each task is assigned a fixed priority level.
- The priority of a task remains constant throughout its execution.
- This strategy can help in preventing priority inversion to some extent, but it may not be sufficient in all cases.
- If a lower priority task holds a shared resource that is required by a higher priority task, priority inversion can still occur.
3. Kernel preemption scheme:
- In this scheme, the operating system kernel is responsible for preempting running tasks and allocating the CPU to the highest priority task.
- When a higher priority task becomes ready, the kernel preempts the currently running task and allows the higher priority task to execute.
- This scheme can help in preventing priority inversion by ensuring that higher priority tasks are not delayed by lower priority tasks.
4. Allowing lower priority process to complete its job:
- In some cases, it may be feasible to allow the lower priority process to complete its job before the higher priority task can access the shared resource.
- This strategy can be effective if the lower priority process completes its job quickly and does not significantly delay the higher priority task.
- However, in scenarios where the lower priority process takes a long time to complete, this strategy may not be suitable.
Conclusion
Among the given options, temporarily raising the priority of the lower priority level process is the most appropriate strategy for overcoming the priority inversion problem. This strategy ensures that higher priority tasks are not delayed or blocked by lower priority tasks when accessing shared resources. Other strategies such as fixed priority level scheme, kernel preemption scheme, and allowing lower priority process to complete its job may also be useful in certain scenarios but may not be as effective as temporarily raising the priority of the lower priority level process.
Which of the following strategy is employed for overcoming the priorit...
Priority inversion is a scenario in scheduling when a higher priority process is indirectly preempted by a lower priority process, thereby inverting the relative priorities of the process. This problem can be eliminated by temporarily raising the priority of lower priority level process, so that it can not preempt the higher priority process.
Option (A) is correct.