[erlang-questions] Semaphores

Richard Carlsson richardc@REDACTED
Thu Mar 15 14:13:45 CET 2007


Javier París wrote:
> El Jueves, 15 de Marzo de 2007 07:45, Corrado Santoro escribió:
>> Maybe someone reminds that, at the last EUC, the talk by Enzo Nicosia on
>> programming robots with Erlang presented the possibility (or necessity)
>> to have a *native support* for sharing simple data among processes. This
>> was due to avoid the latency of message passing between processes that
>> need/share the same information (this latency is dangerous for a
>> real-time system).
> 
> I am curious about this. Is the latency of sending a message so high that
> it affects a robot? It seems to be (from a quick non very reliable test :) 
> more or less in the single digits microseconds. 
> 
> I do not think that using shared memory with semaphores would be
> much faster (if at all), but of course I have not made any measurements :)

I believe that their latency problems were due to messages being passed
through layers of processes, so that queueing and process scheduling
affected the total end-to-end time. (But I could be wrong.) My guess is,
anyway, that restructuring the program could have solved the problem.

     /Richard




More information about the erlang-questions mailing list