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
Page table
(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!
== Translation failures == The page table lookup may fail, triggering a [[page fault]], for two reasons: * The lookup may fail if there is no translation available for the virtual address, meaning that virtual address is invalid. This will typically occur because of a programming error, and the operating system must take some action to deal with the problem. On modern operating systems, it will cause a [[segmentation fault]] signal being sent to the offending program. * The lookup may also fail if the page is currently not resident in physical memory. This will occur if the requested page has been [[paging|moved out]] of physical memory to make room for another page. In this case the page is paged out to a secondary store located on a medium such as a hard disk drive (this secondary store, or "backing store", is often called a ''swap partition'' if it is a disk partition, or a ''swap file'', ''swapfile'' or ''page file'' if it is a file). When this happens the page needs to be taken from disk and put back into physical memory. A similar mechanism is used for [[memory-mapped file]]s, which are mapped to virtual memory and loaded to physical memory on demand. When physical memory is not full this is a simple operation; the page is written back into physical memory, the page table and TLB are updated, and the instruction is restarted. However, when physical memory is full, one or more pages in physical memory will need to be paged out to make room for the requested page. The page table needs to be updated to mark that the pages that were previously in physical memory are no longer there, and to mark that the page that was on disk is now in physical memory. The TLB also needs to be updated, including removal of the paged-out page from it, and the instruction restarted. Which page to page out is the subject of [[page replacement algorithm]]s. Some MMUs trigger a page fault for other reasons, whether or not the page is currently resident in physical memory and mapped into the virtual address space of a process: * Attempting to write when the page table has the read-only bit set causes a page fault. This is a normal part of many operating system's implementation of [[copy-on-write]]; it may also occur when a write is done to a location from which the process is allowed to read but to which it is not allowed to write, in which case a signal is delivered to the process. * Attempting to execute code when the page table has the [[NX bit]] (no-execute bit) set in the page table causes a page fault. This can be used by an operating system, in combination with the read-only bit, to provide a [[Write XOR Execute]] feature that stops some kinds of exploits.<ref> [https://www.openbsd.org/papers/ven05-deraadt/mgp00009.html "W^X - The Mechanism"]. </ref>
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)