Boost logo

Boost :

Subject: Re: [boost] [lockfree::fifo] Review
From: Helge Bahmann (hcb_at_[hidden])
Date: 2009-12-11 12:59:05


Am Friday 11 December 2009 17:07:58 schrieb Gottlob Frege:
> > The message should however be clear: ll/sc is *brittle* and not usable
> > for ABA prevention.
> >
> > Helge
>
> Sad thing is that if some of those brittle restrictions could be
> removed, ll/sc could be a more useful than CAS. And unfortunately
> C++0x seems to be leanings towards CAS, and that might discourage
> other alternatives.

What _are_ the alternatives? Transactional memory systems have been
promised "real soon now", but are not there yet, and standardizing something
unimplementable helps no one.

In my opinion the problem is something entirely different: When you need
a "queue" concept, you will highly likely immediately choose a doubly-linked
list without further thought. The thing that turned out to be really
difficult is the construction of direct wait-free equivalents of such
seemingly "simple" specific data structures.

This has not prevented programmers who had no trouble constructing
data-structures custom-tailored to their specific purpose from being very
successful with just CAS. This track record, the many instances of code using
locking that could be replaced with wait-free methods (see e.g. my wait-free
signal/slot library) and the theoretical results showing CAS to be universal
make me quite content with CAS.

Helge


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk