Virtual Memory MCQs: 12 Cross-Concept Questions with Explanations

Test virtual-memory fundamentals across demand paging, address translation, cache colouring and page replacement. Each of the 12 MCQs includes a direct explanation.

KnowledgeGate Team

Exam prep & CS education

Updated 30 Oct 20268 min read156 views
Virtual Memory MCQs: 12 Cross-Concept Questions with Explanations

Virtual-memory MCQs jump among address spaces, demand loading, page tables, cache synonyms, replacement and other OS concepts. Attempt each question before checking its explanation, and note which concept family each miss belongs to. For a refresher on the fundamentals, revise Memory Hierarchy and Virtual Memory Explained first.

Classify the question before calculating

Classify each item as address-space, demand-loading, translation/cache, replacement or cross-OS; note the bits, page size, frames, string or policy. With 32-bit byte addressing and 4 KiB pages, 0x12345ABC splits into VPN 0x12345, offset 0xABC; virtual space is 4 GiB.

Questions 1-2: separate virtualization, virtual memory and physical memory

Question 1

Indian Space Research Organization, Computer Science, 2023

State whether true or false:

1. Virtualization facilitates multiple OS simultaneously on the same hardware

2. In dual boot, multiple OS can run simultaneously

  • A. (i) True (ii) False

  • B. (i) False (ii) True

  • C. (i) True (ii) True

  • D. (i) False (ii) False

Answer: A. (i) True (ii) False.

A hypervisor can run multiple operating systems concurrently. Dual boot starts only one; virtual memory is unrelated.

Solved Q1.

Question 2

LTI Mindtree, 2025

Which of the following statements is correct about virtual memory?

  • A. It is a combination of the logical-memory and physical-memory

  • B. It is a separation of user logical memory and physical memory

  • C. It is a virtual network memory

  • D. None of the these

Answer: B. It is a separation of user logical memory and physical memory.

Virtual memory separates logical addresses from physical frames. Translation maps between them; it does not combine them.

Solved Q2.

Questions 3-4: judge virtual-memory benefits without overclaiming

Question 3

Capgemini, 2024

Consider the following statements regarding the usage of virtual memory.

1. To free user programs from the need to carry out storage allocation and to permit efficient sharing of the available memory space among different users.

2. To make program independent of the configuration and capacity of the physical memory for their execution.

3. To achieve higher CPU performance.

4. To achieve the very low access time and cost per bit that is possible with a memory hierarchy.

Which of the above are correct?

  • A. 1, 2 and 3

  • B. 2, 3 and 4

  • C. 1, 3 and 4

  • D. 1, 2 and 4

Answer: D. 1, 2 and 4.

Managed allocation hides placement and supports sharing, validating 1 and 2. Statement 4 is the hierarchy goal; fault overhead refutes 3 as a guarantee.

Solved Q3.

Question 4

Wipro, 2023

Select the incorrect statement about virtual memory

(1) It increase the degree of multiprogramming.

(2) Does not allow address space to be shared by several process

(3) reduces the context switching overhead

(4) Less I/O or loading and unloading for individual user process

  • A. 1, 2 and 3 only

  • B. 3 and 4 only

  • C. 2 and 3 only

  • D. 2, 3 and 4 only

Answer: C. 2 and 3 only.

Active pages raise multiprogramming and reduce initial loading. Sharing is allowed, but context switching is not inherently faster; therefore 2 and 3 are incorrect.

Solved Q4.

Questions 5-6: connect demand loading to address-space size

Question 5

LTI Mindtree, 2025

Techniques that automatically move program and data blocks into physical main memory when they are required for execution are called

  • A. Main memory techniques

  • B. Cache memory techniques

  • C. Virtual memory techniques

  • D. Associate memory techniques

Answer: C. Virtual memory techniques.

"When they are required" identifies demand paging: a fault loads the missing page. Caches move smaller blocks.

Solved Q5.

Question 6

Infosys, 2023

Size of virtual memory depends on

  • A. Address line

  • B. Data Base

  • C. Disc Space

  • D. All the above

Answer: A. Address line.

An n-bit address names 2^n locations. Byte-addressed 32- and 48-bit spaces hold 4 GiB and 256 TiB; backing store does not set address width. Demand loading controls when a page becomes resident; address width controls how many virtual locations the process can name.

Solved Q6.

Questions 7-8: solve matching sets by locking direct pairs first

Question 7

UGC NET, Computer Science, Paper 2 December, 2015

Match the following with respect to various memory-management algorithms:

List I: (a) Demand paging; (b) Segmentation; (c) Dynamic partitions; (d) Fixed partitions.

List II: (i) degree of multiprogramming; (ii) working set; (iii) supports the user view of memory; (iv) compaction.

Codes:

  • A. (a)-(iii), (b)-(iv), (c)-(ii), (d)-(i)

  • B. (a)-(ii), (b)-(iii), (c)-(i), (d)-(iv)

  • C. (a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)

  • D. (a)-(ii), (b)-(iii), (c)-(iv), (d)-(i)

Answer: D. (a)-(ii), (b)-(iii), (c)-(iv), (d)-(i).

Segmentation supports the user view; dynamic partitions require compaction. Demand paging pairs with working set, leaving fixed partitions with multiprogramming degree.

