[erlang-questions] lock-free hash table

Bjorn Gustavsson bjorn@REDACTED
Wed Aug 8 07:41:03 CEST 2007


Serge Aleynikov <saleyn@REDACTED> writes:

> Another useful application of SMP-safe lock-free FIFO queues could be 
> inside the emulator.  Correct me if I am wrong but in the emulator with 
> SMP support different schedulers use mutex synchronization in order to 
> get the next process descriptor off of a shared linked list of all 
> processes waiting to be dispatched.  Also when copying a message sent by 
> some Erlang process to a mailbox of another Erlang process the emulator 
> with SMP support uses POSIX locking to ensure thread safety (if I 
> remember it correctly).
> 
> In both of these cases using lock-free FIFO queues can provide a much 
> better scalability when used on multi-core CPUs compared to traditional 
> mutex-based locking primitives.

We will definitely consider using lock-free data structure in future releases
of the SMP emulator. Thanks for the references. Now that the SMP emulator
seem to be stable, most of our future work on it will be to improve its
performance.

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list