Hello,
Concurrent FIFO Queue was updated to version 1.01, i have added the Ticket Spinlock with a proportional backoff so that
it becomes FIFO fair and so that it reduces the cache-coherence traffic , my
concurrent FIFO queue is also energy efficient on the pop(): when there is no items in the queue it will not spin-wait , but it will wait on a portable manual event object, and now using the Ticket Spinlock with a proportional backoff it gives 3 millions push transactions per second much better than the scalable Anderson lock and that's excellent, you can use also the scalable Anderson lock but it gives less throughput than
the TicketSpinlock with a proportional backoff.
If you want to use the TicketSpinlock
use "Ticket" inside the defines.inc and
if you want to use the scalable Anderson lock use "ALOCK" inside the defines.inc.
Authors: Amine Moulay Ramdane.
Description:
A concurrent FIFO queue that satisfies many requirements: it is FIFO fair, it minimizes efficiently the cache-coherence traffic and it is energy efficient on the pop(): when there is no items in the queue it will not spin-wait , but it will wait on a portable manual event object.
Please take a look a the test.pas Object Pascal demo inside the zipfile, compile and run it...
You can download Concurrent FIFO Queue 1.01 from:
http://pages.videotron.com/aminer/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.