I was at section 8.10 '*Example: Possible Swap*' .
Now in this given example , there is a pic ( unfortunately , I am unable to paste it here) which shows the flow of 2 threads for a given snippet.
In the next line they say
+'The only constraint is that it is not possible both for the write of a to precede the read of a and for the write of b to precede the read of b'+
Now I feel confused because , how is this scenario even possible . How can write of A even happen before the read of B has completed . As per the figure , write of A can only happen after read of B. The whole point I am trying to put is , why should Main Memory even think of ordering .
May be I have not been able to understand the point made earlier in the same document in section 8.2 (*Execution Order and Consistency*)
It is not permitted for an action to follow itself.
The last rule may seem trivial, but it does need to be stated separately and explicitly for completeness. Without the rule, it would be possible to propose a set of actions by two or more threads and precedence relationships among the actions that would satisfy all the other rules but would require an action to follow itself.
Could some one help me on this please. Any small lead in understanding would be very helpful.