[erlang-questions] Semaphores

Corrado Santoro csanto@REDACTED
Thu Mar 15 07:45:21 CET 2007

ok wrote:
> This is debatable.
> Semaphores are a rather dangerous and low level construction,
> and Erlang is not really supposed to be a dangerous and low level  
> language.
Indeed the programming model of Erlang is strongly based on message 
passing, which can be an *alternative method* to semaphores for 
programming concurrent systems (see the Tanenbaum's book "Modern 
Operating Systems").

> But for most purposes, Erlang *doesn't* share data.
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 would let you know that, in the software that we are writing for our 
next robot (see http://eurobot.diit.unict.it), we are trying to overcome 
latency problems without adding any data sharing support: the key point 
is to improve process dynamics and performances by rewriting a 'clone' 
of some OTP behaviours (gen_fsm and gen_server). The code of our 
behaviours is small and fast, it does dot feature *all the same* 
characteristics of gen_fsm/gen_server but only what we strict need for 
our robots. And till now it's working good!

We will let you know the results ;-)


Eng. Corrado Santoro, Ph.D.
University of Catania - ITALY - Engineering Faculty

Tel: +39 095 7382380        VoIP: sip:7035@REDACTED

Personal Home Page: http://www.diit.unict.it/users/csanto
     NUXI Home Page: http://nuxi.diit.unict.it

More information about the erlang-questions mailing list