itsy bitsy Unix
Sean 'Captain Napalm' Conner
spc at conman.org
Fri Mar 18 00:01:35 CST 2005
It was thus said that the Great Huw Davies once stated:
>
> 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!
The biggest risk is still CPU starvation. The AmigaOS (at least up
through 1.3) used a simple round-robin with priority scheduler. Dead simple
to implement but can lead to process starvation (three CPU bound tasks, two
at priority 100, the third at 0---the one at 0 would not be scheduled; the
other two would switch off though).
But generally speaking the two styles of multitasking just shove the
complexity around---in cooperative the complexity is handed off to the
application programmer, while in preemptive, it's handed off to the systems
programmer.
-spc (Hmmm ... Linux 2.0 has 1800 lines in sched.c, while 2.4 has only
1300 ... )
More information about the cctalk
mailing list