All mock tests are FREE till 31 December — register to save your progress

Which of the following statement(s) is/are correct with respect to 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.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. Statement I is correct but Statement II is incorrect

Explanation

Statement I is correct: in a virtual memory system, every logical (virtual) address the CPU generates must pass through the MMU for translation to a physical address, on every single memory reference, not just occasionally. Statement II is incorrect — the whole point of virtual memory and demand paging is that a program can begin and continue executing with only the pages it currently needs resident in memory, bringing the rest in on demand, so it need not be fully loaded beforehand. Therefore Statement I is correct but Statement II is incorrect, option (iii).

More Programming Languages and Computer Graphics questions