4 ms·
Parallelism is an algorithms problem: given n processors, design an algorithm that runs faster as n increases. Concurrency is a systems problem: design a syste
by philwelch 15y ago
Parallelism is an algorithms problem: given n processors, design an algorithm that runs faster as n increases.
Concurrency is a systems problem: design a system that safely runs n separate but interacting contexts of execution. Erlang's solution to concurrency--no communication between processes other than asymmetric message passing, no shared state other than the process registry--is a great solution to concurrency in terms of safety and distributon across multiple hosts, but it provides limited help to parallelism.
Erlang's reputation as a great language for concurrent programming on multicore processors is largely by accident--it has a great concurrency model for networks of distributed machines, and almost any concurrency model is better than mutexes and threads, but on multicore machines, Erlang wins only by default.
- scott_s 15y agono communication between processes other than asymmetric message passing, no shared state other than the process registry--is a great solution to concurrency in terms of safety and distributon across multiple hosts, but it provides limited help to parallelism. That's the same model of executions that MPI supports, and the most high-performance, parallel programs ever written have been written with MPI - scaling to thousands of processors across hundreds of nodes. I feel that the people who are trying to define "parallelism" and "concurrency" are clashing with existing definitions from the already established high-performance computing community.