Parallel Programming in Visual Studio 2010: MSDN Event Deck and Demos
A couple of days ago I delivered a session on Parallel Programming in Visual Studio 2010 at the Microsoft offices in Raanana.
The deck and code will appear on the official website (of Israel MSDN Events) shortly, but for now you can download them from my SkyDrive:
This session complements my earlier session on Concurrent Programming fundamentals, in which I provided a theoretical overview of some of the architectural and implementation issues in modern concurrent applications.
In this session, I focused on code and demos—I wanted to show off the Microsoft offering for parallel programming in managed code, specifically in Visual Studio 2010 (with .NET Framework 4.0).
The slides might not be of much value if you haven’t attended the session, but do take a look at the demos. Here are some of the things I showed:
- Explicit creation of Task objects for parallelization
- Linking tasks in parent-child relationships and cancellation propagation
- Continuation of tasks (forming task component chains)
- Implicit parallelization of loops using Parallel.ForEach and Parallel.For
- Custom partitioning of data for dynamic iteration using Parallel.ForEach
- Parallel LINQ (PLINQ) with ordering and cancellation
- Synchronization using SpinLock vs. Monitor and using thread-local state in an implicit parallel loop
- Producer-consumer using ConcurrentQueue
- Creating Tasks out of APM constructs (specifically on top of FileStream.BeginRead/EndRead, FileStream.BeginWrite/EndWrite)
- Debugging parallel applications in Visual Studio 2010 with the Parallel Tasks and Parallel Stacks tool windows
- Profiling parallel applications using the new Visual Studio 2010 “Concurrency” profiler mode