Similar questions 2 more →
Deadlocks


Answer & solution
Answer: No resource deadlock: every wait-for edge points from a younger process to an older process, so a cycle is impossible. (no official key was published)
Form a wait-for graph whose vertices are active processes. Add an edge P→Q when P is blocked waiting for a resource currently held by Q. The rules allow that wait only when TS(Q)<TS(P). If the holder is younger, the requester does not wait; it wounds the holder, whose resources are released on restart. Therefore timestamps strictly decrease along every wait-for edge.
Suppose a resource deadlock existed. For ordinary exclusive resources, a finite set of processes each blocked on resources held within the set contains a directed cycle P1→P2→…→Pk→P1. The edge rule would imply
TS(P1)>TS(P2)>…>TS(Pk)>TS(P1),
which is impossible for distinct ordered timestamps. Thus the wait-for graph is acyclic and the stated resource protocol cannot create deadlock.
For intuition, an older process can force a younger holder to release its resources rather than becoming dependent on it. A younger process may depend on an older one, but dependencies can never turn back toward a younger timestamp to close a cycle. This is the wound-wait scheme, not wait-die: the older requester survives and restarts the younger holder.
The restart must release all resources of the victim, as the source explicitly states; retaining them while the victim cannot proceed would not implement this proof's protocol. Resource grants, victim removal and wait-queue updates are assumed to be performed consistently by the OS. The argument rules out resource deadlock, not every possible lack of progress. An unfair CPU scheduler or a process that never finishes could still delay other processes indefinitely; those are separate starvation/liveness issues addressed under additional assumptions in the next part.