SlideShare a Scribd company logo
1 of 34
Parallel Extensions to the .NET Framework Mike Taulty Developer & Platform Group Microsoft Ltd [email_address]   http://www.mtaulty.com  (/DevWeek.zip)
“ You are here” Visual Studio 2010 ... ... ... ... Parallel Pattern Library & Concurrency Runtime Debugging Enhancements .NET Framework V4.0 ... ... ... Parallel Extensions to .NET Parallel Computing Initiative ( First Deliverables )
Today’s Processors £100 - £300 2-3GHz 2 cores or 4 64-bit Core Core
Tomorrow’s Processors Core Core Core Core £200 - £500 2-3GHz 4 cores with HT 64-bit QuickPath Interconnect Memory Controller
Where we are heading... Unisys ES7000 (7600R) used with kind permission of Mr Henk var der Valk, Unisys, NL
Are we equipped to get there? Windows OS App 1 App 2 ... App 1 .NET CLR .NET Framework My Code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A Pretend Scenario
Parallel Extensions to .NET System.Threading System.Collections.Concurrent System.dll System.Linq System.Linq.Parallel System.Core.dll System.Threading.Tasks System.Threading System.Collections.Concurrent System.Threading.Internal mscorlib.dll
Parallel Extensions to .NET .NET ThreadPool V4.0 Coordination Data  Structures Task Parallel Library Parallel LINQ ( PLINQ )
Parallel Extensions to .NET .NET ThreadPool V4.0 Task Parallel Library Parallel LINQ ( PLINQ ) Coordination Data  Structures
Co-ordination Data Structures SpinLock ManualResetEventSlim SemaphoreSlim CountdownEvent LazyInit <T> SpinWait BlockingCollection<T> Barrier ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> LazyInitField<T>
Co-ordination Data Structures SpinLock ManualResetEventSlim SemaphoreSlim CountdownEvent LazyInit <T> SpinWait BlockingCollection<T> Barrier ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> LazyInitField<T> * Some more detail on hidden slides in slide-deck
Co-ordination Data Structures SpinLock SpinWait ,[object Object],[object Object],[object Object],[object Object]
Co-ordination Data Structures BlockingCollection<T> ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Co-ordination Data Structures ManualResetEventSlim SemaphoreSlim ,[object Object],[object Object],[object Object],[object Object]
Co-ordination Data Structures LazyInit <T> LazyInitField<T> ,[object Object],[object Object],[object Object]
Co-ordination Data Structures SpinLock ManualResetEventSlim SemaphoreSlim CountdownEvent LazyInit <T> SpinWait BlockingCollection<T> Barrier ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> LazyInitField<T>
Co-ordination Data Structures
Parallel Extensions to .NET Coordination Data  Structures .NET ThreadPool V4.0 Parallel LINQ ( PLINQ ) Task Parallel Library
Task Parallel Library ( TPL ) Key Classes
Task Topics
Task
Scheduling Tasks TaskScheduler Task ThreadPoolTaskScheduler SynchronizationContext TaskScheduler Custom QueueTask(Task t)
Default Scheduling .NET ThreadPool ( with V4.0 modifications ) … Thread Thread Thread Work Item Work Item Work Item Work Item Thread’s Work Queue Thread’s Work Queue Thread’s Work Queue Work Item Work Item Work Item Global Work Queue
Task  Exotica ( knobs to tweak )
Side-Bar: the Self-Replicating Task .NET ThreadPool ( with V4.0 modifications ) … ThreadPool Heuristics: Inject another thread? Thread Task Thread’s Work Queue Thread Thread’s Work Queue Thread Thread’s Work Queue Global Work Queue Copy 1 Copy 2
Higher Level Constructs in TPL ,[object Object],[object Object],[object Object],[object Object],[object Object]
Parallel.Invoke, ForEach, For
Parallel Extensions to .NET Coordination Data  Structures .NET ThreadPool V4.0 Task Parallel Library Parallel LINQ ( PLINQ )
Parallel LINQ ( PLINQ ) Select() Where() Etc. Extension method in System.LINQ Extends  IEnumerable<T> LINQ to Objects LINQ to XML not LINQ to SQL,EF Results in a  ParallelQuery<T> “ Usually” would be Enumerable
Parallel LINQ ( PLINQ ) IEnumerable<T> Could be IList<T> or Array Range Chunk Striped? Hash “ Where” “ Where” “ Where” “ OrderBy” “ OrderBy” “ OrderBy” “ Sum” “ Sum” “ Sum” Consumer( foreach … ) Merge Re-partition Task Task Task Query Query Query Partition
PLINQ
What Next? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
© 2008 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.

