[comp.sys.amiga] Memory Management on an Amiga

cmcmanis@sun.uucp (Chuck McManis) (05/14/87)

First let me state up front that I do not believe it would be possible to
add an MMU 'transparently' to the Amiga. And any use of such would confuse
the hell out of the O/S and break all kinds of code. However ...

In article <2686@cit-vax.Caltech.Edu>, (Steve Walton) writes:
> Since none of the Wizards took this up, thought I would.  Nearly EVERY
> system call in the Amiga gets a pointer, and thus this pointer would
> have to be MEMF_PUBLIC if we had an MMU.  When was the last time
> anyone AllocMem'd a NewWindow structure with MEMF_PUBLIC and copied
> their window information into it?  I've seen no examples which do.
> (Didn't Matt Dillon go through all this at some length a while back?)
>     Steve Walton, guest as walton@tybalt.caltech.edu

One of the interesting thing Microsoft did with Xenix on the 80286 was 
put the kernel into the global descriptor table. That meant every process
has the kernel 'mapped' into its space. You could do something similar on 
the Amiga, in that you could map kickstart and all of it's memory into
the same virtual space in every task (which includes processes). Passing a
pointer to the O/S would continue to be valid for your process or task
until you did a task switch and loaded up a new set of translation entries.
The 'public' memory space would likewise be mapped into every process.

A conceptually simpler way to handle memory management on the Amiga would
be to create one big virtual address space of 8 megabytes and leave it
mapped all of the time. That way you could swap out pages of 'fast' ram
as needed and (if using floppies) completely bog down the system. But
at least you wouldn't get 'no more memory' alerts! Chip memory would obviously
be non-pageable. Everyone's pointers become virtual pointers and the 
MMU trap routines fill in the RAM as required. The only enhancement to this
would be in the form of O/S private data. A new release of Kickstart would
be required and it would work like this. All O/S private data lists (like
the free list, Copper list, and other data structures would be prevented
from stomping on by non-supervisor programs. Kinda like a giant version of
MemWatch. The only thing this would help would be that you are probably
kept safe from crashing the system, and rather than reboot all you need
to do is clear out all of the non-os processes and free all memory not used
by the O/S. Sort of a virtual reboot but faster. What does this buy you?
It probably cuts the performance of your system by a factor of 10! So why
bother? You say you hate crashing the darn machine and waiting for a reboot?

Then buy a 500! Yup, as soon as I figure out how to hook two amigas together
in a master slave configuration I will pass it on. The benefits are over
whelming of course. A) It is a lot cheaper than a 68020 board with and
MMU, B) the software can support it, C) It gives you a backup if the
A1000 dies, and D) You can play flight simulator with your friends! 
Sounds like a heck of a deal to me.


-- 
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses. But you knew that, didn't you.