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


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

More proof...

Started byaminer <aminer@toto.net>
First post2014-04-27 01:01 -0700
Last post2014-04-27 01:01 -0700
Articles 1 — 1 participant

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


Contents

  More proof... aminer <aminer@toto.net> - 2014-04-27 01:01 -0700

#2274 — More proof...

Fromaminer <aminer@toto.net>
Date2014-04-27 01:01 -0700
SubjectMore proof...
Message-ID<lji2um$m8m$1@news.albasani.net>

Hello,

I think i have finally find the answer by isolating step
by step the cause..

I was thinking the it was the "factor" called the  "contention" that is 
causing the 33% less throughput in my algorithm, but as i have told
you this was not the "factor" that we call "contention" , cause i am
using an efficient backoff on the pop() side in my Ticket mechanism,
i have just isolated more the cause by testing my other concurrent
FIFO queue that uses a  CAS based loop on the pop() side , and without
"backoff" it's scoring almost 33% less throughtput than the Chriss
Thomasson algorithm that uses the bakery algorithm, the lockfree CAS 
loop is scoring 33% less throughput on the pop() side cause it is
serializing the instruction inside the CAS as is doing
my other algorithm that uses the Ticket mechanism, but the Chriss
Thomasson algorithm is parallelizing more by executing in parallel
the "while ATOMIC_LOAD(@c^.ver) <> ver + 1 do backoff;" so if
the "while ATOMIC_LOAD(@c^.ver) <> ver + 1" is false for many threads
in parallel i think that the ATOMIC_LOAD(@c^.ver) instruction will be 
executed in parallel by many threads, and there must be some gain inside 
the hardware by parallelizing like is doing Chriss Thomasson algorithm , 
so finally i think that the Chriss Thomasson algorithm has more 
parallelism than the lockfree CAS based loops and more parallelism than 
my Ticket mechanism on the pop() side, this is why my algorithm has 
scored 33% less thhroughput than the Chriss Thomasson algorithm.


Here is the Chriss Thomasson algorithm , i finally think
that it's the best one of its kind ! Look at this algorithm here:


https://groups.google.com/forum/#!topic/lock-free/acjQ3-89abE/discussion





Thank you,
Amine Moulay Ramdane.







[toc] | [standalone]


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


csiph-web