What tools exist to help one to experiment with weakly ordered concurrency? That is, in what sandbox can one play while teaching oneself about partial fences, weak atomics, acquire/consume/release semantics, lock-free algorithms and the like?
The tool or sandbox one wants would exercise and stress one's weakly ordered, threaded algorithm, exposing the various ways in which the algorithm might theoretically fail. Physically running on an x86, for example, the tool would nevertheless be able to expose ARM-type failures.
An open-source tool would be preferable. Please advise.
References:
- the C++11 draft standard (PDF, see clauses 1, 29 and 30);
- Hans-J. Boehm's overview of the subject;
- McKenney, Boehm and Crowl on the subject;
- GCC's developmental notes on the subject;
- the Linux kernel's notes on the subject;
- a related question with answers here on Stackoverflow
- another question, this one comparing fences against atomics;
- Cppmem (on the advice of @KerrekSB);
- Cppmem's help page;
- Spin (a tool for analyzing the logical consistency of concurrent systems, on the advice of @JohnZwinck).
(The references are oriented toward C++11 because this is how I happen to have approached the subject. However, for all I know, a non-C++ answer might be best, so feel free to extend your answer beyond C++ as you see fit.)