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