Solved

Virtual Memory

Posted on 1998-05-18
3
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1135468
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
ID: 1135469
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
ID: 1135470
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 80
new laptop new users 8 71
Pc beamer  question 6 76
No Operating System Found 47 50
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

733 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