KR20140092493A - Method for managing memory of virtualization system - Google Patents

Method for managing memory of virtualization system Download PDF

Info

Publication number
KR20140092493A
KR20140092493A KR1020120158026A KR20120158026A KR20140092493A KR 20140092493 A KR20140092493 A KR 20140092493A KR 1020120158026 A KR1020120158026 A KR 1020120158026A KR 20120158026 A KR20120158026 A KR 20120158026A KR 20140092493 A KR20140092493 A KR 20140092493A
Authority
KR
South Korea
Prior art keywords
virtual machine
swap
memory
page data
swap cache
Prior art date
Application number
KR1020120158026A
Other languages
Korean (ko)
Other versions
KR101442091B1 (en
Inventor
유혁
이치영
윤종희
Original Assignee
고려대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 고려대학교 산학협력단 filed Critical 고려대학교 산학협력단
Priority to KR1020120158026A priority Critical patent/KR101442091B1/en
Priority to PCT/KR2013/006183 priority patent/WO2014104509A1/en
Publication of KR20140092493A publication Critical patent/KR20140092493A/en
Application granted granted Critical
Publication of KR101442091B1 publication Critical patent/KR101442091B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0882Page mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/15Use in a specific computing environment
    • G06F2212/152Virtualized environment, e.g. logically partitioned system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/40Specific encoding of data in memory or cache
    • G06F2212/401Compressed data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

A method of managing a memory in a virtualization system according to an aspect of the present invention includes the steps of borrowing a first swap cache from the memory of a first virtual machine when lack of memory occurs while a writing operation for second page data is performed on the memory of a second virtual machine in which first page data has been recorded; swapping out a portion or a whole of the first page data to the first swap cache borrowed; and storing the second page data in the free space of the memory of the second virtual machine.

Description

가상화 시스템에서의 메모리 관리 방법{METHOD FOR MANAGING MEMORY OF VIRTUALIZATION SYSTEM}[0001] METHOD FOR MANAGING MEMORY OF VIRTUALIZATION SYSTEM [0002]

본 발명은 가상화 시스템에서의 메모리 관리 방법에 관한 것이다.The present invention relates to a memory management method in a virtualization system.

가상화 시스템은 제한된 물리 시스템에서 다양한 컴퓨팅 환경을 제공하기 때문에, 최근에 많은 관심을 받고 있다. 가상화 시스템에서는 여러 개의 가상 머신이 생성되고, 이러한 가상 머신은 한정된 컴퓨팅 자원을 다른 가상 머신과 공유하기 때문에, 가상 머신 간에 중재가 필요하다. 그러나, 이러한 중재 과정은 추가적인 프로세싱이 필요하기 때문에 가상 머신의 성능 저하를 유발할 수 있다. Virtualization systems have received a lot of attention in recent years because they provide a variety of computing environments in limited physical systems. In a virtualization system, multiple virtual machines are created, and these virtual machines share limited computing resources with other virtual machines, thus requiring arbitration between virtual machines. However, this arbitration process can cause performance degradation of the virtual machine because it requires additional processing.

특히, 가상화 시스템에서의 메모리는 가상 머신의 수가 증가함에 따라 각 가상 머신이 이용할 수 있는 메모리 용량의 크기는 작아진다. 이는 메모리를 분할하여 각 가상 머신에게 할당하기 때문이다. 메모리는 실행 중인 프로세스의 코드, 데이터 등이 적재되는 저장소이기 때문에, CPU처럼 스케줄링에 의해 시간적으로 나누어 사용할 수 없다. 서로 다른 프로세스를 실행 중인 각 가상 머신은 메모리에 적재되는 내용이 다르기 때문이다. 따라서 가상화 시스템은 메모리를 공간적으로 분할하여 각 가상 머신에게 할당한다. 이로 인해 각 가상 머신은 자신에게 할당된 작은 메모리만 사용할 수 있다. 또한, 가상 머신의 수가 증가하면 메모리를 더 작은 크기로 분할하기 때문에 사용할 수 있는 메모리의 크기가 작아지는 문제가 발생한다. In particular, as the number of virtual machines in a virtualization system increases, the amount of memory capacity available to each virtual machine becomes smaller. This is because memory is partitioned and allocated to each virtual machine. Since memory is a repository in which the code, data, etc. of a running process are loaded, it can not be used in a temporal manner by scheduling like a CPU. Each virtual machine running different processes has different contents to be loaded into memory. Therefore, the virtualization system spatially divides the memory and allocates it to each virtual machine. This allows each virtual machine to use only the small memory allocated to it. In addition, as the number of virtual machines increases, memory is divided into smaller sizes, which results in a problem that the usable memory size becomes smaller.

따라서, 본 발명은 가상화 시스템에서의 메모리 사용의 효율성을 극대화하고 성능 저하를 최소화하고자 한다. 또한, 작은 메모리를 가진 가상 머신들의 추가적인 메모리 이용량을 보장함으로써, 해당 가상 머신들의 활용도를 상승시킨다. Thus, the present invention maximizes the efficiency of memory usage in a virtualization system and minimizes performance degradation. It also increases the utilization of virtual machines by ensuring additional memory usage for virtual machines with smaller memory.

이와 관련하여, 한국등록특허(제1077782호, 발명의 명칭: 가상 머신의 메모리 관리 시스템 및 관리방법)는 게스트 메모리를 이용하는 복수의 가상 머신 중 어느 하나에서 게스트 메모리가 부족한 것을 감지하면, 나머지 가상 머신 중 어느 하나 이상에 할당된 게스트 메모리 중 일부를 게스트 메모리가 부족한 가상 머신에게 할당하는 가상 머신의 메모리 관리 시스템을 제공한다. In this regard, Korean Patent No. 1077782 (entitled " Memory Management System and Management Method of Virtual Machine ") detects a lack of guest memory in any one of a plurality of virtual machines using guest memory, And allocates a part of the guest memory allocated to any one or more of the virtual machines to the virtual machine that lacks the guest memory.

본 발명은 전술한 종래 기술의 문제점을 해결하기 위한 것으로서, 본 발명의 일부 실시예는 가상화 시스템에 포함된 가상 머신간의 메모리 대여를 위한 스왑 캐시 할당 및 스왑 아웃 동작을 수행하도록 하는 메모리 관리 방법을 제공한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems of the conventional art, and some embodiments of the present invention provide a memory management method for performing a swap cache allocation and a swap-out operation for renting memory between virtual machines included in a virtualization system do.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 일 측면에 따른 가상화 시스템에서의 메모리 관리 방법은, 제 1 페이지 데이터가 기록된 제 2 가상 머신의 메모리에 대하여 제 2 페이지 데이터의 쓰기 동작시에 메모리 부족이 발생한 경우, 제 1 가상 머신의 메모리로부터 제 1 스왑 캐시를 대여시키는 단계; 상기 제 1 페이지 데이터 중 일부 또는 전체를 상기 대여된 제 1 스왑 캐시로 스왑 아웃시키는 단계; 및 상기 제 2 가상 머신의 메모리의 여유 공간에 상기 제 2 페이지 데이터를 저장시키는 단계를 포함한다.According to an aspect of the present invention, there is provided a memory management method in a virtualization system, including: writing a second page data to a memory of a second virtual machine in which first page data is written; Leasing a first swap cache from the memory of the first virtual machine when a memory shortage occurs in the first virtual machine; Swapping out some or all of the first page data to the borrowed first swap cache; And storing the second page data in a free space of a memory of the second virtual machine.

또한, 본 발명의 다른 측면에 따른 가상화 시스템에서의 메모리 관리 방법은 제 1 가상 머신이 제 2 가상 머신으로부터 스왑 캐시 할당 요청을 수신하는 단계; 상기 스왑 캐시 할당 요청에 포함된 대상 페이지 데이터와 제 1 가상 머신의 스왑 캐시에 기 저장된 페이지 데이터의 중복 여부를 판단하는 단계; 중복되는 페이지 데이터의 존재시에 해당 페이지 데이터를 저장하고 있는 스왑 캐시의 주소 정보를 상기 제 2 가상 머신으로 전송하는 단계 및 중복되는 페이지 데이터의 미 존재시에 새로운 스왑 캐시를 할당하고, 상기 대상 페이지 데이터를 상기 스왑 캐시에 저장시키는 단계를 포함한다.According to another aspect of the present invention, there is provided a memory management method in a virtualization system, including: receiving a swap cache allocation request from a first virtual machine; Determining whether the target page data included in the swap cache allocation request is overlapped with page data previously stored in the swap cache of the first virtual machine; And transferring address information of a swap cache storing page data to the second virtual machine when duplicate page data is present, and allocating a new swap cache when duplicate page data does not exist, And storing the data in the swap cache.

전술한 본 발명의 과제 해결 수단에 의하면, 가상 머신 간의 스왑 캐시 대여를 통해 메모리 부족이 발생한 가상 머신에 대해서 메모리 부족을 효과적으로 해소할 수 있다. 특히, 디스크에 데이터를 저장하는 것이 아니고, 디스크 보다 읽기/쓰기 속도가 빠른 메모리에 데이터를 저장하기 때문에, 향후 스왑 캐시에 저장된 데이터를 다시 참조할 때에도 디스크에 저장하는 경우에 비하여 빠른 속도를 보장할 수 있는 효과가 있다.According to the task solution of the present invention described above, memory shortage can be effectively solved for a virtual machine in which a memory shortage occurs by renting a swap cache between virtual machines. In particular, since data is stored in a memory having a faster read / write speed than a disk rather than storing data on the disk, the data stored in the swap cache in the future can be referred to again There is an effect that can be.

도 1은 본원 발명의 일 실시예에 따른 가상화 시스템을 도시한 도면이다.
도 2는 본원 발명의 일 실시예에 따른 메모리 스왑 동작을 설명하기 위한 도면이다.
도 3은 본원 발명의 다른 실시예에 따른 메모리 스왑 동작을 설명하기 위한 도면이다.
도 4는 본원 발명의 다른 실시예에 따른 메모리 스왑 동작을 설명하기 위한 도면이다.
1 is a diagram illustrating a virtualization system according to an embodiment of the present invention.
FIG. 2 illustrates a memory swap operation according to an embodiment of the present invention. Referring to FIG.
3 is a view for explaining a memory swap operation according to another embodiment of the present invention.
4 is a view for explaining a memory swap operation according to another embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when an element is referred to as "comprising ", it means that it can include other elements as well, without departing from the other elements unless specifically stated otherwise.

한편, 본 발명과 관련하여 다음과 같이 일부 용어를 정의한다.In the meantime, some terms are defined as follows in connection with the present invention.

페이지 (page)는 메모리를 일정한 크기로 나눈 후의 각 공간 조각을 의미하는 것으로, 예를 들어 일반적인 32 비트 컴퓨터에서는 4KB로 정의되어 있다.A page is a piece of space after dividing the memory by a certain size. For example, it is defined as 4 KB in a general 32-bit computer.

가상 메모리 (virtual memory)는 물리적인 메모리의 제약을 벗어나 프로세스가 인식하고 있는 논리적인 메모리로서, 예를 들어 32 비트 컴퓨터에서는 하나의 프로세스가 4G의 메모리를 모두 사용하는 것으로 인식할 수 있다. Virtual memory is a logical memory that the process recognizes beyond the constraints of physical memory. For example, in a 32-bit computer, one process can recognize that 4G memory is used.

도 1은 본원 발명의 일 실시예에 따른 가상화 시스템을 도시한 도면이다.1 is a diagram illustrating a virtualization system according to an embodiment of the present invention.

가상화 시스템(100)은 복수의 가상 머신(110, 120, 130), 하이퍼바이저(140) 및 하드웨어(150)를 포함한다. 각각의 가상 머신(110, 120, 130)은 하이퍼바이저(140)에 의하여 생성 및 관리되는 것으로, 각 가상 머신에게 논리적으로 분리된 하드웨어 리소스를 제공한다. 예를 들면, 메모리, 하드 디스크, 그래픽 드라이버 등 각종 하드웨어 리소스를 논리적으로 분배하여 각 가상 머신에 할당할 수 있다. 또한, 하이퍼바이저(140)는 각 가상 머신(110, 120, 130)을 구동하는 운영체제 리소스를 제공할 수 있다. 이러한 하이퍼바이저(140)의 설정에 따라 각각의 가상 머신(110, 120, 130)의 상세 구성 옵션은 서로 상이할 수 있다.The virtualization system 100 includes a plurality of virtual machines 110, 120, and 130, a hypervisor 140, and hardware 150. Each virtual machine 110, 120, 130 is created and managed by the hypervisor 140 and provides logically separate hardware resources to each virtual machine. For example, various hardware resources such as a memory, a hard disk, and a graphics driver can be logically distributed and allocated to each virtual machine. In addition, the hypervisor 140 may provide operating system resources for operating the respective virtual machines 110, 120, and 130. Depending on the settings of the hypervisor 140, the detailed configuration options of the respective virtual machines 110, 120, and 130 may be different from each other.

하이퍼바이저(140)에 포함된 메모리 관리부(142)는 본원 발명의 내용에 따라 각 가상 머신(110, 120, 130)의 메모리 리소스를 관리하는 것으로, 특히 메모리 페이지 간의 스왑 동작시에 물리 메모리를 관리하는 동작을 수행한다. 일반적으로, 스왑(swap) 동작은 사용하지 않는 페이지를 디스크로 옮기고 사용할 페이지를 메모리로 가져오는 교체동작을 의미하는 것으로, 본 발명에서는 가상 머신의 메모리들 사이에서의 페이지를 교체하는 스왑 동작을 사용한다.The memory management unit 142 included in the hypervisor 140 manages the memory resources of the respective virtual machines 110, 120 and 130 according to the present invention. In particular, . In general, a swap operation refers to a replacement operation of moving an unused page to a disk and bringing a page to be used into memory. In the present invention, a swap operation for replacing a page between memories of a virtual machine is used do.

각각의 가상머신(110, 120, 130)은 각 가상머신에 할당된 메모리(112, 122, 132) 및 스왑 처리부(114, 124, 134)를 포함한다. 제 1 가상머신(110)에 포함된 스왑 처리부(114)를 기준으로 설명하면, 스왑 처리부(114)는 제 1 가상머신(110)의 메모리 상태를 모니터링하고, 여유 공간이 부족한 경우 다른 가상머신으로 스왑 캐시를 요청하는 동작을 수행한다. 아울러, 스왑 처리부(114)는 다른 가상머신으로부터 대여한 스왑 캐시를 관리하며, 특히 스왑 캐시의 주소 정보를 매칭하여 저장하도록 한다. 한편, 스왑 처리부(114)는 다른 가상머신으로부터 수신한 스왑 캐시 대여 요청에 따라 제 1 가상머신(110)의 메모리 상태를 확인하고, 메모리 여유 공간 존재 여부에 따라 스왑 캐시 대여 여부 판단, 스왑 캐시 대여 동작 등을 수행한다. 즉, 스왑 처리부(114, 124, 134)는 자신이 속한 가상 머신의 메모리를 모니터링 하여 타 가상 머신으로부터 스왑 캐시를 빌려오는 동작 뿐만 아니라, 타 가상 머신의 스왑 캐시 대여 요청에 응답하여 스왑 캐시를 빌려주는 동작을 처리할 수 있다. Each of the virtual machines 110, 120 and 130 includes memories 112, 122 and 132 and swap processing units 114, 124 and 134 allocated to the respective virtual machines. The swap processor 114 monitors the memory status of the first virtual machine 110. If the spare memory space is insufficient, the swap processor 114 changes the status of the first virtual machine 110 to another virtual machine Performs an operation to request a swap cache. In addition, the swap processor 114 manages the swap cache borrowed from other virtual machines, and particularly stores the address information of the swap cache in a matching manner. Meanwhile, the swap processor 114 checks the memory status of the first virtual machine 110 according to the swap cache rental request received from another virtual machine, determines whether or not the swap cache is leased according to the existence of the memory free space, And the like. That is, the swap processing units 114, 124, and 134 monitor the memory of the virtual machine to which they belong and borrow the swap cache from other virtual machines, as well as the swap cache rental request of other virtual machines Lt; / RTI >

하드웨어(150)는 가상화 시스템(100)에서 활용될 수 있는 각종 하드웨어 리소스를 포함하는 것으로, 예를 들면, 메모리, 하드 디스크, SSD(Solid state disk), 그래픽 드라이버, 각종 네트워크 드라이버를 포함할 수 있으나, 본 발명이 이에 한정되는 것은 아니다.The hardware 150 includes various hardware resources that may be utilized in the virtualization system 100 and may include, for example, a memory, a hard disk, a solid state disk (SSD), a graphics driver, , But the present invention is not limited thereto.

도 2는 본원 발명의 일 실시예에 따른 메모리 스왑 동작을 설명하기 위한 도면이다.FIG. 2 illustrates a memory swap operation according to an embodiment of the present invention. Referring to FIG.

도 2의 (a)에 도시된 바와 같이, 제 2 가상 머신(VM2)의 메모리에는 운영체제(Kernel), 제 1 페이지 데이터(P1)가 저장되어 있고, 메모리의 상태에 따라 여유 공간이 존재할 수 있다. 다음으로, 도 2의 (b)에 도시된 바와 같이, 제 1 가상 머신(VM2)의 메모리에 추가적으로 제 2 페이지 데이터(P2)를 기록할 때 메모리의 여유 공간 부족이 부족한 경우가 발생할 수 있다.As shown in FIG. 2 (a), an operating system kernel and first page data P1 are stored in the memory of the second virtual machine VM2, and a free space may exist depending on the state of the memory . Next, as shown in FIG. 2 (b), when the second page data P2 is additionally recorded in the memory of the first virtual machine VM2, a shortage of free space in the memory may be insufficient.

이와 같은 경우에는, 도 2 (c), (b)에 도시된 바와 같이, 제 1 가상 머신(VM1)의 메모리로부터 스왑 캐시를 대여한다. 그리고, 대여한 스왑 캐시에 제 1 페이지 데이터(P1) 전체 또는 일부를 스왑 아웃한다. 즉, 제 1 페이지 데이터(P1) 전체 또는 일부를 제 1 가상 머신(VM1)으로부터 대여한 스왑 캐시에 기록하면서, 해당 데이터는 제 2 가상 머신(VM2)의 메모리로부터 삭제하여, 제 2 가상 머신(VM2)의 메모리 여유 공간을 증가시킨다. 이때, 제 1 가상 머신(VM2)은 자신의 페이지 테이블에 대여한 스왑 캐시의 주소를 저장하여 마치 자신의 메모리인 것처럼 접근한다. 즉, 스왑 캐시의 소유권자는 제 1 가상 머신(VM1)이고, 제 2 가상 머신(VM2)이 이 공간을 대여하여 사용하는 것이다. In such a case, the swap cache is rented from the memory of the first virtual machine VM1, as shown in Figs. 2 (c) and 2 (b). Then, all or part of the first page data P1 is swapped out to the leased swap cache. That is, all or a part of the first page data P1 is recorded in the swap cache borrowed from the first virtual machine VM1, the corresponding data is deleted from the memory of the second virtual machine VM2, VM2) in the memory area. At this time, the first virtual machine (VM2) stores the address of the swap cache borrowed in its page table and accesses it as if it is its own memory. That is, the owner of the swap cache is the first virtual machine (VM1), and the second virtual machine (VM2) borrows this space and uses it.