More Related Content

What's hot

TensorFlow.Data 및 TensorFlow Hub
TensorFlow.Data 및 TensorFlow HubTensorFlow.Data 및 TensorFlow Hub
TensorFlow.Data 및 TensorFlow HubJeongkyu Shin
 
Distributed Multi-device Execution of TensorFlow – an Outlook
Distributed Multi-device Execution of TensorFlow – an OutlookDistributed Multi-device Execution of TensorFlow – an Outlook
Distributed Multi-device Execution of TensorFlow – an OutlookSebnem Rusitschka
 
Concurrency & Parallel Programming
Concurrency & Parallel ProgrammingConcurrency & Parallel Programming
Concurrency & Parallel ProgrammingRamazan AYYILDIZ
 
Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...
Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...
Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...Intel® Software
 
Numba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPyNumba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPyTravis Oliphant
 
Buzzwords Numba Presentation
Buzzwords Numba PresentationBuzzwords Numba Presentation
Buzzwords Numba Presentationkammeyer
 
Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...
Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...
Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...Chris Fregly
 
Understanding Android Benchmarks
Understanding Android BenchmarksUnderstanding Android Benchmarks
Understanding Android BenchmarksKoan-Sin Tan
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Carlos Miguel Ferreira
 
C++ tutorial boost – 2013
C++ tutorial   boost – 2013C++ tutorial   boost – 2013
C++ tutorial boost – 2013Ratsietsi Mokete
 
Using SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with PythonUsing SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with PythonDavid Beazley (Dabeaz LLC)
 
XPath - A practical guide
XPath - A practical guideXPath - A practical guide
XPath - A practical guideTobias Schlitt
 
Numba: Flexible analytics written in Python with machine-code speeds and avo...
Numba:  Flexible analytics written in Python with machine-code speeds and avo...Numba:  Flexible analytics written in Python with machine-code speeds and avo...
Numba: Flexible analytics written in Python with machine-code speeds and avo...PyData
 
Get Your Hands Dirty with Intel® Distribution for Python*
Get Your Hands Dirty with Intel® Distribution for Python*Get Your Hands Dirty with Intel® Distribution for Python*
Get Your Hands Dirty with Intel® Distribution for Python*Intel® Software
 
Introduction to Tensorflow.js
Introduction to Tensorflow.jsIntroduction to Tensorflow.js
Introduction to Tensorflow.jsRiza Fahmi
 
The genesis of clusterlib - An open source library to tame your favourite sup...
The genesis of clusterlib - An open source library to tame your favourite sup...The genesis of clusterlib - An open source library to tame your favourite sup...
The genesis of clusterlib - An open source library to tame your favourite sup...Arnaud Joly
 

What's hot (20)

TensorFlow.Data 및 TensorFlow Hub
TensorFlow.Data 및 TensorFlow HubTensorFlow.Data 및 TensorFlow Hub
TensorFlow.Data 및 TensorFlow Hub
 
Distributed Multi-device Execution of TensorFlow – an Outlook
Distributed Multi-device Execution of TensorFlow – an OutlookDistributed Multi-device Execution of TensorFlow – an Outlook
Distributed Multi-device Execution of TensorFlow – an Outlook
 
Concurrency & Parallel Programming
Concurrency & Parallel ProgrammingConcurrency & Parallel Programming
Concurrency & Parallel Programming
 
Using Parallel Computing Platform - NHDNUG
Using Parallel Computing Platform - NHDNUGUsing Parallel Computing Platform - NHDNUG
Using Parallel Computing Platform - NHDNUG
 
Multiprocessing in python
Multiprocessing in pythonMultiprocessing in python
Multiprocessing in python
 
Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...
Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...
Accelerate Your Python* Code through Profiling, Tuning, and Compilation Part ...
 
Numba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPyNumba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPy
 
Buzzwords Numba Presentation
Buzzwords Numba PresentationBuzzwords Numba Presentation
Buzzwords Numba Presentation
 
Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...
Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...
Swift for TensorFlow - Tanmay Bakshi - Advanced Spark and TensorFlow Meetup -...
 
Understanding Android Benchmarks
Understanding Android BenchmarksUnderstanding Android Benchmarks
Understanding Android Benchmarks
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.
 
C++ tutorial boost – 2013
C++ tutorial   boost – 2013C++ tutorial   boost – 2013
C++ tutorial boost – 2013
 
