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


Groups > comp.programming.threads > #1862

waitfree and lockfree queue...

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject waitfree and lockfree queue...
Date 2013-10-07 15:45 -0700
Organization albasani.net
Message-ID <l2v304$sv5$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

I have took a look at the following FIFO MPMC queue
that Dmitry Vyukov and Chris Thomasson wrote, and i have understood
it very well, this FIFO queue is Waitfree on the push() side
but Lockfree on the pop side... but what i don't like is that
on the pop() side when there is high contention , there will be
too many cache misses and cache lines transfer and this
will be so bad ... in a worst case scenario when the threads will be 
looping
and all crossing the "node next = cmp.m_next;" there will be progress 
but i think this FIFO queue will have to tranfer
1+2+3+4+ ..N = ((N^2+N)/2) cache lines or even worse N+N+N+N...N = N^2 
from the memory and this will be
so bad, this is what i don't like, so to lower much those cache lines 
tranfer the FIFO queue must be Waitfree on both the push() and the pop().

Here is the FIFO queue:

http://pastebin.com/f72cc3cc1


Amine Moulay Ramdane.

Back to comp.programming.threads | Previous | Next | Find similar


Thread

waitfree and lockfree queue... aminer <aminer@toto.net> - 2013-10-07 15:45 -0700

csiph-web