[erlang-questions] What's the difference between starting erlang vms (pure erl shell) and starting erlang nodes on the same machine?

Barco You <>
Tue Nov 15 03:45:55 CET 2011


Dear Erlangers,


When I start two erl shells on the same machine, I got one shell with pid
<0.30.0> and the other one with <0.32.0>, and if I send a message on the
first shell:" list_to_pid("<0.32.0>") ! hello.", the second shell got
nothing by calling "flush()" on it.

However, we can still send messages between shells on the same machine by
starting them as nodes:
>erl -sname bar -setcookie barco
         >erl -sname foo -setcookie barco
Eshell V5.8.4  (abort with ^G)
            Eshell V5.8.4  (abort with ^G)
()5> register(bar,self()).
         ()1> {'',bar} ! "hello bar!".
true
                       "hello bar!"
()6> flush().
Shell got "hello bar!"
ok

I hope to know the difference between the twos ways of starting erlang
shell. Can two shells (not as nodes) send each other messages? Will the two
erlang VMs (I assume one VM for one shell) share the same
schedulers/run-queues on every core or each one has its own
schedulers/run-queues on every core? and what about the VMs for nodes?

Any insight would be appreciated.


Best regards,
Barco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111115/649a41eb/attachment.html>


More information about the erlang-questions mailing list