[erlang-questions] ets vs. SMP memory effects

Kenneth Lundin kenneth.lundin@REDACTED
Tue Jun 4 13:52:19 CEST 2013


ETS tables can be seen as global data within the Erlang VM.
If a process makes updates A, B and C, the updates will become visible in
that order for other processes.
Of course other processes might come in and see the updates in between A,
B, C as well.

There is no transaction support in ETS where several updates can be done as
one atomic operation. To achieve that you need to use Mnesia.

/Kenneth Erlang/OTP Ericsson


On Tue, Jun 4, 2013 at 3:03 AM, Jonathan Leivent <jleivent@REDACTED>wrote:

> After reading the on-line doc on ets, I'm a bit confused about its
> guarantees.  I understand that it guarantees atomicity and isolation for
> operations on a single object.  However, what about a sequence of update
> operations on different objects performed by the same process?  Are the
> results of these operations guaranteed to be visible to other processes in
> only the order in which they occur?  Or, might SMP-style weakly-consistent
> memory - or even compiler/hardware operation re-ordering - cause the
> updates to appear in a different order to other processes?
>
> -- Jonathan
> ______________________________**_________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130604/8001b79d/attachment.htm>


More information about the erlang-questions mailing list