
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
Rob Turk wrote: > "42Bastian Schick" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> And how do you know that you are back at work (without modifying the >> scheduler) ? >> > > This works well in a monolithic state-engine design. It doesn't work > when a scheduler preemptively interrupts tasks, as the scheduling is > (should be) transparent to the tasks. It depends a lot on whether tasks are suspended when idle/waiting for I/O or just busy-looping in their slice until interrupted. I'm wire-wrapping a "junkbox wars" hobby project. If I have 3 I/O lines left over, I'm planning to drive 8 LEDs on the front panel. When the switcher swaps tasks, it'll turn on that task's (or class of tasks') LED. One LED reserved for the idle loop. I'm planning to use cooperative multitasking, but it should also work pre-emptive. The overhead is a few cycles per context-switch. An empirical indicator of limited use except for the fun of watching one LED flare and the others dim as one task grabs the CPU... -- Ron Sharp.
| <-- __Chronological__ --> | <-- __Thread__ --> |