[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Virtual Memory

Posted on 1998-05-18
3
Medium Priority
?
265 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 100 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

656 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