My inventions of a new variants of Scalable RWLocks that are ,starvatio
From World90@21:1/5 to All on Tue Mar 9 13:29:28 2021
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
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):