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.

Find number of pages required for the given virtual address space

  1. A.

    210

  2. B.

    220

  3. C.

    230

  4. D.

    212

Attempted by 336 students.

Show answer & explanation

Correct answer: B

Key idea: the number of pages equals 2^(number of virtual address bits − number of page offset bits).

  • Virtual address width = 32 bits, so the total virtual space is 2^32 bytes.

  • Page size = 4 KB = 2^12 bytes, so the page offset = 12 bits.

  • Number of pages = 2^(32 − 12) = 2^20 = 1,048,576 pages.

  • The main memory size (16 GB) does not affect the count of virtual pages for the virtual address space calculation.

Therefore the correct answer is the choice that indicates 2^20 (shown as "2 20"), i.e., 1,048,576 pages.

Explore the full course: Mppsc Assistant Professor