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


Groups > comp.programming.threads > #2715

About my scalable RWLocks and Seqlock

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Ramine <ramine@1.1>
Newsgroups comp.programming.threads
Subject About my scalable RWLocks and Seqlock
Date Tue, 25 Nov 2014 14:27:28 -0800
Organization A noiseless patient Spider
Lines 57
Message-ID <m52vnv$b69$2@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 25 Nov 2014 22:27:11 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="1ae5840e55f7298da80ae7cf67a723cd"; logging-data="11465"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RntAMOaiXNsN3w8lK1hJh"
User-Agent Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
Cancel-Lock sha1:RIORmorDTZpLq+p3hY/BNAAqTNE=
Xref csiph.com comp.programming.threads:2715

Show key headers only | View raw


Hello,



This time i will speak about my scalable RWLocks and i will
compare them to the Seqlock.


What i don't like in Seqlock , is that it doesn't treat
correctly the general cases of scenarios that we can have,
i mean let say that we are in a case scenario that is not
read mostly and we have many more writes and we don't want
to have starvation and we don't want to have livelock ,
Seqlock is not suitable for this case scenaio cause it can
livelock and it can have starvation.. this is why i have invented
my scalable RWLocks that contain scalable RWLock variants that are 
starvation-free and livelock-free and that are suitable for the general 
scenarios of the read mostly scenario or with the scenarios of many more 
writes, other than that if you look at the source code of my scalable 
RWLocks , you will notice that i am using something
like this:

---
for i:=0 to GetSystemThreadCount-1 do
  begin
    while (FCount1^[i].fcount1<>0)
     do
      begin
      end;
  end;
---


This part is not only a serial part in the Amdahl law  cause
in a case scenario with more contention, as soon as we transfer some
of all the cache-lines from the array "FCount1^[i].fcount1", the reader 
threads will still be able to run the reader section in parallel with 
the transfering of those cache-lines from the writer side, so this part 
above will run in parallel with many reader threads that will run the 
reader section, so that makes my scalable RWLocks more scalable.



You can download my scalable RWLocks from:

https://sites.google.com/site/aminer68/scalable-rwlock



Thank you,
Amien Moulay Ramdane.





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


Thread

About my scalable RWLocks and Seqlock Ramine <ramine@1.1> - 2014-11-25 14:27 -0800
  Re: About my scalable RWLocks and Seqlock Ramine <ramine@1.1> - 2014-11-25 15:44 -0800

csiph-web