Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #2361
| From | aminer <aminer@toto.net> |
|---|---|
| Newsgroups | comp.programming.threads, comp.programming |
| Subject | We have to be smart please... |
| Date | 2014-05-18 17:23 -0700 |
| Organization | albasani.net |
| Message-ID | <llb8bp$8c9$1@news.albasani.net> (permalink) |
Cross-posted to 2 groups.
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.
Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread
We have to be smart please... aminer <aminer@toto.net> - 2014-05-18 17:23 -0700
csiph-web