Given below are two statements about virtual memory: Statement I: Address…
2023
Given below are two statements about virtual memory:
Statement I: Address translation is performed for every logical address used during the execution of a program.
Statement II: A program can execute only when all of its components are loaded in memory.
Choose the most appropriate answer.
- A.
Both Statement I and Statement II are correct
- B.
Both Statement I and Statement II are incorrect
- C.
Statement I is correct, but Statement II is incorrect
- D.
Statement I is incorrect, but Statement II is correct
Attempted by 155 students.
Show answer & explanation
Correct answer: C
Correct answer: Statement I is correct, but Statement II is incorrect.
Statement I: Correct. In virtual memory, the CPU generates logical/virtual addresses, and each such address must be translated into a physical address using mechanisms such as the MMU, page table, and TLB.
Statement II: Incorrect. Virtual memory supports demand paging, so a program can start and continue execution with only the required pages loaded in memory. The entire program need not be present in main memory at the same time.
A video solution is available for this question — log in and enroll to watch it.