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


Groups > comp.programming > #3822

Scalable Distributed Fair Lock 1.0

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject Scalable Distributed Fair Lock 1.0
Date 2013-10-03 16:03 -0700
Organization albasani.net
Message-ID <l2kihv$rti$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

Scalable Distributed Fair Lock 1.0 is here, i have put it again
on my website cause even that it uses a Ticket mechanism , the Ticket
mechanism performs well up to a number of threads 3X times the number of 
cores and i have benchmarked it to notice that , so the Ticket mechanism 
is still very useful.

Authors: Amine Moulay Ramdane.


Description:

A scalable distributed Lock, it is as fast as the Windows critical 
section and it is fair when there is contention , so it think it avoids 
starvation and it reduces the cache-coherence traffic. My Scalable and 
distributed Lock uses now a Ticket mechanism, but my Scalable 
distributed Lock is more efficient than the Ticket Spinlock cause it's 
distributed and hence the threads spins on local variables so it reduced 
the cache misses and the cache-cohence traffic, so my scalable 
distributed Lock is more efficient than the Ticket Spinlock.

I have not used a Waitfree queue to implement my Scalable Distributed 
Lock,  but you can use a Waitfree queue so that my Scalable Distributed 
Lock will be more efficient.

Note: You have to use a number of threads not greater than 3X times the 
number of cores so that the Ticket mechanism will be optimal.

Please take a look a the test.pas Object Pascal demo inside the zipfile, 
compile and run it...

You can download Scalable Distributed Fair Lock 1.0 from:

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


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

Operating Systems: Windows, Mac OSX , Linux , Unix...


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

-Sd for delphi mode....

{$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 | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Scalable Distributed Fair Lock 1.0 aminer <aminer@toto.net> - 2013-10-03 16:03 -0700
  Re: Scalable Distributed Fair Lock 1.0 aminer <aminer@toto.net> - 2013-10-03 17:26 -0700

csiph-web