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?

  1. A.

    \(R(P_i) \cap W(P_j) = \Phi\)

  2. B.

    \(W(P_i) \cap R(P_j) = \Phi\)

  3. C.

    \(R(P_i) \cap R(P_j) = \Phi\)

  4. 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.

Explore the full course: Mppsc Assistant Professor