한편, 제 1 페이지(P1) 중 스왑 아웃할 일부 데이터를 선택하는 경우에는, LRU(leas recently used) 교체 방식에 따라 최근에 가장 사용 빈도가 낮은 데이터를 스왑 아웃할 데이터로 선택할 수 있다.On the other hand, in the case of selecting some data to be swapped out among the first pages P1, it is possible to select the data with the lowest frequency of use recently as the data to be swapped out according to the LRU (leas recently used) replacement method.

한편, 스왑 아웃 동작시에 제 1 가상 머신(VM1)의 메모리에 기록될 데이터를 압축시켜, 스왑 캐시에 기록될 데이터의 용량을 축소시키는 동작을 수행할 수 있다. 예를 들면, LZO(Lempel?Ziv?Oberhumer) 압축 알고리즘과 같은 무손실 압축 알고리즘을 사용할 수 있으나, 본원 발명이 이에 한정되는 것은 아니다.Meanwhile, during the swap-out operation, data to be written in the memory of the first virtual machine (VM1) may be compressed to reduce the capacity of data to be written in the swap cache. For example, a lossless compression algorithm such as the LZO (Lempel? Ziv? Oberhumer) compression algorithm can be used, but the present invention is not limited thereto.

이와 같이, 다른 가상 머신의 메모리로부터 스왑 캐시를 대여하고, 기존에 기록된 데이터를 대여한 스왑 캐시로 스왑 아웃함으로써, 여유 메모리 공간을 확장시킨다.In this way, the swap cache is rented from the memory of another virtual machine, and the existing data is swapped out to the leased swap cache to expand the free memory space.

