Read the following and answer the questions: Consider a machine with 16 GB…
2021
Read the following and answer the questions:
Consider a machine with 16 GB main memory and 32‐bits virtual address space, with page size as 4KB. Frame size and page size is same for the given machine.
What is the size of page table for handling the given virtual address space, given that each page table entry is of size 2 bytes?
- A.
2MB
- B.
2KB
- C.
32MB
- D.
12KB
Attempted by 173 students.
Show answer & explanation
Correct answer: A
Answer: 2 MB
Total virtual address space = 2^32 bytes (because the virtual address is 32 bits).
Page size = 4 KB = 2^12 bytes.
Number of pages = 2^32 ÷ 2^12 = 2^(32−12) = 2^20 = 1,048,576 pages.
Page table entry size = 2 bytes.
Page table size = number of pages × entry size = 1,048,576 × 2 bytes = 2,097,152 bytes = 2 MB.
Note: The physical main memory size (16 GB) is not needed for this single-level page table calculation; only the virtual address space, page size, and entry size matter.
A video solution is available for this question — log in and enroll to watch it.