Paging

To know which page of logical memory is related to which frame in main memory, the operating system uses a data structure called page table that it stores in memory. The page table behaves like a dictionary: the keys are page numbers, and the output values are frame numbers.

Finding the physical address from the logical address goes as follows:

  1. The logical address, which consists of m bits, is divided into 2 parts: the page offset (n rightmost bits), and the page number (m - n leftmost bits). The page number tells on which page of logical memory this address is located, and the page offset tells how deep into this page the address can be found.
The structure of the logical address.

The structure of the logical address. Taken from Bell, John T. "Main Memory." University of Illinois, Chicago.