[comp.arch] Definition of "virtual memory"

radford@calgary.UUCP (Radford Neal) (10/05/87)

In article <76700006@uiucdcsp>, johnson@uiucdcsp.cs.uiuc.edu writes:
> 
> >Virtual memory == ability for a task to run without its entire address space
> >residing in primary memory, in a manner that is transparent to the task
> >itself.
> 
> This answer would be marked as incorrect in the O.S. class that I teach.

I have always understood this to be the correct answer. Common, long-
established usage is the test. I think, for instance, that when IBM
introduced "virtual memory" into their 360/370 line with great fanfare,
they meant the ability to run individual programs with a process address
space larger than the physical size of memory.

> > The test for virtual memory is whether the name space of the process is
> > independent of the name space of the processor; that is, the memory seen by
> > the process is the same, no matter where it is located in physical (real)
> > memory.
> 
> This answer would be judged correct.

By this definition various old processors - e.g. the CDC 6600 - would
be judged to have "virtual memory" - but we didn't say they did back then.
It's a lot more consistent with established usage to call this a "memory
management" facility. Unfortunately, I've noticed a tendency to redefine
"memory management" recently so that it means anything that manages 
memory - i.e. just about any program or machine whatsoever.

> I suppose that either answer could serve as a definition for virtual memory,
> but you have to pick one and use it.  Perhaps it depends on the text book
> that you use.  The definition that you use determines whether you think
> that the PDP-11 has virtual memory or not.

By any definition, the more modern PDP-11s have the capability for
virtual memory. There's just no practical point, since the address
space is divided into only eight pages. Most processes will access
all pages most of the time, so demand-paging would be pointless.

    Radford Neal
    The University of Calgary

alan@pdn.UUCP (Alan Lovejoy) (10/09/87)

In article <1087@vaxb.calgary.UUCP> radford@calgary.UUCP (Radford Neal) writes:
>By this definition various old processors - e.g. the CDC 6600 - would
>be judged to have "virtual memory" - but we didn't say they did back then.
>It's a lot more consistent with established usage to call this a "memory
>management" facility. Unfortunately, I've noticed a tendency to redefine
>"memory management" recently so that it means anything that manages 
>memory - i.e. just about any program or machine whatsoever.
>

There is a significant difference between "Logical Address Space"
virtual memory and "True" virtual memory.  The confusion arises because
the former is a necessary implementation technique for the latter.
In common usage "virtual memory" can mean either one, unfortunately.
Perhaps we should seek to change this, and refer to the case where
the addresses generated by the program are mapped onto a separate
set of physical addresses as "Logical Addressing" and reserve the term
"Virtual Memory" for those systems whose logical address spaces are
larger than their physical address spaces.

Perhaps we should distinguish between systems where 

  1) the sum of all processes' (logical) address spaces must be less than or 
  equal to the physical address space (Logical Addressing),
  
  2) each process's logical address space must be less than or equal to the 
  physical address space, but the sum of all the address spaces can be
  greater than the physical address space (Inter-Process Virtual
  Memory), and
  
  3) each process's logical address space can be greater than the
  physical address space (Intra-Process Virtual Memory).

--alan@pdn

aglew@ccvaxa.UUCP (10/12/87)

>  1) the sum of all processes' (logical) address spaces must be less than or 
>  equal to the physical address space (Logical Addressing),
>  
>  2) each process's logical address space must be less than or equal to the 
>  physical address space, but the sum of all the address saces can be
>  greater than the physical address space (Inter-Process Virtual
>  Memory), and
>  
>  3) each process's logical address space can be greater than the
>  physical address space (Intra-Process Virtual Memory).
 	This isn't necessarily a good distinction.
	There have been, and will be again (as we pass the 32 bit limit)
	machines that came with more physical memory than could be
	addressed by a process (even with separate I/D, and so on).
	Yet these machines could take a page fault
>--alan@pdn

I think that the operative distinctions are:

    Memory Mapping (Logical Addressing)
	The address that a process generates is not the same as the address
	that the memory system sees.

	Sub-issue: how is mapping done?
	    By adding an offset to all addresses? (with bounds)
	    With multiple pages or segments?

	Sub-issue: are synonyms allowed?

    Non-resident memory (virtual memory) (faulting)
	Can memory not be resident?
	Can the machine take a fault?
	Sub-issues: how do you recover from a fault?
	    Instruction continuation/restart?
	    Checkpoint?
	    Imprecise faults? [*]


* By the way, it is possible to have imprecise page faults, and still
  be able to restart with sequential semantics, even without a checkpoint
  restore mechanism. I think I've already made a post to this newsgroup
  about it, but it may have gotten lost.