SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
Report on 
Deadlock Detection in Distributed 
Environment 
Distributed Systems 
CSE 601 
Submitted by 
Nadia Nahar BIT0327 
Submitted to 
Dr. Kazi Muheymin-Us-Sakib 
Associate Professor 
Institute of Information Technology 
University of Dhaka 
Submission Date 
16th September, 2013
Deadlock Detection is an important issue both in single processor system and distributed 
system. As distributed system is more complex than single processor one, deadlock detection 
is also different there, and the difficulty level is high. Before discussing this detection 
method, we need to first understand what deadlock actually is, and how it is different for 
distributed system. 
Deadlock 
Deadlock can be defined as a situation where no. of processors depends on each other for 
resource and ultimately no one can progress. In this kind of situation, each process waits for 
another process that is requested for a resource and this another process also waits for some 
other processes that is again dependent on the first process, and so this waiting becomes 
circular and no one can come out of the waiting state. 
Resource C 
belongs to 
needs 
Process A 
Process B 
Process C 
belongs to 
Resource A 
Resource B 
belongs to 
needs 
needs 
Figure: Deadlock 
In this figure, we can see that Process A is waiting for Process B, Process B waiting for 
Process C and Process C is waiting for Process A. This leads to a circular waiting and the 
system traps into a deadlock situation.
Deadlock in Distributed System 
Deadlock in a distributed system can be very tricky. In distributed system, processors are not 
in single machine, but in different. They do not share a common global memory, but 
communicate by message passing through communication links. There can be problem of 
message lost, duplication, time synchronization and many more. So detecting deadlock in 
distributed system can be real challenging. 
Deadlock Handling 
Deadlock handling can be done by one of three strategies – 
 Deadlock Detection & Recovery 
 Deadlock Prevention 
 Deadlock Avoidance 
Deadlock detection means that we will not try to stop system from being trapped in deadlock, 
but we will check if the system is trapped in one and then we will take necessary actions to 
unlock it. Deadlock prevention is when we take precautions before system deadlock has 
occurred. Deadlock avoidance refers to the strategy when we try to avoid deadlock by 
measuring safety conditions of the system state and allocating resources based on them. 
Deadlock avoidance is never used in distributed system. Because the information needed to 
allocate resources in DS is difficult to acquire at any point of time as different processes are 
not at the same machine. 
Deadlock prevention can be achieved either by having a process acquire all the needed 
resources simultaneously before it begins executing or by preempting a process which holds 
the needed resource. But these methods are not very efficient for distributed system. 
So, deadlock detection and recovery is the most used strategy to handle deadlock. Deadlock 
handling can be efficiently done by deadlock prevention and there are many approaches for 
it.
Deadlock Detection 
Several methods have been proposed for deadlock detection. The methods mentioned in the 
textbook (Distributed Operating System, Concepts and Design) are – 
1. Centralized Approach 
2. Hierarchical Approach 
3. Fully Distributed Approach 
i. WFG-Based Distributed Algorithm 
ii. Probe-Based Distributed Algorithm 
This report is not intended to describe these methods. So, I am not going for it. Rather, I am 
just going to discuss my idea about deadlock detection in distributed system. 
My Way 
There are two approaches in my mind about deadlock detection. 
The first one is to use a central node/ coordinator. In this approach, every machine will have a 
wait-for-graph or resource allocation graph for its own processes only. And the coordinator 
will merge all the wait-for-graphs of individual machines and will have an overall system 
wait-for-graph. It will take decisions about deadlock presence by viewing this linkage among 
processors of the system. Whenever an edge will change in the wait-for-graph of an 
individual machine, it will notify the coordinator and thus, the coordinator will be updated. 
The major problem of this approach will be single point failure. If the coordinator fails, there 
is no way to detect a deadlock in the system. 
coordinator 
Wait-for-graph 
(overall) 
Machine A 
Machine B 
Wait-for-graph 
(machine A) 
Wait-for-graph 
(machine B)
The second approach can be a notifying approach, where all the machines will broadcast its 
wait-for-graph to the others machine, whenever a change is made. So, all the machines will 
have an overall view of the system from the wait-for-graphs received by it. As a result, all the 
machines will be able to detect deadlocks in the system. And whenever, they detect one, they 
can also take decision about the recovery of the deadlock by discussing with each other. 
Wait-for-graph 
(overall) 
Wait-for-graph 
(overall) 
Wait-for-graph 
(overall) 
Machine A Machine B 
Machine C 
The problem of this approach is the overhead problem. The same computations are being 
done in all the machines, and also broadcasting of wait-for-graph in a regular basis can also 
cause extra traffic in communication link. 
Conclusion 
Deadlock detection in distributing system is not so simple as single machine deadlock 
detection process. There are many factors that need to be considered. The approaches 
mentioned in this document just came from an initiative thinking process about deadlock 
detection. To be honest, deadlock detection of distributed system can be a broad topic of 
research.

