comp.programming.threads@googlegroups.com | Google Groups | ![]() |
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.programming.threads+unsubscribe@googlegroups.com. |
- Mu explanation of my algorithm - 1 Update
- More information - 1 Update
- A very fast concurrent FIFO Queue and a very fast concurrent priority FIFO Queue version 1.2 - 2 Updates
- A very fast concurrent FIFO Queue 1 version 1.3 - 1 Update
Ramine <ramine@1.1>: Nov 21 02:25PM -0800 Hello, Here is the explanation of my new algorithm, this very fast concurrent FIFO queue is starvation-free and FIFO fair on the push() side and lockfree on the pop() side, it has given the same performance as the Chriss Thomasson concurrent FIFO queue that uses the backery algorithm, my new algorithm has scored 13 millions of pop() transactions per second and 10.0 millions of push() transaction per second on my 2.4 GHz Quadcore, , i have used it to implement also a very fast concurrent prioority FIFO queue that you will find on the same zipfile. Here is my new explanation of my algorithm: http://pages.videotron.com/aminer/CQueue1.htm Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Nov 21 01:20PM -0800 Hello, Please look at the source code of my new very fast concurrent FIFO queue and very fast concurrent priority queue and you will notice that they are now starvation-free on the push() side, so if you look at the old explanation of my algorithm here: http://pages.videotron.com/aminer/CQueue1.htm I have not yet updated the explanation of my algorithm cause i have changed a little bit the push() side so that it becomes starvation-free, but the pop() that is lockfree side have not changed... Please look at the source code so that you can understand my very fast algorithm better... You can download the source code from here: https://sites.google.com/site/aminer68/concurrent-fifo-queue-2 Thank you for your time. Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: Nov 21 12:51PM -0800 Hello, A very fast concurrent FIFO Queue and a very fast concurrent priority FIFO Queue version 1.2 Author: Amine Moulay Ramdane Description: A very fast concurrent FIFO queue and a very fast concurrent priority FIFO queue that satisfy many requirements: they have more parallelism than the two locks algorithm, they are 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 emaMonitor, 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 very fast. This concurrent FIFO queue and concurrent priority FIFO queue are limited to 1000 threads on the push() side, if you want to higher that, just modify the "margin" constant in the source code. 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 MLock option scored 12.0 millions of transactions per second on my 2.4 GHz Quadcore, 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 can download them from: https://sites.google.com/site/aminer68/concurrent-fifo-queue-2 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. |
Ramine <ramine@1.1>: Nov 21 01:10PM -0800 Hello, Those very fast concurrent FIFO queue and concurrent priority FIFO queue are compatible with Delphi 7 to 2007 and with FreePascal and Lazarus and with all the Delphi XE versions.. To compile them with the Delphi XE versions please download the zipfile called "wqueue1_xe.zip".. And to compile them for Delphi 7 to Delphi 2007 or with FreePascal or Lazarus please download the zipfile called "wqueue1.zip". Thank you, Amine Moulay Ramdane. On 11/21/2014 12:51 PM, Ramine wrote: |
Ramine <ramine@1.1>: Nov 21 12:55PM -0800 Hello, A very fast concurrent FIFO Queue 1 version 1.3 Authors: Amine Moulay Ramdane Description: A very fast concurrent FIFO queue that satisfies many requirements: it has more parallelism than the two locks algorithm, it is FIFO fair , it's starvation-free and it minimizes efficiently the cache-coherence traffic and it is 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 it will not spin-wait , but it will block wait on my SemaMonitor, and when the wait parameter of the constructor is set to false it uses only an atomic increment on the push() side and an atomic increment on the pop() side, so it's very fast. The number of threads on the push() side are limited by the length of the queue, and the number of threads on the pop() side are limited by the length of the queue, the length of the queue must be greater or equal to 2^10, i have set it like that. You have 3 options for setting the kind of locks, just look inside defines.inc , if you want to set it for my array based lock called AMLock just uncomment the option AMLock 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 Ticket Spinlock option scored 12.5 millions of transactions per second on my 2.4 GHz Quadcore. 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/concurrent-fifo-queue-1 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. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com. |
No comments:
Post a Comment