22. Concurrency & Parallelism: IO Bound vs CPU Bound
29.9K views on YouTube
A comprehensive guide to concurrency and parallelism for backend engineers.
We cover:
– Why Concurrency Matters for Backend Systems
– IO Bound vs CPU Bound Operations
– Concurrency vs Parallelism
– Threading Model
– Event Loop Model (Async/Await)
– Virtual Threads (Goroutines)
– Race Conditions & Solutions
Timestamps:
0:00 Introduction: Why Concurrency Matters
2:51 The Cost of Not Using Concurrency
5:55 IO Bound vs CPU Bound Operations
9:44 Concurrency vs Parallelism Explained
15:16 Visualizing Concurrent Request Handling
19:14 Threading Model Deep Dive
23:22 Thread Overhead & Context Switching
37:15 Event Loop Model Deep Dive
43:03 Async/Await Explained
50:28 Virtual Threads & Goroutines (Go Runtime)
1:03:46 How Async/Await Works Under the Hood (State Machines)
1:15:32 Race Conditions & Shared State Problems
1:23:28 Solutions: Locks, Mutexes & Channels
1:26:02 Summary & Key Takeaways
Join the Discord community: https://discord.gg/NXuybNcvVH
#backend #nodejs #golang #softwareengineering
Nerd out about the history of technologies here https://www.fascinatingtechhistory.xyz/