[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming.threads

About my scalable RWLocks and Seqlock

Ramine

11/25/2014 10:27:00 PM

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



Thank you,
Amien Moulay Ramdane.






1 Answer

Ramine

11/25/2014 11:45:00 PM

0

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/scala...
>
>
>
> Thank you,
> Amien Moulay Ramdane.
>
>
>
>
>
>