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


Groups > comp.programming > #3764

There is still a problem with SpinLock...

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject There is still a problem with SpinLock...
Date 2013-09-23 03:51 -0700
Organization albasani.net
Message-ID <l1ortb$5sm$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

That's not the end of the story, there is still a problem with the 
SpinLock that i am using, it's a TTAS with an exponential backoff but 
this kind
of spinlock suffers from starvation, i mean that some threads may starve 
for a long time and this is not acceptable, and i think
that the lockfree algorithms that spin on a CAS suffers from the same
problem that is starvation, so the solution is to use a Ticket Spinlock 
with backoff that is fair to resolve the starvation problem , but this 
kind of Ticket Spinlock spins on a shared variable and this higher the 
cache-coherence traffic, so this will slow the system globally so this 
is not
so efficient, so the MCS queue Lock is the solution i think.

But i have still a question for you:

Does the Windows critical section suffers from this starvation problem
and does it uses a TTAS with backoff or is it the same as an MCS queue 
Lock or ..?



Thank you,
Amine Moulay Ramdane.

Back to comp.programming | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

There is still a problem with SpinLock... aminer <aminer@toto.net> - 2013-09-23 03:51 -0700
  Re: There is still a problem with SpinLock... aminer <aminer@toto.net> - 2013-09-23 04:18 -0700
  Re: There is still a problem with SpinLock... "Chris M. Thomasson" <no@spam.invalid> - 2013-09-23 11:39 -0700

csiph-web