Parallel Computing with .NET

With all the modern systems using multi-core and multi-processor systems, tapping this new power is an interesting challenge for developers. It also fundamentally starts the shift on how your "average Joe" interacts with a computer and things that he/she expects to be able to. First, check out the "Manycore Shift" paper from Microsoft. Second checkout the Parallel Extensions to .NET 3.5 which is a programing model for data and task parallelism. It also helps with coordination on parallel hardware (such as multi-core CPU's) via a common work schedules. There is also a new Parallel Computing Dev Center on MSDN. Before you download the December 2007 CTP, make sure you have the RTM bits of the .NET 3.5 runtime. There are also a number of bugs fixed in this new CTP. If you want a quick introduction then check out a few videos available.

The runtime for this is responsible for mapping parallelism expressed in an application to the actual capabilities of the underlying hardware of multi-core or multi-processor machines. The runtime determines at runtime the number of threads to create. It also monitors this to tweak this and see if any more or fewer threads are needed. The runtime also scales up as more cores become available without any change to your application.

Microsoft also says "Because Parallel Extensions exploits multiple processors, we recommended that you install this directly onto an OS. Using virtualization technologies is not recommended due to restrictions on the maximum number of processors supported by today’s common virtualization technologies." [sic]

There are several approaches you can use to expresses parallelism. Here is a brief from the documentation on these:

  1. Declarative Data – Parallel Language Integrated Query (or Parallel LINQ) is an implementation of LINQ-to-Objects that executes queries in parallel, scaling to utilize the available cores and processors of the machine. Because queries are declarative, you are able to express what you want to accomplish, rather than how you want to accomplish it.
  2. Imperative Data – Parallel Extensions also contains mechanisms to express common imperative data-oriented operations such as for and foreach loops, automatically dividing the work in the loop to run on parallel hardware.
  3. Imperative Task – Rather than using data to drive parallelism, Parallel Extensions enables you to express potential parallelism via expressions and statements that take the form of lightweight tasks. Parallel Extensions schedules these tasks to run on parallel hardware and provides capabilities to cancel and wait on tasks.

Now, I just need to take out the time to play with this; does anyone know how I can rar up some hours in a day and squeeze in a bit more?

Please follow and like us:

Similar posts to check out:

  • XML Based file formats in Office 12June 2, 2005 XML Based file formats in Office 12 (0)
    CNet is reporting that Microsoft said Thursday that it will introduce new XML-based file formats for its Excel, PowerPoint and Word applications when the company launches its Office 12 software package next year. Company officials said the move to replace Microsoft''s traditional binary file formats with open-standards-based XML versions will allow companies using Office 12 to more easily access data across XML''s various applications. Microsoft pledged that the shift to XML, also […]
  • Pretty hefty hardware requirements for VistaSeptember 6, 2005 Pretty hefty hardware requirements for Vista (0)
    If you have been thinking of getting a new machine or upgrading your existing one, you might want to hold off a bit on that if you can for another few months as it seems like Windows Vista (what was called as Longhorn), will have some pretty hefty hardware requirements - e.g. you would need a AGP with at least 128 mb RAM (preferably 256 mb). If you want to run the 64 bit edition, then as the smallest memory chunk that a program can allocate increases, the overall memory usage also […]
  • IWAM Account Is Not Granted the Impersonate Privilege for ASP.NET 1.1 on a Windows 2000 Domain ControllerJanuary 21, 2005 IWAM Account Is Not Granted the Impersonate Privilege for ASP.NET 1.1 on a Windows 2000 Domain Controller (0)
    Recently at work a someone was playing around with AD, and could not get impersonation working in ASP.NET - even hardcoding the userid/pwd did help, and all the time he got an Access is Denied error. After searching high, low, etc. he did find this issue. Interestingly I have never seen this, because well one, I have been working on Windows 2003 Server for the last few months, and two more importantly, my dev box, has not been a Domain Controller! (Why you would want one is another […]

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>