.NET Parallel Programming

All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…

DryadLinq now available also for non-academic use

Several months ago, Microsoft announced for academic customers the availability of DryadLINQ.  DryadLINQ is a LINQ provider developed by Microsoft Research that enables  .NET developers to use the LINQ programming model for writing distributed queries and computations against a cluster of computers using Windows HPC Server. DryadLINQ...

FAQ :: Why is the speedup not X on my X-way machine?

We’ll be regularly posting answers to frequently asked questions that we’ve gotten on the forum, internal email lists, etc.  Here’s the first – enjoy! Why is the speedup not X on my X-way machine?  Or, why does my parallel code run slower?  Less than ideal speedup can typically be attributed to two things: 1.  ...

Reactive Extensions and Parallel Extensions

It’s awesome to see the Reactive Extensions to .NET (Rx) live on the DevLabs site.  If you haven’t checked out this exciting project, we urge you to do so.  Not only is it cool and useful technology, but the download includes a back ported (and unsupported) release of Parallel Extensions for the .NET Framework 3.5 in the ...

Scaling out PLINQ: DryadLINQ at PDC09 and Supercomputing09

PLINQ enables developers to scale up computations in order to leverage the multiple cores available in modern hardware. For many problem domains, this is quite useful and sufficient. What happens, however, when a workload being processed is so big that even a manycore machine is insufficient to adequately handle the load? This can be the case ...

What’s New in Beta 2 for PLINQ

Included in the .NET 4 Framework Beta 2 is a more robust and faster version of PLINQ.  Between B1 and B2, PLINQ changes have mainly been under the covers, so hopefully no need to rewrite any of your applications to see the improvements.  1.       Many improvements to performance and scalability2. &...

Parallelized Map and Filter Operations

Common operations like map and filter are available in parallelized form through PLINQ, though the names differ.  A map can be achieved with PLINQ’s Select operator, and a filter with PLINQ’s Where operator.For example, I could implement a ParallelMap operation that takes in one array and returns another as follows: public ...

Parallel Extensions and I/O

In this post, we’ll investigate some ways that Parallel Extensions can be used to introduce parallelism and asynchrony to I/O scenarios. Here’s a simple scenario.  I want to retrieve data from a number of web resources. static string[] Resources = new string[] {     "http://www.microsoft.com", "http://www.msdn.com", &...

Cancellation in Parallel Extensions

One of the great features that crosses all of Parallel Extensions types is a consistent approach to cancellation (see https://blogs.msdn.com/pfxteam/archive/2009/05/22/9635790.aspx). In this post we explore some of the ways cancellation is used in Parallel Extensions and explain the guidance we developed. The new cancellation system is a ...