[net.micro.16k] 32 vs 24 bit addressing

davet@oakhill.UUCP (Dave Trissel) (02/27/85)

I think a point is being missed here by a few people.  The problem is not
physical memory but *logical* memory space.  In other words, I may need only
a couple megabytes of real memory but require a gigabyte of *virtual* address
space.   One of the neat things about
virtual memory is that one can logically pretend to have gobs of it while only
requiring a much smaller amount of physically available memory for its
implementation.

Let us illustrate with just one example.  If I write an OS and had virtual
memory capability with the hardware and had gobs of space in the memory
map the first thing I would do is plan to keep entire libraries of programs
and run-time routines in  a  *virtual* memory map common to all programs.
That way I don't have to provide any loading mechanisms at all.  Everything
just gets linked to an address.  The code sharing possibilities allow
for dramatic reductions in linked executable object code.

The Fortran Compiler would be put in one megabyte partition, the C compiler
in another, run-time routines for LISP in another etc. etc.  And I couldn't
care less if I 'waste' a lot of space by partitioning it in megabytes since
its all virtual anyway with the unused portion never allocated or paged by the
virtual memory paging system.

Another example: If I'm designing a compiler why bother with the old spill
file technique before the days of virtual memory?  Just create a symbol table
thats a few megabytes in size.  That will insure I'll compile a program even
if its thousands of lines long.  No muss, no fuss.

Now one shouldn't really design programs with the wild abandon I'm suggesting.
And there are subtle implications about doing things like the module sharing
technique which must be delt with in the overall design of my OS.
But my point is that there is a much greater freedom that is gained when
a relatively 'unlimited' amount of *virtual* memory is available.  And
*virtual* is the keyword here. I really don't expect my compiler to be given
3 megabytes of *real* memory for the symbol table, in fact it could start off
with no real memory at all.  The memory would be allocated piecemeal as the
compiler required it for symbols via page fault detection.

So we end up with having no more than say a couple of megabytes of real memory
needed for my computer, but requiring significantly more than 24 bits worth
of addressing.

By the way, I feel uneasy with just 32 bits.  (My reckless abandon?? ;-) )
I know there are those who desire even more virtual address space.

Hope this clarifies things a little.

Motorola Semiconductor                      Dave Trissel
Austin, Texas       {ihnp4,seismo,gatech,ctvax}!ut-sally!oakhill!davet