Parallelism in .NET – Introduction

Parallel programming is something that every professional developer should understand, but is rarely discussed or taught in detail in a formal manner.  Software users are no longer content with applications that lock up the user interface regularly, or take large amounts of time to process data unnecessarily.  Modern development requires the use of parallelism.  There is no longer any excuses for us as developers.

Learning to write parallel software is challenging.  It requires more than reading that one chapter on parallelism in our programming language book of choice…

Today’s systems are no longer getting faster with each generation; in many cases, newer computers are actually slower than previous generation systems.  Modern hardware is shifting towards conservation of power, with processing scalability coming from having multiple computer cores, not faster and faster CPUs.  Our CPU frequencies no longer double on a regular basis, but Moore’s Law is still holding strong.  Now, however, instead of scaling transistors in order to make processors faster, hardware manufacturers are scaling the transistors in order to add more discrete hardware processing threads to the system.

This changes how we should think about software.  In order to take advantage of modern systems, we need to redesign and rewrite our algorithms to work in parallel.  As with any design domain, it helps tremendously to have a common language, as well as a common set of patterns and tools.

For .NET developers, this is an exciting time for parallel programming.  Version 4 of the .NET Framework is adding the Task Parallel Library.  This has been back-ported to .NET 3.5sp1 as part of the Reactive Extensions for .NET, and is available for use today in both .NET 3.5 and .NET 4.0 beta.

In order to fully utilize the Task Parallel Library and parallelism, both in .NET 4 and previous versions, we need to understand the proper terminology.  For this series, I will provide an introduction to some of the basic concepts in parallelism, and relate them to the tools available in .NET.

About Reed
Reed Copsey, Jr. - http://www.reedcopsey.com - http://twitter.com/ReedCopsey

Comments

11 Responses to “Parallelism in .NET – Introduction”
  1. RoanLuo says:

    It’s really helpful. Thanks a lot Reed!

  2. Reed says:

    Thank you both for the feedback!

    -Reed

  3. Bruce says:

    […] This post was mentioned on Twitter by Reed Copsey, Jr., Caspar Kleijne. Caspar Kleijne said: #rocks #mustread: #Parallelism in .NET. Introduction: http://bit.ly/4MEr7h #csharp #dotnet /via @ReedCopsey […]

  4. Louis Garcia says:

    I’ve been looking for a guide guide in to parallelism, thanks for writing this.

  5. E-Bat says:

    I just landed here from a stack overflow link. Does this series still apply to .NET 4.6+?

    • Reed says:

      Yes, it would still apply. The addition of async/await (after this was written) could change how you’d use portions of this, but most of the code here still is valid and applies. Concepts are still important to understand, even in the post-async world.

Trackbacks

Check out what others are saying about this post...
  1. […] This post was mentioned on Twitter by Reed Copsey, Jr., Caspar Kleijne. Caspar Kleijne said: #rocks #mustread: #Parallelism in .NET. Introduction: http://bit.ly/4MEr7h #csharp #dotnet /via @ReedCopsey […]

  2. Social comments and analytics for this post…

    This post was mentioned on Twitter by ReedCopsey: Started blog series on Parallelism in .NET. Introduction is now published: http://bit.ly/4MEr7h #csharp #dotnet…

  3. “Parallelism in .NET” Series by Reed Copsey, Jr….

    Reed Copsey, Jr. has been writing a great series of articles on parallelism with the .NET Framework 4…



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!