#VM as Crutch
6 messages in this thread
Regarding this virtual memory discussion, I certainly look forward to
AmigaDOS support, but there is another option that will probably make much
more sense for most Amiga users. As a 3D product developer, I encounter
dozens of people (customers) with systems much better than my own: i.e.,
eight megs, '030 boards, monster hard disks. They have all the memory for
3D programs, which use it to hold data structures related to 3D modeling
and rendering. (I can think of so very few applications that would need
virtual memory for code space, as opposed to data space.) In most cases,
the majority of the 8 meg is simply used to hold a data structure that
describes the points and polygons of the objects in the 3D scene. In other
words, these programs have things in memory that they don't need. There is
a path not taken by any of today's 3D programs. They could implement their
own virtual memory system for the data structures that could really benefit
from it. This is more common on the IBM PC, where there are 64K
limitations on addressing. Instead of demanding and hogging expansion
memory, the application could use any hard disk to swap out the data that
it doesn't need. It's not a difficult programming task, it's just
something that Amiga developers have been lazy about.
John: (at least I think I remember it as John)
I don't view VM as necessarily a panacea. I view it more for providing
certain hardware and software tools. Part of what I would expect to be
provided by VM is a certain level of hardware protection (say the memory
protection provided by a demand paging system) to prevent a visit from the
guru. I don't do 3D ray traces, nor do I have 8 Megabytes of memory. I have
a 3Mbytes total, but the trend is "bigger is better". If my operating
system can make my machine look like I have 8,12, or 16 Mbytes for a small
chunk of hard disk space (albeit slower), I won't mind. What I really want
is memory protection.
I don't know if you've caught previous discussions of this, but there are
limitations within the Amiga operating system that would make it difficult
to protect one program from taking the whole system down. Even with memory
protection, there are plenty of ways for a program to crash the OS: just
pass garbage data to a system function. Unless the OS is checking every
argument to functions to insure validity, things can go wrong.
What are you doing that would need 8, 12 or 16 meg of memory? Why couldn't
it be handled by a program that swapped its own data to disk, instead of
relying on massive piles of RAM?
It would seem that perhaps where the OS is put into RAM, including
SETCPU FASTROM, could be protected. That would, of course, not protect one
program from crashing another, but would protect one program from crashing
everything. I'm sure I'm missing something important, I just sorta
"dabble". Wouldn't it be possible when using AllocMem to have a protected
and unprotected flag?
Imagine some operating system call, it gets two arguments passed in
registers, one value is the address of a function, one is some flag. If
the address is garbage, then jumping to it as if it were code will
certainly cause problems. Usually, operating system people (especially on
micros, less so on mainframes) don't like to check the arguments to all OS
functions for validity. It takes time, and on some functions, it takes a
lot of work.
I'm afraid I missed most of the previous VM discussions. Yes, I agree that
the operating system can't be made foolproof (otherwise only fools would
want to use it (sick Murphy-ish grin)), but at the same time I think that
there can also be steps taken to make the system (meaning hardware &
software) more robust.
As far as having 8, 12 or 16 meg of memory, I don't have it. Based on my
experiences (largely from what I have seen on the Macintosh systems I use
at work) the tendency for software developers of all kinds is to create
larger and larger programs. I am not having problems on my Amiga now, but
who knows where we may be in say 2 years. BTW my usual method of chewing up
large chunks of memory at work is done in spreadsheets (I abuse them and
use them to do multivariable modeling from large data sets).
My gut reaction to having the program do the memory swapping is I think I'd
rather have the operating system do it through a common swapping area than
3 or 4 programs doing it by their own algorithms in their own private swap
space. I can't say that my gut reaction has any rational basis, its just my
own feelings. (Besides if memory prices keep falling, I think I could learn
to live with an 8 meg machine.)