RTUComputer ScienceYr 2020 · Sem 82020

Q16Distributed Systems

Question

4 marks

Explain the various approaches for distributed deadlock detection.

Answer

A critical analysis of Distributed Deadlock Detection. Contrasts Centralized coordinators against fully Distributed Edge-Chasing algorithms to mathematically map and destroy cyclical dependency graphs across multiple physical servers.

A deadlock occurs when a set of processes are mathematically trapped in a cyclical wait, each holding a lock on a resource that another process desperately needs. In a single machine, the OS simply maps a Wait-For Graph (WFG) and checks for mathematical cycles. In a distributed system, a process on Server A might be waiting for a lock on Server B, making the global WFG completely shattered across the network.

A highly primitive, brute-force architecture.

  • Every single physical server mathematically constructs its own Local WFG.
  • Periodically, they violently blast their Local WFGs across the network to a single, dedicated Coordinator Node.
  • The Coordinator mathematically fuses them into a massive Global WFG. If it detects a cycle, it violently murders (aborts) one of the processes to break the deadlock.
  • Demerit: The Coordinator is a catastrophic Single Point of Failure. Furthermore, network latency can cause False Deadlocks (Phantom Deadlocks), where the Coordinator kills a process based on outdated WFG data.

A completely decentralized mathematical approach.

  • If Process 1 on Server A is blocked waiting for Process 2 on Server B, it violently fires a mathematical Probe message: Probe(Initiator: P1, Sender: P1, Receiver: P2).
  • Server B receives it. If Process 2 is blocked waiting for Process 3 on Server C, it forwards the Probe: Probe(Initiator: P1, Sender: P2, Receiver: P3).
  • The Mathematical Trap: The Probe violently chases the edges of the dependency graph across the network. If the Probe eventually circles completely back and is received by the original Initiator (P1), a global deadlock is mathematically proven to exist. The system then initiates a rollback.
Back to Paper