Using SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with PythonUsing SWIG to Control, Prototype, and Debug C Programs with Python
Using SWIG to Control, Prototype, and Debug C Programs with Python
 
XPath - A practical guide
XPath - A practical guideXPath - A practical guide
XPath - A practical guide
 
Interfacing C/C++ and Python with SWIG
Interfacing C/C++ and Python with SWIGInterfacing C/C++ and Python with SWIG
Interfacing C/C++ and Python with SWIG
 
OpenMP And C++
OpenMP And C++OpenMP And C++
OpenMP And C++
 
Numba: Flexible analytics written in Python with machine-code speeds and avo...
Numba:  Flexible analytics written in Python with machine-code speeds and avo...Numba:  Flexible analytics written in Python with machine-code speeds and avo...
Numba: Flexible analytics written in Python with machine-code speeds and avo...
 
Get Your Hands Dirty with Intel® Distribution for Python*
Get Your Hands Dirty with Intel® Distribution for Python*Get Your Hands Dirty with Intel® Distribution for Python*
Get Your Hands Dirty with Intel® Distribution for Python*
 
Introduction to Tensorflow.js
Introduction to Tensorflow.jsIntroduction to Tensorflow.js
Introduction to Tensorflow.js
 
The genesis of clusterlib - An open source library to tame your favourite sup...
The genesis of clusterlib - An open source library to tame your favourite sup...The genesis of clusterlib - An open source library to tame your favourite sup...
The genesis of clusterlib - An open source library to tame your favourite sup...
 

Viewers also liked

Why you should consider Electronic Content Management in 2009
Why  you should consider Electronic Content Management in 2009Why  you should consider Electronic Content Management in 2009
Why you should consider Electronic Content Management in 2009shogsed
 
Enterprise Content Management in Microsoft SharePoint 2007
Enterprise Content Management in Microsoft SharePoint 2007Enterprise Content Management in Microsoft SharePoint 2007
Enterprise Content Management in Microsoft SharePoint 2007ukdpe
 
Lets manage our files
Lets manage our filesLets manage our files
Lets manage our filesJill Koppel
 
The World Needs an Alternative to SharePoint
The World Needs an Alternative to SharePointThe World Needs an Alternative to SharePoint
The World Needs an Alternative to SharePointAlfresco Software
 
14 tips for planning a ecm content migration to share point
14 tips for planning a ecm content migration to share point14 tips for planning a ecm content migration to share point
14 tips for planning a ecm content migration to share pointDocFluix, LLC
 
SharePoint Folders vs. Metadata
SharePoint Folders vs. MetadataSharePoint Folders vs. Metadata
SharePoint Folders vs. MetadataGregory Zelfond
 
SharePoint 5000 Item List view Threshold Checklist and Best Practices
SharePoint 5000 Item List view Threshold Checklist and Best PracticesSharePoint 5000 Item List view Threshold Checklist and Best Practices
SharePoint 5000 Item List view Threshold Checklist and Best PracticesGregory Zelfond
 
10 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/201010 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/2010Bobby Chang
 
What is a Content Management System or CMS
What is a Content Management System or CMSWhat is a Content Management System or CMS
What is a Content Management System or CMSSteve Williams
 
Document Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to MetadataDocument Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to MetadataGregory Zelfond
 
SharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesSharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesBobby Chang
 
CMS (CONTENT MANAGEMENT SYSTEM)
CMS (CONTENT MANAGEMENT SYSTEM)CMS (CONTENT MANAGEMENT SYSTEM)
CMS (CONTENT MANAGEMENT SYSTEM)Aaina Katyal
 

Viewers also liked (13)

Why you should consider Electronic Content Management in 2009
Why  you should consider Electronic Content Management in 2009Why  you should consider Electronic Content Management in 2009
Why you should consider Electronic Content Management in 2009
 
Enterprise Content Management in Microsoft SharePoint 2007
Enterprise Content Management in Microsoft SharePoint 2007Enterprise Content Management in Microsoft SharePoint 2007
Enterprise Content Management in Microsoft SharePoint 2007
 
Lets manage our files
Lets manage our filesLets manage our files
Lets manage our files
 
The World Needs an Alternative to SharePoint
The World Needs an Alternative to SharePointThe World Needs an Alternative to SharePoint
The World Needs an Alternative to SharePoint
 
14 tips for planning a ecm content migration to share point
14 tips for planning a ecm content migration to share point14 tips for planning a ecm content migration to share point
14 tips for planning a ecm content migration to share point
 
