Re: [linux-audio-dev] jack_callback <-> rest of the world

From: Stéphane Letz <letz@email-addr-hidden>
Date: Wed Nov 02 2005 - 15:22:20 EET

Le 2 nov. 05 à 14:05, Alfons Adriaensen a écrit :

> On Wed, Nov 02, 2005 at 01:57:47PM +0100, St?phane Letz wrote:
>
>>> So if there are N clients, each of them needs N file descriptors
>>> open
>>> all the time. System wide the complexity grows as N^2. Not really a
>>> good way to tackle an O(N) problem IMHO.
>>
>> Yes but in the jackdmp data flow kind of model, the actual activation
>> order is only known when the graph executes.
>> Or do you have a better idea to do that?
>
> Yes, don't use named semas, but 'anonymous' ones placed in memory
> shared by all clients. Each new client gets two pointers, one to the
> sema it has to wait on (fixed for the client's lifetime), and one it
> has to signal (changes when the graph is reordered).

But in a data flow model, a given client may have to signal several
semaphores. And the client that actually signals the semaphore is
only known at activation time. For the following graph for example :

        --> A
IN --> C
        --> B

where A and B can run in parallel, C is activated by the *last*
client of A and B that finish its processing. Thus A and B have to
"know" the C semaphore.
More generally a given client would have to keep a set of semaphores
it may have to signal for a given graph topology. This could improve
the N*N issue but is more difficult to handle.

>
> But of course if OSX doesn't have them, then it's impossible...
>

And OSX does not support them, so i guess we will keep the current
(simple...) implementation in jackdmp until the problem you describe
becomes a real one in real situations...

Stephane
Received on Wed Nov 2 16:15:09 2005

This archive was generated by hypermail 2.1.8 : Wed Nov 02 2005 - 16:15:09 EET