Post 3 of 5 in Multithreading in C++. Mutexes can restrict access to data structures and operations to only one thread at a time so that the invariants of data structures don't break.
Post 2 of 5 in Multithreading in C++. Memory ordering semantics define how memory accesses are going to be ordered by the compiler and the CPU. They are important for performance considerations.