SharePoint Folders vs. Metadata
SharePoint Folders vs. MetadataSharePoint Folders vs. Metadata
SharePoint Folders vs. Metadata
 
SharePoint 5000 Item List view Threshold Checklist and Best Practices
SharePoint 5000 Item List view Threshold Checklist and Best PracticesSharePoint 5000 Item List view Threshold Checklist and Best Practices
SharePoint 5000 Item List view Threshold Checklist and Best Practices
 
10 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/201010 Reasons to Avoid Folders in SharePoint 2013/2010
10 Reasons to Avoid Folders in SharePoint 2013/2010
 
What is a Content Management System or CMS
What is a Content Management System or CMSWhat is a Content Management System or CMS
What is a Content Management System or CMS
 
Document Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to MetadataDocument Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to Metadata
 
SharePoint Permissions Worst Practices
SharePoint Permissions Worst PracticesSharePoint Permissions Worst Practices
SharePoint Permissions Worst Practices
 
[DE] Enterprise Content Management - Orientierung im Informationsdschungel | ...
[DE] Enterprise Content Management - Orientierung im Informationsdschungel | ...[DE] Enterprise Content Management - Orientierung im Informationsdschungel | ...
[DE] Enterprise Content Management - Orientierung im Informationsdschungel | ...
 
CMS (CONTENT MANAGEMENT SYSTEM)
CMS (CONTENT MANAGEMENT SYSTEM)CMS (CONTENT MANAGEMENT SYSTEM)
CMS (CONTENT MANAGEMENT SYSTEM)
 

Similar to MTaulty_DevWeek_Parallel

Parallel Extentions to the .NET Framework
Parallel Extentions to the .NET FrameworkParallel Extentions to the .NET Framework
Parallel Extentions to the .NET Frameworkukdpe
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnelukdpe
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009nkaluva
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthingtonoscon2007
 
Parallel Computing For Managed Developers
Parallel Computing For Managed DevelopersParallel Computing For Managed Developers
Parallel Computing For Managed DevelopersBala Subra
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Bruce Johnson
 
Parallel extensions in .Net 4.0
Parallel extensions in .Net 4.0Parallel extensions in .Net 4.0
Parallel extensions in .Net 4.0Dima Maleev
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒Toki Kanno
 
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingJava Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingTal Melamed
 
Lap around .net 4
Lap around .net 4Lap around .net 4
Lap around .net 4Abdul Khan
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Pythongturnquist
 
Ai dev world utilizing apache pulsar, apache ni fi and minifi for edgeai io...
Ai dev world   utilizing apache pulsar, apache ni fi and minifi for edgeai io...Ai dev world   utilizing apache pulsar, apache ni fi and minifi for edgeai io...
Ai dev world utilizing apache pulsar, apache ni fi and minifi for edgeai io...Timothy Spann
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
Streaming 101: Hello World
Streaming 101:  Hello WorldStreaming 101:  Hello World
Streaming 101: Hello WorldJosh Fischer
 
Understanding Framework Architecture using Eclipse
Understanding Framework Architecture using EclipseUnderstanding Framework Architecture using Eclipse
Understanding Framework Architecture using Eclipseanshunjain
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep JoshiSpiffy
 
SQL Server - CLR integration
SQL Server - CLR integrationSQL Server - CLR integration
SQL Server - CLR integrationPeter Gfader
 

Similar to MTaulty_DevWeek_Parallel (20)

Parallel Extentions to the .NET Framework
Parallel Extentions to the .NET FrameworkParallel Extentions to the .NET Framework
Parallel Extentions to the .NET Framework
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Parallel Computing For Managed Developers
Parallel Computing For Managed DevelopersParallel Computing For Managed Developers
Parallel Computing For Managed Developers
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
Parallel extensions in .Net 4.0
Parallel extensions in .Net 4.0Parallel extensions in .Net 4.0
Parallel extensions in .Net 4.0
 
支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒支撐英雄聯盟戰績網的那條巨蟒
支撐英雄聯盟戰績網的那條巨蟒
 
The State of Wicket
The State of WicketThe State of Wicket
The State of Wicket
 
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-TestingJava Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
Java Hurdling: Obstacles and Techniques in Java Client Penetration-Testing
 
LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
 
Lap around .net 4
Lap around .net 4Lap around .net 4
Lap around .net 4
 
