GATE Papers >> CSE >> 2010 >> Question No 46

Question No. 46 CSE | GATE 2010

A system has n resources R0Rn-1, and k processes P0Pk-1. The implementation of the resourcerequest logic of each process Pi. is as follows:
if (i%2==0) {
    if (i<n) request Ri ;
    if (i+2 < n)request Ri+2 ;
}
else {
     if (i<n) request Rn-i ;
     if (i+2<n)request Rn-i-2 ;
}

In which one of the following situations is a deadlock possible?


Answer : (A) n = 40,k = 26


Comments
No Comments
Leave a comment