[erlang-questions] Lock-free message queue
Björn-Egil Dahlberg
egil@REDACTED
Wed Sep 22 15:10:26 CEST 2010
On 2010-09-22 14:48, Max Lapshin wrote:
> Just a curiosity: currently there is some kind of locks in sending message.
> Have anybody tried to implement a lock-free linked list:
> http://www.amd64.org/fileadmin/user_upload/pub/epham08-asf-eval.pdf
>
> Or I'm just looking at wrong place and erts_smp_proc_lock is already
> using something like this?
The message queue already has this, sort of. The process that owns the
message box has an "inner box" that he has a lock on and an "outer box"
that all senders compete for. So the lock contention is on the tail of
the queue on the "outer box" when lots of processes sends to that
process. The mail box owner is not concerned with it though.
// Björn-Egil
More information about the erlang-questions
mailing list