??? 07/13/10 04:49 Read: times |
#177262 - re - real time system Responding to: ???'s previous message |
Oliver Sedlacek said:
I'm getting the impression that the fixed time slices are being used to guarantee a bandwidth, which you might call a task processing rate. This seems to be wasting time because a task cannot yield if it does not need all of its timeslice. If my understanding is correct, I would look at doing the following.
1 - Prioritise tasks into those that need a guaranteed performance and those that don't. 2 - Allow the high priority tasks to yield to the next task if they don't have anything to do. 3 - Run your low priority tasks in the time left over after the high priority tasks have completed. If you substitute 'bandwidth' for 'processing', then the bandwidth allocation schemes used by USB and Firewire for their isochronous channels is a pretty useful model. Indeed time is wasted in this fixed time-slice system. 1. Prioritise - agreed 2. Yield - Not so easy in the low resources of a 8051 derivative. I have not seen anything suitable for 8051. Please direct me if you know of any scheme that can do that. 3. That is what I am doing now, using a background task that only runs in time left over. Thanks Regards Johan Smit |