ISSN 2979-8582 · Article No. 052
Sobaloju Joel Oyewumi: Mindbuilder Educational Institute, Oyo, Oyo State, Nigeria
Ayeni Joshua Ayobami: Department of Computer Science, Ajayi Crowther University, Oyo, Nigeria
Ojo Olufemi Samuel: Department of Computer Science, Ajayi Crowther University, Oyo, Nigeria
Oyediran Mayowa Oyedepo: Department of Computer Engineering, Ajayi Crowther University, Oyo, Nigeria
Resource sharing lies at the heart of every distributed system, yet the very freedom that allows a process to request resources in an arbitrary order also exposes the system to deadlock. When a group of processes becomes permanently blocked because each holds a resource that another member of the group requires, throughput collapses and the affected transactions stall indefinitely. This paper presents the design of an improved deadlock prevention scheme for a distributed system environment that combines a wait for graph cycle test with a load adaptive control strategy and a priority based allocation policy. Rather than permitting a deadlock to form and then resolving it, the scheme prevents deadlock outright: before any resource is granted, a trial edge representing the prospective wait is added to the wait for graph and the graph is tested for a cycle, and the allocation proceeds only when the augmented graph remains acyclic. The control layer continuously estimates the arrival rate of critical section requests and classifies the prevailing condition as either low load or high load. Under low load the scheme relies on a token based mutual exclusion algorithm that guarantees freedom from starvation and ordered access; under high load it augments mutual exclusion with a priority based strategy in which a higher priority request may preempt the holder of a contested resource, and every prospective allocation is screened by the cycle test. By tying the level of coordination to the measured load, the scheme limits unnecessary coordination overhead at instantiation while ensuring that the circular wait condition, one of the four conditions necessary for deadlock, can never be satisfied. The wait for graph is constructed in time linear in the number of processes, and the cycle test that governs each allocation runs in time linear in the size of the graph, so the worst case cost of preventing an unsafe allocation is bounded by the number of processes and edges. A prototype implemented in the C plus plus language on a Unix based testbed bears out the design: throughput recovers under heavy contention as the priority logic clears blocked queues, and the prevention test reliably screens out every allocation capable of closing a cycle, so that deadlock cannot occur. The design therefore replaces the customary trade between detection speed and detection accuracy with a guarantee of freedom from deadlock at a predictable and modest cost.
Keywords
This article is published under the Creative Commons Attribution 4.0 International License . Free to read, share, and adapt with attribution.
British Journal of Contemporary Research
Open Access · Peer Reviewed · Published by Bexford Publishing Ltd
Browse All Issues