KR101932522B1 - Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same - Google Patents

Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same Download PDF

Info

Publication number
KR101932522B1
KR101932522B1 KR1020180082289A KR20180082289A KR101932522B1 KR 101932522 B1 KR101932522 B1 KR 101932522B1 KR 1020180082289 A KR1020180082289 A KR 1020180082289A KR 20180082289 A KR20180082289 A KR 20180082289A KR 101932522 B1 KR101932522 B1 KR 101932522B1
Authority
KR
South Korea
Prior art keywords
slots
virtual machines
virtual
slot
usage amount
Prior art date
Application number
KR1020180082289A
Other languages
Korean (ko)
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 KR1020180082289A priority Critical patent/KR101932522B1/en
Application granted granted Critical
Publication of KR101932522B1 publication Critical patent/KR101932522B1/en

Links

Images

Classifications

    • 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
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Landscapes

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

Abstract

The present invention relates to a computing device for reallocating a slot included in a virtual GPU memory to a plurality of virtual machines. The computing device comprises: a virtual GPU memory including a plurality of slots; a plurality of virtual machines which are allocated at least one slot among the plurality of slots, and uses the virtual GPU memory to perform allocated jobs; and a memory reallocation unit. The memory reallocation unit determines the amount of use of the virtual GPU memory by the plurality of virtual machines, uses the determined amount of use to calculate the deviation in use amount of the plurality of virtual machines, firstly reallocates the plurality of slots in the order of virtual machines with more occupied slots if the calculated deviation in use amount is lower than a threshold, secondly reallocates the plurality of slots to one or more first non-allocation virtual machines which have not been firstly reallocated the plurality of slots to allow the first non-allocation virtual machines to share at least one slot, firstly reallocates the plurality of slots in the order of virtual machines with large determined amounts of use if the calculated use amount deviation is higher than or equal to the threshold, and secondly reallocates the plurality of slots to allow one or more second non-allocation virtual machines which have not been firstly reallocated the plurality of slots to share at least one slot.

Description

가상 머신에 가상 GPU 메모리의 슬롯을 동적으로 할당하는 방법 및 이를 구현하는 컴퓨팅 장치{METHOD FOR DYNAMICALLY ALLOCATING SLOT OF VIRTUAL GPU MEMORY TO VIRTUAL MACHINE AND COMPUTING DEVICE IMPLEMENTING THE SAME}METHOD FOR DYNAMICALLY ALLOCATING SLOT OF VIRTUAL GPU MEMORY TO VIRTUAL MACHINE AND COMPUTING DEVICE IMPLEMENTING THE SAME Technical Field [1] The present invention relates to a method for dynamically allocating a slot of a virtual GPU memory to a virtual machine,

본 발명은 가상 머신에 가상 GPU 메모리의 슬롯을 동적으로 할당하는 방법 및 이를 구현하는 컴퓨팅 장치에 관한 것이다.The present invention relates to a method of dynamically allocating a slot of a virtual GPU memory to a virtual machine and a computing device implementing the method.

가상 머신이란 하드웨어를 소프트웨어로 구현하고 구현된 소프트웨어 상에서 운영체계가 작동하도록 기술적으로 구현한 것으로서, 가상 머신으로 구성된 가상화 시스템이 효율적으로 동작하기 위해서는, 가상화 시스템 내에서 불필요한 연산이 수행되지 않도록 가상 GPU 메모리의 슬롯이 가상 머신에 효과적으로 할당되어야 한다.The virtual machine is a hardware implemented in software and implemented technically so that the operating system operates on the implemented software. In order for the virtualization system configured as a virtual machine to operate efficiently, a virtual GPU memory Slots should be effectively allocated to the virtual machine.

한편, 종래 기술은 물리적으로 구현된 내장 GPU를 가상화 시스템에 적용하기 위해 가상 GPU 메모리를 구현하며, 구현된 가상 GPU 메모리는 로우 글로벌 그래픽스 메모리(Low Global Graphics Memory)와 하이 글로벌 그래픽스 메모리(High Global Graphics Memory)로 구분된다. 글로벌 그래픽스 메모리(Global Graphics Memory)의 논리 주소(logical address)는 물리적 GTT(physical GTT, physical Graphics Translation Table)를 사용하여 시스템 메모리의 실제 주소(physical address)로 변환된다.Meanwhile, the prior art realizes a virtual GPU memory for applying a physically implemented embedded GPU to a virtualization system, and implemented virtual GPU memory includes a low global graphics memory and a high global graphics memory Memory). The logical address of the global graphics memory is converted to the physical address of the system memory using the physical GTT (physical Graphics Translation Table).

또한, 종래 기술은 위와 같이 구현된 가상 머신에 가상 GPU 메모리의 슬롯을 할당하며, 구체적으로, 확장성(scalability) 문제를 해결하기 위해, 로우 글로벌 그래픽스 메모리의 일부분을 관리 도메인을 제외한 모든 가상 머신들이 공유할 수 있도록 하고, 하이 글로벌 그래픽스 메모리를 384MB의 슬롯으로 나누어 해당 슬롯들을 복수의 가상 머신들이 공유할 수 있도록 한다. 전환할 가상 GPU(vGPU)를 실행하기 전에 물리적 GTT(physical GTT)에 존재하지 않는 가상 GPU의 개별 GTT(private GTT) 항목(entry)이 복사된다. 물리적 GTT의 내용이 수정되는 경우, 개별 GTT의 내용 또한 함께 수정된다.In order to solve the scalability problem, the conventional technology allocates a slot of the virtual GPU memory to the virtual machine implemented as described above. Specifically, a part of the low global graphics memory is allocated to all the virtual machines except the management domain And divides high-global graphics memory into 384 MB slots so that the corresponding slots can be shared by a plurality of virtual machines. Before running the virtual GPU (vGPU) to be converted, the individual GTT (private GTT) entries of the virtual GPUs that do not exist in the physical GTT are copied. If the content of the physical GTT is modified, the contents of the individual GTT are also modified.

그러나, 종래 기술에 의한 슬롯 할당 방법은 가상 머신의 GPU 사용량을 고려하지 않고 가상 머신들에 가상 GPU 메모리의 슬롯을 일괄적으로 할당하는바, 가상 머신의 컨텍스트 전환시 불필요한 슬롯의 복사가 발생한다. 따라서, 이러한 방법은 불필요한 연산이 수행되어 전체 가상화 시스템의 비효율성을 초래하는 문제가 있다.However, according to the slot allocation method of the related art, unnecessary slot copying occurs when the context of the virtual machine is switched because the slots of the virtual GPU memory are collectively allocated to the virtual machines without considering the GPU usage amount of the virtual machine. Therefore, this method has a problem that unnecessary operations are performed, which results in inefficiency of the entire virtualization system.

본 발명이 해결하고자 하는 과제는 가상 머신들의 GPU 사용량을 고려하여, 가상 GPU 메모리의 슬롯을 공유하는 가상 머신 간의 GTT 복사의 수가 최소가 되도록 가상 머신에 가상 GPU 메모리의 슬롯을 할당하는 기술을 제공하는 것이다.SUMMARY OF THE INVENTION The present invention provides a technique for allocating slots of a virtual GPU memory to a virtual machine so that the number of GTT copies among virtual machines sharing a slot of a virtual GPU memory is minimized in consideration of GPU usage of virtual machines will be.

본 발명의 일 실시예에 따른 가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치는 복수의 슬롯들을 포함하는 가상 GPU 메모리, 상기 복수의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 상기 가상 GPU 메모리를 사용하여 할당된 작업을 수행하는 복수의 가상 머신들, 그리고 메모리 재할당부를 포함하며, 상기 메모리 재할당부는 상기 복수의 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하고, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하고, 상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하고, 상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당한다.A computing device for reallocating a slot included in a virtual GPU memory according to an exemplary embodiment of the present invention to a plurality of virtual machines includes a virtual GPU memory including a plurality of slots, A plurality of virtual machines receiving the virtual GPU memory, performing a task assigned using the virtual GPU memory, and a memory reallocation unit, wherein the memory reallocation unit determines the usage amount of the plurality of virtual machines using the virtual GPU memory Allocates the plurality of slots to the plurality of virtual machines in the order of the number of slots occupied when the calculated usage deviation is less than the threshold value, , One or more first unallocated virtual machines that are not primarily reallocated to the plurality of slots Allocating the plurality of slots to the first unallocated virtual machines so as to share at least one slot to the right of the virtual machines, and when the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to one or more secondary slots to share at least one slot in the case of one or more second unallocated virtual machines that are not primarily reallocated to the plurality of slots, .

