SlideShare a Scribd company logo
Peter Csala
2
Agenda
• Definitions & Terminologies
• Problems & Toolbox
• Demos
Definitions and Terminologies
4
Concepts & Misconceptions
Parallel Programming
Concurrent Programming Asyncronous Programming
Multi-Threaded Programming
5
Prog. model: Sync vs Async
6
Execution: Parallel vs Concurrent
7
Environment: Single vs Multi Threading
8
Rumor: Zen 3 can run 4 threads / core
9
Rumor: Ryzen ThreadRipper (64cores)
10
Types: Data vs Task
Problems & Tools
12
Problems: Shared State
13
Toolbox against concurrent mutation
• Syncronization Primitives
• Concurrent Collections
• Immutable state
14
Patterns against concurrent mutation
• Fork / Join
• Master – Worker
• Producer + Consumer
• Divide & Conquer
• MapReduce
• Observer
• Pipeline
• All To All
• Stencil
• Etc.
15
It’s all about isolation
Enough theory, Let’s practice
17
The Downloader
Functional Req.s
• I want to be able to download
arbitrary number of web contents
• I want to be able to process them
in arbitrary way
• It MUST be blazingly fast
• It MUST be superb easy to use
• Why is this not done yet?
Non-Functional Req.s
• Ensure that the provided strings
are valid Uris
• Ensure post-processing ability via
continuation / callback
• It should run in parallel without
exhausting all resources
• Interface should ask for only the
bear minimum (use default
params)
18
Architecture: Cardinality
19
Architecture: Cardinality
20
Architecture: Cardinality
21
Architecture: Cardinality
22
Architecture: Throttling
23
Architecture: Shared State
• The whole source is shared
• The source is pre-partitioned
• The partitions are processed
separately by pulling
24
Architecture: Shared State
• The source is pre-partitioned
• The partitions are not shared
• The partitions are processed
separately by iterating
25
Architecture: Shared State
• The whole source is shared
• The source is dynamically
partitioned
• The source pushes the data to the
targets
26
It’s demo time
27
What have we learnt?
28
What have we learnt?
• (Non-)deterministic
• Slow down
• Over parallelisation
• Partitioning is hard
• Common pitfalls
• Measure base line
• Measure speed-up
• CPU vs I/O bound
• Immutables
• Enormous toolset
29
Where should I look for details?
• Parallel class
• PLINQ partitioning
• Channels
• Parallel data structure, 2
• Synchronization primitives, 2
• Compare Parallel models
• Immutable Collections, 2
• Throttling
• Potential Pitfalls, PLINQ
• Async Guidance
• Async antipatterns
• Avoid sync problem
• VS Threading nuget
• Concurrency Visualizer
30
Is there any free e-book?
• Patterns & Practices Parallel Programming with Microsoft
.NET
• Patterns of Parallel Programming
• Introduction of TPL Dataflow
• Parallel Extension Extras
31
Is there any good book?
Parallel programming in .NET

More Related Content

What's hot (20)

PDF
Pass Elk: CAP Theorem since 90s and Beyond
Raghavendra Prabhu
 
PDF
What can we learn from NoSQL technologies?
Ivan Zoratti
 
PDF
ELK Wrestling (Leeds DevOps)
Steve Elliott
 
PDF
Distributed Erlang Systems In Operation
Andy Gross
 
PDF
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PPTX
Powering an API with GraphQL, Golang, and NoSQL
Nic Raboy
 
PDF
NoSQL Talk at eBuddy
Aliaksandr Kazlou
 
PPT
Scaling MySQL using Fabric
Karthik .P.R
 
PPTX
Hands-on Performance Tuning Lab - Devoxx Poland
C2B2 Consulting
 
PPTX
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
PDF
Effect systems in scala: beyond flatmap
Joost de Vries
 
PPTX
Presto Meetup 2016 Small Start
Hiroshi Toyama
 
PDF
MySQL Query Optimization (Basics)
Karthik .P.R
 
PDF
Building Distributed Systems from Scratch - Part 1
datamantra
 
PDF
Kubernetes – An open platform for container orchestration
inovex GmbH
 
PDF
Scaling ELK Stack - DevOpsDays Singapore
Angad Singh
 
PDF
Presto in my_use_case2
wyukawa
 
PDF
NMF with python
Kyunghoon Kim
 
PDF
HandlerSocket
Łukasz Barulski
 
PPT
Tale of two streaming frameworks- Apace Storm & Apache Flink
Karthik Deivasigamani
 
Pass Elk: CAP Theorem since 90s and Beyond
Raghavendra Prabhu
 
What can we learn from NoSQL technologies?
Ivan Zoratti
 
ELK Wrestling (Leeds DevOps)
Steve Elliott
 
Distributed Erlang Systems In Operation
Andy Gross
 
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Powering an API with GraphQL, Golang, and NoSQL
Nic Raboy
 
NoSQL Talk at eBuddy
Aliaksandr Kazlou
 
Scaling MySQL using Fabric
Karthik .P.R
 
Hands-on Performance Tuning Lab - Devoxx Poland
C2B2 Consulting
 
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
Effect systems in scala: beyond flatmap
Joost de Vries
 
Presto Meetup 2016 Small Start
Hiroshi Toyama
 
MySQL Query Optimization (Basics)
Karthik .P.R
 
Building Distributed Systems from Scratch - Part 1
datamantra
 
Kubernetes – An open platform for container orchestration
inovex GmbH
 
Scaling ELK Stack - DevOpsDays Singapore
Angad Singh
 
Presto in my_use_case2
wyukawa
 
