Messages in this thread | | | From | Bret Indrelee <> | Subject | RE: Guaranteeing processing speed... | Date | Wed, 13 Oct 1999 09:36:31 -0500 |
| |
David Woodhouse [mailto:David.Woodhouse@mvhi.com] wrote: > 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.
Actually, the process can only use the amount of CPU time not consumed by tasks of high priority. The way that real time systems use this is controlling what tasks are at the higher priority and figuring out what the maximum schedulable priority is given the tasks which have to be performed.
MPEG players would be a rather simple RT task to schedule since you have a fixed amount of work that is very periodic.
Look into Rate Monotonic Analysis (RMA), sometimes also known as Rate Monotonic Scheduling, it will show how to design and verify operation of a hard real time scheduling problem.
I'm not sure how much of this is applicable to Linux, since I've never looked at the RT priority support on UNIX varients.
-Bret
------------------------------------------------------------- SBS Technologies, Connectivity Products ... solutions for real-time connectivity
Bret Indrelee, Engineer SBS Technologies, Inc., Connectivity Products 1284 Corporate Center Drive, St. Paul MN 55121 Direct: (651) 905-4731 Main: (651) 905-4700 Fax: (651) 905-4701 E-mail: bindrelee@sbs-cp.com http://www.sbs.com -------------------------------------------------------------
- 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/
| |