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


Groups > comp.programming.threads > #2699 > unrolled thread

Another fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue version 1.0

Started byRamine <ramine@1.1>
First post2014-11-22 18:31 -0800
Last post2014-11-24 15:13 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.programming.threads


Contents

  Another fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue version 1.0 Ramine <ramine@1.1> - 2014-11-22 18:31 -0800
    Re: Another fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue version 1.0 Tom <mail2devnull@web.de> - 2014-11-24 15:13 +0100

#2699 — Another fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue version 1.0

FromRamine <ramine@1.1>
Date2014-11-22 18:31 -0800
SubjectAnother fast concurrent FIFO Queue and a fast concurrent priority FIFO Queue version 1.0
Message-ID<m4r6b1$b1n$2@dont-email.me>
Hello,


Another fast concurrent FIFO Queue and a fast concurrent priority FIFO 
Queue version 1.0, they are waitfree on the push() side and lockfree on 
the pop() side.


Authors: Based on Dmitry Vyukov concurrent FIFO queue


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 lockfree on the pop() side, 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 on the pop() side, so they 
are fast.

You have 3 options for setting the kind of locks, just look 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, the 
Spinlock scaled better even if the number of threads are greater than 
the number of cores, the TicketSpinlock and MLock don't scale well when 
the number of threads are greater than the number of cores, the Ticket 
Spinlock and scalable MLock are optimal when the number of threads are 
equal to the number of cores, and when the wait parameter of the 
constructor is false it scales even if the number of threads are greater 
than the number of cores.

The size of the queue must be passed to the constructor and it must be a 
power of 2.


You an download it from:

https://sites.google.com/site/aminer68/conccurent-fifo-queue-4


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

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

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

-Sd for delphi mode....

Required Delphi switches:  -$H+ -DDelphi

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

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



Thank you,
Amine Moulay Ramdane.

[toc] | [next] | [standalone]


#2700

FromTom <mail2devnull@web.de>
Date2014-11-24 15:13 +0100
Message-ID<20141124151328.5ef707c599642ad90a4c86c3@web.de>
In reply to#2699
the only one who responds to or comments on your posts is yourself. Does this tell you anything about the usefulness of your posts? or work?

On Sat, 22 Nov 2014 18:31:33 -0800
Ramine <ramine@1.1> wrote:

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web