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


Groups > comp.programming.threads > #1762

About my Scalable distributed Lock...

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail
From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject About my Scalable distributed Lock...
Date Mon, 30 Sep 2013 12:13:27 -0700
Organization albasani.net
Lines 35
Message-ID <l2c7vh$4ff$1@news.albasani.net> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net FQRutxmQ8BoucHL9ozFm8s2Gv702gykvQY7J9kLCUsbrBfnGOTzDMB5ynJeCOpiqCBIPTrMp6uVK0sKbJBs+BQ==
NNTP-Posting-Date Mon, 30 Sep 2013 16:13:37 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="HttNe2E7wuXzNPlqC1gK0N/2mYDzpnuA6raX9vMweuyG1iW8iO6RggD8PDnxxszZc7r4loKI0FrHaw55UnWmoKxX/zgNH1Au3qK95E32I0wOMGdujIvD9/U3+UwijaW1"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (Windows NT 6.0; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
Cancel-Lock sha1:ddJi2UnhZDpY1w3yW2VH2zpw+/I=
Xref csiph.com comp.programming.threads:1762 comp.programming:3810

Cross-posted to 2 groups.

Show key headers only | View raw


Hello,


We have to be very carefull, i have benchmaked 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 my scalable distributed Lock
version 1.0, the version 1.0 doesn't use a ticket mechanism but it
is much fair that 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 variable so it reduces
the cache misses and it reduces the cache-coherence traffic, the Windows
critical section spins on a local variable so it's less efficient than
my scalable distributed Lock.



Thank you,
Amine Moulay Ramdane.





Back to comp.programming.threads | Previous | NextNext in thread | Find similar


Thread

About my Scalable distributed Lock... aminer <aminer@toto.net> - 2013-09-30 12:13 -0700
  Re: About my Scalable distributed Lock... aminer <aminer@toto.net> - 2013-09-30 12:17 -0700
  Re: About my Scalable distributed Lock... aminer <aminer@toto.net> - 2013-09-30 12:20 -0700

csiph-web