Sounds like the delay has been down to bridging to/from the PCI bus, PCI is much faster than that. Maximum latencies can get large because of bus (req/grant etc.) delay, but minimum (when the bus is free or owned) are much below
1uS. However, for a monstrous mess like the x86 your figures are about the best one could expect, sound quite reasonable.
Not all of them have to be at the same priority for the effect to be seen. The event just needs to pass through a thread to end up being timed at that threads priority even if the thread waiting for that thread to finish dealing with it is at some other priority.
This is going to be of limited help. The small machines will have the dependencies spreading from one to another. The preemptive multitasking approach provides for shorter, clearer and more manageable code.
This is going to be of limited help. The small machines will have the dependencies spreading from one to another. The preemptive multitasking approach provides for shorter, clearer and more manageable code.
I've never done a state machine with more than maybe eight states. There are cases where multitasking makes sense, like when you have a report generator or serial command parser or some other slow-running eternal task that is easier to write as classic procedural code. But for fast bare-metal stuff, task switching overhead can be a killer, and realtime preemption can tangle logic lots worse than state machines.
One compromise is to have a single, main procedural task that is periodically interrupted by a state machine dispatcher.
I've written several preemptive multitasking RTOS's, but lately, working mostly on instrument controllers, I find I don't need them.
The real tests of an RTOS are: what's the maximum time that it ever runs non-interruptable? And what's the context switch time?
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.