On Thu, Jan 20, 2000 at 07:02:49PM +0100, Juan Pedro Lopez Saez wrote:
> Hello, I keep on having doubts, so I repeat the questions.
>  
> I'd like to know the differences between the oneshot mode and the period
> mode of the scheduler clock. Also I'd like to know the relationship

The purpose of the oneshot is to make it convenient to have several
tasks with no large common divisor in their periods. For
example if 
Thread 1 starts at time 0 and has period 400
Thread 2 starts at time 70  and has period 500

a periodic interrupt of 10 is needed to ensure an interrupt at
both time 400 and time 570.
In oneshot mode the clock is reprogrammed every interrupt so we
would set the timer for 400 and on the interrupt reset it for 170 and
on that interrupt reset it for 230 etc.
The drawback to oneshot is that, on UP x86 machines, the clock is
incredbly slow to reprogram-- sometimes as much as 12 or so microseconds.
So if you have one task or a good gcd, use periodic.


> between the period argument of the "rtl_setclockmode" function and the
> period argument of the "pthread_make_periodic_np" call.
> I'm trying to make a data adquisition aplication, using an A/D converter
> with a periodic sample rate. What's the best choice: oneshot mode or
> periodic mode? 
> I've modified the hello.c example provided with RTL 2.0 setting the
> period mode and the computer got crashed.
> 
> Thank you.
>               Juan Pedro
> --- [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 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

--- [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/

Reply via email to