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


Groups > comp.programming.threads > #2198

Concurrent FIFO queue version 2.01

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject Concurrent FIFO queue version 2.01
Date 2014-04-21 15:59 -0700
Organization albasani.net
Message-ID <lj3tao$nro$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

I have updated my concurrent FIFO queue to version 2.01,
i have added a sleep(0) with a proportaional backoff
to the TicketSpinlock to avoid the serious problem  that i have spook
about in my previous post, and my concurrent FIFO queue
is giging now 3.2 millions of Transactions per second on
my 2.4 GHz Quadcore.. and it is stable now, i have updated
all my other programs with this patch , so i advise you to
download all my other programs too if you need them.


Description:

A concurrent FIFO queue that satisfies many requirements: it is FIFO 
fair on the push() side and lockfree on the pop() side, it uses only an 
atomic increment on the push() side and s proportional backoff on the 
push() to optimize it more on the push() side and it uses a CAS on the 
pop() side , and it minimizes efficiently the cache-coherence traffic 
and it is energy efficient on the pop() side: when there is no items in 
the queue it will not spin-wait , but it will block and wait on my 
SemaMonitor, this concurrent FIFO queue is limited to 1000 threads on 
the push() side, if you want to higher that , just modify the "margin" 
constant in the source code. This concurrent FIFO queue  gives a 
throughput of 3.2 millions of transactions per second on my 2.4 GHz 
Quadcore, that's cool and that's  a decent throughtput .


You can download my concurrent FIFO queue from:

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


Please take a look a the test.pas Object Pascal demo inside the zipfile, 
compile and run it...

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Windows, Mac OSX , Linux , Unix...


Required FPC switches: -O3 -Sd -dFPC -dFreePascal

-Sd for delphi mode....

{$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems

{$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems



Thank you,
Amine Moulay Ramdane.




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


Thread

Concurrent FIFO queue version 2.01 aminer <aminer@toto.net> - 2014-04-21 15:59 -0700

csiph-web