Virtual memory

From Computer History Wiki
Revision as of 14:18, 27 April 2018 by Jnc (talk | contribs) (Grammar, etc)
Jump to: navigation, search

Virtual memory or paging refers to a technique in which not all of the memory contents corresponding to a given virtual address space has to be 'resident', i.e. in actual physical main memory, while the computation which is using that address space is running. When a reference it made to a memory location which is not resident, the computation is stopped while the missing memory is made resident; once it is resident, the computation is allowed to proceed.

This is usually done by dividing the address space into pages, identically-sized blocks of address space; similarly, the physical main memory is also divided into similarly-sized page frames. A selected subset of the pages of a given computation's address space are assigned to page frames at any given time.

The advantages of virtual memory are several-fold:

  • It allows a computation to use more memory than the amount of actual physical memory on the machine; this oftem simplifies the program, over having to work within the confines of a more limited amount of memory.
  • The obverse face of the above is that instead of having to explicitly manage which data is kept in main memory, and which is in secondary storage (usually disk), the operating system automatically performs this on the user's behalf.
  • The use of fixed-size pages, and the usual practise of allowing any page of the address space to be allocated to any page frame, means there is no 'breakage' of main memory, and no need to move data around in main memory to coalesce free space (which was usually necessary on systems which did not use virtual memory).

There is no requirement that a virtual memory system have only two levels of storage; some systems had more (e.g. Multics, which used a three-level virtual memory system, with core, drum and disk memories; later modified to fast semi-conductor main memory, slower bulk core, and disk).