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


Groups > comp.programming.threads > #2357

About my new algorithm

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject About my new algorithm
Date 2014-05-18 15:10 -0700
Organization albasani.net
Message-ID <llb0ia$oaa$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,


Here is what have changed in my new algorithm of a very fast concurrent 
FIFO queue: In my previous algorithm the atomic increment of 
"LockedIncLong(temp)" was located after the getlength() method , so in 
the worst case scenario,  that happen frequently under contention, we 
have to transfer 4 cache-lines between the cores: the tail variable, the 
head variable, and another time the head variable,  and the flag1 
variable, this will make it 4 cache-line transfers and this is 
expensive... so in my new algorithm i have reduce that to 3 cache-lines 
transfers in the worst case, that happen
frequently under contention, and this is much better , so my new 
algorithm has scored much better throughput than my previous algorithm,
and my new algorithm is 100% starvation-free.

Hope you will be happy with this new algorithm.

Here is my new algorithm:

http://pages.videotron.com/aminer/CQueue2.htm


And you can download my very concurrent FIFO queue version 1.2 from:

https://sites.google.com/site/aminer68/concurrent-fifo-queue-1



Thank you,
Amine Moulay Ramdane.


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


Thread

About my new algorithm aminer <aminer@toto.net> - 2014-05-18 15:10 -0700
  Re: About my new algorithm aminer <aminer@toto.net> - 2014-05-18 15:12 -0700
  Re: About my new algorithm aminer <aminer@toto.net> - 2014-05-18 15:16 -0700

csiph-web