Question: Consider a pair of processes in a shared memory system such that process A updates a data structure, and then sets a flag to indicate
Consider a pair of processes in a shared memory system such that process A updates a data structure, and then sets a flag to indicate that the update is completed. Process B monitors the flag, and starts processing the data structure only after it finds the flag is set.
Explain the problems that could arise in a memory architecture where writes may be reordered, and explain how the sfence and lfence instructions can be used to ensure the problem does not occur.
Step by Step Solution
3.56 Rating (170 Votes )
There are 3 Steps involved in it
The main problem that could arise is that process B mi... View full answer
Get step-by-step solutions from verified subject matter experts
