Programming models and multithreading, Programming models and multithreading -6 – Intel ARCHITECTURE IA-32 User Manual

Page 352

Advertising
background image

IA-32 Intel® Architecture Optimization

7-6

When two applications are employed as part of a multi-tasking
workload, there is little synchronization overhead between these two
processes. It is also important to ensure each application has minimal
synchronization overhead within itself.

An application that uses lengthy spin loops for intra-process
synchronization is less likely to benefit from Hyper-Threading
Technology in a multi-tasking workload. This is because critical
resources will be consumed by the long spin loops.

Programming Models and Multithreading

Parallelism is the most important concept in designing a multithreaded
application and realizing optimal performance scaling with multiple
processors. An optimized multithreaded application is characterized by
large degrees of parallelism or minimal dependencies in the following
areas:

workload

thread interaction

hardware utilization

The key to maximizing workload parallelism is to identify multiple
tasks that have minimal inter-dependencies within an application and to
create separate threads for parallel execution of those tasks.

Concurrent execution of independent threads is the essence of deploying
a multithreaded application on a multiprocessing system. Managing the
interaction between threads to minimize the cost of thread
synchronization is also critical to achieving optimal performance
scaling with multiple processors.

Efficient use of hardware resources between concurrent threads requires
optimization techniques in specific areas to prevent contentions of
hardware resources. Coding techniques for optimizing thread
synchronization and managing other hardware resources are discussed
in subsequent sections.

Parallel programming models are discussed next.

Advertising