상기 메모리 재할당부는 상기 결정한 사용량 중에서 최소 사용량 및 최대 사용량을 결정하고, 상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산한다.The memory reallocation unit determines a minimum usage amount and a maximum usage amount among the usage amounts determined and divides the maximum usage amount by the minimum usage amount to calculate the usage amount deviation.

상기 메모리 재할당부는 상기 계산한 사용량 편차가 상기 임계값 미만인 경우, 각 가상 머신이 차지하는 슬롯 수를 결정하고, 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하고, 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당한다.Wherein the memory reallocation unit determines the number of slots occupied by each virtual machine when the calculated usage amount deviation is less than the threshold value and sets the plurality of slots to 1 And for the first unassigned virtual machines to allocate the slots to share a slot with the least recently reallocated virtual machine among the virtual machines that have been primarily reassigned to the plurality of slots Secondarily reallocated.

상기 메모리 재할당부는 상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고, 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.Wherein the memory reallocation unit primarily reallocates the first slot from the leftmost slot among the plurality of slots in the order of the virtual machines having the largest number of slots occupied, And then reassigns it to the secondary.

상기 메모리 재할당부는 상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하며, 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당한다.Wherein the memory reallocation unit continuously and primarily reallocates the plurality of slots so that there is no slot shared by the determined usage amount of the virtual machines in the order of the calculated usage amount deviations is greater than or equal to the threshold value, In the case of allocation virtual machines, the plurality of slots are secondarily reallocated so as to share a slot with the virtual machine having the lowest usage amount among the virtual machines that are primarily reallocated to the plurality of slots.

상기 메모리 재할당부는 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고, 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.Wherein the memory reallocation unit primarily reallocates the slots from the leftmost slot among the plurality of slots in order of the virtual machines having the determined usage, and in the case of the second unallocated virtual machines, And then reassigns it to the secondary.

본 발명의 일 실시예에 따른 하나 이상의 프로세서를 포함하는 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법은 상기 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하는 단계, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하는 단계, 상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계, 그리고 상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함한다.A method for reallocating a plurality of slots included in a virtual GPU memory to a plurality of virtual machines by a computing device including one or more processors according to an embodiment of the present invention includes: Calculating a usage deviation of the plurality of virtual machines by using the determined amount of usage, calculating a usage deviation of the plurality of virtual machines in the order of virtual machines having a large number of slots occupied when the calculated usage deviation is less than a threshold value, Allocating the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of one or more first unallocated virtual machines that are not primarily reallocated to the plurality of slots, And when the calculated usage deviation is equal to or greater than the threshold value, Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having a larger usage amount, and sharing at least one slot in the case of the one or more second unallocated virtual machines, And secondarily reallocating the plurality of slots.

상기 사용량 편차를 계산하는 단계는 상기 결정한 사용량 중에서, 최소 사용량 및 최대 사용량을 결정하는 단계, 그리고 상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산하는 단계를 포함한다.The calculating of the usage deviation may include determining a minimum usage amount and a maximum usage amount among the determined usage amounts, and calculating the usage amount variation by dividing the maximum usage amount by the minimum usage amount.

상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계는 각 가상 머신들이 차지하는 슬롯 수를 결정하는 단계, 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함한다.Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, In the case of machines, the step of secondary reallocating the plurality of slots to the first unallocated virtual machines to share at least one slot comprises the steps of determining the number of slots occupied by each virtual machine, Sequentially reallocating the plurality of slots in a linear manner so that there are no slots that are shared with each other, and in the case of the first unallocated virtual machines, Lt; RTI ID = 0.0 > a < / RTI > least recently reallocated virtual machine A step being.

상기 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는 상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고, 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는 상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.The step of sequentially and primarily reallocating the plurality of slots so that there is no slot shared by the virtual machines in the order of the virtual machines having the largest number of slots occupies, And for the first unassigned virtual machines to allocate the slots to share a slot with the least recently reallocated virtual machine among the virtual machines that have been primarily reassigned to the plurality of slots The secondary reallocation step re-allocates the second unallocated virtual machines from the rightmost slot among the plurality of slots.

상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는 상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함한다.Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, The step of reallocating the plurality of slots so as to share at least one slot in the case of the allocation virtual machines includes sequentially allocating the plurality of slots in a linear manner so that there is no slot shared by the determined virtual machines And allocating the plurality of slots to the second virtual machine to share the slot with the virtual machine having the lowest usage among the virtual machines that are primarily reallocated to the plurality of slots in the case of the second unallocated virtual machines. And reassigning the data.

상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고, 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는 상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당한다.Wherein the step of sequentially and primarily reallocating the plurality of slots so that there is no slot shared by the virtual machines in order of the determined usage amount comprises: Allocating the plurality of slots to the second virtual machine to share the slot with the virtual machine having the lowest usage amount among the virtual machines that are primarily reallocated to the plurality of slots in the case of the second unallocated virtual machines. In the case of the second unallocated virtual machines, the secondary reallocation step reallocally secondaryly allocates from the rightmost slot among the plurality of slots.

본 발명에 따르면, 가상 머신들의 컨텍스트 전환 시 발생하는 불필요한 슬롯의 복사를 최소화할 수 있는바, 컨텍스트 전환 비용을 감소시키고 전체 GPU 가상화 시스템의 성능을 향상시킬 수 있다.According to the present invention, it is possible to minimize unnecessary duplication of slots occurring in the context switching of virtual machines, thereby reducing the context switching cost and improving the performance of the entire GPU virtualization system.

도 1은 한 실시예에 따른 가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치를 설명하는 도면이다.
도 2 및 도 3은 한 실시예에 따른 메모리 재할당부가 가상 GPU 메모리의 슬롯을 복수의 가상 머신들에게 재할당하는 구체적인 방법을 설명하는 도면이다.
도 4는 종래 기술에 따른 가상 GPU 메모리 할당방법과 본 발명의 실시예에 따른 가상 GPU 메모리 재할당 방법을 비교한 도면이다.
도 5는 본 발명의 실시예에 따른 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법을 설명하는 도면이다.
1 is a diagram illustrating a computing device that relocates a slot included in a virtual GPU memory according to an embodiment to a plurality of virtual machines.
FIGS. 2 and 3 are diagrams for explaining a specific method of reallocating slots of a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.
FIG. 4 is a diagram comparing a method of allocating a virtual GPU according to the prior art and a method of reallocating a virtual GPU according to an embodiment of the present invention.
5 is a diagram illustrating a method for reallocating a plurality of slots included in a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. 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 an element is referred to as "comprising ", it means that it can include other elements as well, without excluding other elements unless specifically stated otherwise.

도 1은 한 실시예에 따른 가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치를 설명하는 도면이고, 도 2 및 도 3은 한 실시예에 따른 메모리 재할당부가 가상 GPU 메모리의 슬롯을 복수의 가상 머신들에게 재할당하는 구체적인 방법을 설명하는 도면이다.FIG. 1 is a diagram illustrating a computing apparatus for reallocating a slot included in a virtual GPU memory according to an embodiment to a plurality of virtual machines. FIGS. 2 and 3 illustrate a memory reallocation unit according to an embodiment, FIG. 5 is a diagram illustrating a specific method of reallocating a slot of a memory to a plurality of virtual machines.

도 1을 참고하면, 컴퓨팅 장치(1000)는 가상 GPU 메모리(100), 복수의 가상 머신들(200) 및 메모리 재할당부(300)를 포함한다.Referring to FIG. 1, a computing device 1000 includes a virtual GPU memory 100, a plurality of virtual machines 200, and a memory reallocation unit 300.

