📜  HLP和PCP之间的区别

📅  最后修改于: 2021-08-24 04:43:58             🧑  作者: Mango

1.最高储物柜协议(HLP):
最高储物柜协议(HLP)是一种重要的资源共享协议,它是对优先级继承协议(PIP)的扩展,旨在克服优先级继承协议(PIP)的局限性。在此关键资源共享协议中,为每个关键资源分配了最高优先级值。此值是可能要求保留此关键资源的所有那些任务的最高优先级。当任务拥有关键资源时,其优先级将更改为关键资源的最高优先级。如果任务拥有多个关键资源,则将所有最高优先级值中的最大值分配为任务的优先级。

2.优先天花板协议(PCP):
优先天花板协议(PCP)是优先继承协议(PIP)和最高储物柜协议(HLP)的扩展。它解决了优先级继承协议的无限优先级倒换,最高锁定者协议的死锁和链阻塞的问题,并最大程度地减少了与继承相关的反转,这也是最高锁定者协议的局限性。它不是像优先级继承协议这样的贪婪方法。在PCP中,尽管资源是空闲的,但是可能会拒绝访问任务。

HLP和PCP之间的区别:

HIGHEST LOCKER PROTOCOL PRIORITY CEILING PROTOCOL
It is a critical resource sharing protocol which is an extension of PIP. It is a critical resource sharing protocol which is an extension of PIP and HLP.
It overcomes the limitations of PIP. It overcomes the limitations of PIP and HLP.
It requires moderate support from the operating system. While it requires maximum support from the operating system.
It is the least efficient among all resource sharing protocols. While it is the most efficient one among all resource sharing protocols.
It maximizes the inheritance-related inversions. While it is able to minimize the inheritance-related inversions.
It solves the problem of unbounded priority inversion, deadlock and chain blocking. While it solves the problem of unbounded priority inversion, deadlock, chain blocking and inheritance-related inversions.
In HLP, 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 rarely used in real-life applications. While it is used in large applications.