You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in one of the groups: Users, Administrators.


You can view and copy the source of this page.

Return to GATE2010 q46.

A system has <math>n</math> resources <math>R_0 ,..., R_n-1</math> , and <math>k</math> processes <math>P_0 ,.....P_{k-1}</math> . The implementation of the resource request logic of each process <math>P_i</math> . is as follows: <syntaxhighlight lang="c"> 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 ;

} </syntaxhighlight> In which one of the following situations is a deadlock possible?

(A) n = 40,k = 26

(B) n = 21,k = 12

(C) n = 20,k = 10

(D) n = 41,k = 19

Solution[edit]




blog comments powered by Disqus