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


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

We have to be smart please...

Started byaminer <aminer@toto.net>
First post2014-05-18 17:23 -0700
Last post2014-05-18 17:23 -0700
Articles 1 — 1 participant

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


Contents

  We have to be smart please... aminer <aminer@toto.net> - 2014-05-18 17:23 -0700

#2361 — We have to be smart please...

Fromaminer <aminer@toto.net>
Date2014-05-18 17:23 -0700
SubjectWe have to be smart please...
Message-ID<llb8bp$8c9$1@news.albasani.net>
Hello,

We have to be smart please...

I have heard some devellopers talking about the advantages
of lockfree algorithms, but i am not convinced...

Because i have just benchmarked the follwing lockfree concurrent FIFO 
queue that you find inside the OmniThread library here:

http://code.google.com/p/omnithreadlibrary/downloads/detail?name=OmniThreadLibrary-3.03b.zip&can=2&q=

and i have also benchmarked the lockfree Ringbuffer that
you find here:

http://www.odsrv.com/RingBuffer/RingBuffer.htm

And i have benchmarked my follwing algorithm that is
lockfree on the pop()...

https://sites.google.com/site/aminer68/concurrent-fifo-queue-2


And i have found that all those lockfree concurrent FIFO queues are
2x times slower under contention than my following new algorithm here:

https://sites.google.com/site/aminer68/concurrent-fifo-queue-1


So as you have noticed they are slower than my new algorithm,
and also they are not starvation-free, so i am not convinced that
lockfree algorithms are good...

Why lockfree algorithms are slower like that, cause under contention the 
lockfree mechanism causes contention and you will notice that with
lockfree algorithms under contention the threads that fail will slow the 
next thread that will succeed because of contention over the bus etc. 
and this slows by much the lockfree algorithms under contention, so i 
think lockfree algorithms are bad beacause they are slower
under contention and because they not starvation-free.



Thank you,
Amine Moulay Ramdane.














[toc] | [standalone]


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


csiph-web