[erlang-questions] Shared memory and message passing

David Hopwood <>
Wed Sep 6 01:44:08 CEST 2006


Joel Reymont wrote:
> Joe,
> 
> What about using shared memory to optimize message passing and avoid  
> copying memory?

As long as these optimizations are transparent (which they should be), this
isn't using shared memory at the application level.

All of the disadvantages of shared state *do* apply when using it in the
implementation of a language; it's just that these disadvantages may be
worth dealing with at that level, because they are amortized over all
applications that the language implementation can support.

> This does not involve locks or critical sections, right?

Mu.

(It probably doesn't for efficiency reasons; message passing can be
implemented in a lock-free way more efficiently than using locks. But
that's up to the language implementor.)

-- 
David Hopwood <>





More information about the erlang-questions mailing list