Previous | Next --- Slide 8 of 66
Back to Lecture Thumbnails
anon33

Is there a term for deadlock in which the agents can neither make progress, nor escape the deadlock by releasing some resources? For example the picture above with 2 cars in each lane as shown here vs only 2 car.

potato

Wouldn't that depend on the implementation of the locks? In general, a program simply calls lock() and is guaranteed to have the lock when the function exits, so the agent is "sleeping" until it gets the lock. I don't think the agents themselves can release resources when they are already in deadlock.

harrymellsop

@potato, what do you mean by releasing resources when they are already in deadlock? I think the slide is explicitly saying that for deadlock to occur what you're saying must be true; the processor has to hold the resources while waiting for another. If they aren't holding any resources, they can't be deadlocked (unless the resource they're trying to acquire is itself deadlocked).

potato

@harrymellsop Yes you’re correct, I was trying to express the fact that programs cannot get themselves out of deadlock (although perhaps the OS could resolve it for them)

kevtan

Very late to the game, but I just wanted to comment that the "hold and wait" condition was originally called the "wait for" condition by Edward G. Coffman, Jr. et al. who first formulated these 4 necessary (but not sufficient) conditions for deadlock.

Please log in to leave a comment.