Introduction to Operating Systems: Unit II(b): Deadlock

Deadlock Detection

Deadlock - Introduction to Operating Systems

Deadlock detection is the process of determining that a deadlock exists and identifing the processes and resources involved in the deadlock.

Deadlock Detection

• Deadlock detection is the process of determining that a deadlock exists and identifing the processes and resources involved in the deadlock.

• If processes are blocked on resources for an inordinately long time, the detection algorithm is executed to determine whether the current state is a deadlock.

• Deadlock detection algorithms can incur significant runtime overhead.

Wait for Graph

• Any resource allocation graph with a single copy of resources can be transferred to a wait for graph.

Fig. 3.6.1 shows resource allocation graph with corresponding wait for graph. The state of the system can be modeled by directed graph, called a wait for graph.

• Wait for graph is a graph where each node represents a process. An edge Pi → Pj means that process Pi is blocked and waiting for process Pj to release a resource.

• The wait for graph of a system is always smaller than the resource allocation graph of that same system. There is a deadlock in a system if and only if there is a loop in the wait for graph of that system.

Deadlock detection invloves two issuses:

1. Maintenance of the wait for graph.

2. Searching of the wait for graph for the presence of cycles.

• Deadlock detection requires overhead for run time cost of maintaining necessary information and executing the detection algorithm.

• For multiple instances of a resource type use an algorithm similar to banker's no algorithm.

Introduction to Operating Systems: Unit II(b): Deadlock : Tag: : Deadlock - Introduction to Operating Systems - Deadlock Detection


Introduction to Operating Systems: Unit II(b): Deadlock



Under Subject


Introduction to Operating Systems

CS3451 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation



Related Subjects


Environmental Sciences and Sustainability

GE3451 ESS 4th Semester | 2021 Regulation | 4th Semester EEE Dept 2021 Regulation


Theory of Computation

CS3452 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation


Artificial Intelligence and Machine Learning

CS3491 4th Semester CSE/ECE Dept | 2021 Regulation | 4th Semester CSE/ECE Dept 2021 Regulation


Database Management System

CS3492 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation


Algorithms

CS3401 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation


Introduction to Operating Systems

CS3451 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation