• My new inventions that are my variants of Scalable RWLocks were updated

    From Wisdom90@21:1/5 to All on Thu Apr 16 18:46:13 2020

    Read this:

    My new inventions that are my variants of Scalable RWLocks were updated
    to version 4.50

    Author: Amine Moulay Ramdane


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

    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;
    i: Integer;

    FNV_offset_basis: UInt64 = 14695981039346656037;
    FNV_prime: UInt64 = 1099511628211;
    //FNV-1a hash

    Result := FNV_offset_basis;

    for i := 1 to 8 do
    key1:=(key shr ((i-1)*8)) and $00000000000000ff;
    Result := (Result xor key1) * FNV_prime;

    You can download them from my website here:


    Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/

    Operating Systems: Win , Linux (x86).

    Required FPC switches: -O3 -Sd

    -Sd for delphi mode....

    Required Delphi switches: -DDelphi -DMSWINDOWS -$H+

    You can configure it as follows from inside defines.inc file:

    {$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems

    {$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems

    Thank you,
    Amine Moulay Ramdane.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)