다음으로, 도 2 (e)에 도시된 바와 같이, 스왑 아웃 동작에 따라 발생한 여유 공간에 제 2 페이지 데이터(P2)를 기록한다.Next, as shown in Fig. 2 (e), the second page data P2 is recorded in the free space generated by the swap-out operation.

도 3은 본원 발명의 다른 실시예에 따른 메모리 스왑 동작을 설명하기 위한 도면이다.3 is a view for explaining a memory swap operation according to another embodiment of the present invention.

도 3은 총 2 개 이상의 가상 머신(VM2, VM3)이 하나의 가상 머신(VM1)의 메모리로부터 스왑 캐시를 대여하는 실시예를 도시하고 있다.FIG. 3 shows an embodiment in which a total of two or more virtual machines VM2 and VM3 rent a swap cache from the memory of one virtual machine VM1.

먼저, 제 2 가상 머신(VM2)과 제 3 가상 머신(VM3)은 앞서 도 2에서 설명한 스왑 캐시 대여 동작 및 스왑 아웃 동작 등을 통해, 메모리 여유 공간을 확보하여 추가 데이터를 기록한 상태이다. 즉, 제 2 가상 머신(VM2)은 제 1 페이지 데이터(P1) 전체 또는 일부를 제 1 가상 머신(VM1)의 메모리로부터 대여한 제 1 스왑 캐시(310)로 스왑 아웃 시킨 후 생성된 여유 공간에 제 2 페이지 데이터(P2)를 기록하였다. 그리고, 제 3 가상 머신(VM3)은 제 3 페이지 데이터(P3) 전체 또는 일부를 제 1 가상 머신(VM1)의 메모리로부터 대여한 제 2 스왑 캐시(320)로 스왑 아웃 시킨 후 생성된 여유 공간에 제 4 페이지 데이터(P4)를 기록하였다.First, the second virtual machine VM2 and the third virtual machine VM3 reserve the memory space and record additional data through the swap cache borrowing operation and the swap-out operation described previously with reference to FIG. That is, the second virtual machine VM2 swaps out all or a part of the first page data P1 from the memory of the first virtual machine VM1 to the first swap cache 310 rented, The second page data P2 was recorded. The third virtual machine VM3 swaps out all or a part of the third page data P3 from the memory of the first virtual machine VM1 to the rented second swap cache 320, The fourth page data P4 was recorded.

