The Virtual Memory definition in Linux-general Linux technology-Linux technology and application information. The following is a detailed description. Linux supports virtual memory. virtual memory refers to the use of disks as RAM extensions, so that the available memory size increases accordingly. The kernel will write the content of memory blocks that are not currently used to the hard disk, so that this memory can be used for other purposes. When raw content needs to be used, they are re-read into the memory.
These operations are completely transparent to users. Programs Running in Linux only see a large amount of memory for use, and do not notice that some of them reside on the hard disk from time to time. Of course, reading and writing hard disks is much slower than using real memory directly (several thousand times slower), so the program will not run as fast as it has been running in the memory. The hard disk used as the virtual memory is called the swap space ).
Linux can use a regular file or an independent partition in the file system as a swap space. Swap partition is faster, but it is easy to change the size of the swap file (you do not need to re-partition the entire hard disk, and you can install anything from the temporary partition ). When you know how much swap space you need, you should use swap partitions, but if you are not sure, you can first use a swap file and then use the system for a while, you can feel the size of the swap space. At this time, you can create a swap partition when you are sure of its size.
You should know that Linux allows several swap partitions and/or swap files at the same time. This means that if you only occasionally need another swap space, you can set an additional swap file at that time instead of allocating it all the time.
Operating System terminology Note: Computer Science often exchanges [swapping] (write the entire process to the swap space) and page scheduling [paging] (at a certain time point, only several thousand bytes of fixed size are written to the swap space. Page scheduling is usually more effective, which is also the practice of Linux, but the traditional Linux term refers to the exchange.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service