Differences between version 4 and predecessor to the previous major change of VirtualMemory.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Tuesday, October 12, 2004 3:59:06 pm | by AristotlePagaltzis | Revert |
Older page: | version 2 | Last edited on Tuesday, March 9, 2004 10:02:19 pm | by StuartYeates | Revert |
@@ -1,3 +1,17 @@
-The
concept that the memory your
program sees, is
not the way
memory is layed out physically
. You
may see memory with
holes in it, or parts being read only, or execute only,
and you probably don't see
all of memory. This allows
the application to have memory with a consitent, logical layout and leave the OS to worry about implementing it. On [Linux] it
's quite possible for applications
to use more
memory than the machine
has [RAM], with parts not in active use being swapped to disk and other parts being mmap(2)'ed to conventional files as well.
+VirtualMemory refers to the
concept that the address space of a
program does directly
not correspond to
the physical
memory layout
. The process address space
may therefor have
holes and rarely covers
all of physical
memory. It is
the OperatingSystem
's responsibility
to map process address space to physical
memory. This
has a number of benefits:
-See MemoryProtection MemoryMap
+* Processes are completely separated from each other. They each live in their own address spaces representing a closed universe to which the effect of their actions in memory is confined. This vastly improves security and stability.
+
+* A process has a consistent view of memory regardless of how the OperatingSystem actually maps it to real memory.
+
+* It is possible to allocate more memory to a process than the machine has [RAM], and, through the PageFault mechanism, swap pages in and out of physical memory on demand.
+
+* The PageFault mechanism also allows to use memory access as a metaphor for other operations without necessitating longwinded copy operations:
+
+** mmap(2) allows to treat memory as a mirror image of a file on disk, obviating the need for explicit [IO] calls such as lseek(2), read(2) and write(2).
+
+** The framebuffer of a graphics card can be mapped onto process address space, obviating the need for explicitly paging in and out the proper graphics memory segments.
+
+
See also:
+*
MemoryProtection
+*
MemoryMap