66 points · by gshrikant · 11y ago · 18 comments
It might be one of those terms in computer science that has multiple definitions.
Concurrent is a word that pre-dates computers, and for the English language to work we need to stay true to its definition. The dictionary definition is: "occurring or existing simultaneously".
So far as I know, there are none.
I still don't understand what that notion is, that warrants using a new word other than the existing multitasking/multithreading on a single core, or parallel-processing on multiple-cores, or distributed-computing on a cluster/network. (maybe that's what it is? three different ways of achieving concurrency? but then all of it could easily be called "parallel-processing" or "multitasking")
In any case, I think an article about "Introduction to Concurrency" can be considered incomplete without a discussion of comparing/contrasting it with parallelism.
I was taught that the division is the goal.
You use concurrency because having multiple execution contexts at "the same" time is useful, even if they are merely interleaved by the thread scheduler on the same core. E.g. an IRC server: having a thread per socket, blocking until there is some I/O to be performed on that socket, is a very workable, straightforward design.
A concurrent process is concurrent for design reasons, and could not (sanely) be any other way.
You use parallelism because your problem gets solved faster when worked on in parallel instead of sequence (and obviously not all problems are this way.) A parallel program running on a single core machine would not buy you any performance increase (and its design is unnecessarily convoluted.)
A parallel process is parallel for performance reasons, but could be run (just proportionally slower) on a single core.
It's the best I've found to date.
But definite;y not "type". That's a can of worms.