Re: Do I need a RTOS?
- From: "eeboy" <jason@xxxxxxxxxxxxxxxx>
- Date: Thu, 25 Dec 2008 02:58:15 -0600
Hmm? Everything from AP up until RP is free. What do you mean "keep
something in an empty slot?" If all the pointers point to the same
place, everything is empty ... by definition.
Ha! Ok.... my confusion here was all based on the definition of empty.
When you said empty I was thinking that you were referring to no tasks in
the queue and requesting that I always keep some task in the queue.
However, in fact, you are simply stating that the queue length (QMAX) needs
to be chosen such that it is sufficiently large to handle the worst case.
In other words... there must always be a hole in the available queue.
However... you said, "call Execute function above" at some point. I
... well, I wouldn't necessarily do that there. What I often arrange
is that there is ... in main() ... a busy loop. Something like:
for ( ; ; )
execute();
It is there that I call the execute function, over and over, pumping
processes out. This is why I said you also might not want to always
fire out the processes right away in the timer, itself. Or even in
bursts when all their .delta's == 0. Instead, fire off one at a time
with execute() and call execute() as your basic busy loop in main.
Just a possibility to consider.
I thought about having the main loop call the execute function but I had
two concerns:
1) If I call execute, I can not utilize the sleep pointer in comparison to
the ready pointer (ie: do until RP==SP) to determine if anything needs
execution. I guess this isn't a concern because I could simply look for
..delta ==0.
2) The more idle tasks that I stuff in my main loop the more my queue
execution precision declines. Is it your intention that the only thing in
my main loop be the execute function?
I do see the drawback of calling execute from within the ISR though. It
doesn't allow me to immediately respond to other interrupts coming in and
that could be troublesome if the function I am to execute is of substantial
length.
In a somewhat related question, at what point do you draw the line for
implementing a software delay (burn cycles) versus implementing some sort
of call back with the method described above.
For example, I might have a situation where I must wait 20ms after writing
to an external Flash memory device or perhaps a 300ms to wait after
initializing an external delay. Where/how do you determine where to draw
the line?
Ok... I think I have a clear picture. I'll get busy on implementing but I
am sure I'll have more questions at some point.
Thanks again!
.
- Follow-Ups:
- Re: Do I need a RTOS?
- From: Jonathan Kirwan
- Re: Do I need a RTOS?
- References:
- Do I need a RTOS?
- From: eeboy
- Re: Do I need a RTOS?
- From: eeboy
- Re: Do I need a RTOS?
- From: Jonathan Kirwan
- Re: Do I need a RTOS?
- From: eeboy
- Re: Do I need a RTOS?
- From: Jonathan Kirwan
- Do I need a RTOS?
- Prev by Date: callaway driver:callaway ft-iq driver,callaway ft-I driver,callaway ft-5 (cheap discount 50% off)(www golfip com ) driver,callaway ft-I neutral driver,callaway ft-I draw (cheap discount 50% off)(www golfip com ) real authentic wholesalerdriver,callaway ft-5 neutral driver,(cheap discount 50% off)(www golfip com ) callaway x-20 irons set,callaway ft-I bird sets.callaway ft-I squareway fairway woods.callaway ,(cheap discount 50% off)(www golfip com ) callaway x-tour wedge .callaway bigbertha irons set.callaway fairway woods,callaway irons,callaway wedge.(cheap discount 50% off)(www golfip com ) real authentic wholesaler
- Next by Date: Re: Do I need a RTOS?
- Previous by thread: Re: Do I need a RTOS?
- Next by thread: Re: Do I need a RTOS?
- Index(es):
Relevant Pages
|