Question

Explain the resource-allocation graph and wait-for graph for deadlock processing.

Explain the resource-allocation graph and wait-for graph for deadlock processing.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please follow the data and description :

Deadlock :

In the stream of computer science and technology, a deadlock refers to a specific condition when two or more processes are waiting for each another to release a resource, or more than two processes are waiting for resources in a circular chain.

Resource Allocation Graph :

It is a graph of data that tracks which resource is being held by which process and which process is waiting for a resource of a particular type. It is very simple but yet a poweful process to illustrate the user of how can the interacting processes arise or result to a situation of deadlock. The graph can be depicted as if a process is using a resource, an arrow is drawn from the resource node to the process node. If a process is requesting a resource, an arrow is drawn from the process node to the resource node.

If for example, let us consider that if a process 1 that holds the resource A, and that the process 2 holds the resource B and it is likely in turn that the process 1 is waiting for the resource B and that the process 2 is waiting for the resource A, which results in a circular dependency over the resources and the processes, then this situation leads for the processes process 1 and 2 execution will be deadlocked.


Wait-for graph :

It is a directed graph used for the process of deadlock detection in the operating systems and even in the relational database systems. A deadlock detection process uses the algorithm that makes use of a wait-for graph to track which other processes a process is currently blocking on. In a wait-for graph, generally the processes are represented as the nodes, and an edge from process A to B conveys that the process B is holding a resource that A needs and thus A is waiting for the process B to release its lock on that resource. If the process is waiting for more than a single resource to become available, multiple edges may represent a conjunctive (and) or disjunctive (or) set of different resources or a certain number of equivalent resources from a collection. In the conjunctive case, graph cycles imply the possibility of a deadlock, whereas in the disjunctive case knots are indicative of deadlock possibility.


Hope this is helpful.

Add a comment
Know the answer?
Add Answer to:
Explain the resource-allocation graph and wait-for graph for deadlock processing.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT