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


Groups > comp.programming.threads > #2279

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

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject The following algorithm of Chriss Thomasson is very cleaver...
Date 2014-04-27 16:30 -0700
Organization albasani.net
Message-ID <ljjpcn$uab$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw



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.








Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web