Re: How long do render callbacks have to execute?
Re: How long do render callbacks have to execute?
- Subject: Re: How long do render callbacks have to execute?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 19 Aug 2011 16:25:46 +0200
Le 19 août 2011 à 16:00, philippe wicker a écrit :
>
> On 19 Aug 2011, at 07:53, tahome izwah wrote:
>
>> 2011/8/13 Brian Willoughby <email@hidden>:
>>>
>>> On Aug 12, 2011, at 15:39, Jonathan wrote:
>>>>
>>>> Okay, that makes sense, but are the callbacks called in parallel? In other
>>>> words, is only one callback firing at a time? In the example with two
>>>> inputs into the mixer, does it fire one right after another even though from
>>>> a graph perspective they are peers?
>>>
>>> In general, a processor cannot carry out any operations in parallel.
>
> There is however one situation where a single core can execute 2 threads simultaneously, in "parallel" in a way. This is when hyper-threading is enabled. For those of you who may not know what is "hyper-threading" the basic idea behind it is to design the silicon in such a way that a second thread of instruction can be processed by filling the "holes" in the pipeline left by the 1st thread of instruction.
>
> At some point any instruction you can write needs the result of some other preceding instructions (a "good" example of this is an IIR filter). Because of this dependency the pipeline is not fully used, the hardware has to insert "stall" cycles - some sort of "NOP" cycles - needed for a result N to be actually available as input of instruction N+1. These "NOP" cycles can be filled with instructions from the 2nd thread.
>
> I don't know if Apple uses or not this feature - I remember having read some time ago that the gains in performance were not always as good as expected - but if it is enabled the OS may choose to assign 2 threads to the same core.
The performance was bad on pentium IV implementation of HyperThreading, but it is far better on modern implementations.
On OS X, each core count as a physical CPU.
If a core is able to process 2 threads at the same time (it supports Simultaneous multithreading, aka hyper-threading on Intel processors) then the system will see it as 2 logical CPU.
On a dual core Corei7 machine, sysctl reports 4 physical CPU, and 8 logical CPU.
> Anyway, it does not mean that callbacks are executed in parallel - in the sense of running at the same time in 2 different threads. For what I'v seen so far, the callbacks to a given AU instance always originate from the same thread.
>>
>> Not true. That is exactly what SIMD instructions do which are built
>> into all modern CPUs.
>>
>> --th
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
-- Jean-Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden