I could like to know the role of “Idle task” in NNDK5272
Posted: Wed Apr 07, 2010 2:16 am
Currently application is crashing if I do not create an “Idle task”.
Please let me know the reasons?
Please let me know the reasons?
A community of NetBurner users gathering to discuss NetBurner hardware, software, design and projects
https://forum.embeddedethernet.com/
kumarjosh wrote:Currently application is crashing if I do not create an “Idle task”.
Please let me know the reasons?
I hope this helps ...Lets say you have two tasks: A and B. Task A has priority 50 and Task B has priority 51. Since Task A is of higher priority, it will always run (and Task B will never run) unless it calls a blocking function. Task B will then run for as long as Task A blocks; this could be 1 second due to a call to OSTimeDly(TICKS_PER_SECOND), until a shared resource is available due to a call to OSSemPend(), or until data is available from a network connection due to a
select( ) call. If both tasks were in a blocking state, then the idle task (63) would run.
Thanks yevgenit.yevgenit wrote:Idle task in non-avoidable component of any multitasking environment.
kumarjosh wrote:Currently application is crashing if I do not create an “Idle task”.
Please let me know the reasons?
Thanks gavinm.gavinm wrote:The Idle Task (priority 63 ie lowest priority), is what the uC/OS scheduler will run if all other tasks are in a blocking state. Ie it's what the system will run if there's nothing else of higher priority needing to run.
I didn't know you could delete the Idle Task! It's a "must have".
Read the Netburner Programming Manual (NNDKProgMan.pdf) section on "UC/OS REAL-TIME OPERATING SYSTEM".
Here's a brief extract :
I hope this helps ...Lets say you have two tasks: A and B. Task A has priority 50 and Task B has priority 51. Since Task A is of higher priority, it will always run (and Task B will never run) unless it calls a blocking function. Task B will then run for as long as Task A blocks; this could be 1 second due to a call to OSTimeDly(TICKS_PER_SECOND), until a shared resource is available due to a call to OSSemPend(), or until data is available from a network connection due to a
select( ) call. If both tasks were in a blocking state, then the idle task (63) would run.