5 years, 4 months ago.

How can low priority threads be scheduled to execute?

When using NANO130 board for debugging, it is found that low priority threads can not be scheduled to execute. How can low priority threads be scheduled to execute?

According to debugging, it is found that the scheduling function can schedule threads with the same priority, but low priority threads can never be scheduled. The scheduling function executes when osRtxTick_Handler() - > gets the next thread to be executed, osRtxThreadDispathch () - > thread - > priority > thread_running - > priority. Here's the problem. If there are three threads in the thread queue: Thread1 (priority: Normal = 24), Thread2 (priority: BelowNormal = 16), Thread3 (priority: Low = 8), then Thread2 and Thread3 can never be scheduled. How can we solve this problem? Thank you?

Be the first to answer this question.