1

This question is mostly just to clarify my understanding.

Say I have a 32-bit Computer, with virtual memory space of 2^32 bytes.

Memory paging is used, each page is 2^8 bytes.

So the memory address sizes are 24 bits. Since (2^32/2^8 = 2^24 bytes).

And the offset would be 8 bits? This I do not quite understand. Since I know that the total address is 32, and 24 is already taken by the pages, so the remainder is the offset of 8.

Lastly for the page size. If each physical memory address is stored in 32 bits (4 bytes), the table size would be 2^26 (2^24 * 2^2). Is this correct?

Kyle
  • 69
  • 6
  • Possible duplicate of [translate virtual address to physical address](http://stackoverflow.com/questions/40292822/translate-virtual-address-to-physical-address) – Tony Tannous Feb 13 '17 at 17:50
  • @TonyTannous that helps a bit, but I wanted clarification on whether I understood how the values are calculated and if I was correct. – Kyle Feb 13 '17 at 18:09

1 Answers1

0

Page Table size = number of entries*size of entry

In your case, each page is 2^8 bytes, that is - you need 8 bits offset. You got that one right.

This leaves us with 24 bits for Page. 2^24 different pages.

Size of page-table for process X is: 2^24*Entry-Size. which is not provided by you here.

Lets assume it needs 32 bits per entry. Then, 2^24*32 = 2^24*2^5 = 2^29 bits.

Tony Tannous
  • 14,154
  • 10
  • 50
  • 86