Dec 02 2007

Parallel Computing with .NET

Category: .microsoftAmit Bahree @ 6:00 pm

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?

Share
Similar posts to check out:
  • April 25, 2012 -- SkyDrive, Windows 8 and Domain Account (0)
    I am running Windows 8 on my primary work machine now, which is domain joined. When I try and use the SkyDrive metro app (which ships with Windows 8), it does not like that fact I am domain joined and wants me to switch accounts, which is something I don’t want to do. This of course works great for those who are not domain joined and essentially are personal machines. For many of us who will be using this on ‘work’ machines, this seems like we will be ignored. Of course I can install the deskt...
  • March 6, 2012 -- Enabling Win 8 Metro on a Netbook (0)
    When you install Win 8 on a Netbook the screen resolution would be too low for Metro apps to run which is a bummer. One way to get around this and “fix” this is to update the registry (and you thought that was so XP!) :). Run Regedit and search for “display1_downscalingsupported” (without quotes). Find all occurrences of this entry and change its value from 0 to 1. Reboot when finished and you should have more options on your Screen Resolution choosing which will allow you to run Metro. :) ...
  • January 10, 2012 -- 15 Year of Microsoft at CES (0)
    ...

Tags:

Leave a Reply

*

Get Adobe Flash player