My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
|
Deadlock Detection
|
Deadlock Detection The usual method of detecting a deadlock is to construct a diagram showing processes and resources. Each process and each resource unit is depicted as a node. Resource nodes are annotated with the number of available units. Whenever a process holds units of resource, we draw an arrow from the resource to the process, labeled with the number of units held. Whenever a process requests units of a resources (and is waiting), we draw an arrow from the process to the resource, labeled with the number of units requested. This diagram represents a current system state. Whenever a process makes a new request or releases a resource unit, the state diagram is updated accordingly. A circular wait corresponds to a closed path in this diagram. For example, the kitchen example in the deadlock state looks like:
When there is just one unit of every resource, a circular wait in the diagram is equivalent to a deadlock in the system. In the banking example, which has multiple units of each resource (its cash reserves in each currency), a loop in the diagram represents only a potential deadlock. Whether it is a real deadlock depends on whether any of the resources has fewer units available than any of the incoming request arrows:
These examples show the principle of a deadlock detector: find all the loops in the current allocation diagram and see if any of them contains a resource that has too few units left to grant any of the incoming requests.
|
Responses
|
No responses found. Be the first to respond and make money from revenue sharing program.
|
|
Watch TV Channels
|