Page Table - Translation Failures

Translation Failures

The page table lookup may fail for two reasons. The first is if there is no translation available for that address, meaning the memory access to 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 send a segmentation fault to the offending program.

The page table lookup may also fail if the page is not resident in physical memory. This will occur if the requested page has been paged out of physical memory to make room for another page. In this case the page is paged 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's a disk partition or a swap file, "swapfile", or "page file" if it's a file). When this happens the page needs to be taken from disk and put back into physical memory.

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 algorithms.

Read more about this topic:  Page Table

Famous quotes containing the words translation and/or failures:

    ...it is better to marry than to be aflame with passion.
    Bible: New Testament, 1 Corinthians 7:9.

    King James translation reads, “It is better to marry than to burn.”

    Half the failures of this world arise from pulling in one’s horse as he is leaping.
    Julius Hare (1795–1855)