timer vs task with taskdelay ( or nanosleep) - VxWorks

This is a discussion on timer vs task with taskdelay ( or nanosleep) - VxWorks ; Hi I am wondering about the best solution between using a 1) timer to execute a task at periodic interval 2) a task that sleep for a period of time : nanosleep ( or taskdelay) then do some processing Does ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: timer vs task with taskdelay ( or nanosleep)

  1. timer vs task with taskdelay ( or nanosleep)

    Hi

    I am wondering about the best solution between using a
    1) timer to execute a task at periodic interval
    2) a task that sleep for a period of time : nanosleep ( or taskdelay)
    then do some processing

    Does any cooment about theses solutions


  2. Re: timer vs task with taskdelay ( or nanosleep)

    The principal difference would be the precision and determinism of the
    time intervals your task is waking up.

    The first approach is more deterministic one, whereas the other one
    allows for the time interval to drift, imprecise.

    my $.05

    vxworks


  3. Re: timer vs task with taskdelay ( or nanosleep)


    macabbi wrote:
    > The principal difference would be the precision and determinism of the
    > time intervals your task is waking up.
    >
    > The first approach is more deterministic one, whereas the other one
    > allows for the time interval to drift, imprecise.
    >
    > my $.05
    >
    > vxworks


    Macabbi,
    Can you please explain how you arrived at this conclusion?I am
    interested in understanding the reason from you.Because we use lots of
    timers in our application.

    Regards,
    s.subbarayan


  4. Re: timer vs task with taskdelay ( or nanosleep)

    when u use timers (watchDogs), it will invoke the function in interrupt
    context. I think that's y Macabbi stated it as more deterministic
    one....

    let me know if this is wrong... :-(

    Regards.
    Vali.


  5. Re: timer vs task with taskdelay ( or nanosleep)


    vali wrote:
    > when u use timers (watchDogs), it will invoke the function in interrupt
    > context. I think that's y Macabbi stated it as more deterministic
    > one....
    >
    > let me know if this is wrong... :-(
    >
    > Regards.
    > Vali.


    IMHO and FYKI ,not all timers are watchdog timers....


  6. Re: timer vs task with taskdelay ( or nanosleep)

    Timers are driven by a hardware clock, which is precise.
    When taskdelay is used it is not tied directrly to a hardware clock.
    The taskdelay resolution is in VxWorks ticks which is in most cases
    rough.

    > Macabbi,
    > Can you please explain how you arrived at this conclusion?I am
    > interested in understanding the reason from you.Because we use lots of
    > timers in our application.
    >
    > Regards,
    > s.subbarayan



+ Reply to Thread