Given 4 GB (= 2^32 bytes, approximately 4.3 x 10^9 bytes) of virtual address…

2023

Given 4 GB (= 2^32 bytes, approximately 4.3 x 10^9 bytes) of virtual address space, page size of 4 KB, and each page table entry of 5 bytes, how many virtual pages are there and what is the size of the complete page table?

  1. A.

    1,048,576 pages and 5,242,880 bytes

  2. B.

    215000 and 40960 bytes

  3. C.

    10750 and 10240 bytes

  4. D.

    43000 and 1024 bytes

Attempted by 584 students.

Show answer & explanation

Correct answer: A

To find the number of virtual pages, divide the virtual address space by the page size.

4 GB = 2^32 bytes.
4 KB = 2^12 bytes.

Number of virtual pages = 2^32 / 2^12 = 2^20 = 1,048,576 pages.

Each page table entry is 5 bytes, so the complete page table size is:
1,048,576 x 5 = 5,242,880 bytes.

Therefore, option A is correct: 1,048,576 pages and 5,242,880 bytes.

Explore the full course: Mppsc Assistant Professor