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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/22/02 17:31
Read: times


 
#22050 - RE: Task switching for Keil C51
Hmmm. Really high overhead!

Agreed. The '51 architecture isn't particularly well suited for efficient preemptive multitasking and this is why I tend to think that the cooperative model, whether implemented through ad hoc concurrent state machines or a generic multitasking kernel, is usually a better choice.

What if I reserve, say 10 bytes (5 nested CALLs), for each task and move SP on each task switching?

OK, but...

Don't forget to account for stack usage by ISR's.

Don't forget to account for C51's PUSH/POP for saving registers temporarily, especially around library calls.

Don't forget to account for call nesting within called library functions. You'll likely have to determine this via simulation.

If you are implementing a preemptive model, you still have to save the critical registers somewhere.

Regards,

--Dan Henry


List of 25 messages in thread
TopicAuthorDate
pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
RE: pros and cons of using an OS            01/01/70 00:00      
Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      
RE: Task switching for Keil C51            01/01/70 00:00      

Back to Subject List