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
System calls
PPTX
Deadlock in Operating System
PDF
Deadlock in distribute system by saeed siddik
PPTX
PPTX
Deadlock Prevention
PPTX
Dead Lock in operating system
PPTX
Distributed Shared Memory
PPT
OS Components and Structure
System calls
Deadlock in Operating System
Deadlock in distribute system by saeed siddik
Deadlock Prevention
Dead Lock in operating system
Distributed Shared Memory
OS Components and Structure

What's hot (20)

PPTX
Multi threading
DOCX
BANKER'S ALGORITHM
PPTX
Operating system critical section
PDF
Dead Lock In Operating Systems
PPT
Page Replacement
PDF
operating system structure
PPTX
Deadlock Avoidance in Operating System
PPTX
Concurrency Control in Distributed Systems.pptx
PPT
Deadlock in operating systems
PDF
Deadlock in Distributed Systems
PDF
Process Scheduling in OS
PPT
Deadlock management
PPTX
Inheritance in Java
PPTX
Memory management ppt
PPTX
Structure of operating system
PPTX
Process synchronization in Operating Systems
PPTX
Program Threats
PPTX
Production systems
PDF
Oracle data guard for beginners
PPTX
Deadlock dbms
Multi threading
BANKER'S ALGORITHM
Operating system critical section
Dead Lock In Operating Systems
Page Replacement
operating system structure
Deadlock Avoidance in Operating System
Concurrency Control in Distributed Systems.pptx
Deadlock in operating systems
Deadlock in Distributed Systems
Process Scheduling in OS
Deadlock management
Inheritance in Java
Memory management ppt
Structure of operating system
Process synchronization in Operating Systems
Program Threats
Production systems
Oracle data guard for beginners
Deadlock dbms
Ad

Viewers also liked (20)

PDF
Distributed deadlock
PPTX
Deadlock Detection
PPTX
Deadlock detection in distributed systems
PPT
Deadlock Detection
PPT
Deadlock detection and recovery by saad symbian
PPT
Chapter 7 - Deadlocks
PPTX
Deadlock ppt
PPT
Distributed Transaction
DOCX
Distributed System
PPTX
Deadlocks in operating 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
Distributed deadlock
Deadlock Detection
Deadlock detection in distributed systems
Deadlock Detection
Deadlock detection and recovery by saad symbian
Chapter 7 - Deadlocks
Deadlock ppt
Distributed Transaction
Distributed System
Deadlocks in operating 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
Ad

Similar to Deadlock detection (20)

PPTX
DistributedDeadlock on distriburtedNetwork.pptx
PPT
Distributed Deadlock Detection.ppt
PPTX
Unit 6 : Distributed Deadlock Detection Distributed Systems
PDF
Deadlock in operating system powerpoint presentation
PPTX
Deadlock-in-Parallel-and-Distributed-Computing.pptx
PPT
Distributed process management Distributed deadlock.ppt
PPTX
Deadlocks and Deadlock Detection Other Issues
PPTX
Unit iv: Deadlocks
PDF
“Understanding Distributed Deadlocks: Causes, Detection
PPTX
Deadlocks
PDF
Unit 3 part 2(DEADLOCK)
PPT
Deadlocks.ppt
PPT
Deadlocks dhsidhcc ISIxnac bdbckjncmzczjkbc
PPTX
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
PPTX
Deadlock Detection Algorithm
PPTX
operating system
PPTX
operating system
PDF
Improved Deadlock Prevention Algorithms in Distributed Systems
PDF
Deadlocks Part- III.pdf
DistributedDeadlock on distriburtedNetwork.pptx
Distributed Deadlock Detection.ppt
Unit 6 : Distributed Deadlock Detection Distributed Systems
Deadlock in operating system powerpoint presentation
Deadlock-in-Parallel-and-Distributed-Computing.pptx
Distributed process management Distributed deadlock.ppt
Deadlocks and Deadlock Detection Other Issues
Unit iv: Deadlocks
“Understanding Distributed Deadlocks: Causes, Detection
Deadlocks
Unit 3 part 2(DEADLOCK)
Deadlocks.ppt
Deadlocks dhsidhcc ISIxnac bdbckjncmzczjkbc
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
Deadlock Detection Algorithm
operating system
operating system
Improved Deadlock Prevention Algorithms in Distributed Systems
Deadlocks Part- III.pdf

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
Guide to Food Delivery App Development.pdf
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
Computer Software - Technology and Livelihood Education
PDF
Workplace Software and Skills - OpenStax
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PPTX
4Seller: The All-in-One Multi-Channel E-Commerce Management Platform for Glob...
PPTX
CNN LeNet5 Architecture: Neural Networks
PPTX
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
PPTX
Download Adobe Photoshop Crack 2025 Free
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Cloud Native Aachen Meetup - Aug 21, 2025
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
Internet Download Manager IDM Crack powerful download accelerator New Version...
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
Guide to Food Delivery App Development.pdf
Visual explanation of Dijkstra's Algorithm using Python
Computer Software - Technology and Livelihood Education
Workplace Software and Skills - OpenStax
Trending Python Topics for Data Visualization in 2025
CCleaner 6.39.11548 Crack 2025 License Key
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
4Seller: The All-in-One Multi-Channel E-Commerce Management Platform for Glob...
CNN LeNet5 Architecture: Neural Networks
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
Download Adobe Photoshop Crack 2025 Free
HackYourBrain__UtrechtJUG__11092025.pptx
How to Use SharePoint as an ISO-Compliant Document Management System
Cloud Native Aachen Meetup - Aug 21, 2025
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Internet Download Manager IDM Crack powerful download accelerator New Version...
Matchmaking for JVMs: How to Pick the Perfect GC Partner

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.