Everything You ever Wanted To know about Virtual Memory

Michael David WINIKOFF winikoff@mulga.cs.mu.OZ.AU
Thu, 25 Mar 93 13:20:29 EST


We've had a number of problems with terminology over virtual memory and address
spaces.

The aim of this mail is to clearly (hopefuly) define and clarify this area.

(1) What is an address space?
What gets refered to when a process has an instruction that referes to memory.
Ie. a processes view of memory.

(2) What is virtual memory?
The mechanism that swaps regions of physical memory to disk when they're not
often used.

(3) What is memory protection?
The mechanism whereby despite a memory region being in my address space I cannot
do certain things to it (EG. run code in it. write it etc.)

These three are independant.
In practice all three are performed with the aid of an MMU.

Hypothetically one can envisage systems where ...
(i) All processes have the same addres space, there is no virtual memory and
there is no memory protection (Eg, an MMU-less machine, MS-DOS)

(ii) All processes have separate address spaces, there is virtual memory and
there is memory protection that stops a program from writing on code or 
executing data (Various Unixen)

(iii) All processes have the same adress space but cannot write on sections of
memory that belong to other processes. (One of the proposed designs for MOOSE,
some research OSes for 64 bit machines)
[Ie. process X might "own" addresses 1000-2000 and process Y owns 4000-5000.
Process X can still REFER to address 4500 -- if memory protection allows it
to. This reference will be to the memory used by process Y]


Is this clear?
Please comment if something here seems unclear or ambiguous -- if we can't 
agree on terminology it's hard having a sensible discussion which makes sense
to both sides ...

Michael

--------------------------------------------------------------------------------
Michael Winikoff
winikoff@cs.mu.oz.au
Computer science honours. University of Melbourne, Australia.