0
26kviews
Explain the concept of Virtual memory.
1 Answer
5
1.2kviews

Virtual Memory:

  1. In the most of the computer system, the physical main memory is not as large as address space of the processor.

  2. Suppose user tries to run a program.

  3. If the program run by the user does not completely fit into the main memory then the parts of its currently being executed are stored in main memory and remaining portion is stored in secondary storage device such as HDD.

  4. When a new part of program is to be brought into main memory for execution and if the memory is full, it must replace another part which is already is in main memory.

  5. As this secondary memory is not actually part of system memory, so for CPU, secondary memory is considered as Virtual Memory.

  6. Virtual memory is a memory management technique that is implemented using both hardware and software.

  7. It maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory.

enter image description here

Benefits of having Virtual Memory:

  1. Large programs can be written, as virtual space available is huge compared to physical memory.

  2. Less I/O required, leads to faster and easy swapping of processes.

  3. More physical memory available, as programs are stored on virtual memory, so they occupy very less space on actual physical memory.

Disadvantages of Virtual Memory:

  1. Applications run slower if the system is using virtual memory.

  2. It takes more time to switch between applications.

  3. Less hard drive space for your use.

  4. It reduces system stability.

Please log in to add an answer.