threadx

Dec 17, 2004 21 Replies

Well, no, it isn't quite that simple. There is a priority scheduler involved. It's necessary to find the highest priority task that is ready to run. It's necessary to place the task being preempted into a queue. It's necessary to be able to handle external interrupts under the control of the OS. The implementation and speed of this varies between RTOS's.

--Gene

I know there are some weird priority schedulers arround :-)

Ok, lets put it this way: All RTOS with an O(1) scheduler offer fast taskswitching. On most (if not all) 32Bit CPUs saving/restoring the register-set takes more time than finding the next task to run.

E.g. ARM5TE with an RTOS with 32 priorities (Sciopta, OSE Epsilon): Finding the next ready process takes 4 cycles. But saving and restoring the tasks working registers takes at least 2 times 10 cycles (assuming to save only registers not previously saved due to a system-call).

And I am pretty sure any RTOS (w/o MMU) is as fast as those two.

This may vary but I'd say it's effect is hidden by other things, like RAM/Flash speed.

This will have no effect on the task-switching times.

Yes, but I think that RTOS users should not look at the pure task-switch time because of the reason above.

The real thing is more interresting: That is sending data from one process/task to another.

42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use @epost.de instead !

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required