Generale wrote:
It's true. Pre-emptive multitasking is simple.
IIRC it involves the following steps (varies a little from platform to platform) [...] Its what I don't get about contiki. I can only guess why cooperative multitasking was used. Maybe for portability?
If you do not implement pre-emptive sheduling, easy as it is to implement, then you do not have to worry about race conditions and deadlocks. The kernel itself cannot be interrupted at crucial moments. Everything is single-threaded: a resource is either occupied or free, and there is almost no contention to it. These design considerations make cooperative scheduling far cleaner and easier to implement, but it comes at a price: your computer no longer has control over what the programs do.
And 1.3 seems to be fighting me all the way. Everything I find needs wb/ks 2 or later. I'd like FFS for floppies, and the ability to unmount too.
Forget about 1.3. It's dead, gone, and should be forgotten. Its BCPL legacy makes any decent DOS programming a nightmare. Stick to OS2.x or higher. So much easier and cleaner it hurts.