Race Condition and Shared Memory Conflict

I am confused about the terms race condition and shared memory conflict. I mean their difference.

I know that when a program creates a race condition that two or more threads access the same shared memory location at the same time.

I also know that if two or more program threads access the same shared memory this creates a race condition.

I assume that in a shared memory conflict the thread access the shared memory location simultaneously and in a race condition the access is serial or sequential not simultaneous. If you go to CILK Arts that is how I beleive they define a race condition. They do not even define a shared memory conflict - from what can see at their website.

Anyone shed more light on this.

Respectfully,

Newport-J

You understand race conditions quite well… obviously a fundamental issue on all parallel architectures. And indeed you can have race conditions on shared memory writes as well as global memory writes.

But the term “shared memory conflict” isn’t a standard term… I think you may mean “shared memory bank conflict.” This is an efficiency, not correctness, issue. It occurs when more than one thread all try to access shared memory which shares the same address mod 16. (There are 16 banks, they interleave words, and one bank can service only one thread at a time.) In the case of a bank conflict (ie, thread 0 accesses s[0] and thread 1 accesses s[48], so they both need the same bank) the hardware serializes the access, so it takes two clocks to complete, not one. You do want to avoid bank conflicts if you can for this efficiency reason, though it’s still allowable and usually a minor effect even if it’s unavoidable.