Main > Computer > Hardware

How Virtual Memory Works by Jeff Tyson

Introduction to How Virtual Memory Works Virtual memory is a common part of most operating systems on desktop computers. It has become so common because it provides a big benefit for users at a very low cost. In this article, you will learn exactly what virtual memory is, what your computer uses it for and how to configure it on your own machine to achieve optimal performance.

Computer Tour - Have you ever wondered what is on the inside of your computer? Watch this video from HowStuffWorks as we take you on a tour of your computer.

Most computers today have something like 32 or 64 megabytes of RAM available for the CPU to use (see How RAM Works for details on RAM). Unfortunately, that amount of RAM is not enough to run all of the programs that most users expect to run at once. For example, if you load the operating system, an e-mail program, a Web browser and word processor into RAM simultaneously, 32 megabytes is not enough to hold it all. If there were no such thing as virtual memory, then once you filled up the available RAM your computer would have to say, "Sorry, you can not load any more applications. Please close another application to load a new one." With virtual memory, what the computer can do is look at RAM for areas that have not been used recently and copy them onto the hard disk. This frees up space in RAM to load the new application.

PDF created with pdfFactory Pro trial version www.pdffactory.com

Because this copying happens automatically, you don't even know it is happening, and it makes your computer feel like is has unlimited RAM space even though it only has 32 megabytes installed. Because hard disk space is so much cheaper than RAM chips, it also has a nice economic benefit. The read/write speed of a hard drive is much slower than RAM, and the technology of a hard drive is not geared toward accessing small pieces of data at a time. If your system has to rely too heavily on virtual memory, you will notice a significant performance drop. The key is to have enough RAM to handle everything you tend to work on simultaneously -- then, the only time you "feel" the slowness of virtual memory is is when there's a slight pause when you're changing tasks. When that's the case, virtual memory is perfect. When it is not the case, the operating system has to constantly swap information back and forth between RAM and the hard disk. This is called thrashing, and it can make your computer feel incredibly slow.

The area of the hard disk that stores the RAM image is called a page file. It holds pages of RAM on the hard disk, and the operating system moves data back and forth between the page file and RAM. On a Windows machine, page files have a .SWP extension. Next, we'll look at how to configure virtual memory on a computer. Configuring Virtual Memory Windows 98 is an example of a typical operating system that has virtual memory. Windows 98 has an intelligent virtual memory manager that uses a default setting to help Windows allocate hard drive space for virtual memory as needed. For most circumstances, this should meet your needs, but you may want to manually configure virtual memory, especially if you have more than one physical hard drive or speed-critical applications. To do this, open the "Control Panel" window and double-click on the "System" icon. The system dialog window will open. Click on the "Performance" tab and then click on the "Virtual Memory" button.

Click on the option that says, "Let me specify my own virtual memory settings." This will make the options below that statement become active. Click on the drop-down list beside "Hard disk:" to select the hard drive that you wish to configure virtual memory for. Remember that a good rule of thumb is to equally split virtual memory between the physical hard disks you have.

PDF created with pdfFactory Pro trial version www.pdffactory.com

In the "Minimum:" box, enter the smallest amount of hard drive space you wish to use for virtual memory on the hard disk specified. The amounts are in megabytes. For the "C:" drive, the minimum should be 2 megabytes. The "Maximum:" figure can be anything you like, but one possible upper limit is twice physical RAM space. Windows default is normally 12 megabytes above the amount of physical RAM in your computer. To put the new settings into effect, close the dialog box and restart your computer. The amount of hard drive space you allocate for virtual memory is important. If you allocate too little, you will get "Out of Memory" errors. If you find that you need to keep increasing the size of the virtual memory, you probably are also finding that your system is sluggish and accesses the hard drive constantly. In that case, you should consider buying more RAM to keep the ratio between RAM and virtual memory about 2:1. Some applications enjoy having lots of virtual memory space but do not access it very much. In that case, large paging files work well. One trick that can improve the performance of virtual memory (especially when large amounts of virtual memory are needed) is to make the minimum and maximum sizes of the virtual memory file identical. This forces the operating system to allocate the entire paging file when you start the machine. That keeps the paging file from having to grow while programs are running, which improves performance. Many video applications recommend this technique to avoid pauses while reading or writing video information between hard disk and tape. Another factor in the performance of virtual memory is the location of the pagefile. If your system has multiple physical hard drives (not multiple drive letters, but actual drives), you can spread the work among them by making smaller pagefiles on each drive. This simple modification will significantly speed up any system that makes heavy use of virtual memory. For more information, check out the links on the next page.

More Computer Memory This article is one in a series of articles dealing with computer memory, including: How Computer Memory Works RAM Works How ROM Works How Flash Memory Works How Caching Works How BIOS Works

Lots More Information

Related HowStuffWorks Articles How RAM works How Computer Memory Works How ROM Works How Flash Memory Works How BIOS Works How Caching Works How Operating Systems Work How Hard Disks Work

More Great Links Virtual Memory Tutorial

PDF created with pdfFactory Pro trial version www.pdffactory.com

Virtual Memory Tips and Tricks MMAP, a user-level virtual memory The UVM Virtual Memory System

HSW Brazil | Home | Company Info | Advertise With Us | Newsletter | Careers | Privacy | Contact Us | Help | Terms & Conditions

©1998-2007 HowStuffWorks, Inc.

PDF created with pdfFactory Pro trial version www.pdffactory.com

RSS

How Virtual Memory Works

Virtual memory is a common part of most operating systems on desktop ... Windows 98 is an example of a typical operating system that has virtual memory.

78KB Sizes 0 Downloads 200 Views

Recommend Documents

How Computer Memory Works
If your computer's CPU had to constantly access the hard drive to retrieve every piece of data it needs, it would operate very slowly. When the information is kept ...

pdf virtual memory
There was a problem loading more pages. pdf virtual memory. pdf virtual memory. Open. Extract. Open with. Sign In. Main menu. Displaying pdf virtual memory.

Virtual Memory Strategies.pdf
No preview available. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Virtual Memory Strategies.pdf. Virtual ...

Virtual Memory Management.pdf
No preview available. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Virtual Memory Management.pdf.

pdf virtual memory
Sign in. Loading… Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect ...

eBook Have Better Memory: Your Memory How It Works ...
... into the capabilities and mechanics of our most powerful organ – the brain. ... Your Memory How It Works and How to Improve It For ios by Ivan Harmon}.

VIRTUAL MEMORY TUTORIAL-1.pdf
when logical address space is small. Dynamic loading A routine is loaded only when it's called. Definitions. Page 4 of 28. VIRTUAL MEMORY TUTORIAL-1.pdf.

How webpack works - GitHub
M. Sc. Computer Science. • Started with Open Source in 2012 as Hobby. • Since 2017: Freelancer (Open Source + Consulting). • Father of a 2-months old ...

Code Lifetime-Based Memory Reduction for Virtual ...
application and the hardware and consumes machine cycles to fulfill its ...... Java card, J2ME/CLDC and J2ME/CDC have been built for embedded JVMs.

Virtual memory address translation mechanism with controlled data ...
Sep 19, 1983 - (73) Assignee: International Business Machines. Macpeak & Seas ... 20, 1987 translation of frequently used virtual addresses, a special set. Appl. No.: ..... made by reissue. This is a Continuation of reissue application Ser. No. ....

pdf-1459\virtual-memory-for-humans-how-to-develop-a ...
Try one of the apps below to open or edit this item. pdf-1459\virtual-memory-for-humans-how-to-develop-a-photographic-memory-by-larry-e-iii-lee.pdf.

Virtual memory address translation mechanism with controlled data ...
Sep 19, 1983 - be used to indicate When a line of data has been accessed or. 3,588,839. 6/1971 ..... essential processing unit or by a plurality of such [a] processing units, share a .... closed memory subsystem Which permits this type of uni.

PDF Download 2: Virtual Memory (Operating System ...
PDF Download 2: Virtual Memory (Operating. System Source Code Secrets) Full Books. Books detail. Title : PDF Download 2: Virtual Memory (Operating q.

Virtual memory address translation mechanism with controlled data ...
Sep 19, 1983 - subsystem organized into what is known in the art as a virtual memory. Still more ..... 6 is a conceptual illustration of the combined Hash.

VMMB: Virtual Machine Memory Balancing for ... - Springer Link
Mar 28, 2012 - Springer Science+Business Media B.V. 2012. Abstract Virtualization ... weight solution, the number of total migration in a data center should ..... 1800 memory size (MB) guest swapping (MB) time (sec) actual working set size.

Unit 3 Memory Management & Virtual Memory.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Unit 3 Memory ...

MemX: Supporting Large Memory Workloads in Xen Virtual Machines
tific workloads, virtual private servers, and backend support for websites are common .... They enable the driver domain to set up a. DMA based data transfer ...