Analysis of virtual memory and virtual storage in computers

  
                

What is the role of virtual memory? How much is it better? What is the difference between virtual memory and virtual storage? This article will introduce it in detail. All of the following steps use the Windows XP operating system as an example.

1. Desktop software often needs to set virtual memory, especially the actual memory is very small; after setting virtual memory, the computer can run more software than the actual memory;

this virtual memory Technology, in fact, is mainly a page-changing technique; part of the external storage space is used to store things that are not used in memory as if it were memory. When necessary, it is transferred into memory, which is called virtual; desktop Version windows can set the location of this virtual memory (under which disk), and size, it corresponds to a file pagefile.sys;

2. Virtual storage technology (virtual memory technology, this virtual memory is completely Different from the virtual memory mentioned above, the address used by the programmer when writing the program starts from 0, and then relocates when the program is run; often the address space starting from 0 is called virtual storage space (someone) Also called virtual memory space); this has a huge advantage: the programmer does not care where the program it writes will eventually be placed in memory.

This virtual operating system support, of course, more virtual CPU hardware support, like the 8051 microcontroller does not seem to support this, arm chip like S3C2410 support; this hardware is MMU (memory management unit)

3. Don't mention virtual memory or virtual storage, thinking that the computer can run a program larger than the program actually needs; this idea is definitely wrong. Many embedded systems, such as windows mobile phones, support 2G of virtual storage space, but do not support page-feeding technology, which means that it can not run software that exceeds its actual available memory size; because 2G is only available to programmers here. Address space, it can not put a part of the current running program on the external memory, it must fully meet the memory required by the running program to run this program; of course, if the windows mobile phone is configured with more than 2G of memory, it can of course run like this The big program.

Actually their English words seem to be the same. But the meaning is different. One refers to virtual memory; one represents a technology that requires MMU and operating system support. Virtual memory is Windows XP as part of the hard disk space used as memory. Virtual memory is essential even if physical memory is large. Virtual storage is simply a way to separate the storage seen by the host operating system from the actual physical storage.

Copyright © Windows knowledge All Rights Reserved