A possible method for preventing deadlocks


A possible method for preventing deadlocks is to have a single, higher-order 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:

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: A possible method for preventing deadlocks
Reference No:- TGS080398

Expected delivery within 24 Hours