• edited by
23,292 views
55 55 votes

Which of the following is/are advantage(s) of virtual memory?

  1. Faster access to memory on an average.
  2. Processes can be given protected address spaces.
  3. Linker can assign addresses independent of where the program will be loaded in physical memory.
  4. Program larger than the physical memory size can be run.

6 Answers

Best answer
78 78 votes

Virtual memory provides an interface through which processes access the physical memory. So,

  1. Is false as direct access can never be slower.
     
  2. Is true as without virtual memory it is difficult to give protected address space to processes as they will be accessing physical memory directly. No protection mechanism can be done inside the physical memory as processes are dynamic and number of processes changes from time to time.
     
  3. Position independent can be produced even without virtual memory support.
     
  4. This is one primary use of virtual memory. Virtual memory allows a process to run using a virtual address space and as and when memory space is required, pages are swapped in/out from the disk if physical memory gets full.


So, answer is (B) and (D).

• edited by
14 14 votes

it was asked in 2018 nptel weekly quiz...answer is only D)..prog.larger than m.m. can be run...

only D)

5 5 votes
There are several advantages of virtual memory:

1. Increased effective memory capacity: Virtual memory allows the computer to use more memory than physically available. It uses a combination of physical RAM and disk space to create a larger addressable memory space. This helps in running large applications and multitasking efficiently.

2. Improved performance: Virtual memory enables the operating system to prioritize and manage memory resources effectively. It can transfer data between RAM and disk as needed, ensuring that the most frequently used data is kept in RAM for faster access. This helps in reducing the overall response time and improving system performance.

3. Memory protection: Virtual memory provides a layer of protection by isolating each process's memory space from others. This prevents one program from accessing or modifying the memory of another program, enhancing system stability and security.

4. Simplified programming: Virtual memory simplifies the programming process by providing a uniform address space for all processes. Developers can write programs assuming they have access to a large contiguous memory space, without worrying about the actual physical memory limitations.

5. Efficient memory utilization: Virtual memory allows for efficient utilization of physical memory resources. It enables the operating system to allocate and deallocate memory dynamically based on the needs of different processes, optimizing the usage of available resources.

6. Flexibility: Virtual memory provides flexibility by allowing the operating system to allocate different amounts of memory to different processes based on their requirements. It can also allocate additional memory to handle peak loads or temporary spikes in memory usage.

Overall, virtual memory plays a crucial role in improving system performance, enabling multitasking, and providing a more efficient and secure computing environment.

answer B and D is correct
0 0 votes
  • Position Independent Code (PIC) can be generated without virtual memory

  • Relocation can be done by:

    • Loader

    • Base + offset registers

    • Static relocation

 So strictly speaking, VM is not necessary for linker independence.

so options   B,D are true 

Answer:
Position:
Show:

Related questions

43 43 votes
6 answers 6 answers
17.2k
17.2k views
Kathleen asked Sep 23, 2014
17,162 views
The number of binary strings of $n$ zeros and $k$ ones in which no two ones are adjacent is$^{n-1}C_k$$^nC_k$$^nC_{k+1}$None of the above
25 25 votes
2 answers 2 answers
10.2k
10.2k views
Kathleen asked Sep 23, 2014
10,226 views
Listed below are some operating system abstractions (in the left column) and the hardware components (in the right column)$$\small \begin{array}{|cl|cl|}\hline \text{(A)}...
47 47 votes
4 answers 4 answers
19.6k
19.6k views
Kathleen asked Sep 23, 2014
19,636 views
A multi-user, multi-processing operating system cannot be implemented on hardware that does not supportAddress translationDMA for disk transferAt least two modes of CPU e...
62 62 votes
6 answers 6 answers
33.7k
33.7k views
Kathleen asked Sep 23, 2014
33,678 views
A certain computer system has the segmented paging architecture for virtual memory. The memory is byte addressable. Both virtual and physical address spaces contain $2^{1...