Concurrency vs Parallelism

Photo by Umberto on Unsplash

Concurrency vs Parallelism

ยท

1 min read

Concurrency is the illusion that multiple things are happening at the same time.

Remember the days of the iPhone 4? It had a single-core CPU, so essentially it could handle only one task at a time. But we had multiple applications open at the same time, right? Well, your phone was intermittently processing each application based on demand and time allocated.

So that music app running in the background while you were surfing the web was switching CPU resources with the browser so fast that it seemed as if it was happening at the same time.

Concurrency is not to be confused with parallel processing!

Parallel processing generally happens on a multi-core CPU system, where each core is executing different processes exactly at the same time.

ย