Hello,
We have to be very carefull, i have just benchmarked my Scalable distributed Lock
version 1.1, and i have noticed that since it uses a Ticket mechanism it
doesn't scale, the problem with the Ticket mechanism is that it has a poor performance cause in the case of a spinlock without tickets when it is unlocked() the first thread that comes first to the lock() will enter immediatly the locked section, but that's not the case with a Ticket spinlock cause if the first thread that enters the lock() first has not the ticket to enter, the other thread that have the ticket to enter and that is waiting for his turn will wait longer/more, if there is
also context switches it will wait longer, so this is why the Ticket spinlock has a poor performance compared to a simple spinlock with a backoff, so i have decided to return back to my scalable distributed Lock
version 1.0, the version 1.0 doesn't use a ticket mechanism but it
is much fair than the Windows critical section , other than that
i have benchmarked the Windows critical section and i have noticed that
it doesn't scale well , my scalable distributed Lock scales much better , also my scalable distributed Lock spins on local variables so it reduces
the cache misses and it reduces the cache-coherence traffic, the Windows
critical section spins on a global variable so it's less efficient than
my scalable distributed Lock.
Thank you,
Amine Moulay Ramdane.