I am having a hard time understanding the SC memory model properly. The sentence "the result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program." is very ambiguous for me.

Does: "having the operations in each processor appear in the sequence specified by the program" mean that all memory operations are updated system wide exactly after being run? Or can they reside in the cache, not known to the processors by the new value for a while.

Does the sentence also infer that no matter what sequential order i decide to order my commands between the threads (not order differently the commands in each individual thread), I will always get the same read's for all of my writes?

Lets take for example this:

Thread 0         Thread 1           Thread 2
X=1              EAX=X              Y=1
                 EBX=Y              ECX = X

Thread 1: EAX=1
Thread 1: EBX=0
Thread 2: ECX=0

It is easily seen that Y=1 MUST be before EBX=Y, because otherwise, EAX cannot be 1 if ECX is 0 or vice versa. But is this still SC? because even though Y=1 was issued before EBX=Y, it could of updated all the threads only after EBX polled Y.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.