Concurrency is Not Parallelism: Insights/Notes
Shivam Behl
Software Engineer @ Microsoft| Prev. Flipkart, Zepto | Distributed Systems, Machine Learning | Feel free to message for referrals
Okay, picture this. You’re in the middle of making chai. Water’s boiling, tea leaves are steeping, and you’ve got just enough time to toast some bread while you wait. That’s concurrency—you’re handling multiple tasks but not doing them all at once. Now, imagine you’ve got a sibling who steps in to toast the bread while you focus on the chai. That’s parallelism—getting things done faster with extra hands (or cores). Cool, right?
Concurrency vs. parallelism. If you’ve spent even a little time around software systems, you’ve probably heard these terms tossed around like confetti—sometimes interchangeably, sometimes like they’re long-lost enemies. And if you’re still confused, don’t worry, you’re in good company. Rob Pike, one of the brains behind Go, had an absolute gem of a talk titled "Concurrency is Not Parallelism," and it’s here we are going to discuss my few key takeaways from it.
Concurrency ≠ Parallelism (Yes, Really)
As Rob Pike puts it, concurrency is about dealing with lots of things, while parallelism is about doing lots of things. They’re related, but not the same—and getting this wrong can turn your system into a dumpster fire.
Concurrency: Designing systems to handle multiple tasks efficiently
Parallelism: Executing multiple tasks simultaneously
You might ask, "This is simple, why are you writing an article on this Shivam?"
Because that's just definition. What I started with thinking after I saw the talk, which made me read through a bunch of stuff was the question, why, where and how concurrency vs parallelism knowledge is useful. And since I was anyway reading through a bunch of stuff, thought why not share it here?
The Critical Distinctions
Real World Examples
Web Servers
Our favorite website is likely a masterpiece of concurrency and parallelism:
领英推荐
Database Queries
When querying a database:
Gaming: Player Actions vs. World Updates
In video games, concurrency and parallelism play distinct roles:
Wrapping Up
Concurrency and parallelism aren’t just technical concepts—they’re tools to help us build smarter, more efficient systems. They teach us how to:
At the end of the day, it’s not about perfection; it’s about progress. Managing this balance might feel tricky, but with patience and practice, we can learn to design systems that truly shine. After all, every great coder starts somewhere—and even the most elegant solutions grow from a few messy experiments. Let's keep learning, keep experimenting, and keep improving. We've got this.
While researching for the article, I found this point of view as well:
"To me parallelism is one form of concurrency and no amount of blog posts can convince me otherwise."
And to be honest, you can subscribe to this school of thought too, like till we are making great software, who cares? Right?
Engineering at Flipkart | TIET'21
3 个月Good Read ??
SDE 2 @ Flipkart Java | Spark | Elastic Search
3 个月Crisp, precise and easy to read. Good one Shivam Behl
SDE2 Atlassian, Ex-Microsoft | Expert on codeforces | Web developer | Networking
3 个月The way you have written is quite engaging. Waiting for more such content.
Ex-SDE-2 @Amazon
3 个月Compelling read!!????
SWE at Microsoft | Ex Siemens Healthineers, JP Morgan Chase | Hackerrank Certified at Problem Solving | Open for Mentor/Instructor Roles | DM for Collaborations.
3 个月Interesting, I did see that video, and the examples were truly helpful!