retagged by
359 views
0 votes
0 votes

Let $R1, R2, R3$ be reader processes and let  $W1$ and $W2$ be writer processes requesting shared data. If $R1$ is selected for access. Which of the statement is/are correct?

  1.  Mutual exclusion is necessary for $R2$ and $R3$
  2.  No mutual exclusion is necessary for $R2$ and $R3$
  3.  Mutual exclusion must be there for $W1$ and $W2$
  4.  No mutual exclusion must be there for $W1$ and $W2$
  1. $(i)$ and $(iii)$ only
  2. $(ii)$ and $(iii)$ only
  3. $(iv)$ and $(iii)$ only
  4. $(i)$ and $(iv)$ only
retagged by

1 Answer

Best answer
0 votes
0 votes

Answer : Option (B)

Reason: When R1 is reading there is no need of Mutual Exclusion for other "Reading" processes, as here only  two R2 and R3 are given. 

But when R1 is reading (i.e present in the critical Section) there are chances that W1 or W2 may modify the data read by R1, that's the Reason why Mutual Exclusion will be Required there.

So,

  •   No mutual exclusion is necessary for R2 and R3 
  •   Mutual exclusion must be there for W1 and W2
selected by
Answer:

Related questions

1 votes
1 votes
2 answers
2
2 votes
2 votes
1 answer
4
Bikram asked Jan 16, 2017
561 views
Suppose there are five processes in the ready queue as shown below:$$\begin{array}{|c|c|c|} \hline i & T(Pi) & \text{Priority} \\ \hline 0 & 350 & 5 \\ \hline 1 & 125 & ...