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


Groups > comp.programming.threads > #1913

Re: There is still a problem...

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject Re: There is still a problem...
Date 2013-10-11 19:46 -0700
Organization albasani.net
Message-ID <l3a2le$n9k$1@news.albasani.net> (permalink)
References <l39vf3$hnr$1@news.albasani.net> <l3a1m1$ljg$1@news.albasani.net> <l3a228$lvj$1@news.albasani.net>

Cross-posted to 2 groups.

Show all headers | View raw


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.



On 10/11/2013 7:36 PM, aminer wrote:
>
>
>
> 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.
>
>
>
>
> On 10/11/2013 7:30 PM, aminer wrote:
>>
>>
>> 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.
>>
>>
>>
>> On 10/11/2013 6:52 PM, aminer wrote:
>>>
>>> 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.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>

Back to comp.programming.threads | Previous | NextPrevious in thread | Find similar


Thread

There is still a problem... aminer <aminer@toto.net> - 2013-10-11 18:52 -0700
  Re: There is still a problem... aminer <aminer@toto.net> - 2013-10-11 19:30 -0700
    Re: There is still a problem... aminer <aminer@toto.net> - 2013-10-11 19:36 -0700
      Re: There is still a problem... aminer <aminer@toto.net> - 2013-10-11 19:46 -0700

csiph-web