이때, 제 1 가상 머신(VM1)으로 스왑 아웃된 데이터가 동일한 경우, 즉, 제 1 스왑 캐시(310)에 저장된 데이터와 제 2 스왑 캐시(320)에 저장된 데이터가 동일한 경우에는 메모리 공간 사용의 최적화를 위하여 어느 하나의 스왑 캐시에 저장된 데이터만을 유지하도록 한다. 즉, 제 1 스왑 캐시(310) 및 제 2 스왑 캐시(320) 중 어느 하나에 저장된 데이터를 삭제하도록 한다. 그리고, 나머지 스왑 캐시를 제 2 가상 머신(VM2)의 메모리 및 제 3 가상 머신(VM3)의 메모리에 의하여 참조될 수 있도록 공유시킴으로써, 추후 각 가상 머신에 의한 참조 요청시에 해당 데이터가 참조될 수 있도록 한다.In this case, if the data swapped out to the first virtual machine VM1 is the same, that is, if the data stored in the first swap cache 310 and the data stored in the second swap cache 320 are the same, Only the data stored in any one of the swap caches is maintained. That is, the data stored in any one of the first swap cache 310 and the second swap cache 320 is deleted. By sharing the remaining swap caches so that they can be referred to by the memories of the second virtual machine (VM2) and the third virtual machine (VM3), the corresponding data can be referred to at a later reference request by each virtual machine .

