Intel Threading Building Blocks

Intel Threading Building Blocks

Intel Threading Building Blocks (also known as TBB) is the name of a C++ template library developed by Intel for writing software programs that take advantage of multi-core processors. The library consists of data structures and algorithms that allow a programmer to avoid some complications arising from the use of native threading packages such as POSIX threads, Windows threads, or the portable Boost Threads in which individual threads of execution are created, synchronized, and terminated manually. Instead the library abstracts access to the multiple processors by allowing the operations to be treated as "tasks," which are allocated to individual cores dynamically by the library's run-time engine, and by automating efficient use of the cache. This approach groups TBB in a family of solutions for parallel programming aiming to decouple the programming from the particulars of the underlying machine.

Implementation

TBB implements "task stealing" to balance a parallel workload across available processing cores in order to increase core utilization and therefore scaling. The TBB task stealing model is similar to the work stealing model applied in Cilk. Initially, the workload is evenly divided among the available processor cores. If one core completes its work while other cores still have a significant amount of work in their queue, TBB reassigns some of the work from one of the busy cores to the idle core. This dynamic capability decouples the programmer from the machine, allowing applications written using the library to scale to utilize the available processing cores with no changes to the source code or the executable program file.

TBB uses templates thereby relying on compile-time polymorphism that can be more temporally efficient than traditional run-time polymorphism since modern C++ compilers are tuned to minimize any abstraction penalty arising from heavy use of templates such as Standard Template Library and TBB.

Library contents

TBB is a collection of components for parallel programming:
* Basic algorithms: parallel_for, parallel_reduce, parallel_scan
* Advanced algorithms: parallel_while, pipeline, parallel_sort
* Containers: concurrent_queue, concurrent_vector, concurrent_hash_map
* Scalable memory allocation: scalable_malloc, scalable_free, scalable_realloc, scalable_calloc, scalable_allocator, cache_aligned_allocator
* Mutual exclusion: mutex, spin_mutex, queuing_mutex, spin_rw_mutex, queuing_rw_mutex
* Atomic operations: fetch_and_add, fetch_and_increment, fetch_and_decrement, compare_and_swap, fetch_and_store
* Timing: portable fine grained global time stamp
* Task Scheduler: direct access to control the creation and activation of tasks

History

Version 1.0 was introduced by Intel on August 29, 2006, the year after the introduction of Intel's first dual-core x86 processor, the Pentium D.

Version 1.1 was introduced on April 10, 2007. This version introduced auto_partitioner which offered an automatic alternative to specifying a grain size parameter to estimate the best granularity for your tasks. This version was added to the Intel C++ Compiler 10.0 with the new Professional Edition later that year on June 5.

Version 2.0 was introduced on July 24, 2007. This version included the release of the source code and the creation of an open source project. [ [http://www.threadingbuildingblocks.org Thread Building Blocks] ] The license used for open source is the same as the one used by the GNU Compiler Collection C++ standard library, a GPLv2 with an "runtime exception" (because of being template heavy code that usually becomes part of the executable after compilation). TBB is still available in a commercial version (without source code) with support but with no differences in functionality from the open source version.

Possible future version features were outlined in a posting to the project web site. [cite web| url=http://softwarecommunity.intel.com/articles/eng/1576.htm |title=Next Major TBB Release Features |date=October 10, 2007 |accessdate=2008-04-07 |author=Dave Sekowski]

Between July 2007 and March 2008, significant development was put into improvements in the TBB container classes (especially concurrent_vector), and a new algorithm (parallel_do) was developed. These features were made available in open source TBB development releases during this time period.

The new parallel_do component is a replacement for parallel_while, which will eventually be deprecated. The parallel_do component is structured in a manner that is consistent with the other TBB algorithms (parallel_for, parallel_reduce, parallel_scan), making its application simpler and more intuitive for developers than was the case with parallel_while.

Systems supported

The TBB commercial release 2.0 supports Microsoft Windows (XP or newer), Mac OS X (version 10.4.4 or higher) and Linux using compilers Visual C++ (version 7.1 or higher, on Windows OS only), Intel C++ Compiler (version 9.0 or higher) or GNU Compiler Collection (gcc). [cite web |url=http://cache-www.intel.com/cd/00/00/31/26/312687_312687.pdf |title=Intel Threading Building Blocks - Release Notes Version 2.0 |accessdate=2008-04-07 ] Additionally, the open source builds of TBB supports Solaris [cite web |url=http://developers.sun.com/solaris/articles/tbb_intro.html|title=Using Intel's Threaded Building Blocks (TBB) With Sun Studio Express|accessdate=2008-05-08] and FreeBSD.

Open source operating systems

As of March 2008, TBB is available in FreeBSD and has been packaged into the following Linux distributions:

* Debian Linux
* Ubuntu
* Fedora

ee also

*Parallel computing

Notes

References

* Reinders, James (2007, July). [http://www.oreilly.com/catalog/9780596514808 "Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism"] (Paperback) Sebastopol: O'Reilly Media, ISBN 978-0-596-51480-8.
* Voss, M. (2006, October). [http://www.devx.com/cplus/Article/32935 "Demystify Scalable Parallelism with Intel Threading Building Blocks' Generic Parallel Algorithms."]
* Voss, M. (2006, December). [http://www.devx.com/cplus/Article/33334 "Enable Safe, Scalable Parallelism with Intel Threading Building Blocks' Concurrent Containers."]
* Hudson, R. L., B. Saha, et al. (2006, June). [http://doi.acm.org/10.1145/1133956.1133967 "McRT-Malloc: a scalable transactional memory allocator."] Proceedings of the 2006 International Symposium on Memory Management. New York: ACM Press, pp. 74-83.

External links

* [http://www.intel.com/software/products/tbb Intel Threading Building Blocks Product Home]
* [http://www.threadingbuildingblocks.org Threading Building Blocks Open Source Project Home]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Intel Threading Building Blocks — Тип библиотека (программирование) Разработчик Intel Написана на С++, Assembler Операционная система Кроссплатформенный Последняя версия 4.1 Update 1 (05.09.2012) …   Википедия

  • Intel Threading Building Blocks — Desarrollador Intel www.threadingbuildingblocks.com/ Información general Última versión estable 2.1 update 4 …   Wikipedia Español

  • Threading Building Blocks — Die Threading Building Blocks (auch Intel Threading Building Blocks oder kurz TBB) ist eine C++ Programmierbibliothek, entwickelt von Intel zur effizienten Nutzung von Mehrkernprozessoren. Die Bibliothek bietet einen Satz von Datenstrukturen und… …   Deutsch Wikipedia

  • Threading Building Blocks — (TBB) est une bibliothèque logicielle développée par la société Intel Cet outil développé en C++ permet d abstraire au maximum les détails complexes de la programmation sur microprocesseur multi cœur. Ainsi un développeur n a plus à se soucier d… …   Wikipédia en Français

  • Intel Parallel Inspector — Тип Профилировщик / Отладчик использования памяти Разработчик Intel Developer Products Операционная система Windows Лицензия Проприетарная, однопользовательская …   Википедия

  • Intel Cilk Plus — Cilk Plus Paradigm(s) imperative (procedural), structured, parallel Appeared in 2010 Designed by Intel Developer Intel Stable release Parallel Studio 201 …   Wikipedia

  • Intel C++ Compiler — Esta página o sección está siendo traducida del idioma inglés a partir del artículo Intel C++ Compiler, razón por la cual puede haber lagunas de contenidos, errores sintácticos o escritos sin traducir. Puedes colaborar con Wikipedia …   Wikipedia Español

  • Intel Cilk Plus — Cilk Plus Класс языка: Императивный, процедурный, структурный, параллельный Появился в: 2010 Автор(ы): Intel Основные реализации: Intel C++ Compiler, GCC Испытал влияние: C …   Википедия

  • List of multi-threading libraries — List of cross platform multi threading libraries for the c++ programming language.* Boost C++ Libraries * OpenMP * OpenThreads * POCO Thread (part of POCO project http://pocoproject.org/poco/info/index.html ) * Zthread * Intel Threading Building… …   Wikipedia

  • Tbb — Intel Threading Building Blocks Тип библиотека (программирование) Разработчик Написана на С++ ОС Кроссплатформенный Версия 2.1 07.06.2008 Лицензия …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”