Aop clustering
Aop clusteringAop clustering
Aop clustering
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
Ai dev world utilizing apache pulsar, apache ni fi and minifi for edgeai io...
Ai dev world   utilizing apache pulsar, apache ni fi and minifi for edgeai io...Ai dev world   utilizing apache pulsar, apache ni fi and minifi for edgeai io...
Ai dev world utilizing apache pulsar, apache ni fi and minifi for edgeai io...
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Streaming 101: Hello World
Streaming 101:  Hello WorldStreaming 101:  Hello World
Streaming 101: Hello World
 
Understanding Framework Architecture using Eclipse
Understanding Framework Architecture using EclipseUnderstanding Framework Architecture using Eclipse
Understanding Framework Architecture using Eclipse
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
 
SQL Server - CLR integration
SQL Server - CLR integrationSQL Server - CLR integration
SQL Server - CLR integration
 

More from ukdpe

Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)ukdpe
 
Windows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace IngestionWindows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace Ingestionukdpe
 
Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7ukdpe
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)ukdpe
 
Microsoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NETMicrosoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NETukdpe
 
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 FeaturesMicrosoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Featuresukdpe
 
Microsoft UK TechDays - ASP.NET 4.0 Overview
Microsoft UK TechDays - ASP.NET 4.0 OverviewMicrosoft UK TechDays - ASP.NET 4.0 Overview
Microsoft UK TechDays - ASP.NET 4.0 Overviewukdpe
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworksukdpe
 
Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
Mike Taulty MIX10 Silverlight 4 Accelerated FundamentalsMike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentalsukdpe
 
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTPMike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTPukdpe
 
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?ukdpe
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2ukdpe
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1ukdpe
 
Mike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFMike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFukdpe
 
Mike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 NetworkingMike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 Networkingukdpe
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
Explaining The Cloud
Explaining The CloudExplaining The Cloud
Explaining The Cloudukdpe
 
Microsoft In Education - Steve Beswick
Microsoft In Education - Steve BeswickMicrosoft In Education - Steve Beswick
Microsoft In Education - Steve Beswickukdpe
 
How Microsoft Secures its Online Services [WHITEPAPER]
How Microsoft Secures its Online Services [WHITEPAPER]How Microsoft Secures its Online Services [WHITEPAPER]
How Microsoft Secures its Online Services [WHITEPAPER]ukdpe
 
Overview of Microsoft App-V 4.5
Overview of Microsoft App-V 4.5Overview of Microsoft App-V 4.5
Overview of Microsoft App-V 4.5ukdpe
 

More from ukdpe (20)

Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
 
Windows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace IngestionWindows Phone 7: How (Not) to Fail Marketplace Ingestion
Windows Phone 7: How (Not) to Fail Marketplace Ingestion
 
Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7Mike Ormond: Developing for Windows Phone 7
Mike Ormond: Developing for Windows Phone 7
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)
 
Microsoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NETMicrosoft UK TechDays - jQuery and ASP.NET
Microsoft UK TechDays - jQuery and ASP.NET
 
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 FeaturesMicrosoft UK TechDays - Top 10 ASP.NET 4.0 Features
Microsoft UK TechDays - Top 10 ASP.NET 4.0 Features
 
Microsoft UK TechDays - ASP.NET 4.0 Overview
Microsoft UK TechDays - ASP.NET 4.0 OverviewMicrosoft UK TechDays - ASP.NET 4.0 Overview
Microsoft UK TechDays - ASP.NET 4.0 Overview
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
Mike Taulty MIX10 Silverlight 4 Accelerated FundamentalsMike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
Mike Taulty MIX10 Silverlight 4 Accelerated Fundamentals
 
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTPMike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
Mike Taulty TechDays 2010 Silverlight and Windows Phone 7 CTP
 
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?Mike Taulty TechDays 2010 Silverlight 4 - What's New?
Mike Taulty TechDays 2010 Silverlight 4 - What's New?
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 2
 
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
Mike Taulty DevDays 2010 Silverlight 4 - What's New Part 1
 
Mike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFMike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEF
 
Mike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 NetworkingMike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 Networking
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Explaining The Cloud
Explaining The CloudExplaining The Cloud
Explaining The Cloud
 
Microsoft In Education - Steve Beswick
Microsoft In Education - Steve BeswickMicrosoft In Education - Steve Beswick
Microsoft In Education - Steve Beswick
 
How Microsoft Secures its Online Services [WHITEPAPER]
How Microsoft Secures its Online Services [WHITEPAPER]How Microsoft Secures its Online Services [WHITEPAPER]
How Microsoft Secures its Online Services [WHITEPAPER]
 