NMF with python
Kyunghoon Kim
 
HandlerSocket
Łukasz Barulski
 
Tale of two streaming frameworks- Apace Storm & Apache Flink
Karthik Deivasigamani
 

Similar to Parallel programming in .NET (20)

PPTX
Intro to Big Data and NoSQL
Don Demcsak
 
PDF
FP Days: Down the Clojure Rabbit Hole
Christophe Grand
 
PDF
No stress with state
Uwe Friedrichsen
 
PDF
Building Big Data Streaming Architectures
David Martínez Rego
 
PPTX
Parallel architecture-programming
Shaveta Banda
 
PDF
Navigating Transactions: ACID Complexity in Modern Databases
Shivji Kumar Jha
 
PDF
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Mydbops
 
PPTX
Taming the resource tiger
Elizabeth Smith
 
PDF
Is NoSQL The Future of Data Storage?
Saltmarch Media
 
PPTX
Taming the resource tiger
Elizabeth Smith
 
PPTX
Performance Issue? Machine Learning to the rescue!
Maarten Smeets
 
KEY
Modern Java Concurrency (Devoxx Nov/2011)
Martijn Verburg
 
PPTX
Parallel architecture &programming
Ismail El Gayar
 
PDF
Disco workshop
spil-engineering
 
PPTX
Common issues, rules and principles
Mnats Karakhanyan
 
PDF
Concurrency and Multithreading Demistified - Reversim Summit 2014
Haim Yadid
 
KEY
Writing Scalable Software in Java
Ruben Badaró
 
PDF
H2O World - GBM and Random Forest in H2O- Mark Landry
Sri Ambati
 
PDF
Scalability, Availability & Stability Patterns
Jonas Bonér
 
PDF
Ciel, mes données ne sont plus relationnelles
Xavier Gorse
 
Intro to Big Data and NoSQL
Don Demcsak
 
FP Days: Down the Clojure Rabbit Hole
Christophe Grand
 
No stress with state
Uwe Friedrichsen
 
Building Big Data Streaming Architectures
David Martínez Rego
 
Parallel architecture-programming
Shaveta Banda
 
Navigating Transactions: ACID Complexity in Modern Databases
Shivji Kumar Jha
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Mydbops
 
Taming the resource tiger
Elizabeth Smith
 
Is NoSQL The Future of Data Storage?
Saltmarch Media
 
Taming the resource tiger
Elizabeth Smith
 
Performance Issue? Machine Learning to the rescue!
Maarten Smeets
 
Modern Java Concurrency (Devoxx Nov/2011)
Martijn Verburg
 
Parallel architecture &programming
Ismail El Gayar
 
Disco workshop
spil-engineering
 
Common issues, rules and principles
Mnats Karakhanyan
 
Concurrency and Multithreading Demistified - Reversim Summit 2014
Haim Yadid
 
Writing Scalable Software in Java
Ruben Badaró
 
H2O World - GBM and Random Forest in H2O- Mark Landry
Sri Ambati
 
Scalability, Availability & Stability Patterns
Jonas Bonér
 
Ciel, mes données ne sont plus relationnelles
Xavier Gorse
 
Ad

Recently uploaded (20)

PPTX
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
2nd Sight Lab
 
PPTX
Agentforce – TDX 2025 Hackathon Achievement
GetOnCRM Solutions
 
PDF
Azure AI Foundry: The AI app and agent factory
Maxim Salnikov
 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
PPTX
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
 
PPTX
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
PPTX
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
PDF
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
PDF
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
PPTX
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
PPTX
IDM Crack with Internet Download Manager 6.42 Build 41 [Latest 2025]
pcprocore
 
PDF
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
PPTX
arctitecture application system design os dsa
za241967
 
PPTX
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
 
PDF
Automated Test Case Repair Using Language Models
Lionel Briand
 
PPTX
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
 
PDF
The Next-Gen HMIS Software AI, Blockchain & Cloud for Housing.pdf
Prudence B2B
 
PDF
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
PDF
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
PDF
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
2nd Sight Lab
 
Agentforce – TDX 2025 Hackathon Achievement
GetOnCRM Solutions
 
Azure AI Foundry: The AI app and agent factory
Maxim Salnikov
 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
 
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
IDM Crack with Internet Download Manager 6.42 Build 41 [Latest 2025]
pcprocore
 
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
arctitecture application system design os dsa
za241967
 
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
 
Automated Test Case Repair Using Language Models
Lionel Briand
 
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
 
The Next-Gen HMIS Software AI, Blockchain & Cloud for Housing.pdf
Prudence B2B
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Ad

Parallel programming in .NET

Editor's Notes

  • #5: https://medium.com/swift-india/concurrency-parallelism-threads-processes-async-and-sync-related-39fd951bc61d
  • #6: http://www.enterpriseintegrationpatterns.com/patterns/messaging/Introduction.html
  • #7: https://www.raywenderlich.com/60749/grand-central-dispatch-in-depth-part-1
  • #8: https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/4_Threads.html
  • #9: https://www.tweaktown.com/news/67801/amds-next-gen-zen-3-rumor-4-threads-per-core-enables-64c-256t-chips/index.html
  • #10: https://wccftech.com/amd-ryzen-threadripper-3960x-24-core-48-thread-7nm-zen-2-cpu-confirmed/
  • #11: http://help.pervasive.com/display/DR62/General+Concepts
  • #15: https://onlinelibrary.wiley.com/doi/full/10.1002/cpe.4175 http://snir.cs.illinois.edu/patterns/patterns.pdf