Parallel FX Library

Parallel FX Library

Parallel FX Library (PFX) is a managed concurrency library being developed by a collaboration between Microsoft Research and the CLR team at Microsoft for inclusion with a future revision of the .NET Framework. It is composed of two parts: Parallel LINQ (PLINQ) and Task Parallel Library (TPL).cite web | url = http://channel9.msdn.com/Showpost.aspx?postid=347531 | title = Programming in the Age of Concurrency: Concurrent Programming with PFX | accessdate = 2007-10-16] cite web | url = http://msdn.microsoft.com/msdnmag/issues/07/10/Futures/default.aspx | title = MSDN Magazine: Task Parallel Library | accessdate = 2007-10-16] It also consists of a set of Coordination Data Structures (CDS) - a set of data structures used to synchronize and co-ordinate the execution of concurrent tasks. The library was released as a CTP on November 29, 2007 [cite web | url = http://blogs.msdn.com/somasegar/archive/2007/11/29/parallel-extensions-to-the-net-fx-ctp.aspx | title = Parallel Extensions to the .NET FX CTP | accessdate = 2007-11-30] and refreshed again in December 2007 and June 2008.

PLINQ

PLINQ is a concurrent query execution engine for LINQ, parallelizing the execution of queries on objects (LINQ to Objects) and XML data (LINQ to XML). PLINQ is intended for exposing data parallelism by use of queries. Any computation on objects that has been implemented as queries can be parallelized by PLINQ. However, the objects need to implement the IParallelEnumerable interface, which is defined by PLINQ itself. Internally it uses TPL for execution.cite web | url = http://blogs.msdn.com/somasegar/archive/2008/06/02/june-2008-ctp-parallel-extensions-to-the-net-fx.aspx | title = June 2008 CTP - Parallel Extensions to the .NET FX | accessdate = 2008-08-06] [cite web | url = http://blogs.msdn.com/pfxteam/archive/2008/06/05/8576194.aspx | title = More powerful aggregations in PLINQ | accessdate = 2008-08-06]

TPL

Task Parallel Library (TPL) is the task parallelism component of PFX. It exposes parallel constructs like parallel for and while loops, using regular method calls and delegates. As such, the constructs can be used from any language supporting the .NET Framework. The job of spawning and terminating threads, as well as scaling the number of threads according to the number of available processors, is done by the library itself.

TPL also includes other constructs such as "Task" and "Future". A "Task" is an action that can be executed independent of the rest of the program. In that sense, it is equivalent to a thread, except that the programmer is relieved of the job of synchronizing the execution of the thread. A "Future" is a specialized task that returns a result. The result is computed in a background thread encapsulated by the "Future" object, and the result is buffered until it is retrieved.

Architecture

The main concept in the PFX is a Task, which is a small unit of code, represented as a lambda function, that can be executed independently. Both PLINQ and the TPL API provides methods to create the Tasks - PLINQ divides a query into smaller Tasks, and the Parallel.For, Parallel.While and Parallel.Do methods divide a loop into Tasks.

PFX includes a Task Manager object which schedules the Tasks for execution. A Task Manager contains a global queue of Tasks, which are then executed. In addition, it also encapsulates multiple threads onto which the Tasks are executed. By default, as many threads as there are processors (or processor cores) on the system are created, though this number may be manually modified. Each thread is associated with a thread-specific queue of Tasks. Each thread, when idle, picks up a batch of Tasks, and puts on its local queue, and then executes them one by one. If the global queue is empty, a thread will look for Tasks in the queues of its peers, and will take the Tasks which have been in the queue the longest ("task stealing"). When in execution, the Tasks will be executed independently, with the change in state of one Task independent of others. As a result, if they use a shared resource, they still need to be synchronized manually using locks or other constructs.

ee also

*Concurrency and Coordination Runtime
*Joins

References

External links

* [http://www.microsoft.com/downloads/details.aspx?FamilyId=348F73FD-593D-4B3C-B055-694C50D2B0F3&displaylang=en Parallel FX CTP June 2008]
* [http://msdn.microsoft.com/en-us/concurrency/default.aspx Parallel Computing Developer Center]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Parallel Lines — Parallel Lines …   Википедия

  • Parallel Extensions — Schichtenarchitektur des .NET Frameworks Bei den Parallel Extensions (parallele Erweiterungen), auch bekannt als Parallel Framework Extensions (PFX), handelt es sich um eine Bibliothek zur Unterstützung der parallelen Programmierung bei… …   Deutsch Wikipedia

  • Parallel text — A parallel text is a text placed alongside its translation or translations. Parallel text alignment is the identification of the corresponding sentences in both halves of the parallel text. The Loeb Classical Library and the Clay Sanskrit Library …   Wikipedia

  • Parallel Virtual Machine — NOTOC The Parallel Virtual Machine (PVM) is a software tool for parallel networking of computers. It is designed to allow a network of heterogeneous Unix and/or Windows machines to be used as a single distributed parallel processor. Thus large… …   Wikipedia

  • Parallel Virtual File System — The Parallel Virtual File System (PVFS) is an Open Source parallel file system. A parallel file system is a type of distributed file system that distributes file data across multiple servers and provides for concurrent access by multiple tasks of …   Wikipedia

  • Parallel computing — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • Parallel import — A parallel import is a non counterfeit product imported from another country without the permission of the intellectual property owner. Parallel imports are often referred to as grey product, and are implicated in issues of international trade,… …   Wikipedia

  • Library — Reading room redirects here. For other uses, see Reading room (disambiguation). For other uses, see Library (disambiguation). Reading room of the library at the University of Graz, in Austria …   Wikipedia

  • Library of Alexandria — For the modern library, see Bibliotheca Alexandrina. This Latin inscription regarding Tiberius Claudius Balbilus of Rome (d. c. AD 79) mentions the ALEXANDRINA BYBLIOTHECE (line eight).. The Royal Library of Alexandria, or Ancient Library of… …   Wikipedia

  • Parallel 59 — Doctorwhobook title=Parallel 59 series=Eighth Doctor Adventures number=30 featuring=Eighth Doctor Fitz and Compassion writer=Stephen Cole Natalie Dallaire publisher=BBC Books isbn=ISBN 0 563 55590 4 set between= pages=282 date=January 2000… …   Wikipedia

Share the article and excerpts

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