Question

The terms contention and race are used interchangeably when it comes to thread's state(at critical section). Are they same?

Was it helpful?

Solution

These are two distinct phenomena. Contention refers to the fact that when thread $A$ has accessed a resource $B$ needs to wait until $A$ frees it.

Race refers to the fact when both threads $A$ and $B$ want to secure access to a resource. The fastest will secure it and thus lead to contention.

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top