Altera_Forum
Honored Contributor
12 years agoTasks priorities in NicheStack
Hi there,
I have a problem with task priorities using the NicheStack. My app task has priority 4 and the TCP tasks start at priority 5. The app task is basically a for(;;) loop which writes a value to a output pin and sleeps during 500 ms and so on. This works like a charm when no net traffic is present (the TCPs task has no workload), the app task sleeps exactly 500 ms. But when we add net traffic it seems that the TCP tasks (with lower priority) consume too many CPU time and the app task (the higher priority task) frequency is not 500 ms anymore, it increases to 1000 ms or more. My question is: Is it not supposed that the uCOSII scheduler should give CPU to the higher priority task as soon it is ready to execute? Maybe there is so many interruptions that overkill the OS? Any help will be appreciated.