Re: Guaranteeing processing speed...

laredo@gnu.org
Wed, 13 Oct 1999 14:59:44 -0400 (EDT)


> Suppose you have a process that needs a certain amount of CPU power.
> Think of
> an MPEG player showing a movie. If you start other processes absorbing a
> lot of
> [...]
> BogoMIPS or whatever). When the OS isn't able anymore to grant the
> requested
> amount of processing speed to the process, it could inform it by sending
> a
> signal. Then the process could decide upon what to do. The MPEG player,
> e.g.,
> could skip every second frame.
>
> Is this out-of-realm for Linux? Is it a typical problem for an RT-OS?

I think this is silly personally. A well-written MPEG player will be
able to track its performance for each frame and drop as necessary.
This means that regardless of the load it should always be able to stay
in perfect sync. Why is this important? Well when you get into
variable bitrate sources such as DVD, your processing power required
is NOT a constant. Various tricks may be employed such as watching the
clock and using the "rdtsc" instruction to get as accurate timing as
possible. Of course when APM is enabled, you can really throw things
off as the "hlt" instruction might be executed and your rdtsc will
be off.

Anyway the short of it is that you should just be watching the system
clock and ensuring that your audio and video are delivered at the
specified delivery times in the stream and skipping frames or varying
the audio sample rate if necessary.

-- Nathan Laredo
laredo@gnu.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/