20
Deadlock Detection in Distributed Systems Dr. Davarpanah Research: Kaywan Zayer Reza Ramezani Mohammad Khosravi

Deadlock detection in distributed systems

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Deadlock detection in distributed systems

Deadlock Detection in Distributed Systems

Dr. Davarpanah

Research: Kaywan ZayerReza Ramezani

Mohammad Khosravi

Page 2: Deadlock detection in distributed systems

Deadlock

• Introduction• Strategies to handle deadlock– Ostrich algorithm (ignore it)– Detection (let occur, detect, recover)– Prevention (make it impossible to occur)– Avoidance (careful resource allocation)

Page 3: Deadlock detection in distributed systems

Deadlock Detection

• Centralized– Single point of failure– bottleneck

• Distributed– Soojung Lee– Monjurul Alom et al– Farajzadeh et al

Page 4: Deadlock detection in distributed systems

Introduction

• Process dependency– wait-for graph (WFG)

• Request model– AND– OR– p out-of q

• Communication model– Just message communication– Bounded delay, reliable protocol

Page 5: Deadlock detection in distributed systems

Soojung Lee

• Dependency Model– Reduced wait-for graph (RWFG)– knot

• Request model– OR

• Blocked process can participate in deadlock detection algorithm

Page 6: Deadlock detection in distributed systems

Message

• Probe– Distributed Spanning Tree (DST)– Path-string decoding– Unique id

• Reply– ACTIVE– REPORT

Page 7: Deadlock detection in distributed systems

Example

(i) WFG (ii) DST

Page 8: Deadlock detection in distributed systems

Example

(iii) RWFG after receive ACTIVE(iv) RWFG after receive REPORT (v) Final RWFG

Page 9: Deadlock detection in distributed systems

Monjurul Alom et al

• Distributed Database System• Dependency model– Transaction wait-for graph (TWFG)

• Request model– AND

• Linear Transaction Structure (LTS)• Distributed Transaction Structure (DTS)

Page 10: Deadlock detection in distributed systems

Algorithm Scheme

• LTS for each local site• DTS for global resource transaction communication• Priority Id for each transaction in each of the

sites• The local and global cycles• Abort of the victim transaction based on the

cycles

Page 11: Deadlock detection in distributed systems

Example

TWFG

Page 12: Deadlock detection in distributed systems

Example

LTS2 : {3->5, 5->6, 6->3} {7->10, 10->9, 9->7}{10->9, 9->11, 11->10}LTS3 :

Page 13: Deadlock detection in distributed systems

Example

Page 14: Deadlock detection in distributed systems

Example

DTS1 : {4->3, 3->3, 3->4, 4->4} DTS2 : {6->4, 4->8, 8->7, 7->6}

Page 15: Deadlock detection in distributed systems

Detected deadlock, breaking it

Page 16: Deadlock detection in distributed systems

Final TWFG

Page 17: Deadlock detection in distributed systems

Farajzadeh et al

• History-based edge chasing– Probe message

• Request model– p out-of q

• Messages– Probe– Clean-up– Ok– Deny

Page 18: Deadlock detection in distributed systems

Algorithm

• Receive probe– In memory and id = received id

• Prefix of received route-string– deadlock

• Otherwise– Save probe with smaller path-string and propagate received probe

• Deadlock– Initiator

• Clean-up and suicide

– Otherwise• Request permission for suicide

Page 19: Deadlock detection in distributed systems
Page 20: Deadlock detection in distributed systems

Comparison• First an third algorithm– Both use probe messages– Build WFG– Different in message number, delay, message size

and resolution schemeSujung lee farajzadeh

Number of message

2e <=e

Message size d+2 <=O(d)

delay O(dlogn) n

resolutaion yes Yes, 2 message

e : number of edge in WFG, n : number of node, d : diameter of WFG