Is parallel programming hard, and, if so, what can you do about it? [pdf]
1. Try process level I&#x2F;O, such pipes, sockets, and the like. Have Linux deal with the concurrency problem, not you. (Note: the BASH &amp; background job works in so many cases it ain&#x27;t funny). Also try fork&#x2F;join parallelism models like OpenMP. These are all far easier than dipping down to a lower level.<p>2. Try a mutex<p>3. If that doesn&#x27;t work, try adding a condition variable.<p>4. If that still doesn&#x27;t work, try an atomic in default sequentially consistent mode or equivalent (ex: Java volatile, InterlockedAdd, and the like). Warning: atomics are very subtle. Definitely have a review with an expert if you are here.<p>5. If that still doesn&#x27;t work, consider lock free paradigms. That is, combinations of atomics and memory barriers.<p>6. If that still doesn&#x27;t work, publish a paper on your problem lol.<p>---------<p>#1 is my most important piece of advice. There was a Blender render I was doing, like 2.6 or something old a few years ago. Blenders parallelism wasn&#x27;t too good and only utilized 25% of my computer.<p>So I ran 4 instances of headless Blender. Bam, 100% utilization. Done.<p>Don&#x27;t overthink parallelism. It&#x27;s stupid easy sometimes, as easy as a &amp; on the end of your shell command.