Re: Do I need a RTOS?



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!

.



Relevant Pages

  • Re: Do I need a RTOS?
    ... Avail slots are by nature empty correct? ... in the avail queue, as I earlier defined them to be. ... head-pointers are equal to each other, the avail-queue is full and the ... decide to execute them is another issue. ...
    (comp.arch.embedded)
  • Re-post: Yet another problem with "no current record"
    ... I have a form with 4 unbound text boxes and a button. ... My problem happens after I set one of the values to -999 and execute another ... to empty out the form of rows so the user can start over. ... Else 'Either description entered, or first time entry ...
    (microsoft.public.access.formscoding)
  • Re: Re-post: Yet another problem with "no current record"
    ... I have a form with 4 unbound text boxes and a button. ... My problem happens after I set one of the values to -999 and execute ... to empty out the form of rows so the user can start over. ... Else 'Either description entered, or first time entry ...
    (microsoft.public.access.formscoding)
  • Re: Add "File Roller"/"Archive Manager" to right-click on Desktop
    ... In the nautilus-scripts folder right click> create document> empty ... exec file-roller <and exit selecting save. ... properties> permissions and check the execute box, ... the reload button and close nautilus. ...
    (Ubuntu)
  • Re: To Execute or Not To Execute
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... execute against each one, but it doesn't run the other tasks until after the ... I need it to loop, execute, then return. ... ones that were empty. ...
    (microsoft.public.sqlserver.dts)