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


Groups > comp.programming.threads > #2715 > unrolled thread

About my scalable RWLocks and Seqlock

Started byRamine <ramine@1.1>
First post2014-11-25 14:27 -0800
Last post2014-11-25 15:44 -0800
Articles 2 — 1 participant

Back to article view | Back to comp.programming.threads


Contents

  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

#2715 — About my scalable RWLocks and Seqlock

FromRamine <ramine@1.1>
Date2014-11-25 14:27 -0800
SubjectAbout my scalable RWLocks and Seqlock
Message-ID<m52vnv$b69$2@dont-email.me>
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.





[toc] | [next] | [standalone]


#2718

FromRamine <ramine@1.1>
Date2014-11-25 15:44 -0800
Message-ID<m5348e$qn1$1@dont-email.me>
In reply to#2715
On 11/25/2014 2:27 PM, Ramine wrote:
> 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

I mean: with many more writers...

> 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.
>
>
>
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web