Parallel Extensions
Parallel Extensions was the development name for a managed concurrency library developed by a collaboration between Microsoft Research and the CLR team at Microsoft. The library was released in version 4.0 of the .NET Framework.[1] It is composed of two parts: Parallel LINQ (PLINQ) and Task Parallel Library (TPL).[2][3] It also consists of a set of coordination data structures (CDS) – sets of data structures used to synchronize and co-ordinate the execution of concurrent tasks.[4] Parallel LINQPLINQ, or Parallel 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.[2] Any computation on objects that has been implemented as queries can be parallelized by PLINQ. However, the objects need to implement the Task Parallel LibraryThe Task Parallel Library (TPL) is the task parallelism component of the Parallel Extensions to .NET.[6] It exposes parallel constructs like parallel TPL also includes other constructs like Task and Future. A Task is an action that can be executed independent of the rest of the program. In that sense, it is semantically equivalent to a thread, except that it is a more light-weight object and comes without the overhead of creating an OS thread. Tasks are queued by a Task Manager object and are scheduled to run on multiple OS threads in a thread pool when their turn comes. Future is a 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.[3] If an attempt is made to retrieve the result before it has been computed then the requesting thread will block until the result is available.[6] The other construct of TPL is Parallel class. TPL provides a basic form of structured parallelism via three static methods in the Parallel class:
ArchitectureThe main concept in the Parallel Extensions to .NET is a PFX includes a See also
References
External linksWikibooks has a book on the topic of: .NET Development Foundation Information related to Parallel Extensions |