Question: A possible method for preventing deadlocks is to have a single, higherorder resource that must be requested before any other resource. For example, if multiple

A possible method for preventing deadlocks is to have a single, higherorder resource that must be requested before any other resource. For example, if multiple threads attempt to access the synchronization objects A E, deadlock is possible. (Such synchronization objects may include mutexes, semaphores, condition variables, and the like.) We can prevent the deadlock by adding a sixth object F. Whenever a thread wants to acquire the synchronization lock for any object A E, it must first acquire the lock for object F. This solution is known as containment: the locks for objects A E are contained within the lock for object F.

Compare this scheme with the circular-wait scheme, which is defined as: there exists a set {P0 , P1 , , Pn } of waiting processes such that P0 is waiting for a resource that is held by P1 , P1 is waiting for a resource that is held by P2 , , Pn1 is waiting for a resource that is held by Pn , and Pn is waiting for a resource that is held by P0 .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!