Use. Net for Parallel Programming

Source: Internet
Author: User
Tags visual studio 2010

Microsoft's pattern & Practices Team recently published the "use.. Net for parallel programming (parallel programming with Microsoft. net.. net. The basic content includes six design patterns for parallel programming and corresponding code examples.

Usage. to solve the difficult tasks in parallel programs: decomposing problems in multiple tasks that can be run in parallel, and coordinating parallel tasks, and process data sharing between tasks to avoid the huge performance impact of synchronization. To achieve this goal, this book introduces six design patterns using the. NET 4 Task Parallel library (task parallel library, TPL) and Plinq:

  1. Parallel loop (Parallel Loops)-used when the same operation is performed on multiple similar data input.
  2. Parallel tasks is used when you need to execute different operations that have their own data input.
  3. Parallel aggregation-"parallel aggregation introduces special steps in the algorithm to merge incomplete results. This mode represents a simplified operation and contains a variant of the MAP/reduce algorithm ."
  4. Futures-used to integrate data streams through the control flow. "Futures are a substitute for computing results that were initially unknown but subsequently available. The computing process of the results can occur in other computing processes in parallel ."
  5. Dynamic Task parallelism, a so-called recursive decomposition, helps to add dynamically created tasks during computation.
  6. Pipelines: This mode combines the concept of parallel tasks and concurrent queues, allowing the program to execute tasks concurrently on top of data input and process data in a certain order.

Each design pattern is accompanied by C #, VB. NET, and F # code examples, which can be found on the project website where. NET is used for parallel programming on codeplex. This project also mentions that the pattern and practice team intends to use the parallel patterns Library (PPL) and asynchronous agents Library (asynchronous agents Library) C ++ developers, this book's sister-in-law.

This wizard also contains suggestions for integrating the parallel design mode with other OOP modes, such as facades, decorators, and repositiories ). It also demonstrates how to debug and analyze parallel applications in Visual Studio 2010.

View Original English text:Parallel Programming with Microsoft. NET

Http://www.infoq.com/cn/news/2010/09/Parallel-Programming-.NET;jsessionid=97210FA8CABF12C954FB281C45FA9AC3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.