Arjun Suresh (talk | contribs) (Created page with "A system has n resources R 0 ,..., R n-1 , and k processes P 0 ,.....P k-1 . The implementation of the resource request logic of each process P i . is as follows: if (i% 2==0)...") |
Arjun Suresh (talk | contribs) |
||
Line 24: | Line 24: | ||
{{Template:FB}} | {{Template:FB}} | ||
− | </ | + | <disqus/> |
[[Category:Operating Systems]] | [[Category:Operating Systems]] | ||
[[Category:GATE2010]] | [[Category:GATE2010]] | ||
[[Category: Previous year GATE questions]] | [[Category: Previous year GATE questions]] |
A system has n resources R 0 ,..., R n-1 , and k processes P 0 ,.....P k-1 . The implementation of the resource request logic of each process P i . is as follows: if (i% 2==0) { if (i<n) request R i ; if (i+2<n)request R i+2 ; } else { if (i<n) request R n-i ; if (i+2<n)request R n-i-2 ; } 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
A system has n resources R 0 ,..., R n-1 , and k processes P 0 ,.....P k-1 . The implementation of the resource request logic of each process P i . is as follows: if (i% 2==0) { if (i<n) request R i ; if (i+2<n)request R i+2 ; } else { if (i<n) request R n-i ; if (i+2<n)request R n-i-2 ; } 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
</disqus>