Highest Locker Protocol (HLP) is a critical resource sharing protocol which is an extension of Priority Inheritance Protocol which was introduces to overcome the limitations of Priority Inheritance Protocol. 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.
Basic Concept of HLP :
The basic concept of Highest Locker Protocol is based on the ceiling priority value. 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.
Working of HLP :
- Resources required by each task is found before the compile time.
- Initially a ceiling priority value is assigned to each critical resource.
- Ceiling priority value of a critical resource is calculated as the maximum of priorities of all those tasks which may request to hold this critical resource.
- When a task holds a critical resource, corresponding ceiling priority value is assigned as priority to the task.
- Task acquiring multiple critical resources is assigned maximum of all ceiling priority value.
- Further the execution is done on the basis of allotted priorities.
Features of HLP :
- When HLP is used for resource sharing, once the task holds the required critical resource then it is not blocked any further.
- Before a task can hold one resource, all the resources that may be required by this task should be free.
- It prevents tasks from going into deadlock or chain blocking.
Advantages of HLP :
Following are the advantages of Highest Locker Protocol:
- It is useful into critical resource sharing by several tasks.
- It avoids the unbounded priority inversion among tasks.
- It overcomes the limitations of priority inheritance protocol.
- It prevents from deadlock as a task hols one resource, all other required resources by this task must be free.
- A task can not go into chain blocking using Highest Locker Protocol.
Disadvantages of HLP :
The major disadvantage of Highest Locker Protocol is Inheritance related Priority Inversion.
Inheritance related Priority Inversion occurs when the priority value of low priority task acquiring a critical resource is assigned the highest priority using ceiling rule then the intermediate priority tasks that do not need the resource can not execute and undergo Inheritance related Priority Conversion.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Highest Response Ratio Next (HRRN) CPU Scheduling
- Resource Reservation Protocol in Real-time Systems
- Priority Inheritance Protocol (PIP) in Synchronization
- Difference between macOS and FreeBSD
- Difference between macOS and GhostBSD
- Difference between macOS and DragonFlyBSD
- Difference between macOS and OpenBSD
- Difference between OpenSUSE and CentOS
- Difference between Android 1.0 and Android 4.2.2
- Difference between Android 1.0 and Android 4.3
- Difference between Android 1.0 and Android 4.4.4
- Difference between Android 1.0 and Android 6.0.1
- Difference between Android 1.0 and Android 4.4.1
- Difference between Android 1.0 and Android 5.0.1
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.