제 1 가상 머신(VM1)은 제 1 스왑 캐시(310)와 제 2 스왑 캐시(320)의 소유권자로서, 각의 스왑 캐시에 저장된 스왑 아웃 데이터들에 접근할 수 있다. 따라서, 제 1 가상 머신(VM1)은 스왑 캐시 내의 모든 페이지들의 내용을 비교하여 중복된 내용을 가진 스왑 아웃 데이터들을 제거할 수 있다. The first virtual machine VM1 can access the swap-out data stored in each swap cache as the owner of the first swap cache 310 and the second swap cache 320. [ Thus, the first virtual machine VM1 can compare the contents of all the pages in the swap cache to remove swapped-out data having redundant contents.

이때, 제 1 가상 머신(VM1)이 이미 저장된 스왑-아웃 페이지들을 제거하여 하나의 페이지로 공유하는 작업을 주기적으로 수행하는 것은 매우 큰 오버헤드를 유발할 수 있다. 이는 기존의 스왑-아웃 페이지의 저장소 주소를 변경하게 되어, 제 2 가상 머신(VM2)과 제 3 가상 머신(VM3)가 자체적으로 보유하고 있는 스왑 테이블 내의 주소 정보도 동시에 변경되어야 하기 때문이다. 이를 해결하기 위해, 본 발명은 제 2 가상 머신(VM2) 또는 제 3 가상 머신(VM3)이 새로운 스왑-아웃 페이지를 저장하기 위한 공간 요청을 보내면, 제 1 가상 머신(VM1)이 요청을 받은 후에 해당 페이지의 중복 여부를 판단하도록 한다. 만약 페이지의 중복이 있으면 공유할 페이지의 주소만 알려주고, 스왑 캐시 내의 새로운 공간을 할당하지 않도록 한다. 도면을 통해 더욱 구체적인 동작을 살펴보도록 한다.At this time, removing the swap-out pages already stored in the first virtual machine VM1 and periodically performing the operation of sharing the pages as one page may cause a very large overhead. This is because the storage address of the existing swap-out page is changed and the address information in the swap table held by the second virtual machine VM2 and the third virtual machine VM3 itself must be simultaneously changed. In order to solve this problem, according to the present invention, when the second virtual machine VM2 or the third virtual machine VM3 sends a space request for storing a new swap-out page, after the first virtual machine VM1 receives a request Determine whether the page is duplicated. If there is a duplicate page, only the address of the page to be shared is reported, and the new space in the swap cache is not allocated. A more specific operation will be described with reference to the drawings.

도 4는 본원 발명의 다른 실시예에 따른 메모리 스왑 동작을 설명하기 위한 도면이다.4 is a view for explaining a memory swap operation according to another embodiment of the present invention.

먼저, 제 2 가상 머신(VM2)으로부터 제 1 가상 머신(VM1)이 스왑 아웃 요청을 수신한다(S410). 즉, 제 2 가상 머신(VM2)이 메모리 부족을 확인하고, 메모리에서 내보낼 페이지를 선택한다. 그리고, 선택한 페이지를 압축하고, 미리 설정된 키(key)값을 가지고 해쉬 알고리즘을 실행하여 해쉬값을 산출한다. 스왑 아웃 요청시에는 압축된 페이지 데이터, 해쉬값, 키값등을 전송할 수 있다.First, the first virtual machine VM1 receives a swap-out request from the second virtual machine VM2 (S410). That is, the second virtual machine VM2 confirms the lack of memory and selects the page to be exported from the memory. Then, the selected page is compressed, and a hash value is calculated by executing a hash algorithm with a predetermined key value. When requesting swap-out, compressed page data, a hash value, a key value, and the like can be transmitted.

스왑 아웃 요청을 수신한 제 1 가상 머신(VM1)은 해쉬값 등에 기초하여 기존에 저장된 스왑 아웃 페이지와의 동일 여부를 판단한다(S420). 즉, 제 1 가상 머신(VM1)은 각 스왑 아웃 페이지의 해쉬값을 저장한 해쉬 테이블을 보유한다. 그리고, 해쉬 테이블에 저장된 해쉬값에 기초하여 새롭게 요청된 스왑 아웃 대상 데이터와 기존에 저장된 스왑 아웃 페이지의 중복 여부를 판단할 수 있다. Upon receipt of the swap-out request, the first virtual machine VM1 determines whether the swap-out page is the same as the previously stored swap-out page based on the hash value or the like (S420). That is, the first virtual machine VM1 holds a hash table storing the hash value of each swap-out page. Based on the hash value stored in the hash table, it is possible to determine whether the newly requested swap-out target data and the previously stored swap-out page are duplicated.

만약, 동일한 해쉬값을 가진 스왑 아웃 페이지가 있다면, 해당 스왑 아웃 페이지가 저장된 물리 주소를 제 2 가상 머신(VM2)에 전송한다(S440). 이때, 제 1 가상 머신(VM1)은 데이터의 정확한 비교를 위하여, 제 2 가상 머신(VM2)이 전송한 스왑 아웃 대상 페이지와 제 1 가상 머신(VM1)에 저장된 스왑 아웃 페이지의 내용을 비트 레벨에서 추가적으로 비교할 수 있다. 즉, 해쉬값이 동일한 것으로 판단된 스왑 아웃 페이지에 대하여, 추가적으로 비트 레벨의 비교를 수행하는 것이다. 이와 같은, 비교를 통해 중복 내용이 이미 제 1 가상 머신(VM1)의 스왑 캐시에 저장된 경우에는 제 2 가상 머신(VM2)에 대하여 해당 페이지의 물리 주소를 전송하고, 제 2 가상 머신(VM2)은 해당 물리 주소를 주소 테이블에 저장하도록 한다. 예를 들면, 제 2 가상 머신(VM2)은 스왑 아웃하려는 스왑 아웃 대상 페이지의 주소와 제 1 가상 머신(VM1)으로부터 수신한 물리 주소(즉 중복된 데이터를 포함한 스왑 아웃 페이지의 주소)를 매칭하여 주소 테이블에 저장한다. 그리고, 제 2 가상 머신(VM2)의 메모리로부터는 스왑 아웃 대상 페이지의 내용을 삭제하여, 메모리의 여유 공간을 확보한다. 이렇게 하여, 제 2 가상 머신(VM2)이 요청한 스왑 아웃 대상 페이지와 동일한 내용이 제 1 가상 머신(VM1)의 스왑 캐시에 이미 존재하는 경우에는 스왑 캐시를 추가적으로 할당하지 않고, 동일한 내용이 저장된 스왑 페이지의 주소만을 매칭시키는 형태로 스왑 아웃 동작이 완료된다. If there is a swap-out page having the same hash value, the physical address stored in the swap-out page is transmitted to the second virtual machine VM2 (S440). At this time, the first virtual machine VM1 checks the contents of the swap-out target page sent by the second virtual machine (VM2) and the swap-out page stored in the first virtual machine (VM1) Additional comparisons are possible. That is, the swap-out page determined to have the same hash value is further subjected to bit-level comparison. When the redundant contents are already stored in the swap cache of the first virtual machine VM1 through the comparison, the physical address of the page is transmitted to the second virtual machine VM2, and the second virtual machine VM2 And stores the physical address in the address table. For example, the second virtual machine VM2 matches the address of the swap-out target page to be swapped out with the physical address received from the first virtual machine VM1 (i.e., the address of the swap-out page including the duplicated data) And stores it in the address table. Then, the contents of the swap-out target page are deleted from the memory of the second virtual machine VM2, thereby securing the free space of the memory. In this way, when the same content as the swap-out target page requested by the second virtual machine VM2 already exists in the swap cache of the first virtual machine VM1, the swap cache is not additionally allocated, The swap-out operation is completed.

다음으로, 비교 결과, 기존에 저장된 스왑 아웃 페이지와 동일하지 않은 것으로 판단된 경우에는, 도 2 를 통해 설명한 스왑 캐시 할당(S450) 및 스왑 아웃 동작(S460)을 수행한다. Next, when it is determined that the swap-out page is not the same as the previously stored swap-out page, the swap cache allocation (S450) and the swap-out operation (S460) described with reference to FIG. 2 are performed.

즉, 앞서 산출한 해쉬값이 동일하지 않거나, 해쉬값이 동일하더라도 비트 레벨 비교 결과 내용이 상이한 것으로 판단되면, 새롭게 스왑 캐시를 할당하도록 한다. 제 1 가상 머신(VM1)의 메모리에 할당된 스왑 캐시의 주소 정보를 제 2 가상 머신(VM2)과 공유하도록 GRANT 메커니즘을 활용할 수 있다. 제 2 가상 머신(VM2)은 제 1 가상 머신(VM1)으로부터 수신한 주소 정보를 이용하여, 해당 메모리 공간을 하이퍼바이저(140)에게 요청하고, 이를 자신의 주소 공간에 추가한다. 그리고, 제 1 가상 머신(VM1)으로부터 할당된 스왑 캐시에 스왑 아웃 페이지 데이터를 압축하여 저장하고, 자신의 주소 테이블에 해당 페이지의 주소 정보를 기록한다. 이때, 압축 데이터의 저장시에 해쉬값을 산출하여 같이 저장되도록 함으로써, 추후 중복 데이터 검색시에 활용하도록 한다.That is, if it is determined that the calculated hash value is not the same or the hash value is the same, the swap cache is newly allocated if the result of the bit level comparison is different. The GRANT mechanism may be utilized to share the address information of the swap cache allocated to the memory of the first virtual machine VM1 with the second virtual machine VM2. The second virtual machine VM2 requests the hypervisor 140 from the memory space using the address information received from the first virtual machine VM1 and adds it to its address space. Then, the swap-out page data is compressed and stored in the swap cache allocated from the first virtual machine VM1, and the address information of the page is recorded in the address table of the swap-out page. At this time, the hash value is calculated at the time of storing the compressed data and is stored together, so that the hash value can be utilized at the time of retrieving the duplicate data.

참고로, 본 발명의 실시예에 따른 도 1에 도시된 구성 요소들은 소프트웨어 또는 FPGA(Field Programmable Gate Array) 또는 ASIC(Application Specific Integrated Circuit)와 같은 하드웨어 구성 요소를 의미하며, 소정의 역할들을 수행한다.1 refers to a hardware component such as software or an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit), and performs predetermined roles .

