DEV Community

Bruno Ciccarino λ
Bruno Ciccarino λ

Posted on

2 1 2 2

How to explain the difference between concurrency and parallelism to a layman.

Hey folks! I was recently reading the book "Use Your Head - java", and at the beginning of it there is a part where he says that the best way to teach is by adding images that match the text while explaining the content in a more colloquial language, and I I think the best way to learn is to teach, so I'm going to try to combine a little of both to see if I can stick this content in my head better.

silicon valley

In short, parallelism means you are dealing with several things at the same time

Concurrency is as if you were switching between tasks but only doing one at a time.

Gopher task

Imagine you're a busy chef:

  • Concurrency: You're cooking a big meal and you're juggling multiple tasks. You're chopping vegetables for a salad, heating up a pan for the steak, and setting the table. You're doing all these things, but one at a time. You might pause to check on the steak, then go back to chopping. It's like having a lot of plates spinning in the air.

  • Parallelism: Now imagine you have a sous-chef. You can both work on the meal at the same time. You're cooking the steak, and they're making the salad. You're both working on different parts of the meal simultaneously, which means the whole meal is getting ready faster.

Cheff

Challenge:

Try finding a simple task in your daily life that can be done concurrently and another that benefits from parallelism. Share your examples in the comments below!

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay