189k views
0 votes
Consider a logical address space of 2^32 bytes and a page size of 4 KB. Physical memory of 1 GB, each page table entry also includes 6 bits for bookkeeping. What is the size of the page table?

(a) 4 MB
(b) 2 MB
(c) 1 MB
(d) 3 MB

1 Answer

6 votes

Final answer:

To calculate the size of the page table, divide the logical address space by the page size to get the number of pages, then multiply by the size of each page table entry including bookkeeping bits. The logical address space of 2^32 bytes with a page size of 4 KB results in 2^20 entries. Including 6 bookkeeping bits, the page table size is 3 MB.

Step-by-step explanation:

The question requires understanding of operating system concepts, specifically the function and structure of a page table within the context of virtual memory management. To calculate the size of the page table, we need to consider the logical address space, the page size, and the additional bookkeeping bits used in each page table entry.

Given that the logical address space is 2^32 bytes and the page size is 4 KB (2^12 bytes), we can determine the number of pages that can be accommodated by the logical address space by dividing the address space by the page size:

  • Number of pages = Logical address space / Page size
  • Number of pages = 2^32 / 2^12 = 2^20

Each page table entry has additional 6 bits for bookkeeping, along with the size required to store the physical address. Since the physical memory is 1 GB (2^30 bytes), and the page size is 4 KB, the number of frames in physical memory is 2^30 / 2^12 = 2^18 frames. Therefore, 18 bits are needed to address each frame, resulting in a total of 18+6=24 bits for each page table entry.

If there are 2^20 entries and each entry is 24 bits (or 3 bytes), the total size of the page table is calculated as follows:

  • Page table size = Number of entries × Size of each entry
  • Page table size = 2^20 × 3 bytes
  • Page table size = 3 × 2^20 bytes
  • Page table size = 3 MB

Therefore, the correct answer is (d) 3 MB.

User Phodina
by
8.0k points