O'Reilly logo

Shared Memory Application Programming by Victor Alessandrini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

Concurrent Access to Shared Data

Abstract

Mutual exclusion is a basic synchronization primitive used to ensure thread safety when accessing shared variables. The mutual exclusion programming interfaces available in the five programming environments are reviewed, underlining the common basic features and the different additional features proposed by each one of them. Then, atomic operations are introduced as an efficient alternative to mutual exclusion in some specific cases, and the way they operate in OpenMP is reviewed. Finally, some utilities proposed by Threading Building Blocks (TBB)—basically, extensions of the Standard Template Library containers having internally built in thread safety—are introduced. A few observations concerning ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required