3 ms·
Preemptive multitasking is easy; you just hook the timer interrupt and switch stacks in the interrupt handler. The only tricky part is ensuring that your task
by kragen 5y ago
Preemptive multitasking is easy; you just hook the timer interrupt and switch stacks in the interrupt handler. The only tricky part is ensuring that your task queues are modified in such a way that an interrupt at the wrong time can't crash the system.
But it's true that, without memory protection, a bug in one program can corrupt all the other programs, too. The 286 did have memory protection, FWIW, and arguably an on-chip MMU: https://en.wikipedia.org/wiki/Intel_80286#Protected_mode https://en.wikipedia.org/wiki/Intel_80286#Protected_mode https://retrocomputing.stackexchange.com/questions/7683/how-do-you-put-a-286-in-protected-mode https://retrocomputing.stackexchange.com/questions/7683/how-... http://www.rcollins.org/articles/pmbasics/tspec_a1_doc.html http://www.rcollins.org/articles/pmbasics/tspec_a1_doc.html
EUMEL and Oberon handled this by implementing memory protection in the compiler, but obviously that doesn't help with existing MS-DOS applications unless your compiler's source language is 8086 machine code. That's more or less the approach VMWare and QEMU used to virtualize non-virtualizable hardware. Not sure about Soft-ICE.
Also, btw, the 80386 came out in 01985, and DESQview/X came out 7 years later, in 01992.