Differences between revisions 2 and 3
Revision 2 as of 2004-03-15 21:20:18
Size: 1633
Editor: yakko
Comment:
Revision 3 as of 2004-03-15 23:05:42
Size: 2252
Editor: yakko
Comment:
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
Note that since physical memory is allocated in pages, that the page offset for virtual and physical addresses don't change. Note that since physical memory is allocated in pages, that the page offset for virtual and physical addresses don't change. 
Line 29: Line 29:
Essentially Memory is a cache for the disk drive system. When we view it in this way we need to consider the ''extreme'' difference in speed between the memory and the disk drive. To minimize the effects of this difference we employ the following techniques:
Line 30: Line 31:
   * Pages should be large enough to amortize the high access time.
   * Page placement is fully associative
   * Page faults can be handled in software because the overhead will be small compared to the disk access time
   * The Write-through method will not work with virtual memory since writes take too long. Instead VM systems use write-back schemes.

Back to ComputerTerms

Virtual Memory

There are two main motivations for Virtual Memory:

  1. To allow efficient and safe sharing of memory among multiple programs
  2. To remove the programming burdens of a small, limited amount of main memory.

Virtual memory implements the translation of a program's address space to physical addresses. This translation process enforces protection of a program's address space from other programs.

In times past programmers had to make sure their programs fit in the memory available, Virtual memory overcomes this by relieving the programmer of this task.

KEY: A Virtual Memory Block is called a page

KEY: A Virtual Memory Miss is called a page fault

KEY: The CPU produces a Virtual Address.

The process of mapping virtual memory addresses to physical memory address is called memory mapping or address translation. Virtual memory also provides relocation functionality. This allows us to load the program in any physical memory location (remember that DOS required you to run your program in the lower 640K of memory). Further memory is allocated in fixed size blocks (pages) eliminating the need to find a contiguous block of memory to allocate to a program. (Remember that memory references in a program are offsets that assume contiguous memory use.)

FORMAT:

Virtual Page Number

Page Offset

Note that since physical memory is allocated in pages, that the page offset for virtual and physical addresses don't change.

https://www.scotnpatti.com/images/vitualMemorytranslation.jpg

Essentially Memory is a cache for the disk drive system. When we view it in this way we need to consider the extreme difference in speed between the memory and the disk drive. To minimize the effects of this difference we employ the following techniques:

  • Pages should be large enough to amortize the high access time.
  • Page placement is fully associative
  • Page faults can be handled in software because the overhead will be small compared to the disk access time
  • The Write-through method will not work with virtual memory since writes take too long. Instead VM systems use write-back schemes.

Back to ComputerTerms

VirtualMemory (last edited 2004-03-29 19:59:20 by yakko)