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


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

About fast concurrent FIFO queue

Started byaminer <aminer@toto.net>
First post2014-04-23 14:39 -0700
Last post2014-04-23 14:39 -0700
Articles 1 — 1 participant

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


Contents

  About fast concurrent FIFO queue aminer <aminer@toto.net> - 2014-04-23 14:39 -0700

#2224 — About fast concurrent FIFO queue

Fromaminer <aminer@toto.net>
Date2014-04-23 14:39 -0700
SubjectAbout fast concurrent FIFO queue
Message-ID<lj91d6$h80$1@news.albasani.net>
Hello,

About fast concurrent FIFO queue 1.0 , as you have noticed i have
used a Ticket Spinlock with a proportional backoff in my other 
concurrent FIFO queues, but it has giving a Throughtput of 3.2 millions 
of transactions per second on my 2.4GHz Quadcore, that's a decent 
throughtput, but since i was using a Ticket Spinlock in my other 
concurrent FIFO queues they can not scale to a number of threads greater 
than the number of cores, the 3.2 millions of transactions was scored 
when the number of threads are equal to the number of cores, this is the 
weakness of the Ticket Spinlock and the array based lock and the queue 
locks such us the MCS and CLH locks, they do not scale
when the number of threads are greater to the number of cores,
so i have decided to use a Spinlock with a backoff inside my SemaMonitor 
, so the backoff has amortized greatly the cache-line transfers , so 
even if i am using my SemaMonitor inside this fast concurrent FIFO queue 
, this has giving me a throughput of 6.4 millions per second on my 2.4 
GHz Quadcore, and that's a very good throughput,   other than that this 
simple spinlock with a backoff will permit my concurrent FIFO queue to 
scale even if the number of thread is greater than the number of cores. 
But as you have noticed since i am using a backoff inside this simple 
spinlock that is used by my SemaMonitor, so in high contention some 
threads can be stopped with a backoff from time to time allowing other 
threads to run and this can be a problem for some other scenarios that 
must not allow this to happen, but if you want to solve this problem 
just use my other concurrent FIFO queues.


You can download all those concurrent FIFO queues from my website:

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




Thank you,
Amine Moulay Ramdane.


[toc] | [standalone]


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


csiph-web