From: "Huw Davies" <huw.davies at
kerberos.davies.net.au>
---snip---
Are the risks in preemptive scheduling just ones of complexity? I guess
that it is much harder to "prove" that this type of scheduler is going
to to the right thing at the right time. I know that,
for example, the scheduler for VMS has gone from a couple of pages of
assembler
to something like 75 pages of BLISS!
>
Hi Huw
I think it is more about predictability. Large preemptive
systems can lock up in unpredictable ways. They are hard
to confirm as operating correctly under all conditions
since the number of permutations of conditions is so large.
This makes them dangerous for critical systems.
Most non-preemptive system are easier to find bugs because
they tend to fail right away if there is such a flaw.
Also, preemptive taskers often have to save greater amounts
of information since they may break a task at in opportune
points.
For a general purpose OS, preemptive makes sense. For
RTOS is really doesn't.
As an example of simplicity, for an embedded machine, I used
a non-preemptive tasker to run 50 pid controls, a keypad,
paper printer log and a LCD display. This was all easily handled
with a single 2MHz Z80.
Dwight