Virtual memory is a common part of most desktop operating systems. It has become so common because it offers a great benefit to users at a very low cost.

Most computers today have something like 64 or 128 megabytes of RAM (random access memory) available for use by the CPU (central processing unit). Often, that amount of RAM is not enough to run all the programs that most users expect to run simultaneously. For example, if you load the Windows operating system, an e-mail program, a web browser, and a word processor in RAM at the same time, 64 megabytes is not enough to store everything.

If there is no virtual memory, your computer should say, “Sorry, you can’t load other applications.” Close an application to upload a new one. ” With virtual memory, your computer can search for areas of RAM that have not been used recently and copy them to your hard disk. This frees up space in RAM to load the new application. Because it does this automatically, you don’t even know it’s happening and it makes your computer feel like it has unlimited RAM, even if it only has 32 megabytes installed. Because hard disk space is much cheaper than RAM chips, virtual memory also offers a nice economic benefit.

The area of ​​the hard disk that stores the RAM image is called the page file. It keeps RAM pages on your 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.)

Of course, the read / write speed of a hard disk is much slower than RAM, and the technology of a hard disk is not geared towards accessing small pieces of data at a time.

If your system has to rely too much on virtual memory, you will notice a significant decrease in performance. The key is to have enough RAM to manage everything you tend to work on at the same time. Then, the only time you “feel” the slowness of virtual memory is in the slight pause that occurs when you change tasks. When you have enough RAM for your needs, virtual memory works fine. When you do not do this, the operating system must constantly switch information back and forth between RAM and the hard disk. This is called thrashing and can make your computer feel incredibly slow.