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


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

A new node based scalable and fair and starvation-free lock is coming...

Started byaminer <aminer@toto.net>
First post2014-05-11 19:28 -0700
Last post2014-05-11 18:13 -0700
Articles 2 — 2 participants

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


Contents

  A new node based scalable and fair and starvation-free lock is coming... aminer <aminer@toto.net> - 2014-05-11 19:28 -0700
    Re: A new node based scalable and fair and starvation-free lock is coming... "Chris M. Thomasson" <no@spam.invalid> - 2014-05-11 18:13 -0700

#2325 — A new node based scalable and fair and starvation-free lock is coming...

Fromaminer <aminer@toto.net>
Date2014-05-11 19:28 -0700
SubjectA new node based scalable and fair and starvation-free lock is coming...
Message-ID<lkp138$s1h$1@news.albasani.net>
Hello,

A new node based fair and starvation-free lock is coming...


I have invented this lock today and i will post it today or tomorrow...


It is scalable and fair and starvation-free.


It's node based so it uses less memory ressources than my
scalable AMLock but it is 50%  slower than my scalable array based lock 
called AMLock , but even if it is slower than AMLock
it minimizes efficiently the cache-coherence traffic and it's scalable 
and fair and starvation-free.



Thank you,
Amine Moulay Ramdane.







[toc] | [next] | [standalone]


#2326

From"Chris M. Thomasson" <no@spam.invalid>
Date2014-05-11 18:13 -0700
Message-ID<lkp782$kb5$1@speranza.aioe.org>
In reply to#2325
"aminer"  wrote in message news:lkp138$s1h$1@news.albasani.net... 

> Hello,
> A new node based fair and starvation-free lock is coming...
> I have invented this lock today and i will post it today or tomorrow...
[...]

Starvation-free node based queue. Humm... I am interested in
the algorithm!  :^)

Can you please try to run the algorithm against a verification
tool like Relacy and/or ThreadSanitizer!

If I like it, I might code it up in C++ and run it through
Relacy myself.

;^)


Also, have you read up on any of the hybrid versions?

Each node contains an array. So, you can get unbounded
access, and still get decent performance from using the
per-node array...


Also, using spinlocks in user code is a bit sketchy...

All of the calls to Sleep(0) make be a bit uneasy to say
the least.

FWIW, this is why I use a set of eventcounts to handle any
conditional waiting. Therefore, I do not need to spin. BTW,
using spinlocks in user land code can be a bit sketchy...

You can use an eventcount to get rid of any nasty spin-
waiting.

[toc] | [prev] | [standalone]


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


csiph-web