hally9k
hally9k

Reputation: 2583

In memory allocation - what is the 12 bit page offset actually for?

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?

Upvotes: 2

Views: 672

Answers (1)

codeFreak
codeFreak

Reputation: 164

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.

Upvotes: 3

Related Questions