Parallel Programming in .NET 4.0 - Part 1
This is the series of articles which focuses on new Parallel Programming concepts introduction and existing System.Threading namespace enhancements in .NET Framework 4.0. These series of article will bring in depth coverage of the Parallel Programming in .NET 4.0 and we can make use of it our day-to-day development activity. It will have working samples as attachment and code snippets as well for better understanding of Parallel Programming.
This is the series of artciles which focuses on new Parallel Programming concepts introduction and existing System.Threading namespace enhancements in .NET Framework 4.0
Why Parallel Programming?
We have multi core processors in today's world. Are we really using them? We still focused on Sequential Programming. Yes. It's true. Newer processors processes faster compared to the older processors. However, only one core will be used for the processing and rest of core sits idle when you run the sequential program. Everyone in today's world goes for Dual Core and some go for Quad Core. If we are not using those cores, then there is no point in owning these many cores. Right? If we continue to program the same sequential way, then our performance will be flatter. There won't be an increase in the performance of the applications. There is a possibility that performance will decrease a bit as many cores are introduced that each are just a little less powerful than their predecessors (for less power consumption, less heat dissapation, etc.). Cleary, new tools for us developers to write applications with are necessary. Most of the Processor manufacturing companies are inclined towards having more and more cores where developers can make use of it. Unfortunately, we are not using them to the fullest.
Parallel Programming in .NET 4.0
Microsoft realized it and it wants to make the developers to make use of multi core their programming. Yes. You are right. They had Threading before has well. What's new in .NET Framework 4.0 on this threading? Developers used to got to their backfoot when they want to work on the Multi Threaded Applications. Everyone knows there are lots of issues that needs to be handled when we go for multithreading like thread abortion, thread joining, thread to thread communication. Everyone knows it's not the easies of all tasks.
Microsoft thought about it and came wit new features which supports Parallel Programming and easier for the implementation. MS don't want the brigthest developer to spend time and scratch their heads in threading application instead of focusing on the business requirement implementation.
VS 2010 and .NET Framework 4.0
There are 3 Primary improvements in VS 2010 and .NET Framework 4.0. They are
1. System.Threading improvements
2. Introduction of Parallel Extensions
3. New Unified Cancellation Model
For the people in .NET 3.5
If you want to explore a bit on Parallel Programming, you may need to download the Reactive Extensions for .NET Framework 3.5 SP1. Microsoft released it as a separate downloadable. You won't be able to find it when you install you VS 2008 and .NET Framework 3.5 with SP1. However, one thing to remember is, Microsoft doesn't give any support for 3.5 Reactive Extensions as it's only experimental. You can downoad it from the following location Reactive Extensions for .NET Framework
In next part of this, we will cover about Barrier and System.Threading.CountdownEvent
Parallel programming in . NET Framework 4.0
http://www.enterra-inc.com/techzone/parallel-programming-in-net-framework-4-0/