> If task A has higher priority than B, will B ever get a chance to run? > If so, how often? This depends on the scheduler. Different implementations will have different properties. > How about when A is set to the highest priority and B to a low > priority? How is CPU time split up in that case? Heavily favored towards A, but B might get some time depending on the scheduler. > If task A has equal priority as task B, will CPU time be shared > equally among the tasks? In theory. > If C and D have equal priorities, and c returns prematurely, does D > immediately get the rest of C's CPU time? Or does the IDLE task take > over for C's share of the CPU time/ If there is only one task, it will get CPU when the OS isn't using it. If nobody wants the CPU, then the idle task in the OS will run. > Is there such thing as "yield()" in a preemptive scheduler system? Usually yes. > 3. Are tasks generally run over and over again? Or are they just run once? That's up to you, not the OS. Your app code starts tasks, then the OS decides when to run them. > 4. Is there such thing as "realtime" priority? If so, what does it > mean? That's usually a very high priority. The details are up to the particular scheduler. > 5. If we have two tasks, J and K, which each perform very important > protocol operations (such as bitbang 1-wire and RS-485 protocol), and > both are set to the highest priority, how should they be set up so > that they don't interrupt each other in critical moments, It may not be possible. Essentially you are asking for a way to have a particular task declare that it be the only task that gets CPU until it says otherwise. Some real time OSes might support that, but no ordinary desktop OS or multi-user system would allow that. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist