Stephen Toub Senior Program Manager Lead Microsoft Session Code: DTL203.

Slides:



Advertisements
Similar presentations
Parallel Performance Tools in Visual Studio 2010.
Advertisements

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
System.Threading.Tasks Task Represents an asynchronous operation Supports waiting, cancellation, continuations, … Parent/child relationships 1 st -class.
Stephen Toub Parallel Computing Platform Microsoft Corporation.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Steve Teixeira Principal Product Unit Manager Parallel Developer Tools Microsoft Corporation.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Robert LevyDoug Kramer Program ManagerDevelopment Lead DTL337.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Samantha Durante Program Manager Microsoft Corporation WUX305.
announcing Dev Manager Do I understand what we’ve built? Developer Can I bet on using this shared component? Testers What’s changed since I last.
Chris Menegay VP of Consulting Notion Solutions, Inc. DTL319.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Ram Cherala Principal Program Manager Microsoft Corporation DTL320.

Dmitry Sotnikov New Product Research Manager Quest Software DTL404.
customer.
Mickey Gousset Senior Technical Developer Infront Consulting Group Session Code: DTL330.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Parallel Pattern Library Resource Manager Task Scheduler Task Parallel Library Task Parallel Library Parallel LINQ Managed Native Key: Threads Operating.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Rabi Satter Sr. Program Manager Microsoft Corporation DTL301.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
Jonathan Aneja Program Manager Microsoft Corporation Session Code: DTL336 Anders Hejlsberg Technical Fellow Microsoft Corporation.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

Mark Michaelis Chief Computer Nerd IDesign/Itron/IntelliTechture DTL313.
Scott Morrison Program Manager Microsoft Corporation Session Code: WUX308.
MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
How We Do Language Design at Microsoft (C#, Visual Basic, F#)
Tech·Ed North America /18/2018 2:05 PM
Tech·Ed North America /19/2018 3:29 PM
Tech·Ed North America /7/2018 2:58 PM
9/11/2018 5:53 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Tech·Ed North America /14/2018 7:13 PM
Microsoft Visual Studio IDE Futures
Tech·Ed North America /19/ :44 PM
11/22/2018 8:05 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Jason Zander Unplugged
Title of Presentation 12/2/2018 3:48 PM
Brian Keller Sr. Technical Evangelist Microsoft Session Code: DEV310
12/5/2018 3:24 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
F# for Parallel and Asynchronous Programming
Tech·Ed North America /8/ :16 PM
Tech·Ed North America /17/2019 1:47 AM
Tech·Ed North America /17/2019 6:01 PM
Brian Keller Sr. Technical Evangelist Microsoft Session Code: DEV310
2/16/2019 8:43 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Peter Provost Sr. Program Manager Microsoft Session Code: DEV312
Building Silverlight Apps with RIA Services
Using Windows Runtime and SDK to build Metro style apps
IE11’s Developer Tools, F12, just got nicer (again)
Tech Ed North America /12/2019 6:45 AM Required Slide
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
A Lap Around Internet Explorer 9 For Developers
2010 Microsoft BI Conference
Tech·Ed North America /25/ :53 PM
Hack-proofing your Clients using Windows 7 Security!
Jason Zander Unplugged
5/1/2019 3:29 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Lap Around the Windows Azure Platform
Code First Development in Microsoft ADO.NET Entity Framework 4.1
Title of Presentation 5/24/2019 1:26 PM
7/5/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Tech·Ed North America /17/2019 4:14 PM
Presentation transcript:

Stephen Toub Senior Program Manager Lead Microsoft Session Code: DTL203

Agenda Why Parallelism, Why Now? Today’s difficulties Tomorrow’s solutions Demos along the way

Moore’s Law “The number of transistors incorporated in a chip will approximately double every 24 months.” Gordon Moore – Intel

Moore’s Law: Alive and Well? More than 1 billion transistors in 2006! More than 1 billion transistors in 2006! The number of transistors doubles every two years… ,000 10,000

Moore's Law: Feel the Heat 10 Watts 100 Watts Watts 12 Watts 20 Watts 52 Watts 81 Watts 110 Watts 150 Watts

Moore's Law: But Different 1 GHz 10 GHz MHz 600 MHz 2 GHz 3 GHz 3.6 GHz 3.8 GHz 1 GHz Frequencies will NOT get much faster! Maybe 5 to 10% every year or so, a few more times… And these modest gains would make the chips LOTS hotter!

Hardware Paradigm Shift “… we see a very significant shift in what architectures will look like in the future... fundamentally the way we've begun to look at doing that is to move from instruction level concurrency to … multiple cores per die. But we're going to continue to go beyond there. And that just won't be in our server lines in the future; this will permeate every architecture that we build. All will have massively multicore implementations.” Intel Developer Forum, Spring 2004 Pat Gelsinger Chief Technology Officer, Senior Vice President Intel Corporation February, 19, ,000 1, ‘70‘80‘90‘00‘10 Power Density (W/cm 2 ) Pentium ® processors Hot Plate Nuclear Reactor Rocket Nozzle Sun’s Surface Intel Developer Forum, Spring Pat Gelsinger Today’s Architecture: Heat becoming an unmanageable problem! Many-core Peak Parallel GOPs Single Threaded Perf 10% per year To Grow, To Keep Up, We Must Embrace Parallel Computing GOPS 32,768 2, Parallelism Opportunity 80X Disruption & Opportunity

The Manycore Shift “[A]fter decades of single core processors, the high volume processor industry has gone from single to dual to quad-core in just the last two years. 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 less.” -- Justin Rattner, CTO, Intel (February 2007)Justin Rattner “If you haven’t done so already, now is the time to take a hard look at the design of your application, determine what operations are CPU-sensitive now or are likely to become so soon, and identify how those places could benefit from concurrency.” -- Herb Sutter, C++ Architect at Microsoft (March 2005)Herb Sutter

I'm convinced… now what? Multithreaded programming is “hard” today Doable by only a subgroup of senior specialists Parallel patterns are not prevalent, well known, nor easy to implement So many potential problems Businesses have little desire to “go deep” Best devs should focus on business value, not concurrency Need simple ways to allow all devs to write concurrent code

Example: “Race Car Drivers” IEnumerable drivers =...; var results = new List (); foreach(var driver in drivers) { if (driver.Name == queryName && driver.Wins.Count >= queryWinCount) { results.Add(driver); } results.Sort((b1, b2) => b1.Age.CompareTo(b2.Age));

Manual Parallel Solution IEnumerable drivers = …; var results = new List (); int partitionsCount = Environment.ProcessorCount; int remainingCount = partitionsCount; var enumerator = drivers.GetEnumerator(); try { using (var done = new ManualResetEvent(false)) { for(int i = 0; i < partitionsCount; i++) { ThreadPool.QueueUserWorkItem(delegate { while(true) { RaceCarDriver driver; lock (enumerator) { if (!enumerator.MoveNext()) break; driver = enumerator.Current; } if (driver.Name == queryName && driver.Wins.Count >= queryWinCount) { lock(results) results.Add(driver); } if (Interlocked.Decrement(ref remainingCount) == 0) done.Set(); }); } done.WaitOne(); results.Sort((b1, b2) => b1.Age.CompareTo(b2.Age)); } finally { if (enumerator is IDisposable) ((IDisposable)enumerator).Dispose(); }

LINQ Solution var results = from driver in drivers where driver.Name == queryName && driver.Wins.Count >= queryWinCount orderby driver.Age ascending select driver;

Visual Studio 2010 Tools/Programming Models/Runtimes Parallel Pattern Library Resource Manager Task Scheduler Task Parallel Library Task Parallel Library Parallel LINQ Managed Native Key: Threads Operating System Concurrency Runtime Programming Models ThreadPool Task Scheduler Resource Manager Data Structures Tools Tooling Parallel Debugger Tool Windows Parallel Debugger Tool Windows Profiler Concurrency Analysis Profiler Concurrency Analysis Agents Library UMS Threads.NET Framework 4 Visual C++ 10 Visual Studio IDE Visual Studio IDE Windows

What Can I Do with These Cores Offload Free up your UI Go faster whenever you can Parallelize the parallelizable Do more Use more data to get better results Add more features Speculate Prefetch, Preprocess Multiple solutions

Amdahl’s Law Maximum speedup: Sk – speed-up factor for portion k Pk – percentage of instructions in portion k that can parallelized Simplified: P – percentage of instructions that can be parallelized N – number of processors

Amdahl by Example Theoretical maximum speedup determined by amount of sequential code

Gustafson’s Law Reevaluating Amdahl's Law P – number of processors α – the non-parallelizable part of the process S – percentage of parallelizable instructions Paraphrased “Don’t consider a fixed problem size, consider what can be done within a fixed time period” Do more stuff in the same time

Takeaways The “Manycore Shift” is happening Parallelism in your code is inevitable Visual Studio 2010 can help Platform.NET Framework 4.0 Visual C++ 10 Tooling Debugging Profiling Beta available soon! This is just the beginning…

Related Content Breakout Sessions DTL203 The Manycore Shift: Making Parallel Computing Mainstream DTL329 Parallel Computing APIs with the Microsoft.NET Framework 4.0 DTL310 Parallel Computing with Native C++ in Microsoft Visual Studio 2010 DTL309 Busy Microsoft.NET Developer's Guide to F# DTL303 A Whirlwind Tour of the Microsoft.NET Framework 4.0 WSV317 New NUMA Support with Windows 7 and Windows Server 2008 R2 Interactive Theater Sessions DTL06-TLC Task-Based Parallel Programming with the Microsoft.NET Framework 4.0 Hands-on Labs DTL11-HOL Parallel Extensions: Building Multicore Applications with the Microsoft.NET Framework

DTL Track Resources Visit the DPR TLC for a chance to win a copy of Visual Studio Team Suite. Daily drawing occurs every day in the TLC at 4:15pm. Stop by for a raffle ticket. Please visit us in the TLC blue area

Sessions On-Demand & Community Resources for IT Professionals Resources for Developers Microsoft Certification and Training Resources Microsoft Certification & Training Resources Resources

Complete an evaluation on CommNet and enter to win!

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.