Jump to user comments
memory management A system allowing a computer program to
behave as though the computer's memory was larger than the
and copied to RAM as required.
Virtual memory is usually much larger than physical memory,
making it possible to run programs for which the total code
plus data size is greater than the amount of RAM available.
copied from disk to RAM ("paged in") when an attempt is made
to access it and it is not already present. This paging is
performed automatically by collaboration between the
CPU,
kernel. The program is unaware of virtual memory, it just
to physical memory at any instant.
(virtual)
page number (the most significant bits) and an
offset within the page (the N least significant bits). Each
page thus contains 2^N
bytes (or whatever the unit of
addressing is). The offset is left unchanged and the
memorymanagement unit (MMU) maps the virtual page number to a
physical page number. This is recombined with the offset to
The performance of a program will depend dramatically on how
its memory access pattern interacts with the paging scheme.
i.e. each access tends to be close to previous accesses, the
performance will be better than if accesses are randomly
more paging.
would need to allocate physical memory for the whole of every
active program and its data. Such a system might still use an
MMU so that each program could be located at the same
virtual addressing does not necessarily imply the existence of
the whole program and its data into physical memory when it is
to be executed and copy it all out to disk when its
timeslice expired. Such "swapping" does not imply virtual
memory and is less efficient than paging.
software, by translating every virtual memory access into a
file access, but efficient virtual memory requires hardware
and operating system support.
(2002-11-26)