Overview of Microsoft App-V 4.5
Overview of Microsoft App-V 4.5Overview of Microsoft App-V 4.5
Overview of Microsoft App-V 4.5
 

MTaulty_DevWeek_Parallel

  • 1. Parallel Extensions to the .NET Framework Mike Taulty Developer & Platform Group Microsoft Ltd [email_address] http://www.mtaulty.com (/DevWeek.zip)
  • 2. “ You are here” Visual Studio 2010 ... ... ... ... Parallel Pattern Library & Concurrency Runtime Debugging Enhancements .NET Framework V4.0 ... ... ... Parallel Extensions to .NET Parallel Computing Initiative ( First Deliverables )
  • 3. Today’s Processors £100 - £300 2-3GHz 2 cores or 4 64-bit Core Core
  • 4. Tomorrow’s Processors Core Core Core Core £200 - £500 2-3GHz 4 cores with HT 64-bit QuickPath Interconnect Memory Controller
  • 5. Where we are heading... Unisys ES7000 (7600R) used with kind permission of Mr Henk var der Valk, Unisys, NL
  • 6.
  • 8. Parallel Extensions to .NET System.Threading System.Collections.Concurrent System.dll System.Linq System.Linq.Parallel System.Core.dll System.Threading.Tasks System.Threading System.Collections.Concurrent System.Threading.Internal mscorlib.dll
  • 9. Parallel Extensions to .NET .NET ThreadPool V4.0 Coordination Data Structures Task Parallel Library Parallel LINQ ( PLINQ )
  • 10. Parallel Extensions to .NET .NET ThreadPool V4.0 Task Parallel Library Parallel LINQ ( PLINQ ) Coordination Data Structures
  • 11. Co-ordination Data Structures SpinLock ManualResetEventSlim SemaphoreSlim CountdownEvent LazyInit <T> SpinWait BlockingCollection<T> Barrier ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> LazyInitField<T>
  • 12. Co-ordination Data Structures SpinLock ManualResetEventSlim SemaphoreSlim CountdownEvent LazyInit <T> SpinWait BlockingCollection<T> Barrier ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> LazyInitField<T> * Some more detail on hidden slides in slide-deck
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Co-ordination Data Structures SpinLock ManualResetEventSlim SemaphoreSlim CountdownEvent LazyInit <T> SpinWait BlockingCollection<T> Barrier ConcurrentBag<T> ConcurrentLinkedList<T> ConcurrentDictionary<K,V> ConcurrentQueue<T> ConcurrentStack<T> LazyInitField<T>
  • 19. Parallel Extensions to .NET Coordination Data Structures .NET ThreadPool V4.0 Parallel LINQ ( PLINQ ) Task Parallel Library
  • 20. Task Parallel Library ( TPL ) Key Classes
  • 22. Task
  • 23. Scheduling Tasks TaskScheduler Task ThreadPoolTaskScheduler SynchronizationContext TaskScheduler Custom QueueTask(Task t)
  • 24. Default Scheduling .NET ThreadPool ( with V4.0 modifications ) … Thread Thread Thread Work Item Work Item Work Item Work Item Thread’s Work Queue Thread’s Work Queue Thread’s Work Queue Work Item Work Item Work Item Global Work Queue
  • 25. Task Exotica ( knobs to tweak )
  • 26. Side-Bar: the Self-Replicating Task .NET ThreadPool ( with V4.0 modifications ) … ThreadPool Heuristics: Inject another thread? Thread Task Thread’s Work Queue Thread Thread’s Work Queue Thread Thread’s Work Queue Global Work Queue Copy 1 Copy 2
  • 27.
  • 29. Parallel Extensions to .NET Coordination Data Structures .NET ThreadPool V4.0 Task Parallel Library Parallel LINQ ( PLINQ )
  • 30. Parallel LINQ ( PLINQ ) Select() Where() Etc. Extension method in System.LINQ Extends IEnumerable<T> LINQ to Objects LINQ to XML not LINQ to SQL,EF Results in a ParallelQuery<T> “ Usually” would be Enumerable
  • 31. Parallel LINQ ( PLINQ ) IEnumerable<T> Could be IList<T> or Array Range Chunk Striped? Hash “ Where” “ Where” “ Where” “ OrderBy” “ OrderBy” “ OrderBy” “ Sum” “ Sum” “ Sum” Consumer( foreach … ) Merge Re-partition Task Task Task Query Query Query Partition
  • 32. PLINQ
  • 33.
  • 34. © 2008 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.

Editor's Notes

  1. 06/08/09 15:54 © 2007 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.