What are wait-for-graphs, Database Management System

Assignment Help:

What are wait-for-graphs?Give the algorithm to construct a wait-for-graph from a given schedule of transactions? How can deadlocks be detected from wait-for-graphs? 

 Ans:  The wait-for-graph is a directed graph and consists of nodes and directed arcs; the nodes of the graph are active transactions. An arc of the graph is inserted among two nodes if there is a data-item is needed by the node at the tail of the arc that is being held by the node at the head of the arc. 

  Algorithm to construct wait-for-graph is as follows:

1.  For every transaction Ti active at the time of deadlock detection, make a node labeled Ti in the wait-for-graph.

2.  For every case, if there is a transaction Ti, waiting for a data-item that is at present allocated and held by transaction Tj, then there is a directed arc from the node for transaction Ti, to the node for transaction Tj.

3.  For every case, if there is a directed arc from the node for transaction Ti, to the node for transaction Tj and transaction Tj released the lock, after that remove the arc between them.

4.  There no deadlock if the wait-for-graph is acyclic.  

The wait-for-graph is employed for detection of deadlock in the system. If there is any cycle exits in the wait-for-graph, all the active transaction (denoted as nodes) are in deadlock that are in the cycle.


Related Discussions:- What are wait-for-graphs

What are the basic merits of decomposition, The basic merits of decompositi...

The basic merits of decomposition. The Advantages of Decomposition 1.  Separate person can work on each subsystem. 2.  A particular software engineer can specialize in a

Define the terms - physical schema and logical schema, Define the terms  1)...

Define the terms  1) physical schema 2) logical schema.  Physical schema:  The physical schema explains the database design at the physical level, which  is  the  lowest  lev

Functional dependency, Functional Dependency Consider a relation R that...

Functional Dependency Consider a relation R that has 2 attributes A and B. The attribute B of the relation is functionally dependent on the attribute A if and only if for every

ER diagram, sir we want er diagram of bank management system in this main m...

sir we want er diagram of bank management system in this main menu option as new account,deposit amount,withdraw amount,all acount holder list,modify account,close account

Design and prototype, This assignment is worth 45% of your final grade for ...

This assignment is worth 45% of your final grade for this module.  Marks will be awarded as follows: Prototypes (wireframe and web based prototype) You are expected

What is a transaction? , What is a transaction ? The Transaction is a un...

What is a transaction ? The Transaction is a unit of data processing. For instance, many of the transactions at a bank may be withdrawal or deposit of money; transfer of money f

E-commerce and business intelligence systems., Your friend owns and operate...

Your friend owns and operates a wholesale shoe business with annual revenues of $5 million dollars. His wholesale business specializes in supplying and supporting retailers with sh

Define the phases of two phase locking protocol, Define the phases of two p...

Define the phases of two phase locking protocol Growing phase: a transaction may get locks but not release any lock. Shrinking phase: a transaction might be release locks bu

Construct an er diagram for a hospital, Construct an ER diagram for a hospi...

Construct an ER diagram for a hospital along with a set of patients and a set of medical doctors Associate with every patient a log of the several tests and examinations conducted.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd