Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/27/05 22:41
Read: times


 
#85971 - Decisions, decisions
Responding to: ???'s previous message
Craig Steiner said:

That'd be impressive; but I'm curious as to how you get 8 tasks to require just 24 bytes of RAM? Aside from not protecting the stack, it would seem you're not protecting any of the "R" registers? Won't that lead to some nasty conflicts when tasks switch?

Developing an RTOS for a resource limited micro inevitably means some tough decisions. However, the range of possible applications on such a micro is also limited. It is a cooperative despatcher so tasks run to completion and there is no need for stack protection. Timer0 is used for the tick with just TH0 reloaded in the ISR so the tick granularity is typically 0.25mS. Obviously the ISR saves the regs it affects. Each tasks needs three bytes of RAM. One is the offset from time zero in ticks after which the task is first scheduled. Next is a byte for the repetition period of the task. With a typical 4mS tick a byte value allows a 1 second period. The last byte is the run semaphore, set by the scheduler and reset by the despatcher along with a task enable/disable flag.

At the moment inter-task communication and task state management is the responsibilty of the application.

Ian

List of 49 messages in thread
TopicAuthorDate
Computed Call            01/01/70 00:00      
   Computed Call            01/01/70 00:00      
   simulate an LCALL @A+DPTR instruction?            01/01/70 00:00      
   Solution            01/01/70 00:00      
      Computed LCALL            01/01/70 00:00      
      Computed LCALL            01/01/70 00:00      
         Table offset            01/01/70 00:00      
            x2, not x3            01/01/70 00:00      
   what is the problem            01/01/70 00:00      
      My Problem            01/01/70 00:00      
         never heard of it            01/01/70 00:00      
            It is.......            01/01/70 00:00      
               RTOS            01/01/70 00:00      
                  8051 RTOs Limitations/Issues/Opportunity            01/01/70 00:00      
                     How?            01/01/70 00:00      
                        Decisions, decisions            01/01/70 00:00      
                           Small systems - task scheduling            01/01/70 00:00      
                              Worth it?            01/01/70 00:00      
                                 Scheduler            01/01/70 00:00      
                                    Scheduler            01/01/70 00:00      
                           running small in a big way            01/01/70 00:00      
                              Example            01/01/70 00:00      
                                 in very small chips            01/01/70 00:00      
                                    In all sorts of sizes of chips            01/01/70 00:00      
                                       time dependednt            01/01/70 00:00      
                                          RTOS or Not            01/01/70 00:00      
                                             opinion piece            01/01/70 00:00      
                                                fact piece            01/01/70 00:00      
                                                Opinion piece            01/01/70 00:00      
                                             suggestion piece            01/01/70 00:00      
                                             reasons            01/01/70 00:00      
                                    Polite discussion            01/01/70 00:00      
                                       Politeness            01/01/70 00:00      
                                          Thanks            01/01/70 00:00      
                                             Politeness            01/01/70 00:00      
                                                What are you Rabbiting on about?            01/01/70 00:00      
                                                   Close but no Cigar            01/01/70 00:00      
                                                      Rabbit food            01/01/70 00:00      
                                                         Plessey            01/01/70 00:00      
                                                      small world            01/01/70 00:00      
                                                         Smaller than you imagine!            01/01/70 00:00      
            I use the computed LCALL ...            01/01/70 00:00      
               go it            01/01/70 00:00      
                  Call tabs in-line            01/01/70 00:00      
                     abbreviated            01/01/70 00:00      
                        ... and further optimized...            01/01/70 00:00      
                     has been already disscussed            01/01/70 00:00      
   Scheduler of course            01/01/70 00:00      
      Scheduler            01/01/70 00:00      

Back to Subject List