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

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
Parallel and Asynchronous Programming - ITProDevConnections 2012 (Greek)
PDF
Parallel Programming With Microsoft Net Design Patterns For Decomposition And...
PPTX
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
PPTX
Parallel Programming
PPTX
Concurrency in c#
PPT
Parallel Programming and F#
PPTX
MERIMeeting du 27 mai 2014 - Parallel Programming
PPTX
Coding For Cores - C# Way
PPT
Overview Of Parallel Development - Ericnel
PPTX
Multi core programming 1
ZIP
.Net 4.0 Threading and Parallel Programming
PPTX
Architecting Solutions for the Manycore Future
PDF
I see deadlocks : Matt Ellis - Techorama NL 2024
PDF
.Net Multithreading and Parallelization
PDF
Our Concurrent Past; Our Distributed Future
PDF
Concurrent Programming On Windows Joe Duffy
PPT
Parallel Extentions to the .NET Framework
PPTX
Solution Patterns for Parallel Programming
PDF
Sean Kenney - Solving Parallel Software Challenges with Patterns
PDF
Arc 300-3 ade miller-en
Parallel and Asynchronous Programming - ITProDevConnections 2012 (Greek)
Parallel Programming With Microsoft Net Design Patterns For Decomposition And...
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
Parallel Programming
Concurrency in c#
Parallel Programming and F#
MERIMeeting du 27 mai 2014 - Parallel Programming
Coding For Cores - C# Way
Overview Of Parallel Development - Ericnel
Multi core programming 1
.Net 4.0 Threading and Parallel Programming
Architecting Solutions for the Manycore Future
I see deadlocks : Matt Ellis - Techorama NL 2024
.Net Multithreading and Parallelization
Our Concurrent Past; Our Distributed Future
Concurrent Programming On Windows Joe Duffy
Parallel Extentions to the .NET Framework
Solution Patterns for Parallel Programming
Sean Kenney - Solving Parallel Software Challenges with Patterns
Arc 300-3 ade miller-en
Ad

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Digital Strategies for Manufacturing Companies
PPTX
Transform Your Business with a Software ERP System
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ai tools demonstartion for schools and inter college
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
System and Network Administration Chapter 2
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
How Creative Agencies Leverage Project Management Software.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Digital Strategies for Manufacturing Companies
Transform Your Business with a Software ERP System
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How to Migrate SBCGlobal Email to Yahoo Easily
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Operating system designcfffgfgggggggvggggggggg
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ai tools demonstartion for schools and inter college
ISO 45001 Occupational Health and Safety Management System
System and Network Administration Chapter 2
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo Companies in India – Driving Business Transformation.pdf
PTS Company Brochure 2025 (1).pdf.......
Internet Downloader Manager (IDM) Crack 6.42 Build 41
How Creative Agencies Leverage Project Management Software.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