2
votes

Recently I gave a midterm exam for Operating System course, and one of the questions asked was this-

Which of the following statements is false?

  1. Virtual memory implements the translation of a program's address space into physical memory address space
  2. Virtual memory allows each program to exceed the size of the primary memory
  3. Virtual memory increases the degree of multiprogramming
  4. Virtual memory reduces the context switching overhead

I am confused between options 1 and 4. Context switching should be faster in case of VM (I'm not sure why, its just an intuition ). For option 1, Virtual memory doesnt implement the address translation, but it is the MMU which does this. Am I missing something ? What should be the correct answer then ?

2
Indeed, VM is actually the result of mapping memory addresses. Yet I think the statement is assumed to be correct. However, with VM, the state of the MMU needs to be handled in addition during a context switch, so the overhead increases slightly. - JimmyB

2 Answers

1
votes

Virtual memory implements the translation of a program's address space into physical memory address space

That is logical memory translation, not virtual memory. That could be false, unless you conflate (as many do) the terms "virtual memory" and "logical memory." Could be false or true.

Virtual memory allows each program to exceed the size of the primary memory

True.

Virtual memory increases the degree of multiprogramming

Say what? This statement means something?

Virtual memory reduces the context switching overhead

It might. It might not. Neither true nor false.

1
votes

Virtual memory reduces the context switching overhead.

In a system with virtual memory context switch includes extra overhead in switching of address spaces.4th statement would be false and it would be correct answer.

Refer this link

Virtual memory implements the translation of a program's address space into physical memory address space

VM requires both hardware(TLB and MMU) and OS support (to control TLB and MMU ). MMU hardware translates the virtual address into a physical address

Virtual memory allows each program to exceed the size of the primary memory

TRUE

Virtual memory increases the degree of multiprogramming

Vm improves number of processes simultaneously in memory -TRUE