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


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

The following algorithm of Chriss Thomasson is very cleaver...

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

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


Contents

  The following algorithm of Chriss Thomasson is very cleaver... aminer <aminer@toto.net> - 2014-04-27 16:30 -0700

#2279 — The following algorithm of Chriss Thomasson is very cleaver...

Fromaminer <aminer@toto.net>
Date2014-04-27 16:30 -0700
SubjectThe following algorithm of Chriss Thomasson is very cleaver...
Message-ID<ljjpcn$uab$1@news.albasani.net>

Hello,

The following algorithm of Chriss Thomasson is very cleaver...


https://groups.google.com/d/topic/lock-free/acjQ3-89abE/discussion


I explain...


Notice how it's incrementing "&c.ver" variable and uisng as a Ticket 
mechanism, but the cleaverness of this mechanism comes from the fact
that the "&c.ver" is an uint32 or uint64 , hence it has  a wide range , 
so if the queue is full it has not to spin-wait waiting for
the queue length to become less than the size of the queue to
put an item as is doing my algorithm, cause this will render the 
algorithm not starvation-free, so the clevereness of the Chriss 
Thomasson algorithm comes from the fact that the "&c.ver" variable is 
uint32 or uint64, so it has a wide range , so when the queue is full the 
threads will enter the push() and wait directly on the "&c.ver" 
variable, so this will allow the algorithm of Chriss Thomasson to become 
starvation-free and this also has allowed the Chriss Thomasson algorithm 
to have more parallelism than other algorithms, so finally i think that 
the Chriss Thomasson FIFO queue is the best of its kind around.




Thank you,
Amine Moulay Ramdane.








[toc] | [standalone]


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


csiph-web