chapter

    Memory Management, Paging and Virtual Memory Practice Questions for Gate Cs

    Solve 362+ Memory Management, Paging and Virtual Memory practice questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 1: Warm-up

    Assertion (A): A program with 15 memory accesses and 9 page faults has a page fault rate of 0.6.

    Reason (R): Page fault rate is calculated as Total Page Faults divided by Total Memory Accesses.

    Options:

    A) Both A and R are true and R is the correct explanation of A

    B) Both A and R are true but R is not the correct explanation of A

    C) A is true but R is false

    D) A is false but R is true

    Question 2
    Level 1: Warm-up

    Assertion (A): In the LRU worked example with reference string [7, 2, 7, 3, 2, 5, 3, 4, 6, 7, 7, 1, 5, 6, 1] and 4 page frames, there are 9 page faults.

    Reason (R): The page fault rate is calculated as Total Page Faults divided by Total Memory Accesses.

    Options:

    A) Both A and R are true and R is the correct explanation of A

    B) Both A and R are true but R is not the correct explanation of A

    C) A is true but R is false

    D) A is false but R is true

    Question 3
    Level 1: Warm-up

    A system uses a page size of 4 KB. A process accesses virtual address 8196 (in decimal). The page table maps this virtual page to physical frame number 5. The corresponding physical address in decimal is

    Question 4
    Level 1: Warm-up
    Assertion (A): In a two-level page table with a 32-bit virtual address, 4 KB page size, and 4-byte page table entries, the outer page table index is 10 bits and the inner page table index is 10 bits.
    Reason (R): Each page table must fit exactly in one 4 KB page, and since each entry is 4 bytes, a page can hold 1024 entries, requiring 10 bits for each index.
    Question 5
    Level 1: Warm-up

    Consider the following statements about the Least Recently Used (LRU) page replacement algorithm:

    S1: LRU is a stack algorithm.

    S2: LRU can exhibit Belady's anomaly.

    S3: LRU requires hardware support to track usage history.

    Which of the statements is/are true?

    Options:

    A) S1 only

    B) S1 and S3 only

    C) S2 and S3 only

    D) S1, S2, and S3

    Question 6
    Level 1: Warm-up

    Consider the following statements about manually tracing the Least Recently Used (LRU) page replacement algorithm:

    S1: To find the victim page, you look backward in the reference string from the current position.

    S2: On a hit, the accessed page is moved to the most recently used position.

    S3: The page whose last occurrence is furthest back in the reference string is the LRU victim.

    Which of the statements is/are true?

    Options:

    A) S1 only

    B) S1 and S2 only

    C) S2 and S3 only

    D) S1, S2, and S3

    Question 7
    Level 1: Warm-up

    Consider a system with a 32-bit virtual address space, a 20-bit physical address space, and a page size of 4 KB. Each page table entry is 4 bytes. Which of the following statements about the single-level page table is/are TRUE?

    Question 8
    Level 1: Warm-up
    Consider the following statements about single-level page table size:
    S1: It depends on the virtual address space size.
    S2: It depends on the physical address space size.
    S3: It depends on the page size.
    S4: It depends on the page table entry size.
    Which of the above statements is/are TRUE?
    Question 9
    Level 1: Warm-up

    A system uses a 32-bit virtual address space and a page size of 4 KB. The single-level page table must be capable of mapping every possible virtual page. The number of entries required in this page table is

    Question 10
    Level 1: Warm-up

    In the anchor scenario (32-bit virtual address, 20-bit physical address, 4 KB page size, 4-byte page table entries), the single-level page table is deliberately sized to expose the threshold where multi-level paging becomes mandatory. The size of this page table is

    Free preview ends here

    Login to view the complete practice questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Memory Management, Paging and Virtual Memory Practice Questions for GATE CS

    Solve 362+ Memory Management, Paging and Virtual Memory practice questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Topic Boundary and Anchor Scenario

    Topic Boundary & Anchor Scenario

    This topic covers paging mechanics, page table structures, address translation arithmetic, Translation Lookaside Buffer (TLB) operation, and Effective Access Time (EAT). It explicitly excludes page replacement algorithms, page fault handling procedures, and contiguous memory allocation, which are owned by sibling topics. We will use a consistent anchor scenario: a system with a 32-bit virtual address, 20-bit physical address, 4 KB page size, 4-byte Page Table Entries (PTEs), and a 64-entry 2-way set-associative TLB.

    Explain this more simply

    Think of this anchor scenario as a controlled laboratory setup. Every calculation we perform will use these exact numbers. This prevents cognitive overload from constant unit conversions and allows you to isolate the specific mechanism being tested in each card.

    Go one level deeper

    The anchor scenario is deliberately chosen because a 32-bit virtual address with 4 KB pages yields exactly entries. This cleanly maps to a 4 MB single-level page table, exposing the precise mathematical threshold where multi-level structures become mandatory, without introducing messy fractional page allocations.

    Virtual versus Physical Address Space

    Virtual vs Physical Address Space

    Virtual Address: Index into logical memory space.
    Physical Address: Index into actual hardware RAM.

    Anchor: 32-bit VA (4 GB) vs 20-bit PA (1 MB)

    A virtual address is an index into a process's logical memory space, while a physical address is an index into the actual hardware RAM. In our anchor scenario, the 32-bit virtual address allows a process to request up to 4 GB of memory ( bytes). However, the 20-bit physical address means the machine only has 1 MB of actual RAM installed ( bytes).

    Explain this more simply

    Imagine a library catalog versus the actual bookshelves. The catalog can list millions of books, even if the building only has physical space for a few hundred. The operating system maps the catalog entries to the available shelves dynamically.

    Go one level deeper

    The hardware does not care if the virtual address space exceeds the physical address space. The Memory Management Unit (MMU) blindly performs the translation. If the target physical frame is absent or invalid, the MMU raises a trap, delegating the resolution to the operating system's page fault handler.

    Memory Management, Paging and Virtual Memory: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Operating System MCQ

    Assertion (A): A program with 15 memory accesses and 9 page faults has a page fault rate of 0.6.

    Reason (R): Page fault rate is calculated as Total Page Faults divided by Total Memory Accesses.

    Options:

    A) Both A and R are true and R is the correct explanation of A

    B) Both A and R are true but R is not the correct explanation of A

    C) A is true but R is false

    D) A is false but R is true

    1. A.

      Both A and R are true and R is the correct explanation of A

    2. B.

      Both A and R are true but R is not the correct explanation of A

    3. C.

      A is true but R is false

    4. D.

      D) A is false but R is true

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: Verify both the assertion and reason, then check if the reason correctly explains the assertion.

    Step 1: Evaluate Assertion (A). Page fault rate = 9 / 15 = 0.6. The assertion is true.

    Step 2: Evaluate Reason (R). The formula for page fault rate is indeed Total Page Faults / Total Memory Accesses. The reason is true.

    Step 3: Check if R explains A. The reason provides the exact formula used to calculate the value in the assertion. Therefore, R is the correct explanation of A.

    Answer: Both A and R are true and R is the correct explanation of A (Option A)

    Question 2 · Operating System MCQ

    Assertion (A): In the LRU worked example with reference string [7, 2, 7, 3, 2, 5, 3, 4, 6, 7, 7, 1, 5, 6, 1] and 4 page frames, there are 9 page faults.

    Reason (R): The page fault rate is calculated as Total Page Faults divided by Total Memory Accesses.

    Options:

    A) Both A and R are true and R is the correct explanation of A

    B) Both A and R are true but R is not the correct explanation of A

    C) A is true but R is false

    D) A is false but R is true

    1. A.

      Both A and R are true and R is the correct explanation of A

    2. B.

      Both A and R are true but R is not the correct explanation of A

    3. C.

      A is true but R is false

    4. D.

      A is false but R is true

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: Verify both the assertion and reason, then check if the reason explains the assertion.

    Step 1: Evaluate Assertion (A). The worked example traces LRU with the given reference string and 4 frames, resulting in 9 page faults out of 15 accesses. The assertion is true.

    Step 2: Evaluate Reason (R). The formula for page fault rate is indeed Total Page Faults / Total Memory Accesses. The reason is true.

    Step 3: Check if R explains A. The reason provides the general formula for calculating page fault rate, but it doesn't explain WHY there are 9 faults in the specific trace. The number of faults depends on the LRU algorithm's behavior with that specific reference string, not just the formula.

    Step 4: Therefore, both are true but R is not the correct explanation of A.

    Answer: Both A and R are true but R is not the correct explanation of A (Option B)

    Question 3 · Operating System NAT

    A system uses a page size of 4 KB. A process accesses virtual address 8196 (in decimal). The page table maps this virtual page to physical frame number 5. The corresponding physical address in decimal is

    Correct Answer:

    20484

    Step-by-Step Solution

    Key idea: Physical address = (frame number × page size) + offset. The offset is the same in virtual and physical addresses.

    Step 1: Page size = 4 KB = 4096 bytes.

    Step 2: Virtual address = 8196.

    Step 3: Page number = .

    Step 4: Offset = .

    Step 5: Physical address = .

    Answer: 20484

    Question 4 · Operating System MCQ
    Assertion (A): In a two-level page table with a 32-bit virtual address, 4 KB page size, and 4-byte page table entries, the outer page table index is 10 bits and the inner page table index is 10 bits.
    Reason (R): Each page table must fit exactly in one 4 KB page, and since each entry is 4 bytes, a page can hold 1024 entries, requiring 10 bits for each index.
    1. A.

      Both A and R are true and R is the correct explanation of A.

    2. B.

      Both A and R are true but R is NOT the correct explanation of A.

    3. C.

      A is true but R is false.

    4. D.

      A is false but R is true.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: The index bits are determined by how many entries fit in a single page frame.

    Step 1: Page size = 4 KB = 4096 bytes. PTE size = 4 bytes.

    Step 2: Entries per page = 4096 / 4 = 1024 = . Thus, each index requires 10 bits. Reason R is TRUE.

    Step 3: Virtual address = 32 bits. Offset = 12 bits. Page number = 20 bits.

    Step 4: The 20-bit page number is split into two 10-bit indices for the outer and inner tables. Assertion A is TRUE.

    Step 5: R correctly explains why A is true.

    Answer: Both A and R are true and R is the correct explanation of A.

    Question 5 · Operating System MCQ

    Consider the following statements about the Least Recently Used (LRU) page replacement algorithm:

    S1: LRU is a stack algorithm.

    S2: LRU can exhibit Belady's anomaly.

    S3: LRU requires hardware support to track usage history.

    Which of the statements is/are true?

    Options:

    A) S1 only

    B) S1 and S3 only

    C) S2 and S3 only

    D) S1, S2, and S3

    1. A.

      S1 only

    2. B.

      S1 and S3 only

    3. C.

      S2 and S3 only

    4. D.

      S1, S2, and S3

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: LRU is a stack algorithm that approximates Optimal using past behavior and requires hardware support.

    Step 1: Evaluate S1. LRU is a stack algorithm because the set of pages in memory with N frames is always a subset of pages in memory with N+1 frames. S1 is true.

    Step 2: Evaluate S2. Stack algorithms (including LRU) are mathematically guaranteed to never exhibit Belady's anomaly. S2 is false.

    Step 3: Evaluate S3. LRU requires hardware support (counters or a stack) to track the usage history of pages. S3 is true.

    Step 4: Conclude that S1 and S3 are true.

    Answer: S1 and S3 only (Option B)

    Question 6 · Operating System MCQ

    Consider the following statements about manually tracing the Least Recently Used (LRU) page replacement algorithm:

    S1: To find the victim page, you look backward in the reference string from the current position.

    S2: On a hit, the accessed page is moved to the most recently used position.

    S3: The page whose last occurrence is furthest back in the reference string is the LRU victim.

    Which of the statements is/are true?

    Options:

    A) S1 only

    B) S1 and S2 only

    C) S2 and S3 only

    D) S1, S2, and S3

    1. A.

      S1 only

    2. B.

      S1 and S2 only

    3. C.

      S2 and S3 only

    4. D.

      S1, S2, and S3

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: The manual LRU trace method uses backward looking to find the least recently used page.

    Step 1: Evaluate S1. The manual method involves looking backward in the reference string from the current position to find which page was used least recently. S1 is true.

    Step 2: Evaluate S2. On a hit, the accessed page becomes the most recently used, so it's moved to the MRU position in the tracking list. S2 is true.

    Step 3: Evaluate S3. The LRU victim is the page whose last occurrence is furthest back in the reference string (or has no prior occurrence). S3 is true.

    Step 4: All three statements correctly describe the manual LRU tracing method.

    Answer: S1, S2, and S3 (Option D)

    Question 7 · Operating System MSQ

    Consider a system with a 32-bit virtual address space, a 20-bit physical address space, and a page size of 4 KB. Each page table entry is 4 bytes. Which of the following statements about the single-level page table is/are TRUE?

    1. A.

      The page table requires exactly entries.

    2. B.

      The page table size is 1 MB.

    3. C.

      If the physical address space is increased to 24 bits, the page table size remains unchanged.

    4. D.

      If the page size is increased to 8 KB, the page table size becomes 2 MB.

    Correct Answer:

    ["A","C","D"]

    Step-by-Step Solution

    Key idea: Page table size depends on virtual address space and page size, not physical address space.

    Step 1: Virtual address space = bytes. Page size = bytes.

    Step 2: Number of entries = . Statement A is TRUE.

    Step 3: Page table size = bytes = bytes = 4 MB. Statement B is FALSE (it says 1 MB).

    Step 4: Changing physical address space does not affect the number of virtual pages. Statement C is TRUE.

    Step 5: If page size = 8 KB = , entries = . Size = bytes = 2 MB. Statement D is TRUE.

    Answer: A, C, D

    Question 8 · Operating System MSQ
    Consider the following statements about single-level page table size:
    S1: It depends on the virtual address space size.
    S2: It depends on the physical address space size.
    S3: It depends on the page size.
    S4: It depends on the page table entry size.
    Which of the above statements is/are TRUE?
    1. A.

      S1 only

    2. B.

      S1 and S3 only

    3. C.

      S1, S3, and S4 only

    4. D.

      S1, S2, S3, and S4

    Correct Answer:

    ["C"]

    Step-by-Step Solution

    Key idea: Page table size = (VA space / page size) × PTE size.

    Step 1: S1 is TRUE. VA space determines number of virtual pages.

    Step 2: S2 is FALSE. Physical address space does not affect page table size.

    Step 3: S3 is TRUE. Page size determines how many pages fit in VA space.

    Step 4: S4 is TRUE. PTE size determines bytes per entry.

    Step 5: True statements: S1, S3, S4.

    Answer: S1, S3, and S4 only

    Question 9 · Operating System MCQ

    A system uses a 32-bit virtual address space and a page size of 4 KB. The single-level page table must be capable of mapping every possible virtual page. The number of entries required in this page table is

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: The number of page table entries is determined entirely by the virtual address space, not the physical memory.

    Step 1: Virtual address space = bytes.

    Step 2: Page size = 4 KB = bytes.

    Step 3: Number of virtual pages = .

    Step 4: Each virtual page needs exactly one page table entry, so the page table has entries.

    Answer:

    Question 10 · Operating System MCQ

    In the anchor scenario (32-bit virtual address, 20-bit physical address, 4 KB page size, 4-byte page table entries), the single-level page table is deliberately sized to expose the threshold where multi-level paging becomes mandatory. The size of this page table is

    1. A.

      1 MB

    2. B.

      4 MB

    3. C.

      16 MB

    4. D.

      256 KB

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: Page table size depends on virtual address space, not physical address space.

    Step 1: Virtual address space = bytes.

    Step 2: Page size = 4 KB = bytes.

    Step 3: Number of entries = .

    Step 4: Page table size = bytes = bytes = 4 MB.

    Answer: 4 MB

    More practice questions in this unit