文档介绍:Parallel Performance: Optimize Managed Code For Multi-Core Machines -- MSDN Magazine, October 2007 Page 1
Choose Your Language: English
MSDN Home > MSDN Magazine > October 2007 > Parallel Performance: Optimize Managed Code For Multi-Core Machines
PARALLEL PERFORMANCE
Optimize Managed Code For Multi-Core Machines
Daan Leijen
and Judd Hall
This article discusses:
Task Parallel Library This article uses the following technologies:
versus ThreadPool Parallel FX Library
Static Work Distribution
Futures
ulti-processor machines are now ing standard while the speed increases of single processors have slowed down. The key to
M performance improvements is therefore to run a program on multiple processors in parallel. Unfortunately, it is still very hard to
write algorithms that actually take advantage of those multiple processors. In fact, most applications use just a single core and see no
speed improvements when run on a multi-core machine. We need to write our programs in a new way.
Introducing TPL
The Task Parallel Library (TPL) is designed to make it much easier to write managed code that can automatically use multiple
processors. Using the library, you can conveniently express potential parallelism in existing sequential code, where the exposed parallel
tasks will be run concurrently on all available processors. Usually this results in significant speedups.
®
TPL is being created as a collaborative effort by Microsoft Research, the mon Language Runtime (CLR) team, and the
puting Platform team. TPL is a ponent of the Parallel FX library, the next generation of concurrency support for
the Microsoft .NET Framework. Though it has not yet reached version , the first Parallel munity Tech Preview (CTP) will be
®
available from MSDN in Fall '07. Watch http://blogs./somasegar for details. TPL does not require any language extensions
and works with the .NET Framework and higher.
®
Visual Studio 200