Previous | Next --- Slide 9 of 62
Back to Lecture Thumbnails
tarabyte

Here, the processors are represented by the cars. The shared resources is the intersection on the road. There is deadlock because if we constructed a graph to represent the dependencies each car has on the other in order to move, we would find a cycle in it. If just one of the cars were not there, the cycle would be broken, and there would not be deadlock.

kayvonf

Question: Would there be deadlock if we removed one of the cars from the intersection? Why?

Master

If one of the car is removed, the deadlock will be resolved, as the cycle breaks.

One of the car will get the resources it needs (the lane), and after it finishes, it will release the lane it used to occupy, and another car can leave, and so on.