Recent

Author Topic: Scalable RWLock 2.0  (Read 2034 times)

aminer

  • Hero Member
  • *****
  • Posts: 956
Scalable RWLock 2.0
« on: January 24, 2014, 05:47:05 am »
Hello all,

I have finally found a solution that brings FIFO fairness to
my scalable RWLock, i have tested this solution and it is now working
perfectly in practice, this solution uses two SemaMonitors on the
reader side and one SemaMonitor on the writer side.

So now my scalable RWLock, the variant called RWLock2, supports the following requirements:


1- It uses my SemaMonitor on both the reader and writer side
so it uses less CPU ressources.

2- It scales on multicores

3- It is  FIFO fair on both the reader and the writer side
   and it is starvation free.


You can download all the variants of my scalable RWLock from:

http://pages.videotron.com/aminer/


And please take a look at my new algorithm inside RWLock2.pas.




Thank you,
Amine Moulay Ramdane.
 




aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Scalable RWLock 2.0
« Reply #1 on: January 24, 2014, 06:16:45 pm »

Hello all,


I was thinking about my new scalable RWLock2, you have to understand
an important thing, if from the time t1 to the time t2 there is writes
and reads and from the time t2 to time t3 there is only reads, so 
even if the time from t1 to t2 will add more to the overall time cause there is write threads, the perceived throughput from time t2 to t3 will be higher and the waiting time from t2 to t3 will be lower and this will make my scalable RWLock usefull.


You can download my new scalable RWLock from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Scalable RWLock 2.0
« Reply #2 on: January 24, 2014, 06:25:49 pm »
Hello,

I have updated my scalable RWLock to version 2.01

You can download my new scalable RWLock 2.01 from:
 
http://pages.videotron.com/aminer/


Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Scalable RWLock 2.0
« Reply #3 on: January 26, 2014, 03:08:17 pm »
Hello,

My scalable RWLock was updated to version 2.02, the
RWLock2 variant had a race condition so i have deleted it
from the zip file.

So now my scalable RWLock zip file contains two variants,
a fast  and scalable and lightweight Multiple-Readers-Exclusive-Writer Lock that is portable called LW_RWLock and that works across processes and threads and another one that is fast and also scalable Multiple-Readers-Exclusive-Writer Lock that is portable called RWLock and that don't use spin wait but uses and manual event object and my SemaMonitor, so RWLock consumes less CPU ressouces than the lightweight version. I have verified my scalable RWLock algorithms extensivly and they are working perfectly.


So now my scalable RWLock, the variant called RWLock, supports the following requirements:


1- It uses my SemaMonitor and a manual event object so it uses less CPU ressources.

2- It scales on multicores


You can download my scalable RWSLock version 2.02 from:

http://pages.videotron.com/aminer/




Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Scalable RWLock 2.0
« Reply #4 on: January 26, 2014, 05:37:23 pm »
Hello,


As you have noticed i was trying to implement the starvation free requirement, but i was thinking more and since with RWLock the writes are infrequent, so i don't think threads will starve.

Other than that RWLock 2.02 is stable now, and i have verified  extensivly the two RWLock algorithms and they working perfectly.


So be happy with with my scalable RWLock 2.02.

You can download my scalable RWLock version 2.02 from:

http://pages.videotron.com/aminer/




Thank you,
Amine Moulay Ramdane.


 

TinyPortal © 2005-2018