Answers are grounded in this paper and cite their sources.
The subject of this paper is the computational complexity of the deadlock prediction problem for resource allocation. This problem is the question “Is deadlock avoidable?” i.e. “Is there a feasible sequence in which to allocate all the resource requests?” given the current status of a resource allocation system. This status is defined by (1) the resource vector held by the banker, i.e. the quantity of resources presently available for allocation, and (2) the resource requests of the processes: Each process is required to make a termination request of the form “Give me resource vector y and I will eventually terminate and return resource vector z.” Also, each process can make any number of partial requests of the form “If you can’t give me y, then give me a smaller resource vector $y'$ and I will be able to reach a point at which I can halt and temporarily return to $z'$, although I will still need need $y - y' + z'$ to terminate.” If (1) the resources are reusable and (2) partial requests are not allowed, then Habermann’s well known “banker’s algorithm” solves the deadlock prediction problem in polynomial time. The results of this paper are as follows: If either constraint (1) or constraint (2) is removed, then the deadlock prediction problem is NP-complete. A generalization of the banker’s algorithm solves this problem with the following constraint: For each process, the 0 vector and the profitability vectors $(z - y)$ of its partial and termination requests are linearly ordered with respect to size. This case includes systems with one type of resource or with Hansen’s (1973) hierarchically partitioned reusable resources.
No takes yet. Share an insight, caveat, or question.
Eric Gold (1978) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: