Essence, structure and merit of virtual memory (virtual memory) ~ About swap, MMU, paging table ~

Sponsored Link
Sponsored Link

What is Virtual Memory?

The word virtual memory is now confusing, but it has two meanings.

One is referred to as virtual memory, a technology used in swap etc. The other refers to the memory on the virtual server. But in this article we will not talk about memory on the virtual server.

Essence of virtual memory

Regarding the first “virtual memory”, some people are mistaken as “virtual memory = swap”, but the essence is different.

When creating an application, memory-aware programming is required , but it is extremely difficult for application developers to handle the address of physical memory.

So virtual memory is made to handle physically disjointed addresses as sequential addresses so that application developers can handle it easily.

By using the concept of virtual memory, the application developer only needs to program only the amount that you want, and the OS side will deal with where to pay out. The OS gathers the released physical addresses, redirects them to the virtual memory of the sequential number, and pays out to the application.

As a secondary extension of it, a swap was devised and implemented that considered part of the HDD as an address of virtual memory.

MMU (Memory Management Unit) converts virtual memory addresses and physical memory addresses.MMU converts using “Page Table” which describes how to convert virtual address and physical address. As this paging table changes every moment, updates are made from time to time.

The MMU once existed in the memory controller and was sandwiched between the CPU and the memory, but now the memory controller is built in the CPU, and the MMU is built in the CPU as well.

Why be confused?

In Windows, it is probably caused by expressing the swap area as “virtual memory”.

Summary

Virtual memory is essentially a function to provide sequential addresses to applications, swapping as a secondary extension of them,Area of ​​HDD using virtual storage = swap“.

Sponsored Link
Sponsored Link
Sponsored Link

To share

  • このエントリーをはてなブックマークに追加

To follow

Sponsored Link
Sponsored Link