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

PPTX
Db spof(mssql, my sql)
PPTX
Ruby to Scala in 9 weeks
PDF
Warg
PDF
Slick 3.0 functional programming and db side effects
PDF
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
PPTX
Reactive Database Access With Slick 3
PPT
MySQL HA Percona cluster @ MySQL meetup Mumbai
PDF
Prometheus london
Db spof(mssql, my sql)
Ruby to Scala in 9 weeks
Warg
Slick 3.0 functional programming and db side effects
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Reactive Database Access With Slick 3
MySQL HA Percona cluster @ MySQL meetup Mumbai
Prometheus london

What's hot (20)

PDF
Pass Elk: CAP Theorem since 90s and Beyond
PDF
What can we learn from NoSQL technologies?
PDF
ELK Wrestling (Leeds DevOps)
PDF
Distributed Erlang Systems In Operation
PDF
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
PPTX
Powering an API with GraphQL, Golang, and NoSQL
PDF
NoSQL Talk at eBuddy
PPT
Scaling MySQL using Fabric
PPTX
Hands-on Performance Tuning Lab - Devoxx Poland
PPTX
Mini-Training: Let's have a rest
PDF
Effect systems in scala: beyond flatmap
PPTX
Presto Meetup 2016 Small Start
PDF
MySQL Query Optimization (Basics)
PDF
Building Distributed Systems from Scratch - Part 1
PDF
Kubernetes – An open platform for container orchestration
PDF
Scaling ELK Stack - DevOpsDays Singapore
PDF
Presto in my_use_case2
PDF
NMF with python
PDF
HandlerSocket
PPT
Tale of two streaming frameworks- Apace Storm & Apache Flink
Pass Elk: CAP Theorem since 90s and Beyond
What can we learn from NoSQL technologies?
ELK Wrestling (Leeds DevOps)
Distributed Erlang Systems In Operation
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Powering an API with GraphQL, Golang, and NoSQL
NoSQL Talk at eBuddy
Scaling MySQL using Fabric
Hands-on Performance Tuning Lab - Devoxx Poland
Mini-Training: Let's have a rest
Effect systems in scala: beyond flatmap
Presto Meetup 2016 Small Start
MySQL Query Optimization (Basics)
Building Distributed Systems from Scratch - Part 1
Kubernetes – An open platform for container orchestration
Scaling ELK Stack - DevOpsDays Singapore
Presto in my_use_case2
NMF with python
HandlerSocket
Tale of two streaming frameworks- Apace Storm & Apache Flink
Ad

Similar to Parallel programming in .NET (20)

PPTX
Intro to Big Data and NoSQL
PDF
FP Days: Down the Clojure Rabbit Hole
PDF
No stress with state
PDF
Building Big Data Streaming Architectures
PPTX
Parallel architecture-programming
PDF
Navigating Transactions: ACID Complexity in Modern Databases
PDF
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
PPTX
Taming the resource tiger
PDF
Is NoSQL The Future of Data Storage?
PPTX
Taming the resource tiger
PPTX
Performance Issue? Machine Learning to the rescue!
KEY
Modern Java Concurrency (Devoxx Nov/2011)
PPTX
Parallel architecture &programming
PDF
Disco workshop
PPTX
Common issues, rules and principles
PDF
Concurrency and Multithreading Demistified - Reversim Summit 2014
KEY
Writing Scalable Software in Java
PDF
H2O World - GBM and Random Forest in H2O- Mark Landry
PDF
Scalability, Availability & Stability Patterns
PDF
Ciel, mes données ne sont plus relationnelles
Intro to Big Data and NoSQL
FP Days: Down the Clojure Rabbit Hole
No stress with state
Building Big Data Streaming Architectures
Parallel architecture-programming
Navigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Taming the resource tiger
Is NoSQL The Future of Data Storage?
Taming the resource tiger
Performance Issue? Machine Learning to the rescue!
Modern Java Concurrency (Devoxx Nov/2011)
Parallel architecture &programming
Disco workshop
Common issues, rules and principles
Concurrency and Multithreading Demistified - Reversim Summit 2014
Writing Scalable Software in Java
H2O World - GBM and Random Forest in H2O- Mark Landry
Scalability, Availability & Stability Patterns
Ciel, mes données ne sont plus relationnelles
Ad

Recently uploaded (20)

PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
Website Design Services for Small Businesses.pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PPTX
Introduction to Windows Operating System
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
PDF
Microsoft Office 365 Crack Download Free
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
PDF
E-Commerce Website Development Companyin india
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
PPTX
"Secure File Sharing Solutions on AWS".pptx
PPTX
Cybersecurity: Protecting the Digital World
PPTX
Airline CRS | Airline CRS Systems | CRS System
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
Guide to Food Delivery App Development.pdf
Wondershare Recoverit Full Crack New Version (Latest 2025)
Website Design Services for Small Businesses.pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Practical Indispensable Project Management Tips for Delivering Successful Exp...
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Introduction to Windows Operating System
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
Matchmaking for JVMs: How to Pick the Perfect GC Partner
Microsoft Office 365 Crack Download Free
Full-Stack Developer Courses That Actually Land You Jobs
E-Commerce Website Development Companyin india
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
"Secure File Sharing Solutions on AWS".pptx
Cybersecurity: Protecting the Digital World
Airline CRS | Airline CRS Systems | CRS System
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Guide to Food Delivery App Development.pdf

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