I could like to know the role of “Idle task” in NNDK5272

Discussion to talk about software related topics only.
Post Reply
kumarjosh
Posts: 9
Joined: Wed Apr 07, 2010 2:07 am

I could like to know the role of “Idle task” in NNDK5272

Post by kumarjosh »

Currently application is crashing if I do not create an “Idle task”.
Please let me know the reasons?
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: I could like to know the role of “Idle task” in NNDK5272

Post by yevgenit »

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?
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
gavinm
Posts: 59
Joined: Wed Jun 04, 2008 4:01 pm
Location: Nottingham UK

Re: I could like to know the role of “Idle task” in NNDK5272

Post by gavinm »

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 :
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.
I hope this helps ...
Gavin Murray
kumarjosh
Posts: 9
Joined: Wed Apr 07, 2010 2:07 am

Re: I could like to know the role of “Idle task” in NNDK5272

Post by kumarjosh »

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 yevgenit.
I have understands the use of the “Idle Task” through the “NNDKProgMan.pdf” document.
However I am not able understand that without this task system/application is going to crash.
I think the “Vxworks” runs without the idle task.
kumarjosh
Posts: 9
Joined: Wed Apr 07, 2010 2:07 am

Re: I could like to know the role of “Idle task” in NNDK5272

Post by kumarjosh »

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 :
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.
I hope this helps ...
Thanks gavinm.
I have not found any documentation saying that this task is must!
Why the application is crashing without this task.
Could you have any idea?
ckoehler
Posts: 81
Joined: Sat Mar 13, 2010 9:04 pm

Re: I could like to know the role of “Idle task” in NNDK5272

Post by ckoehler »

It's only logical. I don't know that you can expect to always have something going on, with none of your tasks ever blocking or not doing anything. The OS needs something to run then: the idle task.
Post Reply