• edited by
6,743 views
1 1 vote

In a 32-bit machine we subdivide the virtual address into 4 segments as follows: 
 

10-bit

8-bit

6-bit

8 bit

We use a 3-level page table, such that the first 10-bit are for the first level and so on.

What is the size of a page table for a process that has 256K of memory starting at address 0?

(assume 2Byte per entry for all the levels)

2 Answers

Best answer
5 5 votes
Since the last 8 bits of the virtual address denote the page offset, we can find that page size is $2^{8}$ bytes.

Total memory is 256KB. So number of pages is $\frac{2^{18}}{2^{8}}=2^{10}=1024$.

The first 10 bits of virtual address means, we have $2^{10}=1024$ entries in the outer page table. Similarly, next 8 bits in the virtual address help us to find that there are $2^{8}=256$ entries in the second level page table, and next 6 bits in the virtual address shows us that there are $2^{6}=64$ entries in the third level page table.

Size of a page table entry is 2 bytes for all levels.

The outer page table points to 1024 entries in the second level page table each of whcih points to 256 entries in the third level page table each containing 64 pages. The process's address space consists of 1024 pages. So we need 16 third level page tables (Here, the third level page table has only 64 entries and we need to point to 1024 pages. That's why!). Thus the page table size can be calculated as:

$(1024*2)+(256*2)+(16*64*2)=4608$ bytes.
• selected by
Position:
Show:

Related questions

1 1 vote
1 answers 1 answer
233
233 views
1 1 vote
2 2 answers
498
498 views
tarunmundriya asked Dec 27, 2025
498 views
Consider the two-dimensional array A:int A[][] = new int[100][100];where A[0][0] is at location 200 in a paged memory system with pages of size 200. A small process that ...
1 1 vote
0 0 answers
345
345 views
ASH1198 asked Dec 16, 2025
345 views
In a 32-bit machine we subdivide the virtual address into 4 pieces as follows:8-bit 4-bit 8-bit 12-bitWe use a 3-level page table, such that the first 8 bits are...
1 1 vote
1 1 answer
406
406 views
Shubham Sharma 2 asked Sep 10, 2025
406 views
If the virtual memory size is $32$ MB and a physical memory size is $4$ MB with a page size of $2$ KB, Calculate the number of frames available in physical memory$1024$$2...