Solved Q7.

Question 8

UGC NET, Computer Science, Paper 2 December, 2022

Match List I with List II

List I List II

A. IPC I. Resource Allocation

B. Demand Paging II. Computational speedup

C. Banker's Algorithm III. Task Control Block

D. PCB IV. Virtual Memory

Choose the correct answer from the options given below:

  • A. A-II, B-I, C-IV, D-III

  • B. A-II, B-IV, C-I, D-III

  • C. A-I, B-II, C-III, D-IV

  • D. A-II, B-III, C-I, D-IV

Answer: B. A-II, B-IV, C-I, D-III.

Demand paging maps to virtual memory, Banker's Algorithm to resource allocation, and PCB to task control block. IPC maps to computational speedup, selecting B.

Solved Q8.

Questions 9-10: combine page translation with neighbouring OS facts

Question 9

Three-level virtual page table and cache-colour calculation yielding 8 page colours.

GATE, Computer Science, 2013; BARC, Computer Science, 2013

A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.

What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?

  • A. 2

  • B. 4

  • C. 8

  • D. 16

Answer: C. 8.

With page size 2^p, 4-byte entries give 2^(p-2) entries, so 46 = p + 3(p-2) yields p = 13. The cache has 2^20 / (2^4 x 2^6) = 2^10 sets and 16 offset/index bits; three exceed the page offset, requiring 2^3 = 8 colours.

Solved Q9.

Question 10

UGC NET, Computer Science, 2023

Consider the following statements:

S1: LRU page replacement algorithm suffers from the Belady’s anomaly.

S2: Shortest remaining time first scheduling may cause starvation.

S3: Stack is shared by all threads in a process.

  • A. S1, S2 and S3 are true

  • B. S1, S3 are false and S2 is true

  • C. S1, S2 are false and S3 is true

  • D. S1, S2 and S3 are false

Answer: B. S1, S3 are false and S2 is true.

LRU avoids Belady's anomaly; short arrivals can starve an SRTF job. Threads have private stacks; only S2 is true.

Solved Q10.

Questions 11-12: trace page replacement without losing the order

Question 11

UGC NET, Computer Science, Paper 2 June, 2013

A job has four pages A, B, C, D and the main memory has two page frames only. The job needs to process its pages in following order ABACABDBACD. Assuming that a page interrupt occurs when a new page is brought in the main memory, irrespective of whether the page is swapped out or not. The number of page interrupts in FIFO and LRU page replacement algorithms are

  • A. 9 and 7

  • B. 7 and 6

  • C. 9 and 8

  • D. 8 and 6

Answer: C. 9 and 8.

FIFO faults at 1, 2, 4, 5, 6, 7, 9, 10, 11; LRU at 1, 2, 4, 6, 7, 9, 10, 11. The counts are 9 and 8; position 5 is the first divergence.

A

B

A

C

A

B

D

B

A

C

D

FIFO F1

A

A

A

C

C

B

B

B

A

A

D

FIFO F2

B

B

B

A

A

D

D

D

C

C

FIFO result

F

F

H

F

F

F

F

H

F

F

F

A

B

A

C

A

B

D

B

A

C

D

LRU F1

A

A

A

A

A

A

D

D

A

A

D

LRU F2

B

B

C

C

B

B

B

B

C

C

LRU result

F

F

H

F

H

F

F

H

F

F

F

Solved Q11.

Question 12

UGC NET, Computer Science, Paper 2 August, 2016

Consider the following page reference string :

1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6

Which of the following options, gives the correct number of page faults related to LRU, FIFO, and optimal page replacement algorithms respectively, assuming 05 page frames and all frames are initially empty ?

  • A. 10, 14, 8

  • B. 8, 10, 7

  • C. 7, 10, 8

  • D. 7, 10, 7

Answer: B. 8, 10, 7.

LRU keeps 1 and 2 recent, then faults when 3 and 7 return outside the five-frame working set. FIFO replaces in arrival order; hits do not refresh that order. Optimal evicts 5 for 6 and 4 for 7 because neither victim is needed again. The independently traced totals are 8, 10 and 7.

Algorithm

Fault positions

Count

LRU

1, 2, 3, 4, 7, 8, 12, 13

8

FIFO

1, 2, 3, 4, 7, 8, 10, 11, 12, 13

10

Optimal

1, 2, 3, 4, 7, 8, 13

7

Solved Q12.

Score by concept family and choose the next step

Group misses by family: Q1-2 definitions, Q3-4 benefits, Q5-6 demand loading and address space, Q7-8 matching, Q9-10 translation and cross-OS facts, and Q11-12 replacement traces. Retry a family after two misses; review its named rule after one miss, and move on after zero.

Page Replacement MCQs: 12 Solved (FIFO, LRU, Optimal) owns the dedicated FIFO, LRU and Optimal drill. Questions 11-12 here test whether you can switch into trace mode inside a mixed virtual-memory set.

Virtual Memory & Demand Paging MCQs: 12 Solved PYQs focuses on page-fault behaviour, effective access time, thrashing and frame allocation. This set focuses on cross-concept switching through virtualization, cache colouring, matching and neighbouring OS facts.

Use the GATE Test Series for mixed practice or continue through GATE CS Exam Preparation.