Parallel Programming in .NET 4.0: And Much, Much More…

In my Parallel Programming blog series this week, we’ve looked at: PLINQ Parallel class Tasks Parallel Tasks and Parallel Stacks windows in Visual Studio 2010 I want to conclude by frantically listing some other parallel support that I didn’t have time to tell you in a week.  :)  And this is *not* an all-inclusive list! …

0

Parallel Programming in .NET 4.0: Parallel Tasks and Parallel Stacks windows in Visual Studio 2010

In Visual Studio 2010, there is new support for parallel programming as well.  In particular, I want to discuss two new debugging windows, Parallel Tasks and Parallel Stacks.  To access these windows, hit F5 in Visual Studio to run with debugging.  Then click on the “Debug” menu item, select “Windows” and then click “Parallel Tasks”…

0

Parallel Programming in .NET 4.0: Using Tasks

So far in this series, we have discussed PLINQ and the Parallel class.  These allow you to take existing code (LINQ queries, for/foreach loops, etc.) and run it in parallel.  In today’s post, let’s examine how you might leverage .NET 4.0 if you are currently doing lower-level parallel programming using the Thread class.  Instead of…

5

Parallel Programming in .NET 4.0: Static Parallel Class (For, ForEach, Invoke)

More great support for parallel computing in .NET 4.0 can be found in the static Parallel class.  This static class provides support for parallelizing regions of your code.  It’s located in the namespace System.Threading.Tasks.  For example, you probably often write code like this: // For loop for (int i = 0; i < n; i++)…

1

Parallel Programming in .NET 4.0: PLINQ

This week, I am writing a series of blog posts on the support for parallel programming in .NET 4.0 and Visual Studio 2010.  Let’s start with PLINQ.  Parallel LINQ (PLINQ) is a query execution engine that accepts any LINQ-to-Objects or LINQ-to-XML query and automatically utilizes multiple processors or cores for execution when they are available. …

0

Stephen Toub Tour – Parallel Computing Resources

Last week, Stephen Toub met with roughly 450 people on his Parallel Computing tour!  He toured through Nashville, Louisville, Cincinnati, Cleveland, and Detroit, meeting with customers during the day and speaking at user group meetings in the evenings.   I promised that I would post some resources from Stephen’s tour.  Downloads Stephen’s slide deck: Toub_ParallelismTour_Oct2009.zip Download…

6

Stephen Toub – Parallel Computing Tour

I’m excited to tell you that I’m organizing another product team tour!  Stephen Toub from the Parallel Computing Platform team at Microsoft will be touring through Michigan, Ohio, Kentucky, and Tennessee in one week, speaking at corporations during the day and speaking at user groups in the evenings.  He will discuss concurrency and how .NET…

4

Work-Stealing in .NET 4.0

There is some truly amazing support for parallel programming in .NET 4.0.  One of the compelling new features of the Thread Pool in .NET 4.0 is work-stealing, which allows work to be processed by worker threads more efficiently.  First of all, in addition to the global queue, there are local queues for each worker thread. …

5

Parallel.For in .NET 4.0

In version 4.0 of the .NET Framework, there is a lot of support for parallel programming.  One cool class to know is System.Threading.Parallel, which contains a number of static methods to parallelize loops and regions.  Consider this code which uses a for loop:  static void ComputePerfectSquares1() { Int64[] perfectSquares = new Int64[arraySize]; for (int i…

1