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


Groups > comp.programming.threads > #2724

My new invention called: Scalable Distributed Sequential lock

From Ramine <ramine@1.1>
Newsgroups comp.programming.threads
Subject My new invention called: Scalable Distributed Sequential lock
Date 2014-12-03 16:06 -0800
Organization A noiseless patient Spider
Message-ID <m5nu0i$g5f$2@dont-email.me> (permalink)

Show all headers | View raw


Hello,


Here is my new invention called: Scalable Distributed Sequential lock


Author: Amine Moulay Ramdane.


Description:

This scalable distributed sequential lock was invented by Amine Moulay 
Ramdane, and it combines the characteristics of a distributed 
reader-writer lock with the characteristics of a sequential lock , so it 
is a clever hybrid reader-writer lock that is more powerful than the the 
Dmitry Vyukov's distributed reader-writer mutex , cause the Dmitry 
Vyukov's distributed reader-writer lock will become slower and
slower on the writer side with more and more cores because it transfers 
too many cache-lines between cores on the writer side, so my invention 
that is my scalable distributed sequential lock have eliminated this 
weakness of the Dmitry Vyukov's distributed reader-writer mutex,  so 
that the writers throughput has become faster and very fast, and my 
scalable distributed sequential lock elminates the weaknesses of the 
Seqlock (sequential lock) that is "livelock" and "starvation" even when 
there is more writers, so my scalable distributed sequential lock is a 
powerful sychronization mechanism that can replace RCU and that can 
replace Seqlock and that can replace Dmitry Vyukov's distributed 
reader-writer mutex. And if you look at my algorithm you will notice 
that on the reader side it looks like a sequential lock, but i have 
added a variable called fcount5^.fcount5 that allows the readers to 
switch between a sequential lock mechanism and a distributed 
reader-writer mechanism, so on the writer side you will notice that on 
every
"number of cores" steps, my scalable distributed sequential lock 
switches to a distributed reader-writer lock mechanism and executes the 
writer in this mode for a one time and for the rest of the time it will 
switch to a sequential lock mode , this allows my scalable distributed
sequential lock to minimize efficiently cache-line transfers on the 
writer side, this is why my  scalable distributed sequential lock beats 
Dmitry Vyukov distributed reader-writer mutex and it beats Seqlock.

Please look at the "test.pas" example that i have included and you will 
notice that the reader side have to be used in a transactional mode with 
a repeat-until loop, like this:


repeat
t.rlock(id1,id2);
until t.runlock(id1,id2);

it is like a transactional mode of a Seqlock and id1 and id2 must be of 
type "long" that must be imported from the drwlock library. The writer
side is easy to program , please look at the "test.pas" example and you 
will understand how to use my scalable distributed sequential lock.

My scalable distributed sequential lock can be used from accross 
processes and threads.


You can download my scalable distributed sequential lock from:

https://sites.google.com/site/aminer68/scalable-distributed-sequential-lock


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

Operating Systems: Windows, Mac OSX , Linux on x86.

Required FPC switches: -O3 -Sd -dFPC -dFreePascal

-Sd for delphi mode....

Required Delphi switches:  -$H+ -DDelphi

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

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




Thank you,
Amine Moulay Ramdane.

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


Thread

My new invention called: Scalable Distributed Sequential lock Ramine <ramine@1.1> - 2014-12-03 16:06 -0800

csiph-web