Messages in this thread | | | Subject | Re: Guaranteeing processing speed... | Date | Wed, 13 Oct 1999 14:03:51 +0100 | From | David Woodhouse <> |
| |
Rogier Wolff wrote: > > You run the process with real-time priority. That means that the mpg > player will get the CPU whenever it wants over other processes.... > This is fine as long as the program is fast enough to handle the > datastream.
"I'd like to know how much petrol is in my car." "Go fill it up and I'll tell you."
That's not the ideal answer. The ideal answer is for the MPEG decoder to know how large a timeslice it's going to get, and to adjust its playback quality accordingly. Or at least know the _minimum_ timeslice, then be able to use the extra time efficiently if it happens to get any extra.
Setting it to real-time priority will allow you to guarantee that it's going to get all the CPU time it desires, but that's a limited solution, and not necessarily the right one - those other processes might actually have something important to do.
There are operating systems which attempt to handle such things, but I doubt that Linux is going to do so for the foreseeable future.
The best you can do is make the MPEG decoder react appropriately after the event - tune its behaviour to reflect the amount of time it's had recently.
That's not as good as knowing in advance, but it's far more achievable.
---- ---- ---- David Woodhouse David.Woodhouse@mvhi.com Office: (+44) 1223 810302 Project Leader, Process Information Systems Mobile: (+44) 7976 658355 Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK. finger dwmw2@ferret.lmh.ox.ac.uk for PGP key.
- 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/
| |