More Related Content

PPTX
Bankers algorithm
PDF
Deadlock in distribute system by saeed siddik
PPTX
Deadlock dbms
PDF
Distributed deadlock
PPTX
Remote Procedure Call in Distributed System
PPTX
Concurrency Control in Distributed Database.
PPTX
Deadlock detection & prevention
PPT
Memory Management in OS
Bankers algorithm
Deadlock in distribute system by saeed siddik
Deadlock dbms
Distributed deadlock
Remote Procedure Call in Distributed System
Concurrency Control in Distributed Database.
Deadlock detection & prevention
Memory Management in OS

What's hot (20)

PPTX
Deadlock Avoidance in Operating System
PPTX
deadlock handling
PPT
Transport services
PDF
Deadlock in Distributed Systems
PPTX
Dead Lock in operating system
PPTX
Design Issues of Distributed System (1).pptx
PPTX
2. Distributed Systems Hardware & Software concepts
PPT
Synchronization in distributed systems
PPT
Deadlock management
PPTX
Message passing in Distributed Computing Systems
PPT
deadlock avoidance
PPTX
Process synchronization
PPT
message passing
PPTX
Mobile Transport layer
PDF
PPTX
Deadlock ppt
PPTX
5. phases of nlp
PPT
Inter-Process communication in Operating System.ppt
PPTX
Transport Layer.pptx
PPTX
Deadlocks in operating system
Deadlock Avoidance in Operating System
deadlock handling
Transport services
Deadlock in Distributed Systems
Dead Lock in operating system
Design Issues of Distributed System (1).pptx
2. Distributed Systems Hardware & Software concepts
Synchronization in distributed systems
Deadlock management
Message passing in Distributed Computing Systems
deadlock avoidance
Process synchronization
message passing
Mobile Transport layer
Deadlock ppt
5. phases of nlp
Inter-Process communication in Operating System.ppt
Transport Layer.pptx
Deadlocks in operating system
Ad

Viewers also liked (20)

PPTX
Deadlock Detection
PPTX
Deadlock detection in distributed systems
PPT
Deadlock Detection
PPT
Deadlock detection and recovery by saad symbian
PPT
Chapter 7 - Deadlocks
PPT
Distributed Transaction
DOCX
Distributed System
DOC
Unit 1 architecture of distributed systems
PPTX
DBMS (Deadlock, deadlock prevention, 2phase locking)
PPTX
Distributed datababase Transaction and concurrency control
PDF
Google Fusion Tables - Silicon Valley CodeCamp 2010
PPTX
protocols of concurrency control
DOCX
INTERNRESUME
PPTX
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
DOCX
Remote Procedure Call
PPT
EA Workshop 1
PPTX
Droisys development process
PDF
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
PDF
Soen 423 Project Report Revised
PDF
Droisys development process_v_1.1
Deadlock Detection
Deadlock detection in distributed systems
Deadlock Detection
Deadlock detection and recovery by saad symbian
Chapter 7 - Deadlocks
Distributed Transaction
Distributed System
Unit 1 architecture of distributed systems
DBMS (Deadlock, deadlock prevention, 2phase locking)
Distributed datababase Transaction and concurrency control
Google Fusion Tables - Silicon Valley CodeCamp 2010
protocols of concurrency control
INTERNRESUME
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
Remote Procedure Call
EA Workshop 1
Droisys development process
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
Soen 423 Project Report Revised
Droisys development process_v_1.1
Ad

