High Priority Process Release CPU to Lower Priority Tasks? - VxWorks

This is a discussion on High Priority Process Release CPU to Lower Priority Tasks? - VxWorks ; I've been using taskDelay(NO_WAIT) to release the processor in my RT task, but when I do this when my Real Time task is at a higher priority than some essential tasks (network, exec, etc), VxWorks locks up. From my understanding ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: High Priority Process Release CPU to Lower Priority Tasks?

  1. High Priority Process Release CPU to Lower Priority Tasks?

    I've been using taskDelay(NO_WAIT) to release the processor in my RT
    task, but when I do this when my Real Time task is at a higher priority
    than some essential tasks (network, exec, etc), VxWorks locks up. From
    my understanding and reading, taskDelay(NO_WAIT) only releases the CPU
    to tasks at the task's same priority level.

    I really should be running my RT tasks at the highest system priority
    possible.

    Is there a way to release the CPU momentarily (MUCH less than a single
    clock tick) to the lower priority tasks in the system?

    Thanks in Advance for the help!
    -Dave


  2. Re: High Priority Process Release CPU to Lower Priority Tasks?


    ufcfanvt@gmail.com ha scritto:

    > I've been using taskDelay(NO_WAIT) to release the processor in my RT
    > task, but when I do this when my Real Time task is at a higher priority
    > than some essential tasks (network, exec, etc), VxWorks locks up. From
    > my understanding and reading, taskDelay(NO_WAIT) only releases the CPU
    > to tasks at the task's same priority level.


    Yes! the taskDelay(NO_WAIT) put the current task at the end of the
    ready queue
    for the current priority (i.e the priority of the task that execute
    it).
    It will allow any other tasks on the ready queue of the _same_ priority
    to be run ,
    of course all _higher_ priority tasks will run and other OS service
    routines will also run.

    This method NOT allow tasks of lower priority to run,
    it just forces a rescheduling.

    If your task is the only one at a give priority iit will restart
    immediately. So in this case
    you have only overhead.

    Please use taskDelay(NO_WAIT) only for DEBUG. If you realy need it your
    system is broken!

    Bye,
    Pao


  3. Re: High Priority Process Release CPU to Lower Priority Tasks?

    I understand what you're saying.

    What I need is to be able to run my tasks (Real time, high speed, and
    very critical) at the highest priority possible without locking the
    system up completely.

    Has anyone ever done this before? Or does anyone know how?

    Btw, I do need two tasks at the same priority. One task is used to
    monitor a restart condition in the system. I call this one the Killer.
    The Main task does the actual work. The killer task looks for the
    restart condition and when it occurs, it kills the main task and spawns
    a new one.


  4. Re: High Priority Process Release CPU to Lower Priority Tasks?

    Hello ufcfanvt,
    (it is a pretty strange user name for such an important question, by the
    way. So I expect you being a human being and not a robot...)

    ufcfanvt@gmail.com schrieb:
    > I understand what you're saying.
    >
    > What I need is to be able to run my tasks (Real time, high speed, and
    > very critical) at the highest priority possible without locking the
    > system up completely.
    >
    > Has anyone ever done this before? Or does anyone know how?
    >
    > Btw, I do need two tasks at the same priority. One task is used to
    > monitor a restart condition in the system. I call this one the Killer.
    > The Main task does the actual work. The killer task looks for the
    > restart condition and when it occurs, it kills the main task and spawns
    > a new one.


    This situation is solved in the classical approach by putting the Killer
    Task at a higher priority and the main at a lower one. The Killer task
    should block for the waiting period either by a timer or an event.
    Maybe the restart condition can be detected via a semaphore, event or
    such. The main task then can concentrate on its work without stuff like
    taskDelay(NO_WAIT).

    --
    BaSystem Martin Raabe
    E: Martin.RaabeB-a-S-y-s-t-e-mde

+ Reply to Thread