2

If Erlang does its own process creation and scheduling, without utilizing OS threads, how does it make use of multiple CPU cores? My limited understanding is that the OS assigns the CPU cores to OS threads.

gopi reddy
  • 23
  • 4

1 Answers1

3

Erlang runs on a virtual machine called BEAM.

The Erlang process runs a separate BEAM VM on each core (using OS threads).

See this related SO question.

Community
  • 1
  • 1
Doug Currie
  • 40,708
  • 1
  • 95
  • 119
  • Thank you. My low reputation doesn't allow me to up tick your response. – gopi reddy Aug 01 '16 at 21:19
  • Actually that is not quite right, it runs 1 BEAM VM which has an OS thread for each CPU. That way the beam can move processes between CPUs if it needs too – Zachary K Aug 15 '16 at 16:15