Similar to Deadlock detection (20)

PPTX
Deadlocks and Deadlock Detection Other Issues
PPTX
operating system
PPTX
operating system
PPTX
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
PDF
Deadlock in operating system powerpoint presentation
PDF
“Understanding Distributed Deadlocks: Causes, Detection
PPTX
DEADLOCK PREVENTION AND AVOIDANCE.pptx
PPTX
Deadlock and memory management -- Operating System
PPTX
Advanced Operating Systems- Clock synchronization and mutual exclusive
PDF
Unit 3 part 2(DEADLOCK)
PDF
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
DOCX
Distributed systems_important 2marks.docx
DOCX
Operating System- INTERPROCESS COMMUNICATION.docx
PPTX
RACE CONDITION, DEADLCKS AND SEMAPHORE PRESENTATION
PPTX
Advanced Operating Systems- Distributed OS
PDF
Analysis of mutual exclusion algorithms with the significance and need of ele...
PPT
Chapter 7-Fault Tolerance.ppt
PDF
Process coordination
PDF
Comparative Study of Mutual Exclusion Algorithms in Distributed Systems
Deadlocks and Deadlock Detection Other Issues
operating system
operating system
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
Deadlock in operating system powerpoint presentation
“Understanding Distributed Deadlocks: Causes, Detection
DEADLOCK PREVENTION AND AVOIDANCE.pptx
Deadlock and memory management -- Operating System
Advanced Operating Systems- Clock synchronization and mutual exclusive
Unit 3 part 2(DEADLOCK)
A fault tolerant tokenbased atomic broadcast algorithm relying on responsive ...
Distributed systems_important 2marks.docx
Operating System- INTERPROCESS COMMUNICATION.docx
RACE CONDITION, DEADLCKS AND SEMAPHORE PRESENTATION
Advanced Operating Systems- Distributed OS
Analysis of mutual exclusion algorithms with the significance and need of ele...
Chapter 7-Fault Tolerance.ppt
Process coordination
Comparative Study of Mutual Exclusion Algorithms in Distributed Systems

More from Nadia Nahar (18)

PDF
Internship Final Report
PDF
Test plan
DOCX
Paper review
DOCX
Final project report of a game
DOCX
Job Training Methods and Process
PDF
Software Design Document
PDF
Final document of software project
PPTX
Information retrieval dynamic indexing
PPTX
Component based software engineering
PPTX
Component level design
PPTX
Architectural design presentation
PPTX
Privacy act, bangladesh
PPTX
Paper review
PPTX
PPT
Long formal report
PPTX
Psycology
PPTX
Adjusting the accounts
PPTX
Southwest airlines takes off with better supply chain management
Internship Final Report
Test plan
Paper review
Final project report of a game
Job Training Methods and Process
Software Design Document
Final document of software project
Information retrieval dynamic indexing
Component based software engineering
Component level design
Architectural design presentation
Privacy act, bangladesh
Paper review
Long formal report
Psycology
Adjusting the accounts
Southwest airlines takes off with better supply chain management

Recently uploaded (20)

PDF
Download FL Studio Crack Latest version 2025 ?
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
history of c programming in notes for students .pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Download FL Studio Crack Latest version 2025 ?
Patient Appointment Booking in Odoo with online payment
iTop VPN Free 5.6.0.5262 Crack latest version 2025
history of c programming in notes for students .pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Designing Intelligence for the Shop Floor.pdf
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Wondershare Filmora 15 Crack With Activation Key [2025
Autodesk AutoCAD Crack Free Download 2025
Nekopoi APK 2025 free lastest update
Operating system designcfffgfgggggggvggggggggg
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Salesforce Agentforce AI Implementation.pdf
AutoCAD Professional Crack 2025 With License Key
How to Choose the Right IT Partner for Your Business in Malaysia
L1 - Introduction to python Backend.pptx
Computer Software and OS of computer science of grade 11.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency

Deadlock detection

  • 1. Report on Deadlock Detection in Distributed Environment Distributed Systems CSE 601 Submitted by Nadia Nahar BIT0327 Submitted to Dr. Kazi Muheymin-Us-Sakib Associate Professor Institute of Information Technology University of Dhaka Submission Date 16th September, 2013
  • 2. Deadlock Detection is an important issue both in single processor system and distributed system. As distributed system is more complex than single processor one, deadlock detection is also different there, and the difficulty level is high. Before discussing this detection method, we need to first understand what deadlock actually is, and how it is different for distributed system. Deadlock Deadlock can be defined as a situation where no. of processors depends on each other for resource and ultimately no one can progress. In this kind of situation, each process waits for another process that is requested for a resource and this another process also waits for some other processes that is again dependent on the first process, and so this waiting becomes circular and no one can come out of the waiting state. Resource C belongs to needs Process A Process B Process C belongs to Resource A Resource B belongs to needs needs Figure: Deadlock In this figure, we can see that Process A is waiting for Process B, Process B waiting for Process C and Process C is waiting for Process A. This leads to a circular waiting and the system traps into a deadlock situation.
  • 3. Deadlock in Distributed System Deadlock in a distributed system can be very tricky. In distributed system, processors are not in single machine, but in different. They do not share a common global memory, but communicate by message passing through communication links. There can be problem of message lost, duplication, time synchronization and many more. So detecting deadlock in distributed system can be real challenging. Deadlock Handling Deadlock handling can be done by one of three strategies –  Deadlock Detection & Recovery  Deadlock Prevention  Deadlock Avoidance Deadlock detection means that we will not try to stop system from being trapped in deadlock, but we will check if the system is trapped in one and then we will take necessary actions to unlock it. Deadlock prevention is when we take precautions before system deadlock has occurred. Deadlock avoidance refers to the strategy when we try to avoid deadlock by measuring safety conditions of the system state and allocating resources based on them. Deadlock avoidance is never used in distributed system. Because the information needed to allocate resources in DS is difficult to acquire at any point of time as different processes are not at the same machine. Deadlock prevention can be achieved either by having a process acquire all the needed resources simultaneously before it begins executing or by preempting a process which holds the needed resource. But these methods are not very efficient for distributed system. So, deadlock detection and recovery is the most used strategy to handle deadlock. Deadlock handling can be efficiently done by deadlock prevention and there are many approaches for it.
  • 4. Deadlock Detection Several methods have been proposed for deadlock detection. The methods mentioned in the textbook (Distributed Operating System, Concepts and Design) are – 1. Centralized Approach 2. Hierarchical Approach 3. Fully Distributed Approach i. WFG-Based Distributed Algorithm ii. Probe-Based Distributed Algorithm This report is not intended to describe these methods. So, I am not going for it. Rather, I am just going to discuss my idea about deadlock detection in distributed system. My Way There are two approaches in my mind about deadlock detection. The first one is to use a central node/ coordinator. In this approach, every machine will have a wait-for-graph or resource allocation graph for its own processes only. And the coordinator will merge all the wait-for-graphs of individual machines and will have an overall system wait-for-graph. It will take decisions about deadlock presence by viewing this linkage among processors of the system. Whenever an edge will change in the wait-for-graph of an individual machine, it will notify the coordinator and thus, the coordinator will be updated. The major problem of this approach will be single point failure. If the coordinator fails, there is no way to detect a deadlock in the system. coordinator Wait-for-graph (overall) Machine A Machine B Wait-for-graph (machine A) Wait-for-graph (machine B)
  • 5. The second approach can be a notifying approach, where all the machines will broadcast its wait-for-graph to the others machine, whenever a change is made. So, all the machines will have an overall view of the system from the wait-for-graphs received by it. As a result, all the machines will be able to detect deadlocks in the system. And whenever, they detect one, they can also take decision about the recovery of the deadlock by discussing with each other. Wait-for-graph (overall) Wait-for-graph (overall) Wait-for-graph (overall) Machine A Machine B Machine C The problem of this approach is the overhead problem. The same computations are being done in all the machines, and also broadcasting of wait-for-graph in a regular basis can also cause extra traffic in communication link. Conclusion Deadlock detection in distributing system is not so simple as single machine deadlock detection process. There are many factors that need to be considered. The approaches mentioned in this document just came from an initiative thinking process about deadlock detection. To be honest, deadlock detection of distributed system can be a broad topic of research.