Parallel Programming for Managed Developers with Visual Studio 2010 .


53 views
Uploaded on:
Category: Animals / Pets
Description
Visual Studio 2010 Tools/Programming Models/Runtimes. . Parallel Pattern Library. . Asset Manager. Undertaking Scheduler. Assignment Parallel Library. PLINQ. Overseen Library. Local Library. Key:. . Strings. Working System. Simultaneousness Runtime. Programming Models. AgentsLibrary. ThreadPool. Errand Scheduler.
Transcripts
Slide 1

TL26 Parallel Programming for Managed Developers with Visual Studio 2010 Daniel Moth  Parallel Computing Platform Microsoft Corporation http://www.danielmoth.com/Blog

Slide 2

Visual Studio 2010 Tools/Programming Models/Runtimes Integrated Tooling Programming Models Programming Models PLINQ Parallel Debugger Toolwindows Task Parallel Library Parallel Pattern Library Agents Library Data Structures Concurrency Runtime Concurrency Runtime Data Structures Task Scheduler Profiler Concurrency Analysis ThreadPool Task Scheduler Resource Manager Resource Manager Operating System Threads Key: Managed Library Native Library Tools

Slide 3

demo What a distinction many centers make on the customer

Slide 4

AGENDA Set the scene Fine-Grained Parallelism 3. Debugger Support Structured Parallelism Declarative Data Parallelism

Slide 5

Threading/Concurrency - > Parallelism On Single Core Machine Don\'t obstruct the UI Thread Affinity Async Operations Synchronization Issues On Multi-center Machine As above... ... furthermore Improve Actual Performance ... additionally make new client encounters

Slide 6

demo From Thread-based to Task - based programming model

Slide 7

User Mode Scheduler CLR Thread Pool Global Queue Worker Thread 1 Worker Thread p … Program Thread

Slide 8

User Mode Scheduler For Tasks CLR Thread Pool: Work-Stealing Local Queue Local Queue Global Queue … Worker Thread 1 Worker Thread p … Task 6 Task 3 Task 4 Task 1 Program Thread Task 5 Task 2

Slide 9

demo Task: Rich API

Slide 10

Task-based Programming Summary ThreadPool .QueueUserWorkItem (… ); System.Threading.Tasks Continue/Wait/Cancel Task t = Task .StartNew (… ); Task p = t.ContinueWith (… ); t.Wait (2000 ); t.Cancel (); Starting Task .StartNew (… ); Tasks with results Parent/Child var p = Task .StartNew (() => { var t = Task .StartNew (… ); }); var f = Future .StartNew (() => C()); … int result = f.Value ;

Slide 11

AGENDA CHECKPOINT Set the scene Fine-Grained Parallelism 3. Debugger Support Structured Parallelism Declarative Data Parallelism

Slide 12

demo New Debug ger toolwindows

Slide 13

Debugger Support both oversaw and local Parallel Tasks Parallel Stacks Also underpins customary threading

Slide 14

AGENDA CHECKPOINT Set the scene Fine-Grained Parallelism 3. Debugger Support Structured Parallelism Declarative Data Parallelism

Slide 15

Structured Parallelism Parallel class static (over-burden) strategies assistant techniques to make/work with Tasks epitomizes regular examples

Slide 16

demo Parallel .Invoke/ForEach

Slide 17

AGENDA CHECKPOINT Set the scene Fine-Grained Parallelism 3. Debugger Support Structured Parallelism Declarative Data Parallelism

Slide 18

Declarative Data Parallelism Parallel LINQ-to-Objects (PLINQ) Enables LINQ devs to use different centers Fully bolsters all .NET standard question administrators Minimal effect to existing LINQ show var q = from p in individuals         where p.Name == queryInfo.Name && p.State == queryInfo.State && p.Year >= yearStart && p.Year <= yearEnd orderby p.Year climbing         select p; . AsParallel ()

Slide 19

demo P arallel LINQ

Slide 20

AGENDA CHECKPOINT Set the scene Fine-Grained Parallelism 3. Debugger Support Structured Parallelism Declarative Data Parallelism

Slide 21

Coordination Data Structures Thread-safe accumulations ConcurrentStack <T> ConcurrentQueue <T> ConcurrentDictionary < TKey,TValue > Work trade BlockingCollection <T> IProducerConsumerCollection <T> Initialization LazyInit <T> Phased Operation CountdownEvent Barrier Locks ManualResetEventSlim SemaphoreSlim SpinLock SpinWait

Slide 22

Summary Framework 4.0 Task Parallel Library Task + User Mode Work Stealing Scheduler Parallel.Invoke/For/ForEach Parallel LINQ Coordination Data Structures Debugger toolwindows Parallel Tasks Parallel Stacks Parallel Performance Analyzer (see TL19) Visual Studio 2010 & Embrace Parallelism and Create New Experiences

Slide 23

Parallel Computing @ PDC2008 Monday (watch them on video) Microsoft Visual Studio: Bringing out the Best in Multicore Systems Parallel Programming for C++ Developers in the Next Version of Microsoft Visual Studio Later Today ( 1:15 PM – 2:30 PM ) Concurrency Runtime Deep Dive: How to Harvest Multicore Computing Resources Thursday Symposium (8:30 AM – 1:30 PM) Addressing the Hard Problems of Concurrency Parallel Computing Application Architectures and Opportunities Future of Parallel Computing (Panel)

Slide 24

Parallel Computing Resources Downloads, Binaries, Code, Forums, Blogs, Videos, Screencasts , Podcasts, Articles, Samples Visual Studio 2010 CTP on your PDC drive http://msdn.com/simultaneousness

Slide 25

Evals & Recordings Please round out your assessment for this session at: This session will be accessible as a recording at: www.microsoftpdc.com

Slide 26

Q & A Please utilize the receivers gave

Slide 27

© 2008 Microsoft Corporation. All rights held. Microsoft, Windows, Windows Vista and other item names are or might be enrolled trademarks or potentially trademarks in the U.S. as well as different nations. The data thus is for educational purposes just and speaks to the present perspective of Microsoft Corporation as of the date of this introduction. Since Microsoft must react to changing economic situations, it ought not be translated to be a promise with respect to Microsoft, and Microsoft can\'t ensure the precision of any data gave after the date of this introduction. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Slide 28

MSFT Parallel Computing Technologies Task Concurrency IFx/CCR Robotics-based assembling sequential construction system Silverlight Olympics watcher Automotive control framework Internet –based photograph administrations WCF Maestro TPL/PPL WF Local Computing Distributed/Cloud Computing Ultrasound imaging gear Media encode/disentangle Image preparing/upgrade Data perception Enterprise look, OLTP, collab Animation/CGI rendering Weather determining Seismic observing Oil investigation Cluster SOA PLINQ D-PLINQ OpenMP TPL/PPL D-TPL MPI/MPI.Net CDS Data Parallelism

Slide 29

Comprehensive View Of Concurrency Task Parallel Library Parallel Pattern Library OpenMP , Cluster SOA Coordination Data Structures Transactional Memory PLINQ MPI, MPI.net, CCR Native Agents and Messaging Maestro

Recommended
View more...