4 ms·
You don't need an MMU nor tons of RAM to do multitasking, just a timer interrupt. It's a lot easier if you require position independent code rather than doing
by bryanlarsen 6y ago
You don't need an MMU nor tons of RAM to do multitasking, just a timer interrupt. It's a lot easier if you require position independent code rather than doing fixups. The 6809 is a beautiful instruction set that makes position independent re-entrant code easy.
Of course an MMU and/or lots of RAM does make multitasking a lot easier.
OS-9 is an awesome UNIX-like for the 6809 that can do it in 64K or less.
- kiwidrew 6y agoIndeed, hooking the timer (or keyboard) interrupt was also the way to do "multitasking" (TSRs) in x86 real mode under MS-DOS. The much-maligned x86 segment registers do come in handy here: they provide hardware-accelerated position independent memory addressing! Most DOS utility programs were small enough to fit in a single 64K segment, and provided they never touched the segment registers, these programs were trivially relocatable to any memory address.
- butterisgood 6y agoSpinnaker Sidekick worked this way I believe but wasn’t compatible with some software (presumably those that touched segment registers)
- Avshalom 6y agothe open source NitrOS9 is still active even. https://sourceforge.net/p/nitros9/code/ci/default/tree/ https://sourceforge.net/p/nitros9/code/ci/default/tree/
- moonchild 6y agoYou don't even need a timer interrupt, if userspace is well-behaved. Especially if user input is interrupt-based (think ^C to cancel; triggers context switch -> signal, can also have a kernel fallback for buggy userspace that tries to ignore the signal and refuses to yield).
- dfox 6y agoWhat you need timer interrupt for is “true” preemptive multitasking/threading. For many applications that makes quite large difference in programmer comfort (ie. you can just run CPU-bound computation without any regard to yielding to other tasks). On the other hand you can successfully create create multitasking-like user experience without any OS level support for that simply by making everything event-driven.
- slackfan 6y agoThe userspace, however, can never be assumed to be well-behaved.
- marcodiego 6y agoA MMU is not needed for multi-tasking, but it is needed for memory protection. I wonder how well a system could work if its binaries were written on a bytecode that could be compiled to safe native code, making sure that it would not access non-permitted memory. This bytecode would be compiled at program load time. This could guarantee memory safety and a very small performance penalty.
- pjmlp 6y agoPlenty of mainframes have worked like that. IBM mainframes still do on their classical mode, the bytecode gets AOT compiled at installation time, or when the binaries need to be refreshed due to changes on the hardware. Burroughs B5500, nowadays still sold by Unisys as ClearPath MCP, was already doing this in 1961.
- skissane 6y ago> IBM mainframes still do on their classical mode, the bytecode gets AOT compiled at installation time, or when the binaries need to be refreshed due to changes on the hardware. I suspect in this comment you are confusing IBM i and its predecessors (i5, AS/400, System/38) with IBM mainframes (z, 390, 370, 360). The former do what you are talking about, the later don't. In proper IBM terminology, the former are called midrange systems, not mainframes.
- pjmlp 6y agoNope, IBM z still has language environments, and I call all of them mainframes, instead of precise definitions, because everyone without experience has a vague idea what a mainframe is, whereas midrange systems, most likely requires a Wikipedia visit for most of the audience.
- skissane 6y ago> Nope, IBM z still has language environments What are you talking about? When you say "IBM z", which OS are you talking about – z/OS, z/VM, z/VSE, z/TPF or z/Linux? Which "language environments" are you referring to? Do you mean "z/OS Language Environment"? That doesn't involve "bytecode" in the sense that OPM/EPM/ILE on OS/400 do. LE (on z/OS, z/VM and z/VSE) and ILE (on OS/400) are descendants of the same code base (and I believe that code base was even ported to OS/2 at one point), but ILE on OS/400 does some very OS/400-specific things which never happened on MVS, VM/CMS, DOS/VSE or OS/2. You started out by saying: > IBM mainframes still do on their classical mode, the bytecode gets AOT compiled at installation time, or when the binaries need to be refreshed due to changes on the hardware. That is kind of true for IBM i, but just false for IBM z. > I call all of them mainframes, instead of precise definitions, because everyone without experience has a vague idea what a mainframe is, whereas midrange systems, most likely requires a Wikipedia visit for most of the audience. While "midrange" is a bit of an obscure IBMism, most people have heard of "minicomputer", and have the historic understanding of a "minicomputer" as something in between a microcomputer and a mainframe. I think "minicomputer" would be more accurate than "mainframe" when referring to the S/38 and its successors. Calling the later "mainframes" is just going to confuse anyone familiar with the proper IBM terminology. I get the impression you like to make comments like "IBM did X years before this did" but they make you come across as someone opining on something they don't know a lot about, and you end up saying things which make people who know more about the topic than you do cringe.