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


Groups > comp.programming.threads > #2372 > unrolled thread

Please read this about my scalable MLock

Started byaminer <aminer@toto.net>
First post2014-05-22 21:56 -0700
Last post2014-05-22 21:56 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.programming.threads


Contents

  Please read this about my scalable MLock aminer <aminer@toto.net> - 2014-05-22 21:56 -0700

#2372 — Please read this about my scalable MLock

Fromaminer <aminer@toto.net>
Date2014-05-22 21:56 -0700
SubjectPlease read this about my scalable MLock
Message-ID<llm9sm$dan$1@news.albasani.net>
Hello,

Please read this:


"A bigger problem with the MCS lock is its API. It requires a second 
structure to be passed in addition to the address of the lock. The 
algorithm uses this second structure to store the information which 
describes the queue of threads waiting for the lock. Unfortunately, most 
code written using spinlocks doesn't have this extra information, so the 
fact that the MCS algorithm isn't a drop-in replacement to a standard 
spin lock is a problem.

An IBM working group found a way to improve the MCS algorithm to remove 
the need to pass the extra structure as a parameter. Instead, on-stack 
information was used instead. The result is the K42 lock algorithm:

Unfortunately, the K42 algorithm has another problem. It appears that it 
may be patented by IBM. Thus it cannot be used either. (Without perhaps 
paying royalties to IBM.)"


So you have to know that my scalable MLock doesn't require a local 
"queue node" to be passed in as a parameter  as is doing the MCS and CLH 
locks, my scalable MLock doen't require any parameter to be passed,
just call the Enter() and Leave() method and that's all.

- This scalable Lock was discovered by Amine Moulay Ramdane

- It has the same space requirement as the scalable MCS lock

- Doesn't require a local "queue node" to be passed in as a parameter 
as is doing the MCS and CLH locks.

- Spins only on local locations on a cache-coherent machine


And my scalable MLock is fast.


You can download my scalable MLock from:

https://sites.google.com/site/aminer68/scalable-mlock



Thank you,
Amine Moulay Ramdane.








[toc] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web