Solved

Virtual Memory

Posted on 1998-05-18
3
256 Views
Last Modified: 2013-11-15
Hi,
   I think I pretty much understand virtual memory, but I need an example of a program which would run very efficiently on a virtual memory system, and one which definitely wouldn't. Also a quick explanation of why would be appreciated.
Cheers.
0
Comment
Question by:PiersBull
  • 2
3 Comments
 
LVL 32

Expert Comment

by:jhance
Comment Utility
Any program which makes use of a memory set which cannot be held in real memory will suffer performance degradation.  The issue is that virtual memory is orders of magnitude slower than real memory.  Once your program starts needing it, execution slows to a crawl.  Most computers today can access a word of memory in under 100nS (that's 100 X 10^-9 seconds or 1 x 10^-7 seconds).  Virtual memory is stored on the disk and most disk systems provide access times on the order of 10mS (that's 10 x 10^-3 seconds or 1 x 10^-2 seconds).  If we compare the two, we are talking about 5 orders of magnitude.  In other words, RAM access is 100,000 times faster than disk access.


0
 

Author Comment

by:PiersBull
Comment Utility
jhance,
   Cool. I understand the massive loss in performance, but it seems that some programs work better with virtual memory than others. I need to know what type of application will utilise virtual memory better than another. I need to know as I'm preparing for final exams in C.S. at Uni, and the question has come up several times in the past.
Cheers.  
0
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
Comment Utility
The key to maintaining reasonable performance with a large data set in virtual memory is organizing your data in memory and knowing how the system you are running on manages it's virtual memory.  By keeping your data accesses within VM pages, you can minimize VM paging and keep performance up.  For example, if you target maching uses 4K VM pages, all memory access to that 4K page will be fast (i.e. RAM speed) once that page is pulled into memory.  If, however, your application is reading/writing memory all over the place, the OS will be reading/writing pages from/to disk and will cause a symptom called "thrashing".  This is very undesirable and the system ends up spending more time moving memory in and out that it does doing your work.
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now