Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Memory paging
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Physical and virtual address space sizes == Paging is one way of allowing the size of the addresses used by a process, which is the process's "virtual address space" or "logical address space", to be different from the amount of main memory actually installed on a particular computer, which is the physical address space. ===Main memory smaller than virtual memory=== In most systems, the size of a process's virtual address space is much larger than the available main memory.<ref name="buzbee">{{cite web|author=Bill Buzbee|title=Magic-1 Minix Demand Paging Design|url=http://www.homebrewcpu.com/demand_paging.htm|access-date=December 9, 2013|url-status=live|archive-url=https://web.archive.org/web/20130605134128/http://www.homebrewcpu.com/demand_paging.htm|archive-date=June 5, 2013}}</ref> For example: * The [[address bus]] that connects the CPU to main memory may be limited. The [[Intel 80386#The i386SX variant|i386SX CPU]]'s 32-bit internal addresses can address 4 GB, but it has only 24 pins connected to the address bus, limiting installed physical memory to 16 MB. There may be other hardware restrictions on the maximum amount of RAM that can be installed. * The maximum memory might not be installed because of cost, because the model's standard configuration omits it, or because the buyer did not believe it would be advantageous. * Sometimes not all internal addresses can be used for memory anyway, because the hardware architecture may reserve large regions for I/O or other features. ===Main memory the same size as virtual memory=== A computer with true ''n''-bit addressing may have 2{{Sup|''n''}} addressable units of RAM installed. An example is a 32-bit [[x86]] processor with 4 [[Gigabyte|GB]] and without [[Physical Address Extension]] (PAE). In this case, the processor is able to address all the RAM installed and no more. However, even in this case, paging can be used to support more virtual memory than physical memory. For instance, many programs may be running concurrently. Together, they may require more physical memory than can be installed on the system, but not all of it will have to be in RAM at once. A paging system makes efficient decisions on which memory to relegate to secondary storage, leading to the best use of the installed RAM. In addition the operating system may provide services to programs that envision a larger memory, such as files that can grow beyond the limit of installed RAM. Not all of the file can be concurrently mapped into the address space of a process, but the operating system might allow regions of the file to be mapped into the address space, and unmapped if another region needs to be mapped in. ===Main memory larger than virtual address space=== A few computers have a main memory larger than the virtual address space of a process, such as the Magic-1,<ref name="buzbee" /> some [[PDP-11#Decline|PDP-11]] machines, and some systems using 32-bit [[x86]] processors with [[Physical Address Extension]]. This nullifies a significant advantage of paging, since a single process cannot use more main memory than the amount of its virtual address space. Such systems often use paging techniques to obtain secondary benefits: * The "extra memory" can be used in the [[page cache]] to cache frequently used files and metadata, such as directory information, from secondary storage. * If the processor and operating system support multiple virtual address spaces, the "extra memory" can be used to run more processes. Paging allows the cumulative total of virtual address spaces to exceed physical main memory. * A process can store data in [[memory-mapped file]]s on memory-backed file systems, such as the [[tmpfs]] file system or file systems on a [[RAM drive]], and map files into and out of the address space as needed. * A set of processes may still depend upon the enhanced security features page-based isolation may bring to a multitasking environment. The size of the cumulative total of virtual address spaces is still limited by the amount of secondary storage available.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)