search
HomeCommon ProblemWhat is the use of virtual memory?

What is the use of virtual memory?

May 06, 2019 pm 05:43 PM
Virtual Memory

Virtual memory uses external storage as memory, that is, using a hard disk to simulate memory usage, which can alleviate the pressure of insufficient physical memory and help improve resource utilization. Virtual memory can easily save those occupied RAM blocks that are barely used; the freed RAM can then be used to accommodate more programs with higher priority, improving the overall performance of the system.

What is the use of virtual memory?

Virtual Memory

Virtual memory is a technology for computer system memory management. It makes the application think that it has contiguous available memory (a contiguous complete address space), but in fact, it is usually divided into multiple physical memory fragments, and some are temporarily stored on external disk storage when needed. data exchange. Currently, most operating systems use virtual memory, such as the "virtual memory" of the Windows family; the "swap space" of Linux, etc.

Virtual memory refers to the software or programs we use when using computers. One of the characteristics of virtual memory is its low price and large capacity. However, the running speed of virtual memory and the running speed of CPU registers are slower. Usually, CPU registers are generally calculated in MB or KB, and the size of virtual memory is generally All are in GB. Another characteristic of virtual memory is that after a sudden power outage, the data in the virtual memory will be lost. We don't want our usual hard disk to have a save function after a power outage.

The role of virtual memory

Virtual memory, just like its name, does not use the memory area as memory. Simply put, it treats external storage as memory. to use. But this has a big disadvantage, that is, the running speed of external memory is slower than the running speed of memory, which will cause virtual memory to indirectly affect the running speed of memory.

Simply put, virtual memory uses a hard disk to simulate memory usage. Objectively speaking, if your memory is large enough, you don't need virtual memory. But in fact, this is often impossible. In order to make better and more effective use of memory resources, the operating system usually loads the most commonly used modules into the cache, then puts the commonly used modules into the memory, and puts the least commonly used modules that need to be called during operation into the hard disk.

In this way, resource utilization can be effectively improved. Virtual memory is a logical concept composed of the parts placed on the hard disk. In WINDOWS, it is implemented using a swap file. In LINUX systems, it is a fixed partition. For WINDOWS systems, the existence of this file is equivalent to increasing the memory capacity. However, this part of the capacity is very slow to use (because the hard disk is a mechanical device). Logically, this part of the hard disk space acts as memory, so it is called virtual memory.

Benefits of using virtual memory

It can easily save those RAM blocks that are rarely used but are occupied. The freed RAM can then be used to accommodate more programs with higher priority.

Prevent the situation where RAM space runs out and other programs cannot be executed.

Virtual memory acts as a backup of RAM, thereby increasing the actual space of RAM.

During hibernation, all contents of RAM are written to swap space. Therefore, virtual memory is required for successful hibernation.

It improves the overall performance of the system. (When the kernel parameter swappiness is set appropriately)

The above is the detailed content of What is the use of virtual memory?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.