



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




page 1
©Bruce Char and Vera Zaychik. All rights reserved by the author. Permission is given to students enrolled in CS361 Fall 2004 to reproduce these notes for their own use.
page 2
page 3
page 4
page 7
x
x
x x
x x x
General notes:
Four Resource types Three threads T1 requesting Resource of type 1, has access to a resource of type 3, etc. There are two instances of resource type 3, and three of resource type 4.
What else? page 8
page 9
x
x
x x
x x x
T1, T2, and T3 are deadlocked. Graph has a cycle: T1-> R1 -> T2 -> R2 -> T3 -> R3 -> T T1 wants R1 but is waiting for T to give it up. T2 wanted R2 but is waiting for T3 to give it up. T3 wants R3 but the available supply is being held by T1 and T2 (who have grabbed those resource instances but are waiting to get the another type of resource as well). page 10
x x
x x T
Graph has a cycle: T1 -> R1 -> T -> R2 -> T T1 and T3 are both blocked, but we can avoid permanent deadlock by releasing the resource currently held by T4 and giving it to T3, and by releasing the resource held by T2 and giving it to T1.
page 19
page 20
page 21
page 22
R1 is held by T1, requested by T2. R2 could be requested by T1 and T2, but neither has done so yet.
page 23
We have the graph from the previous slide. T2 asks for R2. We see that changing the R2-T2 edge results in a graph with a cycle, so we deny the request.
page 24
page 25
page 26
page 27
page 28