1 / 21

Visual Studio 2010 and .NET Framework 4 Training Workshop

Visual Studio 2010 and .NET Framework 4 Training Workshop. Parallel Computing for Managed Developers. Name Title Organization Email. Objectives. Understand the importance of the “parallel computing shift ”

Download Presentation

Visual Studio 2010 and .NET Framework 4 Training Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Studio 2010and.NET Framework 4Training Workshop

  2. Parallel ComputingforManaged Developers Name Title Organization Email

  3. Objectives • Understand the importance of the “parallel computing shift” • Understand the technologies introduced in the .NET Framework 4 that are easing this transition

  4. “I used to think that cyberspace was fifty years away. What I thought was fifty years away, was only ten years away. And what I thought was ten years away... it was already here. I just wasn't aware of it yet.” - Bruce Sterling

  5. Baby Names

  6. “Moore’s Law scaling should easily let us hit the 80-core mark in mainstream processors within the next ten years and quite possibly even sooner.” - Justin Ratner, CTO, Intel

  7. Letting the brightest developers solve business problems, not concurrency problems. “Concurrency for the masses” The Parallel Computing Initiative

  8. Concurrency Landscape For Visual Studio 2010 and the .NET Framework 4… System.Threading Parallel Extensions Unified Cancellation Model

  9. New System.Threading Primitives A Barrier is a synchronization primitive that enforces the stopping of execution between a number of threads or processes at a given point and prevents further execution until all threads or processors have reached the given point. A CountdownEvent is a synchronization primitive that enables ongoing tracking of a given workload in order to determine if processing of that workload is finished or not. YUCK!

  10. Barrier “Let’s all caravan over to Seattle! We’ll meet at the gas station and leave from there.” - Charlie Dennis Mac Barrier Charlie Gas Station Seattle

  11. Unified Cancellation Cancellation Token Source “Sir, we are ready to seat you…” - Hostess Cancellation Token

  12. System.Threading and the new Unified Cancellation Model

  13. Parallel Extensions is a .NET Library that supports declarative and imperative data parallelism, imperative task parallelism, and a set of data structures that make coordination easier. Parallel LINQ (PLINQ) Task Parallel Library (TPL) Coordination Data Structures (CDS)

  14. From Threads To Tasks

  15. “Work Stealing” in Action Worker Thread 1 Worker Thread p Program Thread Task 3 Task 1 Task 4 Task 5 Task 2

  16. Parallel Static Class When program statements are independent… …they can be parallelized StatementA(); StatementB(); StatementC(); Parallel.Invoke( () => StatementA(), () => StatementB(), () => StatementC() );

  17. Parallel Static Class

  18. PLINQ Parallel LINQ (PLINQ) enables developers to easily leverage manycore with a minimal impact to existing LINQ programming model var q = from p in people         where p.Name == queryInfo.Name && p.State == queryInfo.State && p.Year >= yearStart && p.Year <= yearEnd orderbyp.Year ascending         select p; .AsParallel()

  19. PLINQ

  20. Recap For Visual Studio 2010 and the .NET Framework 4.0… System.Threading Parallel Extensions Unified Cancellation Model

More Related