After a lecture on paging, page allocation and page replacement I am still unsure about what the 12 bit page offset for each page is actually for. I understand that it holds an address for the 4096 byte space of each page but what does it actually point to and why?

有帮助吗?

解决方案

Actually, page offset is the address of entry in that page, i.e. displacement from the starting of page. These 12 bit offsets are used for addressing each entry within a page.

With the help of page number, find frame number in main memory by looking up in the page table. After getting frame number multiply it with number of entries in one page. Then add offset to the product to get the actual address in main memory, i.e., actual address in main memory = (frame number) * (number of entries in one page) + offset.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top