Question:

Virtual Memory question

by Guest61414  |  earlier

0 LIKES UnLike

I know that virtual memory is different than RAM, but how much virtual memory can you have? can you only have as much virtual memory as RAM, or is it limited by hard disk space. does it take away memory from the hard disk or the RAM?

Thanks!

 Tags:

   Report

3 ANSWERS


  1. Virtual memory is not any existing memory, as the name says, it is virtual. do you know something about Memory Management Unit (MMU)? MMU is responsible for mapping the instructions from virtual memory to actual memory(RAM). I can explain you where virtual memory comes into picture, say you have any application which needs 10MB of RAM, but you have only 5 MB available. you know, when u see an application from machine level, it is nothing but machine language instructions, a sequence on instructions fed to the CPU. so, what the CPU does is, it loads the instructions to the RAM in sequece till the RAM is available. then for the remaining instructions, it assigns the virtual memory addresses. as we know, in RAM, the memory is segmented and each segment has its own address. when the intructions are loaded to the RAM, each instruction will be loaded to different memory address. same way, the for the remaining 5MB of our application, virtual addresses are assigned which actually does not exist. Now, at the time of running these instructions, MMU comes into picture. We can devide the memory address into 2 parts. 1.tag 2. offset. in virtual address space, only offset is assigned to any instruction. In reverse to what I said (virtual addresses which actually does not exist), virtual address exists in RAM when MMU adds the page number(offset) to the virtual address.

    for example, we have an instruction "MOV a, 10" say, it is in virtual address 0x10000, now MMU will add 0x10 as the page number to the virtual address, then the actual address will be 0x1010000 this address really exists. so, before assigning the virtual address to any instruction, the assigner knows in which "tag" the instruction is going to reside. So, for virtual memory does not depend on Hard Disk or anything. one can increase or decrease the virtual memory in his system. but, I believe some amount of RAM will be taken for that, it will depend on the page size of the RAM.

    I dont know this is helpful, I tried saying what I knew, but I am not a good writer. please go through this link for more info on MMU and virtual space http://en.wikipedia.org/wiki/Memory_mana...


  2. VM is space on the hard disk that the computer uses when it runs out of RAM.  You can adjust the amount, usually 1.5 times the amount of RAM.

  3. The adjustment for virtual memory is based on how much RAM you have.If you have 3 or 4 GB of ram,it should never ever be a factor.If you have 512MB-2 GB you can adjust it.It's recommended 2.5 times the amount of ram you have and when you set it,make the initial size and the maximum size the same number.That way windows doesn't work so hard to make up the difference between the 2 and it makes your pc run faster and smoother.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions