Docs are going to be written soon, I swear.
The idea is simple. If you set a timer to interrupt every 1000 time
units then if you have a single task with period 1000 things work out great.
If you add a task with period 500, then you can simply get the clock to
interrupt every 500 ticks.
Now add a task with period 1291. One option is to make the clock
interrupt very 200 ticks and then sit on the timer 91 ticks until
it's time to run the third task. But if you add a task with period 558
even this solution is not good. So, RTL has a "oneshot" option, where
the timer period is dynamically reset by the schduler ever interrupt.
For example, we set the clock to interupt after 558 ticks.
reset it to interrupt after another 442 ticks to get to 1000
reset it to interrupt after another 291 ticks
the disadvantage of one-shot on uniprocessor x86 machines is that
reprogramming the clock takes 10 microseconds or so. If you can use
the periodic mode, it's more efficient in reprogramming time. but
if your schedule does not fit a good period, then oneshot is
much better.
In situations where we can use on board timers, e.g. the APIC timer, the
oneshot reprogram is fast enough to make it a better tradeoff.
On Tue, Jul 06, 1999 at 04:31:13PM -0700, Phil Daly wrote:
> In order for me to better understand the way things work (and without reading
> the source code), could someone tell me the difference between the oneshot
> and periodic timers?
>
> Ta,
>
> +==================================================================+
> Phil Daly, NOAO/AURA, 950 N. Cherry Avenue, Tucson AZ 85719, U S A
> E-mail: [EMAIL PROTECTED] V-mail: (520) 318 8438 Fax: (520) 318 8360
>
> --- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> ----
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/~rtlinux/
--
Victor Yodaiken
Socorro New Mexico
USA.
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/