Welcome Guest | Login | Register
 
What's New

What's New in TBB 2.1?

Task-to-thread affinity – A new “affinity partitioner” class that implements “soft” task-to-thread affinity.  Performance has increased to within 10% of OpenMP static scheduling for cases where the latter works well for cache affinity, such as a serial (e.g., time-step) loop containing repeated parallel work on the same data.  Using task-to-thread affinity may provide a 4x performance increase over Intel® TBB 1.0 on some cases.  An example can be found in examples/parallel_for/seismic which was restructured to use the affinity partitioner and significantly increased performance.

Work cancellation support –  Ability to cancel a Intel® TBB task. This capability enables parallel algorithms in progress to be cancelled. The basic ancellation point model is that a task is a quantum of computation: it is either cancelled befor it starts running or runs to completion. Tasks may poll for cancellation while they are running. The cancellation model fully supports nested parallelism.

ISO C++ thread class – A thin portable wrapper around OS threads. It's a close approximation of the ISO C++ 200x class thread (Section 30.2 of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf). Now TBB lets you choose which is best, task-based versus thread-based, for your situation. Threads are typically better than tasks when the "work" is really more waiting than computation, such as for:

  • GUI, I/O or network interface threads.
  • Threads that need to wait on external events.
  • Programs that previously needed to use both native threads and Intel® TBB tasks.

Container and interface improvements – These improvements address a series of customer requests for containers that line up with STL more closely, adding other interfaces or functionality to the containers, etc. The items addressed in Intel® TBB 2.1 include:

  • Interfaces of all containers now follow those of STL counterparts more closely, and align with STL practices where possible.
  • Improvements in Intel® TBB containers (concurrent_queue, concurrent_hash_map, concurrent_vector):
    • Allow user-defined memory allocator in all containers
    • Eliminating spin-waiting in concurrent_queue
    • Exception safety in containers

Improved Intel® Thread Checker and Intel® Thread Profiler support – Significantly reduce current false positives when using Intel® Thread Checker with Intel® TBB. Make Intel® Thread Profiler information for programs using Intel® TBB more accurateand insightful.

Important tbb::pipeline changes – A specific list of customer-requested improvements for the pipeline class:

  • Now worker threads are able to execute other tasks, or block if no other work to do, instead of spin-waiting when waiting for input (important customer fix request).
  • Now allows parallel input stage instead of only serial input stage.
  • Now has enumeration to distinguish filter types, which is more convenient to use and allows introducing (in future) new filter types besides parallel vs. serial filters.
  • Automatic removal of filters when destroyed.  Previous versions required that the pipeline be manually cleared prior to filter deletion, which was inconvenient.
  • Clarify in documentation that pipeline can have stages added, then be run, then have more stages added, then be run again.

Worker thread callback hooks – A new class “task_scheduler_observer” that notifies a program when a thread starts or stops participating in Intel® TBB task scheduling.  Can be used to monitor creation of worker threads, change their properties (e.g., assigning thread IDs for special monitoring, Thread Local Storage, etc.).  For expert users only. 

Recursive mutex – Some programmers ban them; others say they are a necessary evil. This  customer requested feature is an exception-safe portable Intel® TBB interface for a recursive mutex.  This is not a performance oriented mutex like the other Intel® TBB mutexes, such as tbb::spin_mutex. 

Allow user-defined memory allocator in all containers – Allows selection of the default system allocator, the Intel® TBB scalable memory allocator, or a user-defined allocator in the containers (concurrent_vector, concurrent_queue, concurrent_hash_map).  See also the new tbb_allocator class, directly below.

New tbb_allocator class – This class allows easy switching between the Intel® TBB scalable memory allocator and the standard C memory allocation API (malloc etc.).  It is similar to the existing cache aligned allocator class except that it performs no alignment.  It is used in conjunction with the previous feature so the allocator can be selected to use with the containers.

Better binary compatibility support – Newer versions of the Intel® TBB shared libraries can always be used with code compiled against an earlier version of Intel® TBB starting from TBB 2.0. 

Microsoft Visual Studio* IDE integration plug-in – A new plug-in that’s currently being shipped as a separate package, with its own documentation. Available for download at www.ThreadingBuildingBlocks.org.  It allows different versions of Intel® TBB to be set up easily for use inside any version of Visual Studio starting from Visual Studio .NET 2003.

API to set thread stack size – A new optional parameter to task scheduler initialization call allows to specify stack size for TBB worker threads.

New blocked_range3d class – Analogous to blocked_range2d for 3-D parallel loop iteration spaces.  Includes code contributed by the Intel® TBB open-source community.

Improvements in mutexes – General tuning for performance & scalability, using futex on Linux (and comparable events on Windows) to sleep on long waits.

New parallel_do class – Suggested by the open-source community shortly after Intel® TBB 2.0 launch.  Provides a new alternative to the existing parallel_while algorithm.

Eliminated spin-waiting – Important customer-requested bug fixes to remove excessive idle spinning by worker threads in concurrent_queue and pipeline.

Exception safety/support – Improves ability to write exception-safe code with Intel® TBB code.  Specific changes include:

  • Exception safety in containers – concurrent_vector, concurrent_queue, and concurrent_hash_map now provide better guarantees when exceptions are thrown. See documentation for details.
  • Exception propagation outside of TBB algorithms – Tasks can now safely throw exceptions. When a task inside a parallel algorithm throws an exception, the algorithm is cancelled before the exception propagates outside the algorithm.
Search 

Page & Feed options
Print | Email to a friend | Support | RSS

Bookmark This
 Digg this   del.icio.us

Resources

       Buy Now
Intel TBB        


Do you use TBB for open source or commercial projects?