Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Parallel Programming In Visual Studio 2010

1,573 views

Published on

  • Be the first to comment

  • Be the first to like this

Parallel Programming In Visual Studio 2010

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

×