© Intel Corporation 2019
Michael Voss, Rafael  Asenjo and James ReindersPro TBBhttps://doi.org/10.1007/978-1-4842-4398-5_5

5. Synchronization: Why and How to Avoid It

Michael Voss1 , Rafael Asenjo2 and James Reinders3
(1)
Austin, Texas, USA
(2)
Málaga, Spain
(3)
Portland, Oregon, USA
 

Let us underscore this up front: if you don’t need to use the synchronization features described in this chapter, so much the better. Here, we cover synchronization mechanisms and alternatives to achieve mutual exclusion. “Synchronization” and “exclusion” should have quite a negative connotation for parallel programmers caring about performance. These are operations that we want to avoid because they cost time and, in some cases, processor resources and energy. If we can ...

Get Pro TBB: C++ Parallel Programming with Threading Building Blocks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.