An Efficient Deadlock Avoidance Algorithm

Abstract The Banker's algorithm avoids deadlocks by requiring the existence of a safe sequence of job completions before granting any request. We generalize this safety test and calculate the minimum number of resources needed to assure that an allocation state is safe. We also introduce a data structure that remembers safe sequences across calls to the resource allocator. We derive an O(log n) safety test for n processes.