4 ms·
To best of my knowledge, Erlang was not built for parallelism, but concurrency. When the language was created, multicore CPU where not yet available. The follow
by dragosmocrii 8y ago
To best of my knowledge, Erlang was not built for parallelism, but concurrency. When the language was created, multicore CPU where not yet available. The following article can explain better the point.
http://jlouisramblings.blogspot.com/2011/07/erlangs-parallelism-is-not-parallelism.html?m=1 http://jlouisramblings.blogspot.com/2011/07/erlangs-parallel...
- pdimitar 8y agoThis is pretty old. They have per-core actors and GC for a long time now.
- nathan_long 8y agoIt's true that when Erlang was first made, machines were single-core, so parallel execution was not possible on one machine. However, the "no shared memory" process model made transitioning to true parallelism much simpler. The ability to run one scheduler per core was added around 2005 I think. See https://hamidreza-s.github.io/erlang/scheduling/real-time/preemptive/migration/2016/02/09/erlang-scheduler-details.html https://hamidreza-s.github.io/erlang/scheduling/real-time/pr... Also: > Erlang achieves concurrency by interleaving the execution of processes on the Erlang virtual machine, the BEAM. On a multi-core processor the BEAM can also achieve parallelism by running one scheduler per core and executing one Erlang process per scheduler. The designer of an Erlang system can achieve further parallelism by distributing the system on several computers. > https://happi.github.io/theBeamBook/ https://happi.github.io/theBeamBook/ My understanding is that the BEAM will also do "work stealing" among schedulers to take better advantage of the available CPUs.