This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A question about task of RTX

When the higher priority task was hang-up and at the same time several tasks with the same priority ready to run,which task will be run first? I mean I have several tasks need not preemptive, so I give the same priority to the tasks, but I hope when the higher priority task was hang-up, one designated task will be run first, so how can I do.

  • Note that there can be multiple reasons for these lower prio tasks to wake.

    Maybe you have three threads waiting to receive something, and the high-prio task is now supplying that.

    Or maybe each of the lower-prio tasks was interrupted in the middle, i.e. just running out of their time slice.

    Maybe some of the threads are waiting for an event that is now available.
    And some are waiting for something still not available.
    And some are time-slicing in round robin and have run out of their previous slice.

    So there may not just be one answer to which thread will run next.

    Is there a specific reason why you need to know? The scheduler may not starve any thread that is runnable. But if it is important that you know which thread that will run next when multiple are runnable, then you should consider your thread priorities.