Chapter10 - Deadlock Detection in Distributed Systems Ajay...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Deadlock Detection in Distributed Systems Ajay Kshemkalyani and Mukesh Singhal Distributed Computing: Principles, Algorithms, and Systems Chapter 10 A. Kshemkalyani and M. Singhal Deadlock Detection in Distributed Systems Introduction Deadlocks is a fundamental problem in distributed systems. A process may request resources in any order, which may not be known a priori and a process can request resource while holding others. If the sequence of the allocations of resources to the processes is not controlled, deadlocks can occur. A deadlock is a state where a set of processes request resources that are held by other processes in the set. A. Kshemkalyani and M. Singhal Deadlock Detection in Distributed Systems System Model A distributed program is composed of a set of n asynchronous processes p 1 , p 2 , . . . , p i , . . . , p n that communicates by message passing over the communication network. Without loss of generality we assume that each process is running on a different processor. The processors do not share a common global memory and communicate solely by passing messages over the communication network. A. Kshemkalyani and M. Singhal Deadlock Detection in Distributed Systems There is no physical global clock in the system to which processes have instantaneous access. The communication medium may deliver messages out of order, messages may be lost garbled or duplicated due to timeout and retransmission, processors may fail and communication links may go down. We make the following assumptions: The systems have only reusable resources. Processes are allowed to make only exclusive access to resources. There is only one copy of each resource. A. Kshemkalyani and M. Singhal Deadlock Detection in Distributed Systems A process can be in two states: running or blocked . In the running state (also called active state), a process has all the needed resources and is either executing or is ready for execution. In the blocked state, a process is waiting to acquire some resource. A. Kshemkalyani and M. Singhal Deadlock Detection in Distributed Systems Wait-For-Graph (WFG) The state of the system can be modeled by directed graph, called a wait for graph (WFG). In a WFG , nodes are processes and there is a directed edge from node P 1 to mode P 2 if P 1 is blocked and is waiting for P 2 to release some resource. A system is deadlocked if and only if there exists a directed cycle or knot in the WFG. A. Kshemkalyani and M. Singhal Deadlock Detection in Distributed Systems Figure 1 shows a WFG, where process P 11 of site 1 has an edge to process P 21 of site 1 and P 32 of site 2 is waiting for a resource which is currently held by process P 21 . At the same time process P 32 is waiting on process P 33 to release a resource....
View Full Document

This note was uploaded on 02/23/2012 for the course COMP 553 taught by Professor Ajay during the Spring '12 term at Ill. Chicago.

Page1 / 72

Chapter10 - Deadlock Detection in Distributed Systems Ajay...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online