Deadlock

Thread Starter

zulfi100

Joined Jun 7, 2012
656
Hi,
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?
Somebody plz guide me.

Zulfi.
 
Last edited by a moderator:
Thread starter Similar threads Forum Replies Date
Z Homework Help 6
vaidhya Microcontrollers 2
Similar threads
No Deadlock
Creating deadlock
Top