New Page 1
Welcome to basicsofcomputer.com
 

Share This Free Knowledge With Your Friends:

Home » Deadlocks » Deadlock Detection/Algorithm/Example in Operating System

Deadlock Detection/Algorithm/Example in Operating System:

If the system does not use any of the preventive or avoidance methods, there is a possibility of deadlock occurrence. If a deadlock occurs in the system, it must be detected and recovered. The system needs to provide some methods of deadlock detection and recovery. These methods are overhead for the system.

1 Single Instance of Each Resource Type:

If each resource type has only one instance (There is only 1 printer, 1 hard drive, 1 tape drive, etc.), we can use a variant of the resource-allocation graph called a wait-for graph. It is done by removing the nodes of type resource and collapsing the appropriate edges.

In this graph, processes are not waiting for resources. They are waiting for other processes that hold these resources. A cycle in the graph indicates the occurrence of a deadlock in the system.

This approach requires that a cycle detection algorithm runs from time to time to detect deadlock. Algorithms that detect cycles are O(N2). N is the number of vertices in the graph.

2. Detection-Algorithm Usage:

Detection algorithms need to be executed to detect a deadlock. The frequency and time when we run such algorithm is dependent on how often we assume deadlocks occur and how. many processes they may effect.
If deadlocks may happen often, we run the detection often. If it affects many processes, we may decide to run it often so that less processes are affected by the deadlock.
We could run the algorithm on every resource request. The deadlocks are rare so it is not very efficient use of resources. We could run the algorithm from time to time like every hour or at random times during the system execution lifetime.

Relevant Articles:

Introduction to Deadlocks
Resources in Operating System
Methods for Handling Deadlocks
Deadlock Avoidance in Operating System
Deadlock Characterization in Operating System
Deadlock Detection/Algorithm/Example in Operating System
Deadlock Recovery/Methods/Algorithms in Operating System
 
New Page 1

Basic Computer Science

   
» The Age of Information

» Types of Computer and Digital Age

» Input and Output Devices

» Storage Devices Of Computer

» Central Processing Unit

» Software: The Power Behind The Power

» Data Communication and Computer Networks

» The Nature Of Information

» The System Theory

» Transaction Processing System (TPS) and Management Information System (MIS)

» Decision Support System (DSS) and Executive Support System (ESS)

» Expert System (ES) and Office Information System (OIS)

 

Operating Systems

   
» Introduction to Operating System

» Introduction to Process Management

» Threads and CPU Scheduling

» Process Synchronization in Operating System

» Deadlocks

» Memory Management in Operating System

» Virtual Memory in Operating System

» File System Management in Operating System

» I/O and Device Management

» Security

» Linux Operating System

 

Database Management System

   
» Introduction to Database Systems

» Database System Architecture

» Database Administration and Database Development Process

» The Entity-Relationship Model

» Semantic Object Model

» Logical Database Design and Relational Data Model

» Normalization in Database

» Transformation of E-R Model into Relational Data Model

» Representing Semantic Object Model and Types of Semantic Object Model

» Physical Database Design

» Introduction to Structured Query Language (SQL)

» Implementation of Relational Database and Database Application Design

» Client Server Database Systems & Open Database Connectivity (ODBC)

 

Questions and Answers

   
» Basics of Information Technology

» Computer Architecture

» Data Communication

» Information Networks

» Fundamentals of the Internet

» Application and Uses of Computer

» Security, Copyright and The Law

» Windows Operating Systems

» Spreadsheet Software

» Process Management in CPU

» CPU Scheduling

» Process Synchronization

» Deadlocks

» Memory Management

» Database Systems

» Database System Architecture

» Database Administration and Database Development Process
 
 
New Page 1
 

Home                Dictionary                 Contact us                   About us                    Privacy policy                  Link to us                   Advertise

Copy right ©  2012