Making Weak Memory Models Fair
We observe that the standard notion of thread fairness is insufficient for guaranteeing termination of even the simplest shared-memory programs under weak memory models. Guaranteeing termination requires additional model-specific fairness constraints, which we call memory fairness. In the case of acyclic declarative memory models, such as TSO and RA, we show that memory fairness can be equivalently expressed in a uniform fashion as prefix-finiteness of an extended coherence order. This uniform memory fairness representation yields the first effective way for proving termination of spinloops under weak memory consistency.
READ FULL TEXT