Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2004-07-06 06:27:17


Peter Dimov wrote:
[...]
> The first one is broken, because the whole point of postponing the write
> lock is to allow readers to operate at full speed. However, if readers
> operate at full speed, then there is no guarantee that the write lock will
> ever succeed; ergo, starvation. So promotion is good only for non-critical
> updates.

Not quite. It depends. I have a read/write lock which is "almost"
starvation-free (it uses single "entry" lock for both readers and
writes, so that the scheduling protocol for that entry lock drives
the whole read/write locking without the need to choose between
reader or writer preference policy which could cause reader or
writer starvation). Upgradeability was the design driving force...

http://groups.google.com/groups?selm=3B166244.F923B993%40web.de

regards,
alexander.


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