Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

There is still a problem...

3 views
Skip to first unread message

aminer

unread,
Oct 11, 2013, 9:52:12 PM10/11/13
to

Hello,

We have to be smart, i have invented a waitfree bounded FIFO queue
and i was writing the algorithm on a paper and thinking at the same
time, it's true that my new algorithm satisfies the FIFO fairness
requirement, it also minimizes efficiently the cache-coherence
traffic... but there is still a problem, this waitfree FIFO queue
doesn't statisfies a requirement, wich one? when there is no items in
the queue the threads must not spin-wait cause it's CPU inefficient i think,
and those lockfree and waitfree algorithms must use a spin-wait
mechanism when there is no items in the queue and they want to wait
for items in the queue etc. and my new waitfree algorithm must also use
a spin-wait mechanism in this case, so
they will take too many CPU ressources if there is no items in
the queue, so to satisfy this requirement we must use my SemaCondvar
or a FIFO fair Semaphore , but this will slow too much the FIFO queue..
so as you are noticing with me it's not a silver bullet.


Hope you have understood my ideas...



Thank you,
Amine Moulay Ramdane.







aminer

unread,
Oct 11, 2013, 10:30:03 PM10/11/13
to


Hello,

I think if the number of threads are not greater than the number
of cores , so the spin-wait for an item in the queue will not be a big
problem, it will not take too much CPU ressources in each core, so i
think waitfree algorithms are still usefull.


But lockfree algorithms do not minimize efficiently the cache-coherence
traffic, they generate too much cache coherence traffic and they
are not FIFO fair , so they are not starvation-free, hence i think they
are bad.


Thank you,
Amine Moulay Ramdane.



aminer

unread,
Oct 11, 2013, 10:36:34 PM10/11/13
to



Sorry i correct...

Even if the number of threads are greater than the number of cores ,
this will not take too much CPU ressources, cause we are spinning
and using sleep(0) for example , so it's not a big problem for waitfree
FIFO queue algorithms.


Thank you,
Amine Moulay Ramdane.




aminer

unread,
Oct 11, 2013, 10:46:47 PM10/11/13
to

Hello,

Sorry there is still a problem, cause spin-wait in lockfree
and waitfree FIFO queues even with a sleep(0) (when for example there no
items in the queue) do not satisfy the requirement of the
energy efficency. That's sad i think, cause we have to use
my FIFO fair SemaCondvar or FIFO fair semaphores to satisfy
the requirement of energy efficiency, but SemaCondvar and Semaphores
are slow, that's sad.


Thank you,
Amine Moulay Ramdane.



0 new messages