컴퓨팅 장치(1000)는 가상 GPU 메모리(100) 및 가상 머신들(200)을 이용하여 가상화 시스템을 구현한다. 가상화 시스템이란 컴퓨팅 장치(1000)가 포함하는 물리적인 하드웨어를 다수의 가상 하드웨어로 구분하여 다수의 운영체제를 운영하기 위한 것으로, 컴퓨팅 장치(1000)는 소프트웨어적으로 구현된 가상 GPU 메모리(100)를 각각이 특정 작업을 수행하는 가상 머신들(200)에 할당하여 가상화 시스템을 구현한다.The computing device 1000 implements a virtualization system using the virtual GPU memory 100 and the virtual machines 200. [ The virtualization system is for operating a plurality of operating systems by dividing physical hardware included in the computing device 1000 into a plurality of virtual hardware. The computing device 1000 includes a virtual GPU memory 100 implemented by software, To the virtual machines 200 performing the specific task, thereby implementing the virtualization system.

가상 GPU 메모리(100)는 컴퓨팅 장치(1000)에서 다수의 운영체제를 운영하기 위해 물리적인 GPU 메모리를 소프트웨어적으로 분할하여 구현한 것으로서, 컴퓨팅 장치(1000) 내 가상화 시스템에 구현된다.The virtual GPU memory 100 is implemented in a virtualization system in the computing device 1000, which is implemented by dividing a physical GPU memory into software in order to operate a plurality of operating systems in the computing device 1000.

가상 GPU 메모리(100)는 복수의 슬롯들을 포함하며, 가상 GPU 메모리(100)의 적어도 하나의 슬롯은 가상 머신들(200)에 할당된다.The virtual GPU memory 100 includes a plurality of slots, and at least one slot of the virtual GPU memory 100 is allocated to the virtual machines 200.

가상 머신들(200)은 서로 상이한 비율로 가상 GPU 메모리(100)를 공유할 수 있다. 예를 들면, 도 1에서, 가상 GPU 메모리(100)가 재할당되기 전, 제1 가상 머신(210)은 가상 GPU 메모리(100)의 3개의 슬롯을 차지하며, 제2 가상 머신(220)은 가상 GPU 메모리(100)의 2개의 슬롯을 차지하며, 제3 가상 머신(230)은 가상 GPU 메모리(100)의 1개의 슬롯을 차지하며, 제4 가상 머신(240)은 가상 GPU 메모리(100)의 4개의 슬롯을 차지할 수 있다.The virtual machines 200 can share the virtual GPU memory 100 at a different rate from each other. For example, in FIG. 1, before the virtual GPU memory 100 is reallocated, the first virtual machine 210 occupies three slots of the virtual GPU memory 100, and the second virtual machine 220 occupies three slots The third virtual machine 230 occupies one slot of the virtual GPU memory 100 and the fourth virtual machine 240 occupies one slot of the virtual GPU memory 100, Lt; / RTI > slots.

가상 GPU 메모리(100)의 특정 슬롯이 복수의 가상 머신들(200)에 의해 공유되는 경우, 컨텍스트 전환 시 해당 특정 슬롯의 컨텍스트의 복사가 발생한다. 이 경우, 슬롯의 복사는 슬롯 자체의 내용의 복사가 아닌, 슬롯에 해당하는 컨텍스트의 GTT(Graphics Translation Table)의 복사를 의미한다.When a specific slot of the virtual GPU memory 100 is shared by a plurality of virtual machines 200, a copy of the context of the specific slot occurs at the time of context switching. In this case, the copy of the slot refers to the copy of the Graphics Translation Table (GTT) of the context corresponding to the slot, not the copy of the contents of the slot itself.

예를 들면, 도 1에서, 가상 GPU 메모리(100)가 재할당되기 전, 제1 가상 머신(210)과 제2 가상 머신(220)의 경우 가상 GPU 메모리(100)의 가장 좌측 2개의 슬롯을 공유한다. 이 경우, 제1 가상 머신(210)은 할당된 작업을 수행하기 위해 가상 GPU 메모리(100)의 제1 슬롯(110) 내지 제3 슬롯(130)에 접근하며, 이후 제2 가상 머신(220)이 할당된 작업을 수행하기 위해 제1 슬롯(110) 및 제2 슬롯(120)에 접근한다. 제2 가상 머신(220)이 제1 슬롯(110) 및 제2 슬롯(120)에 접근할 때, 제1 슬롯(110) 및 제2 슬롯(120)에는 이전에 접근한 제1 가상 머신(210)에 대한 정보가 들어가 있으므로, 제2 가상 머신(220)에 대한 정보를 복사하기 위해 제1 슬롯(110) 및 제2 슬롯(120)에서 슬롯의 복사를 수행한다.For example, in FIG. 1, the leftmost two slots of the virtual GPU memory 100 in the case of the first virtual machine 210 and the second virtual machine 220 before the virtual GPU memory 100 is reallocated Share. In this case, the first virtual machine 210 accesses the first slot 110 to the third slot 130 of the virtual GPU memory 100 to perform the assigned task, And accesses the first slot 110 and the second slot 120 to perform the assigned task. When the second virtual machine 220 approaches the first slot 110 and the second slot 120, the first slot 110 and the second slot 120 are connected to the previously accessed first virtual machine 210 The copying of the slot is performed in the first slot 110 and the second slot 120 in order to copy information about the second virtual machine 220. [

반대로, 가상 GPU 메모리(100)의 특정 슬롯이 복수의 가상 머신들(200)에 의해 공유되지 않는 경우, 컨텍스트 전환 시 해당 특정 슬롯의 복사가 발생하지 않는다.In contrast, when a specific slot of the virtual GPU memory 100 is not shared by a plurality of virtual machines 200, copying of the specific slot does not occur at the time of context switching.

예를 들면, 도 1에서, 가상 GPU 메모리(100)가 재할당되기 전, 제4 슬롯(140)의 경우 제3 가상 머신(230)에 단독으로 할당되며, 제5 슬롯(150) 내지 제8 슬롯(180)의 경우 제4 가상 머신(240)에 단독으로 할당되는바, 컨텍스트 전환시 제4 슬롯(140) 내지 제8 슬롯(180)에서는 슬롯의 복사가 발생하지 않는다.For example, in FIG. 1, before the virtual GPU memory 100 is reallocated, in the case of the fourth slot 140, it is allocated solely to the third virtual machine 230, and in the fifth slot 150 to the eighth In the case of the slot 180, only the fourth virtual machine 240 is allocated. In the fourth slot 140 to the eighth slot 180, there is no copy of the slot.

가상 머신들(200)은 가상 GPU 메모리(100)의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 가상 GPU 메모리(100)를 사용하여 각 가상 머신에 할당된 작업을 수행한다.The virtual machines 200 are allocated at least one slot among the slots of the virtual GPU memory 100 and perform tasks assigned to the respective virtual machines using the virtual GPU memory 100.

한편, 가상 머신들(200)이 가상 GPU 메모리(100)를 사용하는 사용량은 각 가상 머신이 할당된 작업을 수행하기 위해 물리 GPU에서 동작하는 시간의 측정값에 의해 결정된다.On the other hand, the usage amount of the virtual machines 200 using the virtual GPU memory 100 is determined by the measurement value of the time that each virtual machine operates in the physical GPU in order to perform the assigned task.

메모리 재할당부(300)는 가상 머신들(200)이 가상 GPU 메모리(100)를 사용하는 사용량을 결정하고, 결정한 사용량을 이용하여 가상 머신들(200)의 사용량 편차를 계산한다. 또한, 메모리 재할당부(300)는 계산한 사용량 편차가 임계값 미만인 경우 차지하는 슬롯 수가 많은 가상 머신 순으로 복수의 슬롯들을 1차적으로 재할당하고, 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 복수의 슬롯들을 제1 미할당 가상 머신들에 2차적으로 재할당한다. 또한, 메모리 재할당부(300)는 계산한 사용량 편차가 임계값 이상인 경우 결정한 사용량이 큰 가상 머신 순으로 복수의 슬롯들을 1차적으로 재할당하고, 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 복수의 슬롯들을 2차적으로 재할당한다.The memory reassigning unit 300 determines the usage amount of the virtual machines 200 using the virtual GPU memory 100 and calculates the usage amount variation of the virtual machines 200 using the determined usage amount. In addition, the memory reassigning unit 300 may reallocate a plurality of slots primarily in the order of virtual machines having a larger number of slots occupied when the computed usage deviation is less than a threshold value, and reallocate a plurality of slots to one or more Allocates a plurality of slots to the first unallocated virtual machines to share at least one slot in the case of the first unallocated virtual machines. Also, the memory reassigning unit 300 may reallocate a plurality of slots primarily in the order of a virtual machine having a larger usage determined when the calculated usage deviation is equal to or greater than a threshold, and allocate a plurality of slots to one or more And secondarily reallocates a plurality of slots to share at least one slot in the case of second unallocated virtual machines.

이 때, 메모리 재할당부(300)는 하드웨어인 컴퓨팅 장치(1000)와 결합되어 실행되기 위해 프로그램(또는 어플리케이션)으로 구현되어 컴퓨터 판독 가능한 기록 매체에 저장될 수 있다.In this case, the memory re-assign unit 300 may be implemented as a program (or application) to be executed in combination with the computing device 1000, which is hardware, and stored in a computer-readable recording medium.

컴퓨터 판독 가능한 기록 매체는, 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 디바이스에 의해 판독 가능한 매체를 의미한다. 기록 매체의 예시로서, ROM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있지만, 이에 제한되지 않는다. 즉, 본 발명의 실시예에 따른 메모리 재할당부(300)는 컴퓨터가 접속할 수 있는 다양한 서버 상의 다양한 기록매체 또는 사용자의 상기 컴퓨터상의 다양한 기록매체에 저장될 수 있다.The computer-readable recording medium is not a medium for storing data for a short time such as a register, a cache, a memory, etc., but means a medium that semi-permanently stores data and is readable by the device. Examples of the recording medium include, but are not limited to, ROM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. That is, the memory re-allocation unit 300 according to the embodiment of the present invention can be stored in various recording media on various servers to which the computer can access, or on various recording media on the user's computer of the user.

우선, 메모리 재할당부(300)는 가상 머신들(200)에 접근하여 가상 머신들(200) 각각의 가상 GPU 메모리(100) 사용량을 결정한다.First, the memory reassigning unit 300 accesses the virtual machines 200 to determine the usage amount of the virtual GPU memory 100 of each of the virtual machines 200.

이후, 메모리 재할당부(300)는 결정한 사용량을 이용하여 가상 머신들(200)의 사용량 편차를 계산한다.Thereafter, the memory reassigning unit 300 calculates the usage deviation of the virtual machines 200 using the determined usage amount.

구체적으로, 메모리 재할당부(300)는 결정한 사용량 중에서 최소 사용량 및 최대 사용량을 결정하고, 최대 사용량을 최소 사용량으로 나누어 사용량 편차를 계산한다.Specifically, the memory re-allocation unit 300 determines the minimum usage amount and the maximum usage amount among the determined usage amounts, and calculates the usage amount deviation by dividing the maximum usage amount by the minimum usage amount.

메모리 재할당부(300)는 계산한 사용량 편차를 임계값과 비교하여, 사용량 편차가 임계값 미만인 경우 가상 머신들(200)에 할당된 가상 GPU 메모리(100)의 슬롯 수에 따라 가상 GPU 메모리(100)의 슬롯을 가상 머신들(200)에 재할당하고, 사용량 편차가 임계값 이상인 경우 가상 머신들(200)의 사용량에 따라 가상 GPU 메모리(100)의 슬롯을 가상 머신들(200)에 재할당하여, 가상 GPU 메모리(100)의 슬롯을 공유하는 가상 머신 수의 합이 최소가 되도록한다. 이 경우, 임계값은 1.1일 수 있다.The memory reassigning unit 300 compares the calculated usage deviation with a threshold value and when the usage deviation is less than the threshold value, the memory reassignment unit 300 determines the virtual GPU memory 100 (100) according to the number of slots of the virtual GPU memory 100 allocated to the virtual machines 200 And reassigns the slots of the virtual GPU memory 100 to the virtual machines 200 according to the usage amount of the virtual machines 200 when the usage deviation is equal to or greater than the threshold value So that the sum of the number of virtual machines sharing the slots of the virtual GPU memory 100 is minimized. In this case, the threshold value may be 1.1.

도 2 및 도 3은 한 실시예에 따른 메모리 재할당부가 가상 GPU 메모리의 슬롯을 복수의 가상 머신들에게 재할당하는 구체적인 방법을 설명하는 도면이다.FIGS. 2 and 3 are diagrams for explaining a specific method of reallocating slots of a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.

도 2를 참고하면, 사용량 편차가 임계값 미만인 경우, 메모리 재할당부(300)는 가상 GPU 메모리(100)에서 각 가상 머신이 차지하는 슬롯 수를 결정한다. 예를 들면, 메모리 재할당부(300)는 제1 가상 머신(210), 제2 가상 머신(220), 제3 가상 머신(230) 및 제4 가상 머신(240)이 차지하는 슬롯 수를 각각 3개, 2개, 1개 및 4개로 결정할 수 있다.Referring to FIG. 2, when the usage deviation is less than the threshold value, the memory reassigning unit 300 determines the number of slots occupied by each virtual machine in the virtual GPU memory 100. For example, the memory reallocation unit 300 may allocate the slots occupied by the first virtual machine 210, the second virtual machine 220, the third virtual machine 230, and the fourth virtual machine 240 to three , 2, 1 and 4, respectively.

또한, 메모리 재할당부(300)는 차지하는 슬롯 수가 많은 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯들을 1차적으로 재할당한다. 이 경우, 가상 머신들(200)은 서로 공유하는 슬롯이 없도록 가상 GPU 메모리(100)의 슬롯을 연속적으로 재할당받고, 차지하는 슬롯 수가 많은 가상 머신 순으로 가장 좌측 슬롯부터 재할당받을 수 있다.In addition, the memory reassigning unit 300 primarily reallocates the slots of the virtual GPU memory 100 in the order of virtual machines having a large number of slots occupied. In this case, the virtual machines 200 can continuously reallocate the slots of the virtual GPU memory 100 so that there is no slot shared by the virtual machines 200, and can be reallocated from the leftmost slot in the order of the virtual machines having a large number of slots occupied.

예를 들면, 메모리 재할당부(300)는 제4 가상 머신(240), 제1 가상 머신(210), 제2 가상 머신(220) 및 제3 가상 머신(230) 순으로 서로 공유하는 슬롯이 없도록 슬롯을 1차적으로 재할당한다. 즉, 메모리 재할당부(300)는 제4 가상 머신(240)이 제1 슬롯(110) 내지 제4 슬롯(140)을 차지하고, 제1 가상 머신(210)이 제5 슬롯(150) 내지 제7 슬롯(170)을 차지하고, 제2 가상 머신(220)이 제8 슬롯(180) 및 제9 슬롯(190)을 차지하도록 가상 머신들(200)에 가상 GPU 메모리(100)의 슬롯을 재할당할 수 있다.For example, the memory reassigning unit 300 may be configured to allow the fourth virtual machine 240, the first virtual machine 210, the second virtual machine 220, and the third virtual machine 230 to share slots in the order of the fourth virtual machine 240, the first virtual machine 210, And reallocates slots primarily. That is, the memory re-assigning unit 300 determines that the fourth virtual machine 240 occupies the first slot 110 to the fourth slot 140, the first virtual machine 210 occupies the fifth slot 150 to the seventh slot 140, And reallocates the slots of the virtual GPU memory 100 to the virtual machines 200 so that the second virtual machine 220 occupies the slots 170 and occupies the eighth slot 180 and the ninth slot 190 .

만일 가상 GPU 메모리(100) 내 슬롯이 부족하여 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신이 있는 경우, 메모리 재할당부(300)는 슬롯을 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 사용하는 가상 머신과 슬롯을 공유하도록 슬롯들을 2차적으로 재할당한다. 이 경우, 미할당 가상 머신 중 슬롯을 가장 많이 사용하는 미할당 가상 머신은 가장 우측 슬롯을 사용하도록 배치하고, 나머지 미할당 가상 머신들은 모든 슬롯을 해당 가상 머신과 공유하되, 해당 가상 머신이 차지하는 슬롯 중 가장 좌측 슬롯을 포함하도록 할 수 있다.If there is an unassigned virtual machine that is not primarily reallocated due to insufficient slots in the virtual GPU memory 100, the memory reallocator 300 may use the least number of slots among the reallocated virtual machines Lt; RTI ID = 0.0 > slots. ≪ / RTI > In this case, an unassigned virtual machine that uses the most slots among the unassigned virtual machines is arranged to use the rightmost slot, and the remaining unassigned virtual machines share all slots with the virtual machine, And the leftmost slot among the slots.

예를 들면, 도 2에서, 가상 GPU 메모리(100)의 슬롯이 9개인 관계로 제3 가상 머신(230)은 슬롯을 재할당받지 못한다. 따라서, 메모리 재할당부(300)는 제3 가상 머신(230)이 슬롯을 가장 적게 재할당받은 제2 가상 머신(220)과 슬롯을 공유하도록 2차적으로 재할당할 수 있다. 이 경우, 제3 가상 머신(230)과 제2 가상 머신(220)은 가장 우측 슬롯인 제9 슬롯(190)을 공유하며, 컨텍스트 전환시 제9 슬롯(190)에서만 슬롯의 복사가 발생한다.For example, in FIG. 2, because the slots of the virtual GPU memory 100 are nine, the third virtual machine 230 is not reallocated. Accordingly, the memory reassignment unit 300 can re-allocate the slot to share the slot with the second virtual machine 220 that has the least reallocated slot. In this case, the third virtual machine 230 and the second virtual machine 220 share the ninth slot 190, which is the rightmost slot, and copy of the slot occurs only in the ninth slot 190 at the time of context switching.

사용량 편차가 임계값 미만인 경우, 제1 가상 머신(210) 내지 제4 가상 머신(240)의 가상 GPU 메모리(100) 사용량은 거의 동일한바, 각 가상 머신이 가상 GPU 메모리(100)에 접근하는 빈도 또한 거의 동일하다. 따라서, 이 경우 가상 머신들(200)에 의해 공유되는 슬롯이 최소화되도록 가성 머신들(200)에 가상 GPU 메모리(100)의 슬롯을 재할당하여 컨텍스트 전환시 발생하는 슬롯의 복사를 최소화한다.The amount of usage of the virtual GPU memory 100 of the first virtual machine 210 to the virtual machine 240 of the fourth virtual machine 240 is substantially the same and the frequency of each virtual machine accessing the virtual GPU memory 100 It is also almost the same. Accordingly, in this case, the slot of the virtual GPU memory 100 is reallocated to the virtual machines 200 so that the slot shared by the virtual machines 200 is minimized, thereby minimizing the copy of the slot occurring at the time of context switching.

도 3을 참고하면, 사용량 편차가 임계값 이상인 경우, 메모리 재할당부(300)는 사용량이 큰 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당한다. 이 경우, 가상 머신들(200)은 서로 공유하는 슬롯이 없도록 가상 GPU 메모리(100)의 슬롯을 연속적으로 재할당받는다. 이 경우, 메모리 재할당부(300)는 가장 사용량이 큰 가상 머신 순으로 가상 GPU 메모리(100)의 가장 좌측 슬롯부터 순차적으로 재할당할 수 있다.Referring to FIG. 3, when the usage deviation is equal to or greater than the threshold value, the memory reassigning unit 300 primarily reassigns the slots of the virtual GPU memory 100 in order of the virtual machines having a large usage. In this case, the virtual machines 200 are continuously reallocated in the slots of the virtual GPU memory 100 such that there is no slot shared by the virtual machines 200. In this case, the memory reassigning unit 300 may reallocate sequentially from the leftmost slot of the virtual GPU memory 100 in order of the largest virtual machine.

예를 들면, 제1 가상 머신(210), 제2 가상 머신(220), 제4 가상 머신(240) 및 제3 가상 머신(230)순으로 가상 GPU 메모리(100)의 사용량이 큰 경우, 메모리 재할당부(300)는 제1 가상 머신(210)이 제1 슬롯(110) 내지 제3 슬롯(130)을 차지하고, 제2 가상 머신(220)이 제4 슬롯(140) 및 제5 슬롯(150)을 차지하고, 제4 가상 머신(240)이 제6 슬롯(180) 내지 제9 슬롯(190)을 차지하도록 가상 머신들(200)에 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당할 수 있다.For example, when the amount of usage of the virtual GPU memory 100 is large in the order of the first virtual machine 210, the second virtual machine 220, the fourth virtual machine 240, and the third virtual machine 230, The reallocator 300 may be configured such that the first virtual machine 210 occupies the first slot 110 to the third slot 130 and the second virtual machine 220 occupies the fourth slot 140 and the fifth slot 150 And the slots of the virtual GPU memory 100 are primarily reallocated to the virtual machines 200 so that the fourth virtual machine 240 occupies the sixth slot 180 to the ninth slot 190 .

만일 가상 GPU 메모리(100) 내 슬롯이 부족하여 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신이 있는 경우, 메모리 재할당부(300)는 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당받은 가상 머신 중에서, 가장 적은 사용량을 가진 가상 머신과 슬롯을 공유하도록 슬롯을 할당받지 못한 가상 머신에 슬롯들을 2차적으로 재할당한다. 이 경우, 슬롯을 1차적으로 재할당받지 못한 가상 머신은 가장 우측 슬롯을 공유할 수 있다.If there is an unassigned virtual machine that is not primarily reallocated due to insufficient slots in the virtual GPU memory 100, the memory reassigning unit 300 may reallocate slots of the virtual GPU memory 100 primarily Among the received virtual machines, slots are secondarily reallocated to virtual machines that are not assigned slots to share slots with the least-used virtual machines. In this case, a virtual machine that is not primarily reallocated slots can share the rightmost slot.

예를 들면, 도 3에서, 가상 GPU 메모리(100)의 슬롯이 9개인 관계로 제3 가상 머신(230)은 슬롯을 1차적으로 재할당받지 못한다. 따라서, 메모리 재할당부(300)는 제3 가상 머신(230)이 슬롯이 재할당된 가상 머신 중 가장 적은 사용량을 가진 제4 가상 머신(240)과 슬롯을 공유하도록 2차적으로 재할당할 수 있다. 이 경우, 제3 가상 머신(230)과 제4 가상 머신(240)은 가장 우측 슬롯인 제9 슬롯(190)을 공유하며, 컨텍스트 전환시 제9 슬롯(190)에서만 슬롯의 복사가 발생한다.For example, in FIG. 3, the slot number of the virtual GPU memory 100 is nine, so that the third virtual machine 230 does not receive a primary reallocation of the slot. Accordingly, the memory reassignment unit 300 can re-allocate the slots so that the third virtual machine 230 shares a slot with the fourth virtual machine 240 having the smallest usage among the virtual machines re-allocated slots . In this case, the third virtual machine 230 and the fourth virtual machine 240 share the ninth slot 190, which is the rightmost slot, and copy of the slot occurs only in the ninth slot 190 at the time of context switching.

사용량 편차가 임계값 이상인 경우, 제1 가상 머신(210) 내지 제4 가상 머신(240)의 가상 GPU 메모리(100) 사용량은 차이가 있고, 가상 GPU 메모리(100) 사용량이 큰 가상 머신일수록 가상 GPU 메모리(100)에 접근하는 빈도가 크다. 만일 가상 GPU 메모리(100)에 자주 접근하는 가상 머신들이 슬롯을 공유하는 경우, 슬롯의 복사가 빈번하게 발생하여 시스템 내 연산량이 증가하게 된다.The use amount of the virtual GPU memory 100 of the first virtual machine 210 to the fourth virtual machine 240 is different when the usage deviation is equal to or larger than the threshold value and the virtual machine having a larger usage amount of the virtual GPU memory 100, The frequency of approaching the memory 100 is high. If the virtual machines frequently accessing the virtual GPU memory 100 share a slot, the number of slots is frequently increased and the amount of computation in the system increases.

따라서, 가상 GPU 메모리(100) 사용량이 적은 가상 머신들이 슬롯을 공유하도록 가상 머신들(200)에 가상 GPU 메모리(100)를 재할당하는 경우, 컨텍스트 전환시 발생하는 슬롯의 복사를 최소화할 수 있다.Accordingly, when the virtual GPU memory 100 is reallocated to the virtual machines 200 so that the virtual machines having a small amount of usage of the virtual GPU memory 100 share the slots, the copying of the slots occurring at the context switching can be minimized .

도 4는 종래 기술에 따른 가상 GPU 메모리 할당방법과 본 발명의 실시예에 따른 가상 GPU 메모리 재할당 방법을 비교한 도면이다.FIG. 4 is a diagram comparing a method of allocating a virtual GPU according to the prior art and a method of reallocating a virtual GPU according to an embodiment of the present invention.

도 4 (a)를 참고하면, 종래 기술의 경우, 가상 머신들(400)이 일괄적으로 동일한 수의 슬롯을 공유하도록 가상 GPU 메모리(100)의 슬롯이 할당된다. 이 경우, 컨텍스트 전환시 제1 가상 머신(410), 제2 가상 머신(420), 제3 가상 머신(430) 및 제4 가상 머신(440)에 의해 각각 6번의 슬롯의 복사가 발생하므로 총 24회의 슬롯의 복사가 발생한다.Referring to FIG. 4A, in the prior art, a slot of the virtual GPU memory 100 is allocated so that the virtual machines 400 collectively share the same number of slots. In this case, six slots are copied by the first virtual machine 410, the second virtual machine 420, the third virtual machine 430, and the fourth virtual machine 440, respectively, A copy of the conference slot occurs.

그러나, 도 4 (b)를 참고하면, 본 발명의 실시예에 따라 제1 가상 머신(410), 제3 가상 머신(430) 및 제4 가상 머신(440)이 동일한 슬롯을 공유하고, 제2 가상 머신(220)이 슬롯을 단독으로 할당받도록 재할당하는 경우, 컨텍스트 전환시 제2 가상 머신(220)을 제외한 제1 가상 머신(410), 제3 가상 머신(430) 및 제4 가상 머신(440)에 의해 각각 6번의 슬롯의 복사가 발생하므로 총 18회의 슬롯의 복사가 발생하여 종래 기술에 비해 적은 수의 슬롯의 복사가 발생한다.However, referring to FIG. 4 (b), the first virtual machine 410, the third virtual machine 430, and the fourth virtual machine 440 share the same slot according to the embodiment of the present invention, The first virtual machine 410, the third virtual machine 430, and the fourth virtual machine (except for the second virtual machine 220) can be reused when the virtual machine 220 reassigns the slot to be allocated solely 440), so that a total of 18 slots are copied, resulting in a smaller number of slots than in the prior art.

따라서, 본 발명의 실시예에 의하면 종래 기술보다 적은 수의 슬롯의 복사가 발생하는바, 가상화 시스템 내에서 슬롯의 복사로 인한 연산량이 감소한다.Thus, according to embodiments of the present invention, fewer slots of copying occur than in the prior art, which reduces the amount of computation due to slot copying within the virtualization system.

도 5는 본 발명의 실시예에 따른 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법을 설명하는 도면이다.5 is a diagram illustrating a method for reallocating a plurality of slots included in a virtual GPU memory to a plurality of virtual machines according to an embodiment of the present invention.

도 5를 참고하면, 컴퓨팅 장치(1000)는 가상 머신들(200)이 가상 GPU 메모리(100)를 사용하는 사용량을 결정한다(S100).Referring to FIG. 5, the computing device 1000 determines a usage amount of the virtual machines 200 using the virtual GPU memory 100 (S100).

컴퓨팅 장치(1000)는 결정한 사용량을 이용하여 가상 머신들(200)의 사용량 편차를 계산한다(S110).The computing device 1000 calculates a usage deviation of the virtual machines 200 using the determined usage amount (S110).

구체적으로, 컴퓨팅 장치(1000)는 최소 사용량 및 최대 사용량을 결정하고, 최대 사용량을 최소 사용량으로 나누어 사용량 편차를 계산한다.Specifically, the computing device 1000 determines the minimum usage amount and the maximum usage amount, and calculates the usage amount difference by dividing the maximum usage amount by the minimum usage amount.

컴퓨팅 장치(1000)는 계산한 사용량 편차가 임계값 미만인지 확인한다(S120).The computing device 1000 determines whether the calculated usage deviation is less than a threshold value (S120).

만일 사용량 편차가 임계값 미만인 경우, 컴퓨팅 장치(1000)는 슬롯이 적게 할당된 가상 머신들이 슬롯을 공유하도록 슬롯들을 가상 머신들(200)에 재할당한다.If the usage deviation is below the threshold, the computing device 1000 reassigns the slots to the virtual machines 200 so that the less-allocated virtual machines share the slot.

구체적으로, 컴퓨팅 장치(1000)는 가상 GPU 메모리(100)에서 각 가상 머신에 할당된 슬롯 수를 결정하고(S130), 차지하는 슬롯 수가 많은 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯들을 1차적으로 재할당한다(S131). 이 경우, 컴퓨팅 장치(1000)는 서로 공유하는 슬롯이 없도록 연속적으로 슬롯들을 할당할 수 있다.Specifically, the computing device 1000 determines the number of slots allocated to each virtual machine in the virtual GPU memory 100 (S130), and updates the slots of the virtual GPU memory 100 to the primary (S131). In this case, the computing device 1000 can continuously allocate slots so that there is no slot shared with each other.

또한, 컴퓨팅 장치(1000)는 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신의 경우, 슬롯을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 슬롯을 2차적으로 재할당한다(S133).In addition, in the case of an unassigned virtual machine in which the slot is not primarily reallocated, the computing device 1000 may share the slot with the virtual machine that has the least reallocated slot among the virtual machines that have been primarily reallocated The slots are reallocated (S133).

이 경우, 컴퓨팅 장치(1000)는 차지하는 슬롯 수가 많은 가상 머신 순으로 가장 좌측 슬롯부터 1차적으로 재할당하고, 슬롯을 1차적으로 재할당받지 못한 미할당 가상 머신의 경우, 슬롯을 가장 많이 사용하는 미할당 가상 머신은 가장 우측 슬롯을 사용하도록 재할당하고, 나머지 미할당 가상 머신들은 모든 슬롯을 해당 가상 머신과 공유하되, 해당 가상 머신이 차지하는 슬롯 중 가장 좌측 슬롯을 포함하도록 2차적으로 재할당할 수 있다.In this case, the computing device 1000 primarily reallocates from the leftmost slot in the order of the virtual machines having a large number of slots occupied, and in the case of an unassigned virtual machine in which slots are not primarily reallocated, The unassigned virtual machine is reassigned to use the rightmost slot and the remaining unassigned virtual machines share all the slots with the corresponding virtual machine but are reallocated to include the leftmost slot occupied by the virtual machine .

만일 사용량 편차가 임계값 이상인 경우, 컴퓨팅 장치(1000)는 결정한 사용량이 적은 가상 머신들이 슬롯을 공유하도록 슬롯들을 가상 머신들(200)에 재할당한다.If the usage deviation is above the threshold, the computing device 1000 reassigns the slots to the virtual machines 200 so that the less-used virtual machines share the slot.

구체적으로, 컴퓨팅 장치(1000)는 사용량이 큰 가상 머신 순으로 가상 GPU 메모리(100)의 슬롯을 1차적으로 재할당한다(S140). 이 경우, 컴퓨팅 장치(1000)는 서로 공유하는 슬롯이 없도록 연속적으로 슬롯들을 할당할 수 있다.Specifically, the computing device 1000 primarily reallocates the slots of the virtual GPU memory 100 in order of the virtual machines having a large usage (S140). In this case, the computing device 1000 can continuously allocate slots so that there is no slot shared with each other.

또한, 컴퓨팅 장치(1000)는 슬롯을 재할당받지 못한 미할당 가상 머신의 경우, 슬롯을 1차적으로 재할당받은 가상 머신들 중에서 가장 적은 사용량을 가진 가상 머신과 슬롯을 공유하도록 슬롯을 2차적으로 재할당한다(S141).In addition, in the case of an unassigned virtual machine in which slots are not reallocated, the computing device 1000 may also be configured to perform a secondary slot allocation so as to share a slot with a virtual machine having the smallest usage amount among the virtual machines, (S141).

이 경우, 컴퓨팅 장치(1000)는 사용량이 큰 가상 머신 순으로 가장 좌측 슬롯부터 1차적으로 재할당하고, 슬롯을 재할당받지 못한 미할당 가상 머신의 경우, 가장 우측 슬롯을 공유하도록 2차적으로 재할당할 수 있다.In this case, the computing device 1000 primarily reallocates from the leftmost slot in order of the larger virtual machines, and in the case of an unassigned virtual machine that has not been reallocated slots, Can be assigned.

본 발명에 따르면, 가상 머신들의 컨텍스트 전환 시 발생하는 불필요한 슬롯의 복사를 최소화할 수 있는바, 컨텍스트 전환 비용을 감소시키고 전체 GPU 가상화 시스템의 성능을 향상시킬 수 있다.According to the present invention, it is possible to minimize unnecessary duplication of slots occurring in the context switching of virtual machines, thereby reducing the context switching cost and improving the performance of the entire GPU virtualization system.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있다.The embodiments of the present invention described above are not implemented only by the apparatus and method, but may be implemented through a program for realizing the function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.

Claims (12)

가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치로서,
복수의 슬롯들을 포함하는 가상 GPU 메모리,
상기 복수의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 상기 가상 GPU 메모리를 사용하여 할당된 작업을 수행하는 복수의 가상 머신들, 그리고
메모리 재할당부를 포함하며,
상기 메모리 재할당부는
상기 복수의 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하고, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하고,
상기 계산한 사용량 편차가 임계값 미만인 경우, 각 가상 머신이 차지하는 슬롯 수를 결정하고, 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하고,
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 컴퓨팅 장치.
A computing device for reassigning a slot contained in a virtual GPU memory to a plurality of virtual machines,
A virtual GPU memory including a plurality of slots,
A plurality of virtual machines assigned at least one slot among the plurality of slots and performing an assigned task using the virtual GPU memory,
A memory reallocation unit,
The memory reallocation unit
Determining a usage amount of the plurality of virtual machines using the virtual GPU memory, calculating a usage deviation of the plurality of virtual machines using the determined usage amount,
Determining a number of slots occupied by each virtual machine when the calculated usage deviation is less than a threshold value and sequentially reallocating the plurality of slots so that there is no slot shared by the virtual machines in the order of the number of slots occupied, In the case of one or more first unallocated virtual machines in which the plurality of slots are not primarily reallocated, a virtual machine and a slot that have been reallocated at least among the virtual machines that have been primarily reallocated to the plurality of slots Re-allocating the plurality of slots to share,
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to share at least one slot in the case of allocation virtual machines.
제1항에서,
상기 메모리 재할당부는
상기 결정한 사용량 중에서 최소 사용량 및 최대 사용량을 결정하고, 상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산하는 컴퓨팅 장치.
The method of claim 1,
The memory reallocation unit
Wherein the computing unit determines the minimum usage amount and the maximum usage amount among the usage amounts determined and divides the maximum usage amount by the minimum usage amount to calculate the usage amount deviation.
삭제delete 제1항에서,
상기 메모리 재할당부는
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고,
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 컴퓨팅 장치.
The method of claim 1,
The memory reallocation unit
And reallocating the slots from the leftmost slot among the plurality of slots in order of virtual machines having the largest number of slots,
Allocates the second unallocated virtual machines to the second slot from the rightmost slot among the plurality of slots.
가상 GPU 메모리에 포함된 슬롯을 복수의 가상 머신들에게 재할당하는 컴퓨팅 장치로서,
복수의 슬롯들을 포함하는 가상 GPU 메모리,
상기 복수의 슬롯들 중 적어도 하나의 슬롯을 할당받고, 상기 가상 GPU 메모리를 사용하여 할당된 작업을 수행하는 복수의 가상 머신들, 그리고
메모리 재할당부를 포함하며,
상기 메모리 재할당부는
상기 복수의 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하고, 상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하고,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하고,
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하며, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 컴퓨팅 장치.
A computing device for reassigning a slot contained in a virtual GPU memory to a plurality of virtual machines,
A virtual GPU memory including a plurality of slots,
A plurality of virtual machines assigned at least one slot among the plurality of slots and performing an assigned task using the virtual GPU memory,
A memory reallocation unit,
The memory reallocation unit
Determining a usage amount of the plurality of virtual machines using the virtual GPU memory, calculating a usage deviation of the plurality of virtual machines using the determined usage amount,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, Allocating the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of machines,
Wherein when the calculated usage deviation is equal to or greater than the threshold value, the plurality of slots are primarily and continuously reallocated so that there is no slot shared by the determined virtual machines in ascending order of virtual machines, In the case of one or more second unallocated virtual machines that have not been allocated, the plurality of slots may be quadratically divided to share a slot with the virtual machine having the lowest usage amount among the virtual machines that have been primarily reallocated to the plurality of slots A computing device that reassigns.
제5항에서,
상기 메모리 재할당부는
상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가장 좌측 슬롯부터 1차적으로 재할당하고,
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 컴퓨팅 장치.
The method of claim 5,
The memory reallocation unit
And reallocating the slots from the leftmost slot among the plurality of slots,
And secondarily reallocates the second unallocated virtual machines from the rightmost slot among the plurality of slots.
하나 이상의 프로세서를 포함하는 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법으로서,
상기 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하는 단계,
상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하는 단계,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계, 그리고
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함하고,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계는
각 가상 머신들이 차지하는 슬롯 수를 결정하는 단계,
차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계
를 포함하는 슬롯 재할당 방법.
CLAIMS What is claimed is: 1. A method for reassigning a plurality of slots, included in a virtual GPU memory, to a plurality of virtual machines, the computing device comprising one or more processors,
Determining a usage amount of the virtual machines using the virtual GPU memory,
Calculating usage deviations of the plurality of virtual machines using the determined usage amount,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, Reassigning the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of machines, and
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to share at least one slot in the case of allocation virtual machines,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, In the case of machines, the step of secondarily reallocating the plurality of slots to the first unallocated virtual machines to share at least one slot
Determining the number of slots occupied by each virtual machine,
Sequentially reallocating the plurality of slots so that there is no slot shared by the virtual machines in the order of the number of slots occupied; and
In the case of the first unallocated virtual machines, the plurality of slots are secondarily reallocated so as to share a slot with a virtual machine having the least reallocated slots among the virtual machines that have been primarily reallocated to the plurality of slots step
Lt; / RTI >
제7항에서,
상기 사용량 편차를 계산하는 단계는
상기 결정한 사용량 중에서, 최소 사용량 및 최대 사용량을 결정하는 단계, 그리고
상기 최대 사용량을 상기 최소 사용량으로 나누어 상기 사용량 편차를 계산하는 단계
를 포함하는 슬롯 재할당 방법.
8. The method of claim 7,
The step of calculating the usage deviation
Determining a minimum usage amount and a maximum usage amount among the determined usage amounts, and
Dividing the maximum usage amount by the minimum usage amount, and calculating the usage amount deviation
Lt; / RTI >
삭제delete 제7항에서,
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는
상기 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고,
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 슬롯을 가장 적게 재할당받은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는
상기 제1 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 슬롯 재할당 방법.
8. The method of claim 7,
The step of sequentially and primarily reassigning the plurality of slots so that there is no slot shared by the virtual machines in the order of
Allocating a virtual left slot of the plurality of slots in a virtual machine order having a larger number of slots,
In the case of the first unallocated virtual machines, the plurality of slots are secondarily reallocated so as to share a slot with a virtual machine having the least reallocated slots among the virtual machines that have been primarily reallocated to the plurality of slots The step
And allocating the second unallocated virtual machines from the rightmost slot among the plurality of slots.
하나 이상의 프로세서를 포함하는 컴퓨팅 장치가 가상 GPU 메모리에 포함된 복수의 슬롯들을 복수의 가상 머신들에 재할당하는 방법으로서,
상기 가상 머신들이 상기 가상 GPU 메모리를 사용하는 사용량을 결정하는 단계,
상기 결정한 사용량을 이용하여 상기 복수의 가상 머신들의 사용량 편차를 계산하는 단계,
상기 계산한 사용량 편차가 임계값 미만인 경우, 차지하는 슬롯 수가 많은 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제1 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 상기 제1 미할당 가상 머신들에 2차적으로 재할당하는 단계, 그리고
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계를 포함하고,
상기 계산한 사용량 편차가 상기 임계값 이상인 경우, 상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들을 1차적으로 재할당하고, 상기 복수의 슬롯들을 1차적으로 재할당받지 못한 하나 이상의 제2 미할당 가상 머신들의 경우 적어도 하나의 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는
상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계, 그리고
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계
를 포함하는 슬롯 재할당 방법.
CLAIMS What is claimed is: 1. A method for reassigning a plurality of slots, included in a virtual GPU memory, to a plurality of virtual machines, the computing device comprising one or more processors,
Determining a usage amount of the virtual machines using the virtual GPU memory,
Calculating usage deviations of the plurality of virtual machines using the determined usage amount,
Allocating the plurality of slots to the plurality of slots in the order of virtual machines having a larger number of slots when the calculated usage deviation is less than a threshold, Reassigning the plurality of slots to the first unallocated virtual machines to share at least one slot in the case of machines, and
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, Allocating the plurality of slots to share at least one slot in the case of allocation virtual machines,
Allocating the plurality of slots to the plurality of slots in the order of the virtual machines having the determined usage amount larger than the threshold if the calculated usage deviation is greater than or equal to the threshold value, In the case of allocation virtual machines, the step of secondary reallocating the plurality of slots to share at least one slot
Sequentially reallocating the plurality of slots so that there is no slot shared with each other in the ascending order of virtual machines; and
Allocating the plurality of slots to the second virtual machine, wherein the second unallocated virtual machines share the slot with the virtual machine having the lowest usage amount among the virtual machines that are primarily reallocated to the plurality of slots
Lt; / RTI >
제11항에서,
상기 결정한 사용량이 큰 가상 머신 순으로 서로 공유하는 슬롯이 없도록 상기 복수의 슬롯들을 연속적으로 1차적으로 재할당하는 단계는
상기 결정한 사용량이 큰 가상 머신 순으로 상기 복수의 슬롯들 중에서 가상 좌측 슬롯부터 1차적으로 재할당하고,
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들을 1차적으로 재할당받은 가상 머신들 중에서 상기 결정한 사용량이 가장 적은 가상 머신과 슬롯을 공유하도록 상기 복수의 슬롯들을 2차적으로 재할당하는 단계는
상기 제2 미할당 가상 머신들의 경우, 상기 복수의 슬롯들 중에서 가장 우측 슬롯부터 2차적으로 재할당하는 슬롯 재할당 방법.
12. The method of claim 11,
Wherein the step of sequentially and primarily reassigning the plurality of slots so that there is no slot shared by the determined virtual machines
Allocating a virtual left slot of the plurality of slots to the virtual left slot,
Allocating the plurality of slots to the second virtual machine, wherein the second unallocated virtual machines share the slot with the virtual machine having the lowest usage amount among the virtual machines that have been primarily reallocated to the plurality of slots The
And in the case of the second unallocated virtual machines, reallocally from the rightmost slot among the plurality of slots.
KR1020180082289A 2018-07-16 2018-07-16 Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same KR101932522B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180082289A KR101932522B1 (en) 2018-07-16 2018-07-16 Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180082289A KR101932522B1 (en) 2018-07-16 2018-07-16 Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same

Publications (1)

Publication Number Publication Date
KR101932522B1 true KR101932522B1 (en) 2018-12-26

Family

ID=65006467

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180082289A KR101932522B1 (en) 2018-07-16 2018-07-16 Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same

Country Status (1)

Country Link
KR (1) KR101932522B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220035626A (en) * 2020-09-14 2022-03-22 한화시스템 주식회사 Method for managing gpu resources and computing device for executing the method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011041615A1 (en) 2009-09-30 2011-04-07 Citrix Systems, Inc. Dynamic reallocation of physical memory responsive to virtual machine events
US20140176583A1 (en) * 2012-12-20 2014-06-26 Vmware, Inc. Dynamic allocation of physical graphics processing units to virtual machines
KR101661783B1 (en) 2009-03-26 2016-10-10 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 Virtual non-uniform memory architecture for virtual machines
US20160358305A1 (en) 2015-06-07 2016-12-08 Apple Inc. Starvation free scheduling of prioritized workloads on the gpu

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101661783B1 (en) 2009-03-26 2016-10-10 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 Virtual non-uniform memory architecture for virtual machines
WO2011041615A1 (en) 2009-09-30 2011-04-07 Citrix Systems, Inc. Dynamic reallocation of physical memory responsive to virtual machine events
US20140176583A1 (en) * 2012-12-20 2014-06-26 Vmware, Inc. Dynamic allocation of physical graphics processing units to virtual machines
US20160358305A1 (en) 2015-06-07 2016-12-08 Apple Inc. Starvation free scheduling of prioritized workloads on the gpu

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220035626A (en) * 2020-09-14 2022-03-22 한화시스템 주식회사 Method for managing gpu resources and computing device for executing the method
KR102417882B1 (en) 2020-09-14 2022-07-05 한화시스템 주식회사 Method for managing gpu resources and computing device for executing the method

Similar Documents

Publication Publication Date Title
US11157306B2 (en) Faster access of virtual machine memory backed by a host computing device's virtual memory
US10089026B1 (en) Virtual drive based RAID groups
KR101137172B1 (en) System, method and program to manage memory of a virtual machine
US9223709B1 (en) Thread-aware cache memory management
US10534720B2 (en) Application aware memory resource management
US9336147B2 (en) Cache and memory allocation for virtual machines
KR102290540B1 (en) Namespace/Stream Management
US9329780B2 (en) Combining virtual mapping metadata and physical space mapping metadata
US7590816B2 (en) Computer system, management computer and storage system, and storage area allocation amount controlling method
JP6678230B2 (en) Storage device
CN103577345A (en) Methods and structure for improved flexibility in shared storage caching by multiple systems
US8332611B2 (en) Method and system for managing memory
JP2004192612A (en) Power saving in segmented data processing system
KR20120000066A (en) Virtual non-uniform memory architecture for virtual machines
CN104572656A (en) Method and device for recycling space of disk mirror image
US20210026762A1 (en) Virtualization of multiple coprocessor memory
CN112241320A (en) Resource allocation method, storage device and storage system
US11803423B1 (en) Dynamic allocation of resources
KR101072807B1 (en) System for hypervisor
US20090037685A1 (en) Fair memory resource control for mapped memory
KR101932522B1 (en) Method for dynamically allocating slot of virtual gpu memory to virtual machine and computing device implementing the same
US9015418B2 (en) Self-sizing dynamic cache for virtualized environments
US10664393B2 (en) Storage control apparatus for managing pages of cache and computer-readable storage medium storing program
CN110447019B (en) Memory allocation manager and method for managing memory allocation performed thereby
US9811260B2 (en) System and method for ballooning with assigned devices

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant