A computer system supports a logical address space of 232 bytes. It uses…
2025
A computer system supports a logical address space of 232 bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a 𝑏-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size.
The value of 𝑏 is ___________ . (Answer in integer)
Attempted by 105 students.
Show answer & explanation
Correct answer: 11
Correct Answer is 11.
This question asks you to determine the size, in bits, of the index for the outer page table (represented by the variable b). The system uses a 32-bit logical address and a two-level paging scheme. To find b, you must first calculate the number of bits required for the other two parts of the address: the page offset and the inner page table index, using the given page size and page table entry size.
A 32-bit logical address in this system is divided into three parts:
[ Outer Page Index (b bits) | Inner Page Table Index (x bits) | Page Offset (d bits) ]
<------------------------32 Bit total (b + x + d ) --------------------------------->
1. Find the Page Offset (d)
The page offset is determined by the size of a page.
Page Size = 4096 Bytes = 212 Bytes.
To address each of the 4096 bytes within a page, you need 12 bits.
Therefore, d = 12 bits.
2. Find the Inner Page Table Index (x)
An inner page table must fit perfectly into a single page frame. We can use this to find how many bits are needed for its index.
Number of Entries in an Inner Table = Page Size / Entry Size = 4096 Bytes / 8 Bytes = 512 entries.
To uniquely address 512 entries, you need log2(512) bits, which is 9 bits.
Therefore, x = 9 bits.
3. Find the Outer Page Table Index (b)
The outer index b consists of the remaining bits of the 32-bit address.
b + x + d = 32
b + 9 + 12 = 32
b + 21 = 32
b = 32 - 21 = 11
The value of b is 11.
A video solution is available for this question — log in and enroll to watch it.