What is virtual memory?

1.03K views

I have a vague idea of what is, but I really have no idea on how it works with physical memory and what it actually does. I also would like to know how virtual memory, physical memory, virtual address space are related and what is the job of MMU.

In: Engineering

3 Answers

Anonymous 0 Comments

Your computer has (at least) two different ways of storing data. One is on your harddrive/SSD these tends to be big and slow. the other is the memory on RAM which tends to be much, much faster but also much smaller.

When a computer works with data or programs it loads them from the disk into the memory to have faster access to it.

However it might happen that you give your computer too much to do or too much data to handle at once and its memory just isn’t big enough too hold all of it.

At this point it takes a part of your drive and turns it into a pretend RAM. It swapps out data and programs it currently doesn’t need as often onto this pretend RAM on the disk.

As far as the programs running on the computer are concerned this pretend memory is just as much RAM as the physical RAM. the only difference is that it takes longer to work with because the computer has to constantly swap stuff around between the disk and the real RAM, slowing everything down.

So a computer may have 8GB or physical RAM installed but by swapping out some data onto its disk it may have as much 24 GB or RAM available to work with, if it used a 16 GB swap file.

To differentiate this total RAM that is partially pretend from the real physical RAM, it gets called virtual RAM.

Virtual Memory = Physical Memory + Swap File Memory

You are viewing 1 out of 3 answers, click here to view all answers.