Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #2159

Re: Bakery algorithm

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail
From "Chris M. Thomasson" <no@spam.invalid>
Newsgroups comp.programming.threads, comp.programming, comp.arch
Subject Re: Bakery algorithm
Date Sun, 13 Apr 2014 19:46:53 -0700
Organization Aioe.org NNTP Server
Lines 25
Message-ID <lifi7d$k7v$1@speranza.aioe.org> (permalink)
References <lif6if$gdp$1@news.albasani.net> <lifi20$joi$1@speranza.aioe.org>
NNTP-Posting-Host PomiWpvG4e2y0HvOhU0dhw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
X-MimeOLE Produced By Microsoft MimeOLE V15.4.3555.308
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Microsoft Windows Live Mail 15.4.3555.308
Importance Normal
X-Priority 3
X-MSMail-Priority Normal
Xref csiph.com comp.programming.threads:2159 comp.programming:4215 comp.arch:21322

Cross-posted to 3 groups.

Show key headers only | View raw


"Chris M. Thomasson"  wrote in message 
news:lifi20$joi$1@speranza.aioe.org...

> "aminer"  wrote in message news:lif6if$gdp$1@news.albasani.net... Hello,
> Here is the Bakery algorithm of the FIFO queue of Chriss Thomasson

[...]

I came up with this algorithm as a tweak from Dmitry Vyukov's original
beauty:

http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue


Here is some further context, and a complete implementation in the form
of a unit test that runs under Relacy Race Detector.

https://groups.google.com/d/topic/lock-free/acjQ3-89abE/discussion

AFAICT, its about as good as one can get wrt atomic operations on a MPMC
queue.

No CAS, only a single XADD per side... Can't get better for a general
purpose MPMC 100% fair and strict FIFO data-structure. 

Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bakery algorithm aminer <aminer@toto.net> - 2014-04-13 19:28 -0700
  Re: Bakery algorithm "Chris M. Thomasson" <no@spam.invalid> - 2014-04-13 19:44 -0700
    Re: Bakery algorithm "Chris M. Thomasson" <no@spam.invalid> - 2014-04-13 19:46 -0700
      Re: Bakery algorithm "Chris M. Thomasson" <no@spam.invalid> - 2014-04-14 13:49 -0700

csiph-web