Question 957 – Nielit Scientist-B IT 4-12-2016
December 3, 2023Question 1262 – Nielit Scientist-B CS 2016 march
December 3, 2023Question 1178 – Nielit Scientist-B CS 22-07-2017
A system has n resources R0,..,Rn-1 and k processes P0,..Pk-1. The implementation of the resources request logic of each process P
i is a 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?
Correct Answer: B
Question 36 Explanation:
Consider the case where i = 10 & i = 11, n = 21 & k = 12
P10 requests R10 & R11
P11 requests R10 & R8
Hence P10 & P11 inorder in deadlock.
P10 requests R10 & R11
P11 requests R10 & R8
Hence P10 & P11 inorder in deadlock.
n=40, k=26
n=21, k=12
n=20, k=10
n=41, k=19
Subscribe
Login
0 Comments