그렇지만 '구성 요소들'은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 각 구성 요소는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다.However, 'components' are not meant to be limited to software or hardware, and each component may be configured to reside on an addressable storage medium and configured to play one or more processors.

따라서, 일 예로서 구성 요소는 소프트웨어 구성 요소들, 객체지향 소프트웨어 구성 요소들, 클래스 구성 요소들 및 태스크 구성 요소들과 같은 구성 요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다.Thus, by way of example, an element may comprise components such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, Routines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.

구성 요소들과 해당 구성 요소들 안에서 제공되는 기능은 더 작은 수의 구성 요소들로 결합되거나 추가적인 구성 요소들로 더 분리될 수 있다.The components and functions provided within those components may be combined into a smaller number of components or further separated into additional components.

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. One embodiment of the present invention may also be embodied in the form of a recording medium including instructions executable by a computer, such as program modules, being executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes any information delivery media, including computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transport mechanism.

본 발명의 방법 및 시스템은 특정 실시예와 관련하여 설명되었지만, 그것들의 구성 요소 또는 동작의 일부 또는 전부는 범용 하드웨어 아키텍쳐를 갖는 컴퓨터 시스템을 사용하여 구현될 수 있다. While the methods and systems of the present invention have been described in connection with specific embodiments, some or all of those elements or operations may be implemented using a computer system having a general purpose hardware architecture.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be understood by those skilled in the art that the foregoing description of the present invention is for illustrative purposes only and that those of ordinary skill in the art can readily understand that various changes and modifications may be made without departing from the spirit or essential characteristics of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is defined by the appended claims rather than the detailed description and all changes or modifications derived from the meaning and scope of the claims and their equivalents are to be construed as being included within the scope of the present invention do.

100: 가상화 시스템
140: 하이퍼바이저 142: 메모리 관리부
150: 하드웨어
100: Virtualization system
140: hypervisor 142: memory manager
150: Hardware

Claims (10)

