Hacker News new | ask | show | jobs
by myrandomcomment 312 days ago
The 68K lacked an MMU, so cooperative multitasking was really the only way to do it. Same reason MacOS and AmigaOS were cooperative multitasking.
5 comments

The only thing you need to achieve pre-emptive multitasking is interrupts and the ability to cleanly save the current CPU state.

The 68k lacked the ability to resume with full state intact after a bus fault, which made an off-chip MMU painful (but there was one - the MC68451[1]), but this doesn't affect the ability to do pre-emptive multitasking at all.

AmigaOS famously did have preemptive multitasking - we used it to mock PC and Mac users with for years.

[1] https://en.wikipedia.org/wiki/Motorola_68451 Note that to do full virtual memory with a 68k, Motorola proposed using a second 68k to handle page faults due to a design flaw:

https://retrocomputingforum.com/t/correcting-errors-by-dupli...

There were also alternatives to the Atari ST TOS which feature preemptive multitasking, like

https://en.m.wikipedia.org/wiki/MagiC

and

https://en.m.wikipedia.org/wiki/MiNT

You can preemptively schedule without an MMU just fine, just like there's nothing stopping multiple threads in the same address space from being preemptively scheduled.
Microware OS9 implemented preemptive multitasking on the motorola 6809 without an MMU back in 1980. You don't have memory protection without an MMU, but you can have preemptive multitasking.
As another commenter pointed out, you can do pre-emptive multitasking just fine without an MMU. And as it turns out AmigaOS had just that. All you need for pre-emptive multitasking is a suitable interrupt source to use for task switching.

What it did not have was memory protection or virtual memory. You do need an MMU for those.

AmigaOS had preemptive multitasking.