In my Parallel Programming blog series this week, we’ve looked at:
I want to conclude by frantically listing some other parallel support that I didn’t have time to tell you in a week. :) And this is *not* an all-inclusive list!
Thread Pool Improvements
The parallel computing team at Microsoft have made some wicked-cool improvements and optimizations to the Thread Pool, including using work-stealing local queues. I’ve described them in an earlier blog post.
Concurrent Collection Classes
Various Sync Primitives
Some other random cool classes that support parallelism in .NET 4.0 are:
- Partitioner – provides common partitioning strategies
- Lazy – provides thread-safe support for lazy initialization
- AggregateException – bundles together multiple exceptions (which may be thrown from different threads executing in parallel) into a single exception
- Locks and fun stuff: SpinLock, SpinWait, SemaphoreSlim, ManualResetEventSlim
Support for Native Development
Being a .NET girl myself, I’ve focused on the managed code parallel computing support this week. However, there is a ton of support for native code (C++) development in the form of the Concurrency Runtime. A good starting point to learn about this is http://msdn.microsoft.com/en-us/library/dd504870.aspx.
If you’re into parallel computing, you should keep an eye on these great sites:
- Parallel Computing Developer Center: http://msdn.com/concurrency
- MSDN Documentation: http://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx
- The Parallel samples that I’ve been referencing all week: http://code.msdn.microsoft.com/ParExtSamples (click the Downloads tab)
- MSDN Forums for Parallel: http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/threads
- The Managed Code Parallelism team blog: http://blogs.msdn.com/pfxteam (the great Stephen Toub blogs here)
- The Native Code Parallelism team blog: http://blogs.msdn.com/nativeconcurrency
- The Parallelism Tools team blog: http://blogs.msdn.com/visualizeparallel
- The Parallel Programming information on my blog: http://blogs.msdn.com/b/jennifer/archive/tags/parallel+programming/
In conclusion, parallel programming really should matter to you as a software developer. Moore’s Law (“The number of transistors in a chip will double every 2 years”) has reached a limit due to the amount of heat generated by that many transistors. Therefore, the way to gain faster performance is shifting from building faster cores to building multiple cores. We as software developers need to understand how to design and write code to take advantage of those multiple cores. The support in .NET 4.0 for parallelism will hopefully make this process easier.