Presentation is loading. Please wait.

Presentation is loading. Please wait.

Virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India.

Similar presentations


Presentation on theme: "Virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India."— Presentation transcript:

1 virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India

2  What and Why of Parallelism  Threading: From There to Now  Exploring The Task Parallel Library (TPL)  Quick introduction Task Factories and Task Schedulers and why we need them?  Diagnostics tools in Visual Studio 2010  Summary  Q&A virtual techdays INDIA │ 9-11 February 2011 S E S S I O N A G E N D A

3  What is Parallelism?  The ability to run multiple tasks in Parallel without really worrying about the underlying synchronization and management of threads  Why do we need it?  Computers have evolved from single core to multiple cores  Software needs to take advantage of this  Splitting larger jobs in smaller chunks (across cores) increasing performance and scalability together virtual techdays INDIA │ 9-11 February 2011 What and Why of Parallelism

4  Scenario 1:  There: Threading but not Threading  Windows Messaging technique  Scenario 2:  There: Threading for Performance  Scenario 3:  Now: Threading with managed synchronization  ThreadPool  Scenario 4:  Now! Tasks across cores!  Imperative Task Parallelism: System.Threading.Tasks  Imperative Data Parallelism: Parallel.For, Parallel.ForEach  Declarative Data Parallelism: PLINQ (AsParallel) virtual techdays INDIA │ 9-11 February 2011 Threading: From There to Now

5 virtual techdays INDIA │ 9-11 February 2011 Parallel Programming Architecture

6  Set of Public Types and APIs in  System.Threading  System.Threading.Tasks  Enables scalability by leveraging multiple cores  TPL:  Handles work partitioning  Thread Scheduling (ThreadPool)  Cancellation support  State Management virtual techdays INDIA │ 9-11 February 2011 Exploring the Task Parallel Library (TPL)

7  Imperative Task Parallelism  Create and run tasks implicitly using Parallel.Invoke  Explicitly using Tasks objects  Imperative Data Parallelism  Parallel.For and Parallel.ForEach loops  Declarative Data Parallelism  PLINQ virtual techdays INDIA │ 9-11 February 2011 Components of TPL

8  Task Factories  Exists in Task.TaskFactory in System.Threading  Creates Task Objects which can be started immediately  Manage Task Waits– Task continuation  Use for TPL with classic Async Programming models  Task Schedulers  Exists in Task.TaskScheduler in System.Threading  Ensures that Tasks complete  Based on ThreadPool virtual techdays INDIA │ 9-11 February 2011 Quick introduction Task Factories and Task Schedulers and why we need them?

9  New Windows in Debugger:  Parallel Tasks  Parallel Stacks virtual techdays INDIA │ 9-11 February 2011 Visual Studio 2010 support for Parallelism

10 virtual techdays INDIA │ 9-11 February 2011 RESOURCES  Parallel Computing Resources on MSDN  http://msdn.microsoft.com/en-us/concurrency/default http://msdn.microsoft.com/en-us/concurrency/default

11 virtual techdays THANKS │ 9-11 February 2011 paragp@microsoft.com │ blogs.msdn.com/parag


Download ppt "Virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India."

Similar presentations


Ads by Google