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: Benno Senoner (sbenno_AT_gardena.net)
Date: Tue Jun 26 2001 - 14:31:52 EEST


I recall that some time ago I asked on linux-kernel which was the fastest way
to wake up a thread. Some told me that one should let the receiver sleep on a
pipe fd and letting the sender write one single byte to that pipe to wake up
the other thread.

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

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)

cheers,
Benno.

On Mon, 25 Jun 2001, you wrote:
> I wrote:
>
> >I also want to measure the speed of SysV semaphores for the graph. It
> >occurs to me that since they never imply data transfer, and since they
> >don't involve the file system in any way, they may be faster than
> >named pipes to drive the out-of-process graph or subgraphs.
>
> the problem with semaphores is that Unix/POSIX semantics don't allow
> integration of a process sleeping on an file descriptor and a
> semaphore (one of the few areas where Windows definitely improves upon
> Unix). this would mean adding yet another thread that just sleeps on
> the semaphore used to drive the "process" callback. Not terrible, but
> not particularly great either. The code would be a little cleaner, but
> we'd have an extra thread for every client. Uhm.
>
> --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 - 13:40:05 EEST