Let \(πβπ\) and \(π_π\) two processes, R be the set of variables read fromβ¦
2015
LetΒ \(πβπ\)Β andΒ \(π_π\)Β two processes, R be the set of variables read from memory, and W be the set of variables written to memory. For the concurrent execution of two processesΒ \(π_π\)Β andΒ \(π_π\) which of the conditions are not true?
- A.
\(R(P_i) \cap W(P_j) = \Phi\) - B.
\(W(P_i) \cap R(P_j) = \Phi\) - C.
\(R(P_i) \cap R(P_j) = \Phi\) - D.
\(W(P_i) \cap W(P_j) = \Phi\)
Attempted by 134 students.
Show answer & explanation
Correct answer: C
Correct answer: The condition R(P_i) β© R(P_j) = Ξ¦ is not required for safe concurrent execution.
Required conditions for conflict-free concurrent execution:
R(P_i) β© W(P_j) = Ξ¦ β no readβwrite overlap from the first process reading what the second writes.
W(P_i) β© R(P_j) = Ξ¦ β no writeβread overlap from the first process writing what the second reads.
W(P_i) β© W(P_j) = Ξ¦ β no writeβwrite overlap, as concurrent writes to the same variable cause conflicts.
Explanation:
Two processes may read the same memory location at the same time without causing a data race or inconsistency, so the intersection of their read sets can be non-empty. In contrast, any overlap between reads and writes (in either direction) or between writes and writes can produce race conditions or inconsistent updates, so those intersections must be empty for safe concurrent execution.
A video solution is available for this question β log in and enroll to watch it.