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


Groups > comp.programming.threads > #363

Re: Mutex or reader writer lock

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.straub-nv.de!newsfeed.pionier.net.pl!plix.pl!newsfeed1.plix.pl!news.nask.pl!news.nask.org.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From Edek <edek.pienkowski@gmail.com>
Newsgroups comp.programming.threads
Subject Re: Mutex or reader writer lock
Date Fri, 24 Jun 2011 12:02:54 +0200
Organization ATMAN - ATM S.A.
Lines 23
Message-ID <iu1nar$dbi$1@node2.news.atman.pl> (permalink)
References <b10602ad-9b3b-485e-bb1f-66b0e1b3adce@h38g2000pro.googlegroups.com> <ittper$joe$1@node2.news.atman.pl> <ZOLMp.17616$5v5.3521@newsfe11.iad> <598410ca-ad1e-4f69-8d78-b22eda6bf1f3@f39g2000prb.googlegroups.com>
NNTP-Posting-Host 83-238-152-145.ip.netia.com.pl
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace node2.news.atman.pl 1308909723 13682 83.238.152.145 (24 Jun 2011 10:02:03 GMT)
X-Complaints-To usenet@atman.pl
NNTP-Posting-Date Fri, 24 Jun 2011 10:02:03 +0000 (UTC)
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Linux/3.1.0-15 Thunderbird/3.1.0
In-Reply-To <598410ca-ad1e-4f69-8d78-b22eda6bf1f3@f39g2000prb.googlegroups.com>
Xref x330-a1.tempe.blueboxinc.net comp.programming.threads:363

Show key headers only | View raw


On 06/24/2011 11:26 AM, ittium wrote:
>
>>
>> Last time I checked (a couple of years ago), most POSIX rw-locks impls I
>> have seen used mutexs and condition variables. They had rather horrible
>> performance characteristics...
>
> Chris, I also did some more searching and it seems the rwlock
> implementation is still based on mutex and condition variable and is
> quite slow. For low contention case atleast on linux mutex (based on
> futex) can be very fast.  Criteria for choosing rwlock or mutex was
> the intention of my post.
>

Interesting - what kind of mutex can a rwlock use, if mutex is based on
futex? Non-futex mutex? What for?

On my 2.6.3x, in no collision case there is not even a futex call; on
collisions, futex calls (according to strace).

Before futexes there was no other option.

Edek

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


Thread

Mutex or reader writer lock ittium <ittium@gmail.com> - 2011-06-21 03:27 -0700
  Re: Mutex or reader writer lock David Schwartz <davids@webmaster.com> - 2011-06-21 22:03 -0700
  Re: Mutex or reader writer lock Edek <edek.pienkowski@gmail.com> - 2011-06-23 00:14 +0200
    Re: Mutex or reader writer lock ittium <ittium@gmail.com> - 2011-06-23 06:04 -0700
    Re: Mutex or reader writer lock "Chris M. Thomasson" <cristom@charter.net> - 2011-06-23 11:43 -0700
      Re: Mutex or reader writer lock ittium <ittium@gmail.com> - 2011-06-24 02:26 -0700
        Re: Mutex or reader writer lock Edek <edek.pienkowski@gmail.com> - 2011-06-24 12:02 +0200
          Re: Mutex or reader writer lock "Chris M. Thomasson" <cristom@charter.net> - 2011-06-29 13:46 -0700
            Re: Mutex or reader writer lock "Chris M. Thomasson" <cristom@charter.net> - 2011-06-29 14:26 -0700
              Re: Mutex or reader writer lock "Chris M. Thomasson" <cristom@charter.net> - 2011-06-29 20:30 -0700

csiph-web