Paralel Programing

Páginas: 24 (5808 palabras) Publicado: 4 de agosto de 2011
FOCUS: PARALLELISM ON THE DESKTOP

Multicore Desktop Programming with Intel Threading Building Blocks
Wooyoung Kim and Michael Voss, Intel

TBB provides a range of building blocks to help developers write efficient parallel programs (see Figure 1). Its task-based programming model and algorithms let developers express parallelism easily, leveraging its work-stealing scheduler to provide acomposable execution environment that can effectively adapt to changes in resources. Moreover, its containers and synchronization constructs can be used flexibly from within tasks or from native threads to provide safety and scalability.

About Intel TBB
Intel TBB is a key component of Intel Parallel Building Blocks (Intel PBB). Intel PBB is Intel’s family of complementary and compatibleparallel-programming models; it also includes Intel Cilk Plus1 and Intel Array Building Blocks.2 (For more information on other parallel programming models, see the “Related Work in Parallel-Programming Models” sidebar.) Intel TBB is available as a commercially supported product3 and an open source project.4 Intel supports the library on multiple platforms including Windows, Linux, and Mac OS. It’s usedby many applications, including Adobe Systems’ Creative Suite 5, Autodesk’s Maya, Avid’s Media Composer, Epic Games’ Unreal Engine 3, Firaxis Games’ Civilization 5, and Creative Assembly’s Napoleon: Total War.

// Intel Threading Building Blocks is a key component of Intel Parallel Building Blocks. This widely used C++ template library helps developers achieve well-performing modular parallelprograms in multiprogrammed environments. //

THE CHARACTERISTICS OF BOTH THE APPLICATIONS and the environment make writing parallel programs that perform well on multicore desktops a challenge. Often, desktop applications are modular and depend on shared, third-party libraries and plug-ins. When modules use parallel models that don’t compose well, each component might act as though it can consumeall available resources, making it easy for the application to oversubscribe a system. Desktop environments are also

multiprogrammed and have independent, competing applications. To perform well, parallel applications on the desktop must be able to adapt to changes in resource availability. Writing a correct parallel program is difficult; writing a highly modular parallel program that performswell in a multiprogrammed environment is even more so. To address many difficult issues that desktop developers face, Intel designed Intel Threading Building Blocks (Intel TBB), a portable C++ template library. Intel

The Tasking Interface
Intel TBB’s lightweight tasks and workstealing task scheduler are key to its performance. Users express basic units of parallel work in their applications astasks, which are user-space C++ objects. Because a task’s allocation and deallocation are much more lightweight than those of a native OS thread, developers can overdecompose their problem, creating many more tasks than hardware

0 74 0 -74 5 9 / 11 / $ 2 6 . 0 0 © 2 0 11 I E E E

J A N U A R Y/ F E B R U A R Y 2 0 1 1 \ I E E E S O F T W A R E  23

FOCUS: PARALLELISM ON THE DESKTOPparallel_for, parallel_for_each parallel_reduce parallel_scan parallel_do pipeline, parallel_pipeline parallel_sort parallel_invoke
Task scheduler

Generic parallel algorithms

task_group, structured_task_group task task_scheduler_init task_scheduler_observer
Synchronization primitives

concurrent_hash_map concurrent_unordered_map concurrent_queue concurrent_bounded_queue concurrent_vectorThread local storage

Concurrent containers

combinable enumerable_thread_speci c
Memory allocation

atomic, condition_variable mutex, recursive_mutex spin_mutex, spin_rw_mutex queuing_mutex, queuing_rw_mutex null_mutex, null_rw_mutex critical_section, reader_writer_lock
Threads

tbb_allocator zero_allocator cache_aligned_allocator scalable_allocator

tbb_thread
FIGURE 1. Intel...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programing
  • Programing
  • Programing C++
  • c programing
  • programing c.
  • Paralelo
  • paralelismo
  • Paralelas

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS