How can priority inversion occur What can be done to prevent

How can priority inversion occur? What can be done to prevent priority inversion?

Solution

Please follow the data and description :

Priority inversion :

In the field of computer science and technology, the word priority inversion is a case where we refer to a higly problematic scenario in the process of scheduling in which a high priority task is indirectly preempted by a lower priority task effectively \"inverting\" the relative priorities of the two tasks. This violates the priority model that high priority tasks can only be prevented from running by higher priority tasks and briefly by low priority tasks which will quickly complete their use of a resource shared by the high and low priority tasks. So this kind of hte inversionof the priorities for the taks that have been scheduled is called as the priority inversion.

Ther are also some cases, where the priority inversion can occur without causing any immediate harm but that the delayed execution of the high priority task goes unnoticed, and eventually the low priority task releases the shared resource. If the high priority task is left unused which in search of the resources, it might lead to a system malfunction, such as a watchdog timer resetting the entire system. This process can also reduce the performance of the system. Low priority tasks usually have a low priority because it is not important for them to finish. Similarly, a high priority task has a high priority because it is more likely to be subject to strict time constraints as this may be providing data to an interactive user who has been waiting for the reult to continue his process of execution. Because priority inversion results in the execution of a lower priority task blocking the high priority task, it can lead to reduced system responsiveness.

Prevention :

The process of the priority inversion could be prevented witht the use of simple techniques that makes the proces to run simpler and in a easier way. Some of them are as follows :

a) Priority inheritance :

It conveys that whenever a high priority task has to wait for some resource shared with an executing low priority task, then the respective low priority task is temporarily assigned the priority of the highest waiting priority task for the duration of its own use of the shared resource, and thus keeping the medium priority tasks from pre-empting the parent low priority task, and thereby affecting the waiting high priority task as well. Once the resource is released, the low priority task continues at its original priority level.

b) Blocking Avoidance :

As the process of the priority inversion involves a low-priority task blocking a high-priority task, one way to avoid priority inversion is to avoid blocking of the tasks which allows the process to complete it task even at a slower rate.


Hope this is helpful.

How can priority inversion occur? What can be done to prevent priority inversion?SolutionPlease follow the data and description : Priority inversion : In the fi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site