Erlang Mailing Lists

Author Message

<  Erlang  ~  Thoughs

laserlars
Posted: Mon Oct 01, 2007 10:02 am Reply with quote
Joined: 10 Sep 2007 Posts: 5
Is there a way of communication between erlang virtual machines? Iv'e noticed that the virtual machine suffers from the typical problem of 32 bits software, it can just address 1 gig of ram.

This is kind of interesting because I remember that the teacher mentioned when you are doing mallocs in C and you don't have more memory available you would most often crash your software. Please do a infinite recursion in your erlang shell and see how the virtual machine dies when it reaches your 32 bit application memory limit. Isn't it just possible that if you spawn enough processes, eventually you could make the virtual machine crash due to memory exhaustion? I mean, we can do something similar with C very easy. Just try to spawn that thread until it works. Smile

And regarding another curiosity is it even possible to have response-times in microseconds in erlang if you only got like 1000 System Ticks/s So what I'm saying is that it should not be possible to a react to different events more than 1000 times a second.
View user's profile Send private message
Mazen
Posted: Mon Oct 01, 2007 12:02 pm Reply with quote
User Joined: 20 Jul 2006 Posts: 164 Location: London
I don't have all the answers but I do have three Smile

1) Yes you can communicate between two nodes using rpc. Just make sure that the two nodes have the same cookie [1][2].

2) You can't crash the VM by simply spawning processes. You will get an error saying that you have reached the limit. The process is never created and you get a crash report. Maybe there is a way but last time I tried maximizing the number of processes, this is what happened. The reason you can do it in C so easy is that in C you have nothing that manages your code... your free to do exactly what ever you want (almost Razz)

3) In order to crash the virtual machine by recursion is to use non tail recursive functions. This will probably blow up the VM pretty quickly. (I.e. try to stick to tail-recursive functions Smile)

[1] http://www.erlang.org/doc/reference_manual/distributed.html#11
[2] http://www.erlang.org/doc/man/rpc.html
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum