Reputation: 25
Suppose my system is using a 32-bit address space with each entry being 32 bits and with each page being 8 KB. How many different entries would the page table contain?
My logic: 32-bit address space implies 2^32 total addresses, therefore 2^37 total bits. 8 KB per page implies 2^16 total bits per page. Therefore, there will be 2^37 / 2^16 = 2^21 entries in the page table.
Is this correct?
Upvotes: 1
Views: 10943
Reputation: 7374
You don't need to consider the number of bits in a byte. The answer to the general question is:
number of total addresses
-------------------------
number of bytes per page
So for your problem it is 2^32 / 2^13 = 2^19.
Upvotes: 2