Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like this quick comic from Joe Armstrong (Erlang's "father").

http://joearms.github.io/2013/04/05/concurrent-and-parallel-...



It's great, but all these definitions (this one, the ones at https://news.ycombinator.com/item?id=6270128 and so on) have slightly different meanings. It must be maddening to anyone trying to get it for the first time.

For example, are parallel processes always also concurrent? It's hard to imagine a more elementary question, yet the different definitions don't all answer it the same way. That alone casts some doubt on how well-defined these terms are to begin with.


What helped me understand was this point

concurrency is a property of the algorithm, parallelism is a property of the execution environment

To expand on the above. This means that a particular problem can be talked about in terms of smaller sub problems. Example, you are serving a site. Sub problems are handling each client request. Another example of problem "crack password via brute-force method", sub problem is "try one particular password". Here is where discussion comes about whether there are concurrent sub-problems or not. We are not sure about how they'll run yet.

>For example, are parallel processes always concurrent?

Not sure what you mean by that. Are these processes solving one particular problem. Concurrency and parallelism make sense for a particular problem or algorithm. How are these processes related? Do they just happen to run on the same machine but otherwise are solving separate problems. Then maybe it doesn't even make sense to talk about either concurrency or parallelism.

Now you can turn this on its head an look at it from the point of view of a kernel designer. His very simplified algorithm is "fairly schedule processes and IO" for all the users. So his problem now deals with any two processes but these are now all part of a problem.

I guess I am trying to say that some questions just don't make sense to ask.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: