On processors that support hardware transaction memory (such as Intel® Transactional Synchronization Extensions (Intel® TSX)) speculative mutexes work by letting multiple threads acquire the same lock, as long as there are no "conflicts" that may generate different results than non-speculative locking. The exact notion of a "conflict" depends on the hardware, and typically means accessing the same cache line where one of the accesses modifies the cache line.
Parallel programming is about speeding up wall clock time, which is the real time that it takes a program to run. Unfortunately, some of the obvious wall clock timing routines provided by operating systems do not always work reliably across threads, because the hardware thread clocks are not synchronized. The library provides support for timing across threads. The routines are wrappers around operating services that we have verified as safe to use across threads.
Class that represents thread's interest in task scheduling services.
The interface for constructing a filter evolved over several releases of Intel® Threading Building Blocks (Intel® TBB).
Class for run time control over the loading of an Intel® Threading Building Blocks dynamic library.
Intel® Threading Building Blocks (Intel® TBB) is a library that helps you leverage multi-core performance without having to be a threading expert. Typically you can improve performance for multi-core processors by implementing the key points explained in the early sections of the User Guide. As your expertise grows, you may want to dive into more complex subjects that are covered in advanced sections.
A parallel loop construct incurs overhead cost for every chunk of work that it schedules. Since version 2.2, Intel® Threading Building Blocks (Intel® TBB) chooses chunk sizes automatically, depending upon load balancing needs. The heuristic attempts to limit overheads while still providing ample opportunities for load balancing.
The discussion so far was simplified by assuming non-nested parallelism and skipping details of task_group_context. This topic explains both.