[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming

We have to be smart please...

aminer

5/19/2014 12:24:00 AM


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&ca...

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

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

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

https://sites.google.com/site/aminer68/concurrent-fi...


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-fi...


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.