Upload
wynn
View
21
Download
0
Embed Size (px)
DESCRIPTION
DEV 315. Designing Applications in the era of Many-core Computing. Tiberiu Covaci Senior Technical Trainer Many-core. Who am I?. Tiberiu ’Tibi’ Covaci Software engineer, over 20 years experience MCT since 2004, teaching .NET Researcher at KTH Sweden - PowerPoint PPT Presentation
Citation preview
Designing Applications in the era of Many-core Computing
Tiberiu CovaciSenior Technical TrainerMany-core
DEV 315
Who am I?
Tiberiu ’Tibi’ CovaciSoftware engineer, over 20 years experienceMCT since 2004, teaching .NETResearcher at KTH SwedenINETA Speaker & Country Lead for SwedenTelerik MVP/Insider@tibor19 #msteched
Current state
Clock speed has reached an upper limit and can not be increasedMoore’s law is alive and kickingProcessors makers are doing multicoreMulticore software is hard
Amdahl's law (optional)Three reasons why it is hardConclusion, we and no one else has any idea how to do multicore software, but it is a glorious and shiny future.
Agenda
DefinitionsHow to create parallel applicationFinding concurrency Strategies for exploiting concurrencyAlgorithm structuresSupporting structuresSharing state
Patterns
A generally accepted solution to a recurring problem
– Name– Problem– Context– Forces– Solution
– Invariant– Examples– Known Uses– Related patterns
Characteristics:
Patterns
A generally accepted solution to a recurring problem
– Name– Problem– Context– Forces– Solution
– Invariant– Examples– Known Uses– Related patterns
Characteristics:
Pattern language
Collection of related patterns one flowing in to the other as you solve the problem
Programming roles
Application programmerApplication framework developerParallel programming framework developersPlatform programmers
How to create parallel applications
Finding ConcurrencyOriginal Problem
Original Problem
Algorithm Structure
Tasks, shared and local data
Corresponding source code
Task t1 = Task.Factory.StartN
ew(…);
Units of execution & new shared data for extracted dependencies
Supporting Structures & Implementation Mechanisms
Finding Concurrency
Finding Concurrency
Tasks, shared and local data
Original Problem
Original Problem
Step 1 Step 2 Step 3 Step 4
Peel and Dice Oninons
Fry the Onion
Sprinkle Paprika
Add Water
Dice TheMeat
Add Some Spices
Cut And Clean The Chilies
Cook 40 minutes
Peel and Dice Potatoes
Cook 10 minutes
Cut The Peppers
Cook 5 minutes
Peel and Dice Oninons
Fry the Onion
Sprinkle Paprika
Add Water
Dice TheMeat
Add Some Spices
Cut And Clean The Chilies
Cook 40 minutes
Peel and Dice Potatoes
Cook 10 minutes
Cut The Peppers
Cook 5 minutes
Strategies for exploiting concurrency
Finding ConcurrencyOriginal Problem
Original Problem
Algorithm Structure
Tasks, shared and local data
Units of execution & new shared data for extracted dependencies
Agenda parallelism
Algorithms are naturally expressed in terms of the actions to be carried out by the program
Finding ConcurrencyOriginal Problem
Original Problem
Algorithm Stru
cture
Tasks, shared and local data
Corresponding source code
Task t1 = Task.Factory.StartNew
(…);
Units of execution & new shared data for extracted dependencies
Supporting Structures & Implementation Mechanisms
Supporting Structures & Implementation mechanism
Supporting Structures & Implementation mechanism
Program StructuresData StructuresUnit of Execution ManagementCommunicationSynchronization
Source: More Patterns for Parallel Application Programs, Berna L. Massingill, Timothy G. Mattson and Beverly A. Sanders
Master/Worker
SPMD Loop Parallel
Fork/Join
DistributedArray Map
Reduce
Actors
SOA Facade
Repository
MPMD
Pipeline
Producer/Consumer
Shared Queue
Divide & Conquer
Summary
DefinitionsHow to create parallel applicationFinding concurrency Strategies for exploiting concurrencyAlgorithm structures
Summary
Supporting structuresSharing stateDeadlocksHow to make GoulashHow to get help in the kitchen
Where do we go from here?
http://msdn.com/concurrencyhttp://software.intel.com/en-us/multi-core/http://[email protected]
Related Content
DEV303 - Modern Native C++ Development for Maximum ProductivityDEV323 | A Taste of F#: Today and Future
DEV277-HOL Introduction to the Parallel Extensions Library
Find Me Later At Ask an Architect Booth
Questions?
http://msdn.com/concurrencyhttp://software.intel.com/en-us/multi-core/http://[email protected]
DEV Track Resources
http://www.microsoft.com/visualstudio http://www.microsoft.com/visualstudio/en-us/lightswitch http://www.microsoft.com/expression/http://blogs.msdn.com/b/somasegar/http://blogs.msdn.com/b/bharry/http://www.microsoft.com/sqlserver/en/us/default.aspxhttp://www.facebook.com/visualstudio
Resources
www.microsoft.com/teched
Sessions On-Demand & Community Microsoft Certification & Training Resources
Resources for IT Professionals Resources for Developers
www.microsoft.com/learning
http://microsoft.com/technet http://microsoft.com/msdn
Learning
http://northamerica.msteched.com
Connect. Share. Discuss.