Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Pro TBB : C++ parallel programming with threading building blocks
Voss M., Asenjo R., Reinders J., Apress, New York, NY, 2019. 754 pp. Type: Book (978-1-484243-97-8)
Date Reviewed: Jul 29 2021

First, the good news: Pro TBB (threading building blocks, or TBB, now renamed oneTBB) is an invaluable book, written by three experts, on all facets of parallel programming that are available for free. Moreover, Intel’s oneAPI software tools, including oneTBB, are also free. There is also ample documentation, including source code and examples, to complement the book [1,2].

TBB is a parallel programming model that extends the C++ library template with novel parallelism concepts and constructs. As a parallel programming model, the TBB approach offers programmers, experts, and novices the mental and metal tools to develop parallel programs, for execution on heterogeneous and multi-core platforms and devices, which address criteria such as machine independence, efficiency, scalability, and portability without having to deal with low-level idiosyncrasies. To achieve these criteria, TBB elevates parallel programming to a logical level by introducing platform-agnostic tasking constructs, thus freeing developers from the complexity of the heterogeneous multi-core systems and their optimal exploitation requirements. The developer uses tasks, defined as lightweight units of parallelism, to express parallel computations. A task scheduler consisting of high- and low-level application programming interfaces (APIs) manages the life cycle stages of a given task, such as spawning, allocating, mapping tasks onto threads, running, synchronizing, exception handling, and termination.

TBB supports various constructs and mechanisms, including (1) parallel control structures, generic algorithms (patterns), flow graphs, and concurrent data structures for concurrency (containers); and (2) partitioning, granularity, isolation, affinity, mutexes, atomic operations, and scalable memory allocation.

According to TBB, there are three typical layers of parallelism applications exhibited: (1) message-driven layers; (2) fork-join layers; and (3) single instruction, multiple data (SIMD) layers. TBB maps each one of these into its high-level TBB parallel execution interface: (1) flow graphs; (2) generic parallel algorithms; and (3) the parallel algorithms of the C++ Standard Template Library (STL). Being built on top of the C++ STL, TBB seamlessly augments the C++ STL and integrates its execution model. Flow graphs are similar to dataflow programming languages developed in the early 1970s. The flow graph paradigm emphasizes data flowing from node to node in a dependency graph. TBB provides a graphical notation for various types of nodes, such as functional, control flow, and join nodes, each with a predefined semantics to form a dependency graph. Such a graph is then translated into an equivalent textual representation for processing.

Generic parallel algorithms, more precisely patterns, capture the fork-execute parallel threads-join pattern. They consist of functional parallelism (parallel invoke), simple parallel loops (for example, parallel for, parallel reduce), complex parallel loops (for example, parallel do), pipelines (for example, pipeline, parallel pipeline), and sorting (for example, parallel sort). These patterns are predefined and fine-tuned for optimal execution. These are composable in the sense that they can be freely combined to build more complex patterns while maintaining clean semantics and minimizing overhead.

The book provides comprehensive coverage of a full-fledged model of parallelism. Besides the TBB constructs, various mechanisms that address issues of exception handling, task partitioning, concurrent data structures, mutual exclusion, granularity, and task-thread affinity are elaborated and evaluated in great detail. The first part of the book is a light introduction to TBB, and the second part provides an in-depth presentation with examples and a performance analysis of TBB constructs. Appendix B (“Précis”) summarizes using the TBB templates and illustrates each one with examples. Developers with experience in parallel programming will benefit the most from this book.

More reviews about this item: Amazon

Reviewer:  B. Belkhouche Review #: CR147321 (2112-0281)
1) Intel(R) oneAPI Threading Building Blocks (oneTBB) Documentation. Intel. https://software.intel.com/content/www/us/en/develop/documentation/onetbb-documentation/top.html (accessed 07/28/2021).
2) oneTBB. GitHub. https://github.com/oneapi-src/oneTBB (accessed 07/28/2021).
Bookmark and Share
  Featured Reviewer  
 
Parallel Programming (D.1.3 ... )
 
 
Object-Oriented Languages (D.3.2 ... )
 
 
Programming Languages (D.3 )
 
Would you recommend this review?
yes
no
Other reviews under "Parallel Programming": Date
How to write parallel programs: a first course
Carriero N. (ed), Gelernter D. (ed), MIT Press, Cambridge, MA, 1990. Type: Book (9780262031714)
Jul 1 1992
Parallel computer systems
Koskela R., Simmons M., ACM Press, New York, NY, 1990. Type: Book (9780201509373)
May 1 1992
Parallel functional languages and compilers
Szymanski B. (ed), ACM Press, New York, NY, 1991. Type: Book (9780201522433)
Sep 1 1993
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy