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


Groups > comp.programming > #3875 > unrolled thread

About Lockfree also...

Started byaminer <aminer@toto.net>
First post2013-10-07 20:43 -0700
Last post2013-10-07 21:11 -0700
Articles 2 — 1 participant

Back to article view | Back to comp.programming


Contents

  About Lockfree also... aminer <aminer@toto.net> - 2013-10-07 20:43 -0700
    Re: About Lockfree also... aminer <aminer@toto.net> - 2013-10-07 21:11 -0700

#3875 — About Lockfree also...

Fromaminer <aminer@toto.net>
Date2013-10-07 20:43 -0700
SubjectAbout Lockfree also...
Message-ID<l2vket$59t$2@news.albasani.net>
I will add...


Those lockfree FIFO queue algorithms higher the cache-coherency traffic 
when there is contention, in worst scenarios you can
have 1+2+3+4+ ..N = ((N^2+N)/2) or even worse N+N+N+N...N = N^2
cache lines transfers from the memory and those Lockfree FIFO queue
algorithms are not FIFO fair , hence you can also have starvation with 
Lockfree FIFO queue algorithms, and this is not good at all,
so what i will advice is to wrap those push() and pop() of your FIFO 
queue with two Locks that support FIFO fairness to avoid also starvation 
and that lower the cache-coherence traffic, this is better i think, so 
you can use for example the Scalable Anderson Lock , the scalable MCS 
Lock or my scalable distributed Lock for that , that are better also for 
realtime systems.



Thank you,
Amine Moulay Ramdane.

[toc] | [next] | [standalone]


#3876

Fromaminer <aminer@toto.net>
Date2013-10-07 21:11 -0700
Message-ID<l2vm38$7e3$2@news.albasani.net>
In reply to#3875
On 10/7/2013 8:43 PM, aminer wrote:> when there is contention, in worst 
scenarios you can
 > have 1+2+3+4+ ..N = ((N^2+N)/2) or even worse N+N+N+N...N = N^2

In worst case scenarios it can be much much worst than that,
i have took just an example to show that lockfree FIFO queue
algorithms are very bad when there is contention.



Amine Moulay Ramdane.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web