가상화 시스템에서의 메모리 관리 방법에 있어서,
제 1 페이지 데이터가 기록된 제 2 가상 머신의 메모리에 대하여 제 2 페이지 데이터의 쓰기 동작시에 메모리 부족이 발생한 경우, 제 1 가상 머신의 메모리로부터 제 1 스왑 캐시를 대여하는 단계;
상기 제 1 페이지 데이터 중 일부 또는 전체를 상기 대여한 제 1 스왑 캐시로 스왑 아웃하는 단계; 및
상기 제 2 가상 머신의 메모리의 여유 공간에 상기 제 2 페이지 데이터를 저장하는 단계를 포함하는 가상화 시스템에서의 메모리 관리 방법.
A method of managing memory in a virtualization system,
Renting a first swap cache from a memory of a first virtual machine when a memory shortage occurs during a write operation of second page data to a memory of a second virtual machine in which first page data is written;
Swapping out some or all of the first page data to the borrowed first swap cache; And
And storing the second page data in a free space of a memory of the second virtual machine.
제 1 항에 있어서,
상기 제 1 페이지 데이터 중 일부 또는 전체를 상기 대여된 제 1 스왑 캐시로 스왑 아웃하는 단계는 상기 제 1 페이지 데이터 중 일부 또는 전체를 압축하여 상기 대여된 제 1 스왑 캐시로 스왑 아웃하는 것인 가상화 시스템에서의 메모리 관리 방법.
The method according to claim 1,
Wherein swapping out some or all of the first page data to the borrowed first swap cache compresses some or all of the first page data to swap out the borrowed first swap cache. In memory management.
제 1 항에 있어서,
제 3 페이지 데이터가 기록된 제 3 가상 머신의 메모리에 대하여 제 4 페이지 데이터의 쓰기 동작시에 메모리 부족이 발생한 경우, 상기 제 1 가상 머신의 메모리로부터 제 2 스왑 캐시를 대여하는 단계;
상기 제 3 페이지 데이터 중 일부 또는 전체를 상기 대여된 제 2 스왑 캐시로 스왑 아웃하는 단계; 및
상기 제 3 가상 머신의 메모리의 여유 공간에 상기 제 4 페이지 데이터를 저장하는 단계를 더 포함하는 가상화 시스템에서의 메모리 관리 방법.
The method according to claim 1,
Renting a second swap cache from a memory of the first virtual machine when a memory shortage occurs in a memory of a third virtual machine in which third page data is written during a fourth page data write operation;
Swapping out some or all of the third page data to the borrowed second swap cache; And
And storing the fourth page data in a free space of a memory of the third virtual machine.
제 3 항에 있어서,
상기 제 3 페이지 데이터 중 일부 또는 전체를 상기 대여된 제 2 스왑 캐시로 스왑 아웃하는 단계는 상기 제 3 페이지 데이터 중 일부 또는 전체를 압축하여 상기 대여된 제 2 스왑 캐시로 스왑 아웃하는 것인 가상화 시스템에서의 메모리 관리 방법.
The method of claim 3,
Wherein swapping out some or all of the third page data to the borrowed second swap cache comprises compressing some or all of the third page data to swap out the borrowed second swap cache. In memory management.
제 3 항에 있어서,
상기 제 1 스왑 캐시로 스왑 아웃된 데이터와 제 2 스왑 캐시로 스왑 아웃된 데이터가 동일한 경우, 상기 제 1 스왑 캐시 및 제 2 스왑 캐시 중 어느 하나에 저장된 데이터를 삭제하고, 나머지 스왑 캐시에 저장된 데이터를 상기 제 2 가상 머신 및 제 3 가상 머신의 메모리에 의하여 참조되도록 공유시키는 단계를 더 포함하는 가상화 시스템에서의 메모리 관리 방법.
The method of claim 3,
If the data swapped out to the first swap cache and the data swapped out to the second swap cache are the same, the data stored in one of the first swap cache and the second swap cache is deleted and the data stored in the remaining swap cache To be referenced by the memory of the second virtual machine and the virtual machine of the third virtual machine.
제 1 항에 있어서,
제 3 페이지 데이터가 기록된 제 3 가상 머신의 메모리에 대하여 제 4 페이지 데이터의 쓰기 동작시에 메모리 부족이 발생한 경우, 상기 제 1 가상 머신의 메모리에 대하여 제 2 스왑 캐시의 대여 요청을 전달하는 단계;
상기 제 2 스왑 캐시의 대여 요청에 따라, 제 1 스왑 캐시에 저장된 데이터와 제 2 스왑 캐시에 저장할 데이터의 중복 여부를 판단하는 단계,
상기 제 1 스왑 캐시에 저장된 데이터와 제 2 스왑 캐시에 저장할 데이터가 동일한 경우, 제 1 스왑 캐시의 주소 정보를 제 2 스왑 캐시에 저장할 데이터와 매칭시키는 단계;
상기 제 1 스왑 캐시에 저장된 데이터와 제 2 스왑 캐시에 저장할 데이터가 상이한 경우, 제 2 스왑 캐시를 할당하고, 할당된 제 2 스왑 캐시로 상기 제 3 페이지 데이터 중 일부 또는 전체를 상기 대여된 제 2 스왑 캐시로 스왑 아웃하는 단계; 및
상기 제 3 가상 머신의 메모리의 여유 공간에 상기 제 4 페이지 데이터를 저장하는 단계를 더 포함하는 가상화 시스템에서의 메모리 관리 방법.
The method according to claim 1,
Transferring a second swap cache lease request to the memory of the first virtual machine when a memory shortage occurs in the memory of the third virtual machine in which the third page data is written during the writing operation of the fourth page data ;
Determining whether the data stored in the first swap cache and the data to be stored in the second swap cache overlap with each other according to the lease request of the second swap cache,
Matching address information of a first swap cache with data to be stored in a second swap cache when data stored in the first swap cache is identical to data to be stored in a second swap cache;
If the data stored in the first swap cache is different from the data to be stored in the second swap cache, allocates a second swap cache and allocates a part or all of the third page data to the allocated second swap cache to the second Swapping out to a swap cache; And
And storing the fourth page data in a free space of a memory of the third virtual machine.
가상화 시스템에서의 메모리 관리 방법에 있어서,
제 1 가상 머신이 제 2 가상 머신으로부터 스왑 캐시 할당 요청을 수신하는 단계;
상기 스왑 캐시 할당 요청에 포함된 대상 페이지 데이터와 제 1 가상 머신의 스왑 캐시에 기 저장된 페이지 데이터의 중복 여부를 판단하는 단계;
중복되는 페이지 데이터의 존재시에 해당 페이지 데이터를 저장하고 있는 스왑 캐시의 주소 정보를 상기 제 2 가상 머신으로 전송하는 단계 및
중복되는 페이지 데이터의 미 존재시에 새로운 스왑 캐시를 할당하고, 상기 대상 페이지 데이터를 상기 스왑 캐시에 저장시키는 단계를 포함하는 가상화 시스템에서의 메모리 관리 방법.
A method of managing memory in a virtualization system,
The first virtual machine receiving a swap cache allocation request from a second virtual machine;
Determining whether the target page data included in the swap cache allocation request is overlapped with the page data pre-stored in the swap cache of the first virtual machine;
Transmitting address information of a swap cache storing page data to the second virtual machine when duplicate page data exists; and
Allocating a new swap cache in the absence of duplicate page data, and storing the target page data in the swap cache.
제 7 항에 있어서,
상기 중복 여부를 판단하는 단계는
상기 대상 페이지 데이터에 대한 해쉬값과 상기 제 1 가상 머신의 스왑 캐시에 기 저장된 페이지 데이터들의 해쉬값를 비교하는 단계를 포함하는 가상화 시스템에서의 메모리 관리 방법.
8. The method of claim 7,
The step of determining whether or not to duplicate
Comparing a hash value for the target page data with a hash value of page data pre-stored in the swap cache of the first virtual machine.
제 8 항에 있어서,
상기 중복 여부를 판단하는 단계는
상기 해쉬값을 비교하는 단계의 수행 결과, 상기 대상 페이지 데이터의 해쉬값과 동일한 해쉬값을 가진 페이지 데이터가 상기 제 1 가상 머신의 스왑 캐시에 존재하는 경우, 상기 대상 페이지 데이터와 해당 페이지 데이터를 비트 레벨에서 비교하는 단계를 포함하는 가상화 시스템에서의 메모리 관리 방법.
9. The method of claim 8,
The step of determining whether or not to duplicate
If the page data having the same hash value as the hash value of the target page data exists in the swap cache of the first virtual machine as a result of comparing the hash value with the hash value, Level in the virtualization system.
제 7 항에 있어서,
상기 제 2 가상 머신으로 전송된 스왑 캐시의 주소 정보는 상기 대상 페이지 데이터와 매칭되어 주소 테이블에 저장되는 가상화 시스템에서의 메모리 관리 방법.
8. The method of claim 7,
Wherein the address information of the swap cache transferred to the second virtual machine is stored in the address table by matching with the target page data.
KR1020120158026A 2012-12-31 2012-12-31 Method for managing memory of virtualization system KR101442091B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020120158026A KR101442091B1 (en) 2012-12-31 2012-12-31 Method for managing memory of virtualization system
PCT/KR2013/006183 WO2014104509A1 (en) 2012-12-31 2013-07-11 Memory management method in virtualization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120158026A KR101442091B1 (en) 2012-12-31 2012-12-31 Method for managing memory of virtualization system

Publications (2)

Publication Number Publication Date
KR20140092493A true KR20140092493A (en) 2014-07-24
KR101442091B1 KR101442091B1 (en) 2014-09-25

Family

ID=51021534

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120158026A KR101442091B1 (en) 2012-12-31 2012-12-31 Method for managing memory of virtualization system

Country Status (2)

