Why we need Virtual memory?

Today my sir asked this question in the class..! No one gave the correct answer for this question..!

What is the need to use Virtual Memory ?

Why dont we take the data directly from the physical Memory?

Why We need this extra work of using logical addresses for Virtual Memory ?

Can anyone give me the clear answer..!

Sorry guys if its a simple question?

Replies

  • Mahesh Dahale
    Mahesh Dahale
    Windows XP Professional uses a process called demand paging to exchange data between random access memory (RAM) and paging files on the hard disk. When you install Windows XP Professional, Setup creates a virtual-memory paging file, PAGEFILE.SYS, on the partition in which you installed
    Windows XP Professional. The default or recommended paging file size for Windows XP Professional is equal to 1.5 times the total amount of RAM. For best results, never set the value of the paging file size to less than the recommended amount. Typically, you can leave the size of the paging file set to the default value and let Windows XP Professional manage the file size. In some circumstances, such as when you run a large number of applications simultaneously, you might find it advantageous to use a larger paging file or multiple paging files.

    by this you will get an idea
  • Sahithi Pallavi
    Sahithi Pallavi
    Thanks for your information mahesh...!
  • faizaan
    faizaan
    virtual memory is one of the most important concept which must be properly understood in order to know how actually operating system allows those large programs (programs larger than size of main memory) to run without any problem.

    As you know that program is divided into number of pages of some fixed size .In olden days to run a program all pages of that program need to be present in main memory but as time passed and multi programming came into picture & program sizes increased drastically so it was not possible to keep all pages of all programs in main memory but yes each program can have all its pages on secondary storage (disk).So virtual memory allows us to keep only those pages currently needed by our program & keep all other pages on secondary storage so when ever there is need of page it can be brought from disk.

    Thus we can say that virtual memory allows to keep copy of whole address space of process in secondary storage.

    We need to do extra work of using logical address & mapping from pages in disk to pages in main memory in order to run program that is much larger than our actual physical main memory.

    Please correct me if i am wrong as i am also student studying o.s in current semister.
  • Sahithi Pallavi
    Sahithi Pallavi
    Thank you fiazaan...!

You are reading an archived discussion.

Related Posts

The Great Wall of Indian Cricket helped to Cross 300 RUNS
I am doing my 3-2 , computer science engineering. Totally we have 6 subjects. Out of 6, we have one Elective paper..! The first 5 subjects are 1) Computer Networks,...
where the segment registers reside in memory.. is it in main memory(RAM) or in the micrprocessor memory. does segment has a fix size (64kb) or variable size...?? what is difference...
One of my friends orkut account was hacked now by someone and they changed her password...! Now she cant able to access her account..? Is there any way to delete...
Source: Times of India Global technology and consultancy giant Accenture on Monday said it is going to add around 8,000 people in India by the end of next year taking...