How many bits required for frame and offset number on 32-bit system with 1GB physical memory and 8KB page size?

StackOverflow https://stackoverflow.com/questions/17182155

Question

Doing some quick revision for a test, and its questions like these that always stump me:

How many bits required for the frame and offset number on 32-bit system with 1GB (2^30) physical memory and 8KB (2^13) page size?

For the Offset Number I got:

2^13 ~ 13 bits

For The Frame Number I got:

32-13 = 19 bits

Also it asks how many pages are available for the system but that was pretty simple:

2^30/2^13 = 2^17 pages

Just wanting to know if my answers are correct because I have doubts about the first two.

Thanks for the help! :D

Was it helpful?

Solution

I have no doubt about the first one. To address every byte in an 8K frame, you need 13 bits.

The second one is a bit more iffy. Although you may have 32 bits available to you in a "word", the question asks how many bits you require for a 1G address space (not the 4G you'd normally get from 32 bits). What you require is just those 17 bits, not the full 19.

And I agree with your third answer as well, 217 pages.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top