Question:-
A system has n resources R0,…,Rn-1, and k processes P0,....Pk-1. The implementation of the resource request logic of each process Pi. is as follows:

if (i% 2==0) {

if (i
if (i+2i+2;

}

else {

if (in-i;

if (i+2n-i-2;

}

In which one of the following situations is a deadlock possible?
Option (A)
n = 40,k = 26
Option (B)
n = 21,k = 12
Option(C)
n = 20,k = 10
Option(D)
n = 41,k = 19
Correct Option:
(B)
question-answer-faq-2250