187k views
5 votes
Consider a computer that has 32-bit virtual addresses. If a process is the minimum size (it uses only one actual page), then how much page table space, in terms of the number of entries the system must actually maintain for this process, is used for each of the following?

A. A one-level page table is used: page is 20 bits; offset is 12 bits.
B. A two-level page table is used: PT1 is 10 bits; PT2 is 8 bits; offset is 14 bits.

User Carbonizer
by
8.0k points

1 Answer

5 votes

Final answer:

In a one-level page table system with a 20-bit page number, only one entry is required. In a two-level system with PT1 being 10 bits and PT2 being 8 bits, the system must maintain two entries, one in each level of the page tables.

Step-by-step explanation:

The student has asked about the amount of page table space required for a process that uses only one actual page in systems with different page table structures using 32-bit virtual addresses. Let's break down both scenarios:

A. One-Level Page Table

In a one-level page table system where the page size is given by a 20-bit page number and a 12-bit offset, the size of the page table space that the system must maintain for a process that uses only one page is simply the size of one page table entry since only one entry will be used. Since the virtual address space is 32 bits and the offset is 12 bits, the page number must take up the remaining 20 bits. The total number of entries in the page table would be 220, but for a process using a single page, only one entry is required.

B. Two-Level Page Table

For a two-level page table system, where PT1 has 10 bits and PT2 has 8 bits with a 14-bit offset, we break the virtual address into three parts. In this case, the system must maintain an entry in the first level page table (PT1), which points to a second level page table (PT2), which in turn contains the actual page entry. For a process using only one page, there would be one entry in the PT1 and one entry in one of the PT2s. Thus, we would only need to maintain two entries in total.

User Panji Gemilang
by
9.0k points