Re: [linux-audio-dev] sysv semaphores instead of pipes

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] sysv semaphores instead of pipes
From: Paul Davis (pbd_AT_Op.Net)
Date: Tue Jun 26 2001 - 16:08:57 EEST


>Paul, can you tell me why you went from kill() to pipes and now want to use
>semahores ?
>(we know that will() and sem*() does not allow poll()ing and that with pipes,
>modifications to the graph are a bit messy).

signals are problematic because they have too many other "semantics"
related to their asynchronous nature. although i was careful to ensure
that we only ever receive signals synchronously, the fact that they
*can* be received asynchronously complicated a number of things. for
one thing, the implementation of sigwait(3) is very costly in RT
terms. i also found that the combination of signals (to wake up the
graph nodes) and poll(2) quite problematic when it got down to the
real nitty-gritty details (rather than the design phase).

pipes are not really a problem once you recognize that graph
reordering is expensive anyway. the engine creates all the FIFO's
itself; the clients just open the correct pair when told their new
position in the graph. the FIFO's are removed whenever the engine
exit(3)'s.

>So what's the best IPC method for LAAGA in your opinion ?
>(best tradeoff between speed and flexibility (eg support of poll() ,
>difficulity of graph reordering etc)

for now, i'm quite happy with named pipes. it would be nice if there
was a POSIX API for "wake this process (that I know to be sleeping)"
that didn't have the semantics of signals. but we don't need it.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jun 26 2001 - 16:09:30 EEST