1. Priority Inheritance Protocol (PIP) :
Priority Inheritance Protocol (PIP) is a critical resource sharing protocol which is used for sharing critical resources among different tasks. This allows the sharing of critical resources among different without the occurrence of unbounded priority inversions. When a task goes through priority inversion, the priority of the lower priority task which has the critical resource is increased by the priority inheritance mechanism. It allows this task to use the critical resource as early as possible without going through the preemption. It avoids the unbounded priority inversion.
2. Highest Locker Protocol (HLP) :
Highest Locker Protocol (HLP) is a critical resource sharing protocol which is an extension of Priority Inheritance Protocol (PIP) which was introduced to overcome the limitations of Priority Inheritance Protocol (PIP). In this critical resource sharing protocol, every critical resource is assigned a ceiling priority value. This value is the maximum of priorities of all those tasks which may request to hold this critical resource. When a task holds a critical resource its priority is changed to the ceiling priority vale of the critical resource. If a task holds multiple critical resources, then maximum of all ceiling priorities values is assigned as priority of the task.
Difference between PIP and HLP :
|PRIORITY INHERITANCE PROTOCOL||HIGHEST LOCKER PROTOCOL|
|It is a critical resource sharing protocol used for sharing critical resources among different tasks.||It is a critical resource sharing protocol which is an extension of PIP.|
|It overcomes the limitations of traditional resource sharing techniques.||It overcomes the limitations of PIP.|
|It requires minimum support from the operating system.||While it requires moderate support from the operating system.|
|It can not prevent the deadlock.||While it prevents tasks from going into deadlock.|
|Tasks using PIP may suffer chain blocking.||While the tasks using HLP can not suffer from chain blocking.|
|It is the simplest protocol among all resource sharing protocols.||While it is the moderate one among all.|
|Intermediate priority tasks not needing CR do not go into inheritance-related inversion.||Intermediate priority tasks not needing CR do not might go into inheritance-related inversion.|
|It solves the problem of unbounded priority inversion.||While it solves the problem of deadlock and chain blocking.|
|It can not make tasks to miss the corresponding deadlines.||While it can cause tasks to miss the deadlines.|
|It is mostly used in small applications.||While it is rarely used in real-life applications.|
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.