What’s a page table in OS?

Print anything with Printful



Computers have virtual and physical memory, with a page table linking the two. The memory management unit (MMU) accesses the page table to find data, with frequently used maps stored in the lookaside translation buffer. If an address cannot be found, the program may shut down.

Most computers have two forms of memory, virtual memory and physical memory. Virtual memory, as the name suggests, is simply a construct that allows a program to function as if all the information needed to run it is stored in the same place. Each piece of information stored in virtual memory corresponds to a physical memory address. A page table is the data structure used by the computer operating system to keep track of the connections between virtual memory and physical memory. The process of correlating virtual memory with physical memory is called mapping.

The concept of how the page table organizes the two types of memory is best understood using a familiar example. When a computer user creates a playlist in a media player program, he can take songs from different files on the computer. The physical files aren’t moved, but the program knows where to go to access each song in turn.

The playlist is like virtual memory. It is a contiguous block of information that is easily accessible by the program. Individual files with individual songs in them are like physical memory. They are stored in many different places on your computer. Physical memory is stored in a page table.

A hardware component in the computer receives requests from virtual memory and then accesses the page table to find the physical memory location of the data. This hardware is called a memory management unit (MMU) or dynamic address translation unit (DAT). To make data access happen as quickly as possible, the MMU stores a finite number of frequently used maps in a table called the lookaside translation buffer. Acting like the bookmarks tab in a web browser, the lookaside translation buffer allows your computer to quickly jump to a frequently used memory location.

If the address in question is not the one requested often by the computer, the MMU will access the page table directly. It scans the table until it finds the address in question. It then returns the address to the translation lookaside buffer from which the program is able to access information.

Sometimes the computer cannot find the address in the page table. This can happen if there is no map between virtual memory and physical memory. In this case, the operating system will send a message to the program telling it to shut down. The search can also fail if the physical file has been moved, such as being placed on a backup disk and removed from the system.




Protect your devices with Threat Protection by NordVPN


Skip to content