Hacker News new | ask | show | jobs
by digi_owl 3542 days ago
Kinda. Best i can find is that AmigaOS didn't have memory protection because the 68k initially didn't have it, but later variants got it (68030 onwards?).

I think there was similar issues with (classic) Mac OS and Windows 9x.

3 comments

Classic MacOS dealt with the memory fragmentation in a pretty neat way tho. All code was relocatable to start with, and pretty much every memory block you'd allocate was also relocatable by using one further level of indirection called a Handle. A Handle was basically a pointer to a pointer. A Handle defaulted to 'unlocked' so the actual memory block could move at any time; unless you Locked it, and Unlocked it afterward.

This allowed the OS to compact the memory heap, move all the relocatable blocks in one corner and allow further contiguous blocks to be allocated.

Of course, this is a primitive concept these days, but it allowed amazing pieces of software to exist on very, very small memory systems.

Handles were effectively a brilliant workaround at the time, given the constraints of having static memory allocation for apps.

(This kindles some fond memories of MacOS classic development along with the Inside Macintosh books...)

I fondly remember playing with Photoshop 2.5 on my Color Classic with its 16MHz CPU with 10MB RAM... It was amazing what you could do on such a "primitive" machine.
Photoshop was a little bit of a masterpiece back then (it arguably still is, deep down) -- it had it's own 'swap' system for large pixmaps that allowed you to work on images that were massively bigger than the onboard memory; and it wasn't even that slow (unless you were applying filters on the whole image).
Already the 68010 could have an external MMU, the 68451.

IIRC the 68030 was the first 68k CPU that had one built-in.

Not that it mattered for AmigaOS. Commodore always used the cheaper versions without MMU.

AmigaOS did not have memory protection even in the later iterations post 68040 availability (A4000) - not sure about AmigaOS 4.x though.
AmigaOS 4 does use the MMU, but only to map pages to virtual addresses to for example help with memory fragmentation and swapping to disk.

Here's some surprisingly thorough documentation on this:

http://wiki.amigaos.net/wiki/Exec_Memory_Allocation

However, the MMU is not used for memory protection, not even on Amiga OS 4.

Edit: OK, so not entirely true... See this for more: http://www.os4coding.net/forum/memory-protection-support

If you were lucky enough to have an Amiga with a CPU that did have an MMU, you could use a piece of freely-downloadable software (called GigaMem) to implement paged virtual memory - albeit still with a single address space. One of those few operating systems that could have virtual memory implemented outside the OS kernel.