January19

PLINQ and .Net Parallel Programming resources

Seems there are more and more articles popping up on PLINQ and just multi core programming in general.  Visual Studio Magazine has a great summary of the current state of affairs in multicore programming.

Key to the article is that just enabling parallel code doesn’t always make it run faster.  There are dependencies, deadlocks, and all sorts of other problems that can occur.  Programmers have to know how to take advantage of the various technologies, and shift some thinking to new design patterns as well.

There are many technologies in .Net 4 including the following list:

Samples

Microsoft recently updated the parallel programming samples.  There are a lot of samples included that demonstrate a wide variety of concepts.

I found the parallel grep sample to be very interesting.  The LINQ looks almost identical to a previous grep utility I had written.  The ability to just add the .AsParallel() to the expression is so incredibly powerful for naïve cases like this, and works very well.  On my 8 core machine the parallel version ran about 3x faster than the standard expression.  This is pretty impressive when you would think that the disk IO would be the major bottleneck.  Obviously there are some cases where the multiple cores can contribute.

Resources

The Parallel Computing Developer Center on the MSDN Web site has links to the latest content and forum posts about parallel programming in the .NET Framework, and in native C++.

The Parallel Programming with .NET blog on the MSDN blog site contains many in-depth articles about parallel programming in the .NET Framework.

The Concurrency Visualizer blog on the MSDN blog site covers the new performance profiling tool that is included in some editions of Visual Studio 2010.

The Parallel Extensions forum on the MSDN forums site is where to ask and answer questions about parallel programming.

The Parallel Extensions Samples page on the MSDN Code Gallery Web site contains many samples that demonstrate intermediate and advanced parallel programming techniques.

Data Structures for Parallel Programming is a great resource for common data structures, designs, and pitfalls of implementing parallel code.

There is a great white paper on Patterns for Parallel Programming that includes some great discussions on applying the best patterns to your code.

Comments are closed