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

Queries, Find the names of all Albums that have more than 30 tracks. Result...

Find the names of all Albums that have more than 30 tracks. Result: (name: varchar(255))

What is a candidate key, What is a candidate key? Minimal super keys ar...

What is a candidate key? Minimal super keys are known as candidate keys.

What is trigger, What is trigger?  Triggers are statements that are exe...

What is trigger?  Triggers are statements that are executed automatically by the system as the side effect of a modification to the database.

Benefits abd drawback of hashed file organisation, Benefits of Hashed file ...

Benefits of Hashed file Organisation 1.      Insertion or search on hash-key is quick. 2.      Best if equality search is required on hash-key. Drawbacks of Hashed file

Construct a conceptual data model, Competition entrants can be either Indiv...

Competition entrants can be either Individuals, or Teams. A Team is usually sponsored by a business, and, in that case, the team members would all wear T-shirts with the sponsoring

What are the types of indices, Normal 0 false false false ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Mysql, he SQL query that will return the order number, quantity ordered, pr...

he SQL query that will return the order number, quantity ordered, price each and total cost of an order (quantity * price each) from the order details table. Label the calculated c

Accessing information permissions users, Accessing information about permis...

Accessing information about permissions to all users- Object level permissions: With the use of data dictionary you can see the permissions to user. Let us get the table name fro

Write short notes on domain relational calculus, Write short notes on domai...

Write short notes on domain relational calculus   The domain relational calculus uses domain variables that take on values from an attribute domain rather than values for whole

Which method of access uses key transformation, Which method of access uses...

Which method of access uses key transformation? A Hash method of access uses key transformation.

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