170 likes | 310 Views
Parallel Programming in Visual Studio 2010. Sasha Goldshtein Senior Consultant, Sela Group http://blogs.microsoft.co.il/blogs/sasha. Agenda. Overview and Roadmap Architecture, Design Patterns Explicit and Implicit Parallelism Synchronization Mechanisms Coordination Data Structures
E N D
Parallel Programming in Visual Studio 2010 Sasha Goldshtein Senior Consultant, Sela Group http://blogs.microsoft.co.il/blogs/sasha
Agenda • Overview and Roadmap • Architecture, Design Patterns • Explicit and Implicit Parallelism • Synchronization Mechanisms • Coordination Data Structures • Debugging and Profiling • Other Technologies
Overview and Roadmap Framework 4.0 Visual Studio 2010 & • Shipping in .NET 4.0 • Task Parallel Library • Parallel LINQ • Task Scheduler • Shipping in Visual Studio 2010 • Debugging and profiling enhancements • Don’t forget the native tools (ConcRT) • Disclaimer: This is Beta software
Architecture • Pipeline • Partitioning • Grid
Explicit Parallelism • Task.Factory.StartNew • Parent-child relationships • Continuations • Futures • Exception handling • Cancellation
Implicit Parallelism • Parallel.For, Parallel.ForEach • Parallel.Invoke • Custom partitioner
Very Implicit Parallelism • Parallel LINQ • Ordered vs. Unordered • foreach vs. ForAll • Cancellation
Synchronization Mechanisms • Barrier • CountdownEvent • ManualResetEventSlim • SemaphoreSlim • SpinLock • SpinWait • Lazy initialization
Coordination Data Structures • Lock-free data structures • Concurrent queue • Concurrent stack, dictionary • Concurrent bag (work-stealing) • ThreadLocal<T>
Concurrency Design Patterns • Worker patterns • Producer-consumer (BlockingCollection<T>) • Completion port / thread pool (Task) • Automatic pipelining / partitioning • APM coordination (Task.Factory.FromAsync) • Smart collections patterns • Safe/unsafe, read/write • Cyclic buffer
Debugging in Visual Studio 2010 • Parallel Stacks • Parallel Tasks
Profiling in Visual Studio 2010 • Core utilization • Thread blocking, Thread migration
Incubation and Other Technologies • STM.NET • Axum (ex. Maestro) • CHESS • Windows 7 256-core support • Windows 7 User-Mode Scheduler
Summary • The next generation parallel technologies and tools are here • Download Visual Studio 2010 Beta 1
Additional Resources • msdn.com/concurrency • code.msdn.microsoft.com/ParExtSamples • msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx • channel9.msdn.com/tags/Parallel+Extensions/
Thank You! Sasha Goldshtein Senior Consultant, Sela Group http://blogs.microsoft.co.il/blogs/sasha