Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #3822 > unrolled thread
| Started by | aminer <aminer@toto.net> |
|---|---|
| First post | 2013-10-03 16:03 -0700 |
| Last post | 2013-10-03 17:26 -0700 |
| Articles | 2 — 1 participant |
Back to article view | Back to comp.programming
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
| From | aminer <aminer@toto.net> |
|---|---|
| Date | 2013-10-03 16:03 -0700 |
| Subject | Scalable Distributed Fair Lock 1.0 |
| Message-ID | <l2kihv$rti$1@news.albasani.net> |
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.
[toc] | [next] | [standalone]
| From | aminer <aminer@toto.net> |
|---|---|
| Date | 2013-10-03 17:26 -0700 |
| Message-ID | <l2kncq$5nf$1@news.albasani.net> |
| In reply to | #3822 |
Hello, Please read this about how the Ticket spinlock slows the thinks when it spins on a global variable, this problem doesn't happened with my distributed fair Lock cause my distributed fait Lock spins on local variables so it's efficient. Read please: http://lwn.net/Articles/531254/ Thank you, Amine Moulay Ramdane.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming
csiph-web