What OS threads get used in Erlang’s abstract machine, BEAM?
Mon Sep 13 17:08:52 CEST 2010
I’ve begun studying Erlang and find the BEAM runtime environment fascinating. It’s commonly stated that in Erlang, processes belong to the language rather than the OS (meaning the runtime, meaning BEAM in this case). These are the lightweight, “green processes” that Erlang is getting famous for. It’s further stated (on page 5 of http://www.cs.ucsb.edu/~puneet/reports/erlang.pdf) that BEAM uses one (1) OS thread per CPU core for scheduling and another OS thread for i/o. So I wonder: From what thread do the CPU cycles needed to actually execute Erlang code come from?
Further, if I’m running on a dual core machine I would expect -- based on what I’ve read so far -- to see three (3) threads running under the BEAM process: two schedulers (one for each core) and one i/o thread. But I see 10. Sometimes 11. Sometimes it starts at 13 and, like high-quality amplifiers, goes to 11.
I’m confused. Any insight will be appreciated.
- Alan Labouseur
More information about the erlang-questions