Abstract
There are three methods for handling deadlocks in resource allocation systems: deadlock prevention, deadlock avoidance and deadlock detection combined with recovery. Of these three methods deadlock avoidance is preferable in many cases but seldom used on account of its high cost. We present a simple modification of a known deadlock avoidance algorithm, the banker's algorithm, which has a running time Θ(mn 2) in a system consisting ofn processes andm different types of resources. Our modified algorithm gives an amortized worst case running time ofO(mn) under certain likely conditions and in that way it can be considered a competitive method for handling deadlocks. At worst, our algorithm is twice as fast as the banker's algorithm.
Similar content being viewed by others
References
E. W. Dijkstra,Cooperating sequential processes, Technical Report EWD-123, Technological University, Eindhoven, The Netherlands, 1965.
A. N. Haberman,Prevention of system deadlocks, Communication of the ACM, Vol. 12, No. 7, July 1969, pp. 373–385.
T. Kameda,Testing deadlock-freedom of computer systems, Journal of the ACM, Vol. 27, No. 2, April 1980, pp. 270–280.
J. Peterson and A. Silberschatz,Operating System Concepts, Second Edition, Addison-Wesley, 1985.
Author information
Authors and Affiliations
Additional information
This work was partly supported by The National Swedish Board for Technical Development (STUF) under contract number 85-3127.
Rights and permissions
About this article
Cite this article
Belik, F. Deadlock avoidance with a modified banker's algorithm. BIT 27, 290–305 (1987). https://doi.org/10.1007/BF01933724
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01933724