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:
“The Bible is for the Government of the People, by the People, and for the People.”
—General prologue, Wycliffe translation of the Bible (1384)
“Our children will not survive our habits of thinking, our failures of the spirit, our wreck of the universe into which we bring new life as blithely as we do. Mostly, our children will resemble our own misery and spite and anger, because we give them no choice about it. In the name of motherhood and fatherhood and education and good manners, we threaten and suffocate and bind and ensnare and bribe and trick children into wholesale emulation of our ways.”
—June Jordan (b. 1939)