on-internet
← Community

What happens when different CPU cores write to the same RAM address without synchronization?

Stack Overflow ·

Let's assume that 2 cores are trying to write different values to the same RAM address (1 byte), at the same moment of time (plus-minus eta), and without using any interlocked instructions or memory barriers. What happens in this case and what value will be written to the main RAM? The first one wins? The last one wins? Undetermined behavior?

Comments

Sign in or sign up to comment and upvote.

No comments yet.