Tuesday, September 15, 2015

Parallelism vs. Concurrency

I always had a perception that parallelism and concurrency are interchangeable and they convey the same concept.
But that was a wrong perception! 

Here is my understanding: 
Parallelism is using multiple threads to compute the same problem such that this single problem can be divided into many sub-problems which then be computed simultaneously).
Concurrency is more like a concept used in distributed system, i.e., rapid IO interaction combined with callbacks to be triggered on certain events.

An explicit example is web server. Suppose a web server can have 100 requests per second. Then these requests will be handled by this single server which will be running concurrently. If there are 100 web servers to serve the 100 requests, then it is a parallel handling.

No comments:

Post a Comment