Difference between PIP and PCP
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. Priority Ceiling Protocol (PCP) :
Priority Ceiling Protocol (PCP) is an extension of Priority Inheritance Protocol (PIP) and Highest Locker Protocol (HLP). It solves the problem of unbounded priority inversion of Priority Inheritance Protocol, deadlock and chain blocking of Highest Locker Protocol and also minimizes the inheritance-related inversion which was an also a limitation of Highest Locker Protocol. It is not a greedy approach like Priority Inheritance Protocol. In PCP, it is possible that a task may be denied for access although the resources is free.
Difference between PIP and PCP :
|PRIORITY INHERITANCE PROTOCOL||PRIORITY CEILING 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 and HLP.|
|It overcomes the limitations of traditional resource sharing techniques.||It overcomes the limitations of PIP and HLP.|
|It requires minimum support from the operating system.||While it requires maximum 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 PCP can not suffer from chain blocking.|
|It is the simplest protocol among all resource sharing protocols.||While it is the complex and most efficient one among all.|
|It can not minimize the inheritance-related inversions.||While it is able to minimize the inheritance-related inversions.|
|It solves the problem of unbounded priority inversion.||While it solves the problem of unbounded priority inversion, deadlock and chain blocking.|
|In PIP, highest priority task can not be denied access if resource is free.||While in PCP, highest priority task can be denied access although resource is free if priority value is less than CSC (Current System Ceiling).|
|It is mostly used in small applications.||While it is used in large 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.