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


Groups > comp.programming.threads > #6367

My inventions of a new variants of Scalable RWLocks that are starvation-free and fair were updated to version 5.0..

Newsgroups comp.programming.threads
Date 2021-03-09 13:31 -0800
Message-ID <ade3ceff-9cce-48f5-90cf-3ec54264165dn@googlegroups.com> (permalink)
Subject My inventions of a new variants of Scalable RWLocks that are starvation-free and fair were updated to version 5.0..
From Amine Moulay Ramdane <aminer68@gmail.com>

Show all headers | View raw


Hello...


My inventions of a new variants of Scalable RWLocks that are 
starvation-free and fair were updated to version 5.0..

I think they are stable now.

Author: Amine Moulay Ramdane

Description:

Here is my inventions of a fast, and scalable and starvation-free and fair and lightweight Multiple-Readers-Exclusive-Writer Lock called LW_RWLockX, the scalable LW_RWLockX does spin-wait, and of a fast and scalable and starvation-free and fair Multiple-Readers-Exclusive-Writer Lock called RWLockX, the scalable RWLockX doesn't spin-wait but uses my portable SemaMonitor and portable event objects , so it is energy efficient.

The parameter of the constructors is the size of the array of the readers , so if the size of the array is equal to the number of parallel readers, so it will be scalable, but if the number of readers are greater than the size of the array , you will start to have contention, please look at the source code of my scalable algorithms to understand.

And i have included two units that are called MREWEx and LighweightMREWEx that include TMultiReadExclusiveWriteSynchronizer and TLightweightMREW classes that are scalable and stavation-free and fair since they are using my Scalable RWLocks that are starvation-free and fair, please take a look at them inside the source code of my units.

I have also used my following implementation of FNV1a hash function to make my new variants of RWLocks scalable (since FNV1a is a hash algorithm that has good dispersion):

function FNV1aHash(key:int64): UInt64;

var

i: Integer;

key1:uint64;

const

FNV_offset_basis: UInt64 = 14695981039346656037;

FNV_prime: UInt64 = 1099511628211;

begin

//FNV-1a hash

Result := FNV_offset_basis;

for i := 1 to 8 do

begin

key1:=(key shr ((i-1)*8)) and $00000000000000ff;

Result := (Result xor key1) * FNV_prime;

end;

end;



You can download them from my website here:

https://sites.google.com/site/scalable68/new-variants-of-scalable-rwlocks



Thank you,
Amine Moulay Ramdane.


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


Thread

My inventions of a new variants of Scalable RWLocks that are  starvation-free and fair were updated to version 5.0.. Amine Moulay Ramdane <aminer68@gmail.com> - 2021-03-09 13:31 -0800

csiph-web