Country Link
KR (1) KR101442091B1 (en)
WO (1) WO2014104509A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160068481A (en) * 2014-12-05 2016-06-15 삼성전자주식회사 Mobile device and management method of mobile device
KR101648725B1 (en) * 2015-06-15 2016-08-30 서울대학교산학협력단 Method for managing memory using ssd
KR20190029904A (en) * 2017-09-13 2019-03-21 엘지전자 주식회사 A digital device and method for controlling the same
WO2019194394A1 (en) * 2018-04-06 2019-10-10 삼성전자주식회사 Electronic device and control method thereof
WO2020159055A1 (en) * 2019-01-28 2020-08-06 삼성전자주식회사 Electronic device and method for controlling electronic device
WO2020242663A1 (en) * 2019-05-28 2020-12-03 Micron Technology, Inc. Inter operating system memory services over communication network connections
KR20200135715A (en) * 2019-05-24 2020-12-03 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. Method, apparatus, device and medium for processing data
US11061819B2 (en) 2019-05-28 2021-07-13 Micron Technology, Inc. Distributed computing based on memory as a service
US11100007B2 (en) 2019-05-28 2021-08-24 Micron Technology, Inc. Memory management unit (MMU) for accessing borrowed memory
US11169930B2 (en) 2019-05-28 2021-11-09 Micron Technology, Inc. Fine grain data migration to or from borrowed memory
US11256624B2 (en) 2019-05-28 2022-02-22 Micron Technology, Inc. Intelligent content migration with borrowed memory
US11334387B2 (en) 2019-05-28 2022-05-17 Micron Technology, Inc. Throttle memory as a service based on connectivity bandwidth

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102294669B1 (en) * 2015-08-12 2021-08-27 삼성전자 주식회사 Electronic device for compressing data and method thereof
CN110196770B (en) * 2018-07-13 2023-04-18 腾讯科技(深圳)有限公司 Cloud system memory data processing method, device, equipment and storage medium
EP4357903A1 (en) * 2021-12-23 2024-04-24 Samsung Electronics Co., Ltd. Method for managing memory and electronic device using same

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8015383B2 (en) * 2007-06-27 2011-09-06 International Business Machines Corporation System, method and program to manage virtual memory allocated by a virtual machine control program
JP5194703B2 (en) * 2007-10-16 2013-05-08 ソニー株式会社 Data processing apparatus and shared memory access method
US20090327621A1 (en) * 2008-06-27 2009-12-31 Microsoft Corporation Virtual memory compaction and compression using collaboration between a virtual memory manager and a memory manager
KR101077782B1 (en) * 2009-12-18 2011-10-28 한국과학기술원 Managing system of memory for virtual machine and managing method of the same
US8484405B2 (en) * 2010-07-13 2013-07-09 Vmware, Inc. Memory compression policies
KR20120070326A (en) * 2010-12-21 2012-06-29 한국전자통신연구원 A apparatus and a method for virtualizing memory
KR20120097136A (en) * 2011-02-24 2012-09-03 삼성전자주식회사 Management of memory pool in a virtualization system

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160068481A (en) * 2014-12-05 2016-06-15 삼성전자주식회사 Mobile device and management method of mobile device
KR101648725B1 (en) * 2015-06-15 2016-08-30 서울대학교산학협력단 Method for managing memory using ssd
KR20190029904A (en) * 2017-09-13 2019-03-21 엘지전자 주식회사 A digital device and method for controlling the same
WO2019054581A1 (en) * 2017-09-13 2019-03-21 엘지전자 주식회사 Digital device and control method therefor
WO2019194394A1 (en) * 2018-04-06 2019-10-10 삼성전자주식회사 Electronic device and control method thereof
KR20190117294A (en) * 2018-04-06 2019-10-16 삼성전자주식회사 Electronic apparatus and controlling method thereof
US11409648B2 (en) 2018-04-06 2022-08-09 Samsung Electronics Co., Ltd. Electronic apparatus and controlling method for performing memory swapping to reduce resource usage
WO2020159055A1 (en) * 2019-01-28 2020-08-06 삼성전자주식회사 Electronic device and method for controlling electronic device
KR20200135715A (en) * 2019-05-24 2020-12-03 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. Method, apparatus, device and medium for processing data
US11061819B2 (en) 2019-05-28 2021-07-13 Micron Technology, Inc. Distributed computing based on memory as a service
US11100007B2 (en) 2019-05-28 2021-08-24 Micron Technology, Inc. Memory management unit (MMU) for accessing borrowed memory
US11169930B2 (en) 2019-05-28 2021-11-09 Micron Technology, Inc. Fine grain data migration to or from borrowed memory
US11256624B2 (en) 2019-05-28 2022-02-22 Micron Technology, Inc. Intelligent content migration with borrowed memory
US11334387B2 (en) 2019-05-28 2022-05-17 Micron Technology, Inc. Throttle memory as a service based on connectivity bandwidth
WO2020242663A1 (en) * 2019-05-28 2020-12-03 Micron Technology, Inc. Inter operating system memory services over communication network connections
US11438414B2 (en) 2019-05-28 2022-09-06 Micron Technology, Inc. Inter operating system memory services over communication network connections
US11481334B2 (en) 2019-05-28 2022-10-25 Micron Technology, Inc. Distributed computing based on memory as a service
US11657002B2 (en) 2019-05-28 2023-05-23 Micron Technology, Inc. Memory management unit (MMU) for accessing borrowed memory
US11954042B2 (en) 2019-05-28 2024-04-09 Micron Technology, Inc. Distributed computing based on memory as a service

Also Published As

Publication number Publication date
KR101442091B1 (en) 2014-09-25
WO2014104509A1 (en) 2014-07-03

Similar Documents

Publication Publication Date Title
KR101442091B1 (en) Method for managing memory of virtualization system
US10963387B2 (en) Methods of cache preloading on a partition or a context switch
US10339047B2 (en) Allocating and configuring persistent memory
US8838935B2 (en) Apparatus, method, and system for implementing micro page tables
US9811465B2 (en) Computer system and cache control method
US10552337B2 (en) Memory management and device
US11487675B1 (en) Collecting statistics for persistent memory
US9648081B2 (en) Network-attached memory
US8788739B2 (en) Hypervisor-based management of local and remote virtual memory pages
US7757034B1 (en) Expansion of virtualized physical memory of virtual machine
US8601201B2 (en) Managing memory across a network of cloned virtual machines
US20110246742A1 (en) Memory pooling in segmented memory architecture
WO2024099448A1 (en) Memory release method and apparatus, memory recovery method and apparatus, and computer device and storage medium
US20140229683A1 (en) Self-disabling working set cache
US20170364442A1 (en) Method for accessing data visitor directory in multi-core system and device
CN116302491A (en) Memory management method, device, computer equipment and storage medium
US20240103876A1 (en) Direct swap caching with zero line optimizations
US20090031100A1 (en) Memory reallocation in a computing environment
US20230229498A1 (en) Systems and methods with integrated memory pooling and direct swap caching
TW202340931A (en) Direct swap caching with noisy neighbor mitigation and dynamic address range assignment
TW202344971A (en) Systems and methods with integrated memory pooling and direct swap caching

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20170707

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20180723

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190808

Year of fee payment: 6