In all parallel programs that I saw or heard the details (admittedly, a small set), at some point they use the hardware synchronization functions, usually in some form of compare-and-swap . The question is, are there any parallel programs in the wild where the stream interacts throughout life and leaves without any synchronization?
An example of what I'm thinking of includes:
A program that is a single thread that runs the yes / no test in a large set of cases, and a large bunch of thread tagging cases based on possible / no tests. This does not require synchronization because dirty data will only affect performance, not correctness.
A program that has many threads updating the data structure, where any current state will always be valid, so dirty reads or writes do nothing invalid. An example of this is (I think) path compression in a join-search algorithm .
source share