Tony Arcieri wrote in post #1067919:
> Again, there's only one instance of BEAM, i.e. there is only one virtual
> machine, however there are 8 schedulers running inside it. These
> schedulers
> each have their own thread, however they share an address space and
> contend
> on things like memory allocation (again, because there's only one
> virtual
> machine with a single pool of resources that much be shared among
> schedulers).
>
> In the past, when Erlang really did use green threads, it was necessary
> to
> run a single Erlang VM per CPU core and use distributed Erlang (even in
> a
> single system) to get multicore parallelism. However, now that Erlang
> has
> an SMP scheduler, one Erlang VM can run a scheduler thread per CPU core
> and
> affect multicore parallelism that way.

Ah!  I'll take your word for this, and assume my Erlang distribution 
isn't as updated as I thought it was (could have sworn I had the 
latest)!  Apparently I've been doing the older method of "running a 
single VM per core" to achieve parallelism, and this is no longer 
necessary.  Got it.

Now that that's cleared up, I think we seem to be using different terms 
to describe essentially the same thing.  For you, it seems no threads 
are green anywhere if a VM or scheduler runs a native thread per core to 
achieve parallelism.  It seems you call the whole shebang "native 
threaded."

For me, I draw a line between those millions of threads living in the 
VM, and the one native scheduler thread per core.  I call the things in 
the VM "green threads," and the things the scheduler is running "real 
threads" or "kernel threads" or "OS threads" or "native threads" or 
whatever.  Furthermore, if there are what I call "green threads" 
anywhere, I say the whole shebang "has green threads" or "is green 
threaded," regardless of whether or not parallelism is achieved by a 
scheduler running a kernel thread per core.

If this is true, and we actually agree as to what's going on (albeit 
using different terms), I think we can shake hands and call it a day at 
this point.  And again, thanks for the updated info.

-- 
Posted via http://www.ruby-forum.com/.