Re: IOProc limitations
Re: IOProc limitations
- Subject: Re: IOProc limitations
- From: Bill Stewart <email@hidden>
- Date: Thu, 31 May 2001 23:58:49 -0700
on 31/5/01 6:52 PM, James McCartney wrote:
>
on 5/31/01 7:44 PM, Jeff Moore at email@hidden wrote:
>
> Bear in mind, that you don't need to be holding a mutex to signal on it's
>
> associated condition variable (assuming you're using the PThread API).
>
>
Oh, I thought you had to hold a mutex just like on cond_wait.
>
I guess I just got in that habit writing semaphores with counters.
>
So that clears up all my concerns about that.
>
>
The other thing, is that if you are doing throughput processing, not doing
>
it in the IOProc causes an extra buffer of latency, correct? Because you
>
then must have the output ready when the IOProc runs, but you don't have the
>
input yet. So you must operate on the previous buffer of input.
Yes indeed.
Its a tradeoff that you can decide to make based on how much real-time
processing of input (or reaction to input) that you have to do - and also
what you actually need to do in the IOProc.
If you treat the work you do in the IOProc as similar to the kinds of things
you do in a primary interrupt on 9, then you'll get better behaviour from
the system. ie. Don't do allocations and expensive resource acquisitions
whilst you're there. (I know I'm probably stating the obvious, but just
because you can do these things, doesn't mean you should).
Some of the performance tools that X provides are really good for
understanding how much time you're spending and latencies in scheduling that
your code might be introducing. There's a publication available on Apple's
developer (called Performance on Mac OS X - or something like that) web site
about using the profiling tools on X.
Bill
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
Cat: "Leave me alone, I'm trying to nap... Ah, What's that clicking noise?"
__________________________________________________________________________