Question: Consider N processes numbered 0 to N - 1 in which each process i executes: A [ i ] = 1 B [ i ]

Consider N processes numbered 0 to N -1 in which each process i executes:
A[i]=1
B[i]=A[(i-1) mod N]
If all the reads and writes to A[i] are atomic, what can you say about the values in B at the end when all processes are done. Assume that the arrays A and B are shared by all processes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!