Hi,
Kindly guide me with the following question
Somebody plz guide me.
Zulfi.
Kindly guide me with the following question
Rich (BB code):
Consider the three processes below, (proc1 through proc3,) each of which competes for six shared resources, (A through F):
proc1() proc2() proc3()
{ { {
while (1) while (1) while (1)
{ { {
lock(&D); lock(&C); lock(&A);
lock(&E); lock(&F); lock(&B);
lock(&B); lock(&D); lock(&C);
// Use D, E, // Use C, F, // Use A, B,
// and B // and D // and C
unlock(&D); unlock(&C); unlock(&A);
unlock(&E); unlock(&F); unlock(&B);
unlock(&B); unlock(&D); unlock(&C);
} } }
} } }
Could the three processes enter into deadlock?
Zulfi.
Last edited by a moderator: