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 protection
(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!
=== Paged virtual memory === {{Main|Paged virtual memory}} In paging the memory address space or segment is divided into equal-sized blocks{{efn|Some systems, e.g., [[z/OS]], support more than one page size.}} called [[Page (computing)|pages]]. Using [[virtual memory]] hardware, each page can reside in any location at a suitable boundary of the computer's physical memory, or be flagged as being protected. Virtual memory makes it possible to have a linear [[virtual address space|virtual memory address space]] and to use it to access blocks fragmented over [[physical memory]] address space. Most [[computer architecture]]s which support paging also use pages as the basis for memory protection. A ''[[page table]]'' maps virtual memory to physical memory. There may be a single page table, a page table for each process, a page table for each segment, or a hierarchy of page tables, depending on the architecture and the OS. The page tables are usually invisible to the process. Page tables make it easier to allocate additional memory, as each new page can be allocated from anywhere in physical memory. On some systems a page table entry can also designate a page as read-only. Some operating systems set up a different address space for each process, which provides hard memory protection boundaries.<ref> Jeffrey S. Chase; Henry M. Levy; Michael J. Feeley; and Edward D. Lazowska. [https://homes.cs.washington.edu/~levy/opal/opal-tocs.pdf "Sharing and Protection in a Single Address Space Operating System"]. {{doi|10.1145/195792.195795}} 1993. p. 2. </ref> It is impossible for an unprivileged{{efn|On some systems there are privileged instructions for storage access by real address.}} application to access a page that has not been explicitly allocated to it, because every memory address either points to a page allocated to that application, or generates an [[interrupt]] called a ''[[page fault]]''. Unallocated pages, and pages allocated to any other application, do not have any addresses from the application point of view. A page fault may not necessarily indicate an error. Page faults are not only used for memory protection. The operating system may manage the page table in such a way that a reference to a page that has been previously [[Memory paging|paged out]] to secondary storage{{efn|In the early days of [[time sharing]] paging was normally to a [[magnetic drum]]; in contemporary systems, paging is normally to a [[hard disk]] or [[solid state device]].}} causes a page fault. The operating system intercepts the page fault, loads the required memory page, and the application continues as if no fault had occurred. This scheme, a type of [[virtual memory]], allows in-memory data not currently in use to be moved to secondary storage and back in a way which is transparent to applications, to increase overall memory capacity. On some systems, a request for virtual storage may allocate a block of virtual addresses for which no page frames have been assigned, and the system will only assign and initialize page frames when page faults occur. On some systems a [[guard page]] may be used, either for error detection or to automatically grow data structures. On some systems, the page fault mechanism is also used for [[executable space protection]] such as [[W^X]].
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)