So, when each process requests another drive, the three processes will have the deadlock situation as each process will be waiting for the USB drive to release, which is currently in use. Each of the three processes able to holds one of the USB drives. Example of Circular waitįor example, a computer has three USB drives and three processes. In the same way, Process B is allocated Resource A, and it is requesting Resource B. This creates a circular chain.įor example, Process A is allocated Resource B as it is requesting Resource A. This will continue until the last process is waiting for a resource held by the first process.
One process is waiting for the resource, which is held by the second process, which is also waiting for the resource held by the third process etc. Several cars may have to be backed up if a deadlock situation occurs.So, when Deadlock happens, it can be easily resolved if one car backs up (Preempt resources and rollback).Here, a bridge is considered a resource.A real-world example would be traffic, which is going only in one direction.