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


Groups > comp.programming > #3922 > unrolled thread

There is still a problem...

Started byaminer <aminer@toto.net>
First post2013-10-11 18:52 -0700
Last post2013-10-11 19:46 -0700
Articles 4 — 1 participant

Back to article view | Back to comp.programming


Contents

  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

#3922 — There is still a problem...

Fromaminer <aminer@toto.net>
Date2013-10-11 18:52 -0700
SubjectThere is still a problem...
Message-ID<l39vf3$hnr$1@news.albasani.net>
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.






[toc] | [next] | [standalone]


#3923

Fromaminer <aminer@toto.net>
Date2013-10-11 19:30 -0700
Message-ID<l3a1m1$ljg$1@news.albasani.net>
In reply to#3922

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.
>
>
>
>
>
>
>

[toc] | [prev] | [next] | [standalone]


#3924

Fromaminer <aminer@toto.net>
Date2013-10-11 19:36 -0700
Message-ID<l3a228$lvj$1@news.albasani.net>
In reply to#3923


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.
>>
>>
>>
>>
>>
>>
>>
>

[toc] | [prev] | [next] | [standalone]


#3925

Fromaminer <aminer@toto.net>
Date2013-10-11 19:46 -0700
Message-ID<l3a2le$n9k$1@news.albasani.net>
In reply to#3924
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.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web