A Dynamic Deadlock Detection/Resolution Algorithm with Linear Message Complexity
Maria Castillo, F. Fariña, Alberto Córdoba · 2012
Leader election and deadlock detection/resolution are different problems in distributed computing. However, the problem of selecting a candidate to resolve a detected deadlock is quite similar to the problem of selecting a leader in a virtual ring. In this paper we exploit this similarity and the fact that leader election is a well-known problem with optimal solutions. We have adapted an O(n) leader election algorithm for complete networks, in order to implement a deadlock resolution algorithm with the same cost. The adaptation consists in adding dynamic features to the leader election algorithm, ensuring that it works properly even when the wait-for relations in the system change at the same time as the algorithm runs. The algorithm guarantees that only just up-to-date information remains in the system, thus reducing the communication cost unlike previous linear proposals.