Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra

Slides:



Advertisements
Similar presentations
Tridion 5.3 Templates.
Advertisements

Unit 1: Overview of the Microsoft.NET Platform
An overview of… Luis Guerrero Plain Concepts
James Kolpack, InRAD LLC popcyclical.com. CodeStock is proudly partnered with: Send instant feedback on this session via Twitter: Send a direct message.
Parallel Extensions to the.NET Framework Daniel Moth Microsoft
FUTURE OF.NET PARALLEL PROGRAMMING Joseph Albahari SESSION CODE: DEV308 (c) 2011 Microsoft. All rights reserved.
System.Threading.Tasks Task Represents an asynchronous operation Supports waiting, cancellation, continuations, … Parent/child relationships 1 st -class.
 Niklas Gustafsson Software Architect Microsoft Corporation TL22.
CSE 1302 Lecture 21 Exception Handling and Parallel Programming Richard Gesick.
Overview of.NET Framework Sanjay Vyas. Whats New In Base Class Library Declaration & consumption of extensibility points Monitoring for new runtime extension.
Virtual techdays INDIA │ 9-11 February 2011 Parallelism in.NET 4.0 Parag Paithankar │ Technology Advisor - Web, Microsoft India.
Parallel Programming in Visual Studio 2010 Sasha Goldshtein Senior Consultant, Sela Group
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
Daniel Moth  Parallel Computing Platform Microsoft Corporation TL26.
Connect with life Bijoy Singhal Developer Evangelist | Microsoft India.
Parallel Programming in.NET Kevin Luty.  History of Parallelism  Benefits of Parallel Programming and Designs  What to Consider  Defining Types of.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel.
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
Parallel Programming in.NET 4.0 Tasks and Threading Ingo Rammer, thinktecture
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Parallel Extensions A glimpse into the parallel universe Eric De Carufel
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Parallel Programming: Responsiveness vs. Performance Joe Hummel, PhD Microsoft MVP Visual C++ Technical Staff: Pluralsight, LLC Professor: U. of Illinois,
About Me Microsoft MVP Intel Blogger TechEd Israel, TechEd Europe Expert C++ Book
Robert Vitolo CS474.  Branched off of ML (metalanguage)  Developed at Microsoft, available as part of the Visual Studio 2010 software package, integrated.
Lecture 21 Parallel Programming Richard Gesick. Parallel Computing Parallel computing is a form of computation in which many operations are carried out.
Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra
Lecture 1: IDE - Integrated Development Environment.NET Framework Visual Studio 2010.NET Solution Explorer Properties Window.
Barry Wimlett Technical Specialist BSc MBCS blackmarble.com.
CS333 Intro to Operating Systems Jonathan Walpole.
Configuring Workflows Module 4. Overview  Understanding Workflows  Using Default Workflows  Creating Workflow Instances.
Huseyin YILDIZ Software Design Engineer Microsoft Corporation SESSION CODE: DEV314.
Module 8 Enhancing User Interface Responsiveness.
LINQ & PLINQ (Parallel) Language Integrated Query.
Plinq Presentation Steen L. Knudsen
Data Parallelism Task Parallel Library (TPL) The use of lambdas Map-Reduce Pattern FEN 20141UCN Teknologi/act2learn.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
Inside LINQ to Objects How LINQ to Objects work Inside LINQ1.
DEV303. Tiny Functions Why Does It Need a Name?
CSC 360, Instructor: Kui Wu Thread & PThread. CSC 360, Instructor: Kui Wu Agenda 1.What is thread? 2.User vs kernel threads 3.Thread models 4.Thread issues.
TAP into async programming
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Code Development for High Performance Servers Topics Multithreaded Servers Event Driven Servers Example - Game Server code (Quake) A parallelization exercise.
Microsoft TechDayshttp:// Сычев Игорь Microsoft Student Partner.
TOPICS WHAT YOU’LL LEAVE WITH WHO WILL BENEFIT FROM THIS TALK.NET developers: familiar with parallel programming support in Visual Studio 2010 and.NET.
C# Present and Future Marita Paletsou Software Engineer.
@gfraiteur a deep investigation on how.NET multithreading primitives map to hardware and Windows Kernel You Thought You Understood Multithreading Gaël.
Task and Data Parallelism: Real-World Examples Sasha Goldshtein | SELA Group.
Wely Microsoft MVP, Visual C#
Best Practices for Multi-threading Eric Young Developer Technology.
Thread Fundamentals Header Advanced .NET Threading, Part 1
CS399 New Beginnings Jonathan Walpole.
Async or Parallel? No they aren’t the same thing!
Lighting Up Windows Server 2008 R2 Using the ConcRT on UMS
Task Parallel Library: Design Principles and Best Practices
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Staying Afloat in the .NET Async Ocean
C++ Forever: Interactive Applications in the Age of Manycore
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel
12 Asynchronous Programming
An example design for an Amadeus APIv2 Web Server Application
Modified by H. Schulzrinne 02/15/10 Chapter 4: Threads.
Visual Studio 2010 and .NET Framework 4 Training Workshop
Module 10: Implementing Managed Code in the Database
Inside the Database Engine
Lecture 20 Parallel Programming CSE /8/2019.
Inside the Database Engine
Presentation transcript:

Parallel Extensions A glimpse into the parallel universe By Eric De Carufel Microsoft.NET Solution Architect at Orckestra

Agenda Introduction Overview Library Core TPL (Task Parallel Library) Parallel Linq (PLINQ) Parallel Data Structures Questions

Introduction Why do we have to bother?  Moore’s law is over, no more free lunch  Multi cores systems will be more and more available Type of Parallelism  Asynchronous operation (better user experience)  Data parallelism  Task parallelism Options  Manual treading  Thread, ThreadPool, BackgroundWorkerThread  Asynchronous calls  Event driven Problems  Resource sharing  Locking  Non-deterministic sequence of execution  Hard to debug

Overview

Task Parallel Library (TPL) Lightweight task framework (Task)  Create(Action ) factory method  Wait, WaitAll, WaitAny to catch exception  ContinueWith to chain Tasks together Lazy function call  Future Task scheduler and manager  TaskManager

Parallel API Parallel Loops  Parallel.For  Parallel.ForEach Lazy Initialisation  LazyInit Locking  SpinWait  SpinLock CountdownEvent

Parallel API Standard for loop  for (int i = 0; i < N; i++) { a[i] = Compute(i); } Parallel for loop  Parallel.For(0, N, i => { a[i] = Compute(i); });

Parallel Linq (PLINQ) Parallel Query  AsParallel() Return to sequential execution  AsSequential() Preserve order  AsOrdered() Order doesn’t matter  AsUnordered()

Parallel Linq (PLINQ) var query = from c in Customers where c.Name = “Smith” select c; var query = from c in Customers.AsParallel() where c.Name = “Smith” select c;

Parallel Data Structures IConcurrentCollection  Add(T item)  Remove(out T item) ConcurrentStack  Push(T item)  TryPop(out T item) ConcurrentQueue  Enqueue(T item)  TryDequeue(out T item) BlockingCollection  Add(T item),  Remove(out T item)  TryAdd(T item),  TryRemove(out T item)

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

Ideas Task stealing Integration into language maybe for later Potentially in parallel Exception Handling Garbage collection Shift from threads to tasks (more than needed) Divide and conquer leads to more parallelism opportunities Use of CPU, GPU or Scale out To get another 100x performance  The Power Wall  The Complexity Wall  The Memory Wall

What’s next Visual Studio 2010.NET Framework 4.0 New multi cores computer (4, 16, 32, 64, …) Think parallel!