Re: [ILUG] unix link

From: Paul Jakma (paulj at domain itg.ie)
Date: Wed 12 Jul 2000 - 17:15:50 IST


On Wed, 12 Jul 2000, kevin lyda wrote:

> how does real-time help sound apps?

well, i gather it's cause playing sound requires bounded latencies so that
the app can guarantee the music won't skip.

then there's also things like MIDI interfaces which being a simple serial
like protocol also has tight latency requirements. (not much point
recording something from a MIDI device if you can't be sure that you
didn't miss little bits here and there).

> all real-time really means is that system calls can be configured to
> give an error message if they take longer than a given amount of time
> to run.
>

ah.. but that is where the problem lies. how do you guarantee that?

> now changes to the scheduler, that's where sound benefits might help.
>

but the scheduler is fine. nothing wrong with it. The problem is that
there is no guarantee the scheduler will be called at least every x ms,
cause there might be a driver holding a lock, (eg IDE can have large
latencies, fb console and many other drivers).

so from what i gather, what needs to be done is that /every/ driver has to
reviewed to make sure that it won't hold locks for long periods of
time. Ingo Molnar did a hack for 2.2 where they profiled the kernel and
looked at which parts of the kernel can block other things for
unreasonably long. Then they looked at the code and hacked it by adding
scheduler calls in places where it looked safe.

but that will never get in, cause Ingo himself said it's a horrible
hack. Linus' preffered answer is to make clean fixes where code /may/
block for too long, and in the longer term he wants to get rid of UP
kernels and make everyone run pre-emptible kernels a la SMP, cause he'd
preffer that everyone bangs on the same code.

Other answers are: if your sound app really really really needs
'Real-Time' then go run it under RT-Linux with linux on top.

sound guys didn't like that: but we only need 'sort-of' real-time not
'real' real-time, and RT-Linux is too inconvenient. Which of course
spawned a long huge thread about RT. :)

> kevin
>

--paulj



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:51 GMT