.net 4.0 Parallelization Overview and Example

Saturday, February 27, 2010

Parallelization is a major Enhancements in Microsoft dot.net 4.0 in .netframework 4.0 give`s advantage of multi core processors . Now you can divide load of your functions Parallelly on Multi Core Processors.

Advantage Of Parallel Programing
Many applications contain some segments of code that will benefit from parallelization; and some that
will not. Code that is likely to benefit from being run in parallel will probably have the following
• It can be broken down into self-encapsulated units.
• It has no dependencies or shared state.
A classic example of code that would benefit from being run in parallel is code that goes off to call an
external service or perform a long-running calculation (for example, iterating through some stock quotes
and performing a long-running calculation by iterating through historical data on each individual
This type of problem is an ideal candidate for parallelization because each individual calculation is
independent so can safely be run in parallel. Some people like to refer to such problems as
“embarrassingly parallel” (although Stephen Toub of Microsoft suggests “delightfully parallel”!) in that
they are very well-suited for the benefits of parallelization.
(Ref: Apress.Introducing.dot.NET.4.0.with.Visual.Studio.2010.Feb.2010)book

I Try to Show Deference between Serialized and Parallel functions

download Source code
By Usama Wahab Khan

share this post
Share to Facebook Share to Twitter Share to Google+ Share to Stumble Upon Share to Evernote Share to Blogger Share to Email Share to Yahoo Messenger More...