Similar questions 2 more →
Synchronization & Concurrency


Answer & solution
Answer: Edges S1→S3, S2→S3, S3→S5, S4→S5 (no official key was published)
After the two forks there are three branches. The original executes S1, the L3 branch executes S2, and the L4 branch executes S4. There is no synchronization among those three statements, so they can occur in any order or overlap.
The S1 and S2 branches both reach join N. Because N starts at 2, the first arrival changes N to 1 and terminates; the second changes N to 0 and survives. Exactly one process therefore continues to S3, and S3 cannot start until both S1 and S2 have finished. This gives edges S1→S3 and S2→S3. The identity of the surviving process is irrelevant to the statement ordering.
The branch completing S3 and the branch completing S4 both reach join M. The same counting argument, with M initially 2, permits S5 exactly once, after both predecessors finish. Add edges S3→S5 and S4→S5. These four edges form the transitive reduction: draw S1 and S2 feeding S3, then S3 and S4 feeding S5. The additional transitive relations S1→S5 and S2→S5 need not be drawn.
This finite five-statement interpretation uses the paper's explicit goto next after S5. Its execution is not captured by the intended one-node-per-statement DAG. Omitting the jump is a material control-flow variant, not harmless punctuation.