0
votes

The following parameters apply to a system employing a 40-bit virtual address and 1G bytes of physical (main) memory. Word size is 64 bits (8 bytes). Addresses point to bytes and are aligned on byte boundaries. We use the following notation for an i-bit address: Ai-1...A2,A1,A0 where Ai-1 is the most significant bit of the address and A0 is the least significant bit of the address. The virtual address is denoted by V39-V0 and the physical address is denoted by P29-P0.

Page size: 64 K bytes
Page table: three-level page table
The virtual page number is split in 3 fields of 8 bits each.
Entries in all tables are 32 bits (4 bytes).

This is what I have found so far,

Since it is a 40 bit virtual address and the Page Size is 64kB (2^16), 16 bits are for offset and we subtract 16 from 40. The remaining 24 bits are for the Virtual Page Number (VPN). The VPN is split in 3 fields of 8 bits each. So we have a three level page table. Each table has 2^8 entries and the size of each table is 2^8 * 4 bytes = 1024 bytes.

From here how would we proceed and find the total amount of virtual memory covered by one entry of page tables at each level?

1
I'm voting to close this question as off-topic because it is not a programming question.Raymond Chen
Don't close it, the question is tagged appropriately.Isuru H

1 Answers

1
votes

At the lowest level each entry points to a single page, so working out the amount of virtual memory is trivial, its the size of 1 page. At each of the higher level, one entry represents n entries in the lower table (2^8 in this case). So for the second level its n * amount covered by a bottom level entry, or 2^8* the size of a page. Then use the size of a second level to repeat this calculation for the third level.