[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming

A fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue version 1.2

Ramine

12/4/2015 8:58:00 PM


Hello,


A fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue
version 1.2

You can download it from:

https://sites.google.com/site/aminer68/concurrent-fi...


Author: Based on Dmitry Vyukov concurrent FIFO queue

Email: aminer@videotron.ca

Description:

Description: A fast concurrent FIFO queue and a fast concurrent priority
FIFO queue that satisfy many requirements: they have more parallelism
than the two locks algorithm, they are waitfree and starvation-free and
FIFO fair on the push() side and they are FIFO fair on the pop(), and
they minimizes efficiently the cache-coherence traffic and they are
energy efficient on the pop() side when you set the wait parameter to
true in the construtor: when there is no items in the queue they will
not spin-wait , but they will block wait on my SemaMonitor, and when the
wait parameter of the constructor is set to false they uses only an
atomic increment on the push() side and a CAS and a lock on the pop()
side, so they are fast, those concurrent FIFO queues are more scalable.

You have 5 options for setting the kind of locks, just look inside
defines.inc , if you want to set it for the Mutex that is energy
efficient because it blocks the threads, uncomment the option Mutex,if
you want to set it for my scalable array based lock called AMLock just
uncomment the option AMLock inside defines.inc, if you want to set it
for my scalable lock called MLock just uncomment the option MLock inside
defines.inc, if you want to set it for Ticket Spinlock just uncomment
the option TicketSpinlock ,If you want to set it for Spinlock just
uncomment the option Spinlock.



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

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

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

-Sd for delphi mode....

Required Delphi switches: -$H+ -DDelphi

For Delphi XE-XE7 use the -DXE switch

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

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



Thank you,
Amine Moulay Ramdane.