KR102199509B1 - Memory sharing system, method, and program for performing for sharing memory in virtualization system - Google Patents

Memory sharing system, method, and program for performing for sharing memory in virtualization system Download PDF

Info

Publication number
KR102199509B1
KR102199509B1 KR1020190128192A KR20190128192A KR102199509B1 KR 102199509 B1 KR102199509 B1 KR 102199509B1 KR 1020190128192 A KR1020190128192 A KR 1020190128192A KR 20190128192 A KR20190128192 A KR 20190128192A KR 102199509 B1 KR102199509 B1 KR 102199509B1
Authority
KR
South Korea
Prior art keywords
unit
address information
virtual device
application
memory
Prior art date
Application number
KR1020190128192A
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 KR1020190128192A priority Critical patent/KR102199509B1/en
Application granted granted Critical
Publication of KR102199509B1 publication Critical patent/KR102199509B1/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/10Address translation
    • G06F12/1072Decentralised address translation, e.g. in distributed shared 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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

Provided is a memory sharing method. The memory sharing method comprises: a step of receiving an access request to a virtual device from an application; a step of checking the access right of the application; a step of converting virtual address information into intermediate address information according to page table information; a step of converting the intermediate address information into physical address information; and a step that the application accesses the memory. Therefore, the memory can be shared by generating the virtual device with a shared memory.

Description

가상화 시스템에서 메모리를 공유하기 위한 메모리 공유 시스템, 방법 및 이를 수행하기 위한 프로그램을 기록한 기록매체{MEMORY SHARING SYSTEM, METHOD, AND PROGRAM FOR PERFORMING FOR SHARING MEMORY IN VIRTUALIZATION SYSTEM}Memory sharing system and method for sharing memory in a virtualization system, and a recording medium recording a program to perform it {MEMORY SHARING SYSTEM, METHOD, AND PROGRAM FOR PERFORMING FOR SHARING MEMORY IN VIRTUALIZATION SYSTEM}

본 발명은 가상화 시스템에서 메모리를 공유하기 위한 메모리 공유 시스템, 방법 및 이를 수행하기 위한 프로그램을 기록한 기록매체에 관한 것으로, 보다 상세하게는, 공유 메모리를 구비하는 가상 디바이스를 생성하여 메모리를 공유하는 시스템, 방법 및 이를 수행하기 위한 프로그램을 기록한 기록매체에 관한 것이다.The present invention relates to a memory sharing system and method for sharing memory in a virtualization system, and to a recording medium recording a program for performing the same, and more particularly, to a system for sharing memory by creating a virtual device having a shared memory , A method, and a recording medium recording a program for performing the same.

가상화 기술은 서버 장치, 데스크톱 컴퓨터, 클라우드 컴퓨팅 등 다양한 분야에 적용되어 활용되고 있다. 이러한 가상화 기술은 하드웨어에 운영체제가 직접 설치되는 호스트와 호스트에 가상화 기술을 통해 설치되는 게스트가 존재하게 되며, 이때, 게스트를 실행시키기 위한 하이퍼바이저가 요구된다.Virtualization technology is applied and used in various fields such as server devices, desktop computers, and cloud computing. In this virtualization technology, a host in which an operating system is directly installed in hardware and a guest installed in the host through virtualization technology exist. In this case, a hypervisor for executing the guest is required.

예를 들어, 리눅스는 KVM(Kernel-based Virtual Machine) 방식으로 가상화를 실현하며, KVM 방식에서 게스트는 호스트의 모듈과 같은 형태로 동작한다.For example, Linux realizes virtualization in the KVM (Kernel-based Virtual Machine) method, and in the KVM method, the guest operates in the same form as the host module.

한편, 이러한 가상화 시스템은 일반적으로 호스트와 게스트가 독립적으로 운영되며, 하드웨어에 대한 게스트의 권한이 호스트의 권한보다 낮은 수준에서 운영된다.Meanwhile, in such a virtualization system, in general, a host and a guest operate independently, and a guest's authority to hardware is operated at a lower level than that of the host.

이에 따라, 게스트는 호스트와 공유할 수 있는 메모리 공간을 확보하는데 어려움이 존재한다.Accordingly, it is difficult for the guest to secure a memory space that can be shared with the host.

본 발명이 해결하고자 하는 기술적 과제는 공유 메모리를 구비하는 가상 디바이스를 생성하여 메모리를 공유하는 시스템, 방법 및 이를 수행하기 위한 프로그램을 기록한 기록매체를 제공하는 것이다.The technical problem to be solved by the present invention is to provide a system, a method for sharing a memory by creating a virtual device having a shared memory, and a recording medium in which a program for performing the same is recorded.

본 발명의 일측면은, 호스트부 및 호스트부에 가상의 운영체제로 설치되는 게스트부를 포함하는 메모리 공유 시스템을 이용하는 메모리 공유 방법에 있어서, 게스트부에 설치되는 어플리케이션으로부터 가상 디바이스에 대한 접근 요청을 수신하는 단계; 상기 어플리케이션의 상기 가상 디바이스에 대한 접근 권한을 확인하는 단계; 상기 가상 디바이스에 대한 상기 어플리케이션의 접근이 허용된 경우, 상기 게스트부에 사전에 저장되는 페이지 테이블 정보에 따라 상기 가상 디바이스에 대한 가상 주소 정보를 매개 주소 정보로 변환하는 단계; 상기 매개 주소 정보를 호스트부에서 이용되는 물리 주소 정보로 변환하는 단계; 및 상기 어플리케이션이 상기 물리 주소 정보에 따른 메모리에 접근하는 단계를 포함할 수 있다.One aspect of the present invention is a memory sharing method using a memory sharing system including a host unit and a guest unit installed as a virtual operating system on the host unit, receiving a request for access to a virtual device from an application installed in the guest unit step; Checking access rights of the application to the virtual device; Converting virtual address information for the virtual device into individual address information according to page table information previously stored in the guest unit when access of the application to the virtual device is permitted; Converting the respective address information into physical address information used in a host unit; And accessing, by the application, a memory according to the physical address information.

또한, 상기 가상 디바이스는, 상기 호스트부 및 상기 게스트부 중 적어도 하나의 요소에서 실행되는 어플리케이션의 접근이 가능한 공유 메모리를 포함할 수 있다.In addition, the virtual device may include a shared memory in which an application executed in at least one element of the host unit and the guest unit can be accessed.

또한, 상기 공유 메모리는, 상기 호스트부가 실행되는 하드웨어의 메모리로부터 사전에 설정되는 크기의 메모리 용량이 할당될 수 있다.In addition, the shared memory may be allocated a memory capacity of a preset size from a memory of hardware running the host unit.

또한, 상기 어플리케이션으로부터 수신하는 접근 요청에 대한 가상 디바이스가 존재하지 않는 경우, 상기 접근 요청에 따른 가상 디바이스를 생성하는 단계 및; 상기 가상 디바이스에 대한 상기 어플리케이션의 접근 권한을 부여하는 단계를 더 포함할 수 있다.In addition, when a virtual device for an access request received from the application does not exist, generating a virtual device according to the access request; It may further include the step of granting the access right of the application to the virtual device.

또한, 상기 접근 권한은, 상기 가상 디바이스에 대한 접근 권한을 소유한 어플리케이션의 요청에 따라, 상기 호스트부에 의해 상기 접근 권한이 변경될 수 있다.In addition, the access right may be changed by the host unit according to a request of an application that has access right to the virtual device.

또한, 상기 접근 권한은, 상기 호스트부 및 상기 게스트부 중 적어도 하나의 요소에서 실행되는 서로 다른 복수의 어플리케이션에 대해 각각의 접근 권한이 다르게 설정될 수 있다.In addition, the access right may be set differently for a plurality of different applications executed in at least one element of the host unit and the guest unit.

본 발명의 다른 일측면은, 제1항 내지 제6항 중 어느 하나의 항에 따른 메모리 공유 방법을 수행하기 위한, 컴퓨터 프로그램이 기록된 컴퓨터로 판독 가능한 기록매체.Another aspect of the present invention is a computer-readable recording medium having a computer program recorded thereon for performing the memory sharing method according to any one of claims 1 to 6.

본 발명의 또 다른 일측면은, 하드웨어에 설치되는 호스트부; 상기 호스트부에 가상의 운영체제로 설치되는 게스트부; 및 상기 게스트부에 설치되는 어플리케이션으로부터 가상 디바이스에 대한 접근 요청을 수신하고, 상기 어플리케이션의 상기 가상 디바이스에 대한 접근 권한을 확인하여, 상기 가상 디바이스에 대한 어플리케이션의 접근이 허용된 경우, 상기 어플리케이션에 상기 가상 디바이스에 대한 접근 경로를 전달하는 커널부를 포함할 수 있다.Another aspect of the present invention is a host unit installed in hardware; A guest unit installed as a virtual operating system on the host unit; And receiving an access request for a virtual device from an application installed in the guest unit, checking access rights of the application to the virtual device, and when access to the virtual device is permitted, the application is It may include a kernel unit that transmits the access path to the virtual device.

또한, 상기 커널부는, 상기 어플리케이션으로부터 수신하는 접근 요청에 대한 가상 디바이스가 존재하지 않는 경우, 상기 호스트부에 상기 접근 요청에 따른 가상 디바이스의 생성을 요청할 수 있다.In addition, when the virtual device for the access request received from the application does not exist, the kernel unit may request the host unit to generate a virtual device according to the access request.

또한, 상기 게스트부는, 상기 게스트부에 사전에 저장되는 페이지 테이블 정보에 따라 상기 가상 디바이스에 대한 가상 주소 정보를 매개 주소 정보로 변환할 수 있다.In addition, the guest unit may convert virtual address information on the virtual device into each address information according to page table information previously stored in the guest unit.

또한, 상기 커널부는, 상기 커널부에 사전에 저장되는 주소 데이터 정보에 따라 상기 매개 주소 정보를 상기 호스트부가 설치되는 하드웨어에 대한 물리 주소 정보로 변환할 수 있다.In addition, the kernel unit may convert the respective address information into physical address information for hardware on which the host unit is installed according to address data information stored in advance in the kernel unit.

상술한 본 발명의 일측면에 따르면, 가상화 시스템에서 메모리를 공유하기 위한 메모리 공유 시스템, 방법 및 이를 수행하기 위한 프로그램을 기록한 기록매체를 제공함으로써, 공유 메모리를 구비하는 가상 디바이스를 생성하여 메모리를 공유할 수 있다.According to one aspect of the present invention described above, by providing a memory sharing system and a method for sharing memory in a virtualization system, and a recording medium in which a program for performing the same is recorded, a virtual device having a shared memory is created to share the memory. can do.

도1은 본 발명의 일 실시예에 따른 메모리 공유 시스템의 개략도이다.
도2는 도1의 호스트부를 나타내는 개략도이다.
도3은 도1의 게스트부를 나타내는 개략도이다.
도4는 도1의 커널부를 나타내는 개략도이다.
도5는 본 발명의 일 실시예에 따른 메모리 공유 방법을 나타내는 개략도이다.
도6는 본 발명의 일 실시예에 따른 메모리 공유 방법의 순서도이다.
1 is a schematic diagram of a memory sharing system according to an embodiment of the present invention.
Fig. 2 is a schematic diagram showing the host unit of Fig. 1;
Fig. 3 is a schematic diagram showing the guest portion of Fig. 1;
Fig. 4 is a schematic diagram showing the kernel unit of Fig. 1;
5 is a schematic diagram illustrating a memory sharing method according to an embodiment of the present invention.
6 is a flowchart of a memory sharing method according to an embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예와 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.DETAILED DESCRIPTION OF THE INVENTION The detailed description of the present invention described below refers to the accompanying drawings, which illustrate specific embodiments in which the present invention may be practiced. These embodiments are described in detail sufficient to enable a person skilled in the art to practice the present invention. It is to be understood that the various embodiments of the present invention are different from each other but need not be mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention in relation to one embodiment. In addition, it is to be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the present invention. Accordingly, the detailed description to be described below is not intended to be taken in a limiting sense, and the scope of the present invention, if properly described, is limited only by the appended claims, along with all scopes equivalent to those claimed by the claims. Like reference numerals in the drawings refer to the same or similar functions over several aspects.

이하, 도면들을 참조하여 본 발명의 바람직한 실시예들을 보다 상세하게 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the drawings.

도1은 본 발명의 일 실시예에 따른 메모리 공유 시스템의 개략도이다.1 is a schematic diagram of a memory sharing system according to an embodiment of the present invention.

메모리 공유 시스템(1)은 하드웨어(100), 호스트부(200), 게스트부(300), 커널부(400) 및 가상 디바이스(500)를 포함할 수 있다.The memory sharing system 1 may include a hardware 100, a host unit 200, a guest unit 300, a kernel unit 400, and a virtual device 500.

하드웨어(100)는 호스트부(200), 게스트부(300), 커널부(400) 및 가상 디바이스(500)에서 실행되는 명령에 따라 실제 데이터에 대한 처리, 제어, 저장 및 통신 중 적어도 하나의 명령을 수행할 수 있다.The hardware 100 includes at least one command of processing, control, storage, and communication for real data according to commands executed by the host unit 200, the guest unit 300, the kernel unit 400, and the virtual device 500. Can be done.

이를 위해, 하드웨어(100)는 처리 장치, 저장 장치, 통신 장치, 입력 장치, 출력 장치 및 전원 장치 중 적어도 하나의 장치를 포함할 수 있다.To this end, the hardware 100 may include at least one of a processing device, a storage device, a communication device, an input device, an output device, and a power device.

예를 들어, 하드웨어(100)는 개인 컴퓨터로써, 중앙 처리 장치(CPU: Central Processing Unit), 마더 보드(Motherboard), 램(RAM: Random Access Memory), 저장 드라이브(SSD: Solid State Drive 및 HDD: Hard Disk Drive), 그래픽 카드(Graphic Card), 파워 서플라이(Power Supply), 키보드, 마우스, 모니터 등을 포함하는 장치를 의미할 수 있다.For example, the hardware 100 is a personal computer, such as a central processing unit (CPU), a motherboard, a RAM (Random Access Memory), a storage drive (SSD: Solid State Drive and HDD: Hard Disk Drive), a graphic card, a power supply, a keyboard, a mouse, a monitor, and the like.

이에 따라, 하드웨어(100)는 데이터 및 명령 등의 정보를 입력 받을 수 있으며, 하드웨어(100)는 입력 받은 정보를 하드웨어(100) 내에 저장할 수 있다.Accordingly, the hardware 100 may receive information such as data and commands, and the hardware 100 may store the received information in the hardware 100.

또한, 하드웨어(100)는 외부로부터 입력되거나, 사전에 저장되는 명령에 따라 데이터에 대한 가공, 수정, 삭제, 등록 및 저장 등의 처리를 수행할 수 있다.Further, the hardware 100 may process, modify, delete, register, and store data according to a command input from the outside or stored in advance.

또한, 하드웨어(100)는 데이터의 처리 과정 및 처리 결과 등을 외부에 출력할 수 있으며, 하드웨어(100)는 이러한 데이터를 하드웨어(100) 내부의 각각의 요소 간에 전달하거나, 전달받을 수 있다.In addition, the hardware 100 may output data processing and processing results to the outside, and the hardware 100 may transmit or receive such data between respective elements of the hardware 100.

호스트부(200)는 하드웨어(100)에 직접 설치되는 운영체제로 이해할 수 있다. 이에 따라, 호스트부(200)는 사용자가 편리하게 데이터를 처리하고, 하드웨어(100)를 제어할 수 있도록 서로 다른 동작을 수행하는 복수의 소프트웨어를 포함할 수 있다.The host unit 200 may be understood as an operating system directly installed on the hardware 100. Accordingly, the host unit 200 may include a plurality of software that performs different operations so that the user can conveniently process data and control the hardware 100.

여기에서, 소프트웨어는 특정한 하드웨어(100)에 포함되어, 해당 하드웨어(100)가 임의의 동작을 수행하는데 요구되는 명령을 포함하는 펌 웨어(Firmware), 하드웨어(100)를 관리 및 제어하는데 요구되는 명령을 포함하는 시스템 소프트웨어(System Software) 및 소프트웨어의 목적에 따라 사전에 설정되는 작업을 수행하는 응용 소프트웨어(Application Software)를 더 포함할 수 있다.Here, the software is included in a specific hardware 100, and the hardware 100 includes a command required to perform an arbitrary operation, and a command required to manage and control the hardware 100 It may further include a system software (System Software) and application software (Application Software) for performing a task set in advance according to the purpose of the software.

예를 들어, 운영체제는 윈도우즈(Windows), 맥(macOS), 우분투(Ubuntu), 리눅스(Linux) 등을 포함할 수 있다.For example, the operating system may include Windows, macOS, Ubuntu, and Linux.

게스트부(300)는 호스트부(200)에 가상으로 설치되는 운영체제로 이해할 수 있다.The guest unit 300 may be understood as an operating system virtually installed on the host unit 200.

여기에서, 가상으로 설치되는 운영체제는 호스트부(200)를 통해 하드웨어(100)를 논리적인 단위로 분할하여, 호스트부(200)와는 독립적인 운영체제를 설치하는 것으로 이해할 수 있으며, 이때, 호스트부(200) 및 게스트부(300)에 설치되는 운영체제는 동일한 요소를 구비하는 하드웨어(100) 환경에서 구동되는 것일 수 있다.Here, the virtually installed operating system can be understood as dividing the hardware 100 into logical units through the host unit 200 to install an operating system independent from the host unit 200. In this case, the host unit ( 200) and the operating system installed in the guest unit 300 may be driven in an environment of the hardware 100 having the same elements.

이에 따라, 게스트부(300)는 호스트부(200)가 설치되는 하드웨어(100)의 일부분에 설치되는 것으로 이해할 수 있으며, 게스트부(300)는 호스트부(200)에 소프트웨어로 설치되는 것으로 이해할 수도 있다.Accordingly, the guest unit 300 may be understood as being installed on a part of the hardware 100 in which the host unit 200 is installed, and the guest unit 300 may be understood as being installed as software on the host unit 200 have.

한편, 게스트부(300)는 호스트부(200)에 가상으로 설치되는 운영체제로, 사용자가 편리하게 데이터를 처리하고, 하드웨어(100)를 제어할 수 있도록 서로 다른 동작을 수행하는 복수의 소프트웨어를 포함할 수 있다.Meanwhile, the guest unit 300 is an operating system virtually installed on the host unit 200 and includes a plurality of software that performs different operations so that the user can conveniently process data and control the hardware 100. can do.

또한, 운영체제에 포함되는 소프트웨어라는 표현은 어플리케이션으로 대체가 가능한 것으로 이해할 수 있다.In addition, it can be understood that the expression of software included in the operating system can be replaced by an application.

커널부(400)는 호스트부(200)에 가상으로 설치되는 게스트부(300)의 어플리케이션으로부터 발생하는 처리, 제어 등의 명령을 호스트부(200)에 전달할 수 있다.The kernel unit 400 may transmit commands such as processing and control generated from an application of the guest unit 300 that are virtually installed in the host unit 200 to the host unit 200.

이에 따라, 호스트부(200)는 게스트부(300)로부터 생성되고, 커널부(400)를 통해 전달되는 제어 명령에 따라 하드웨어(100)를 제어할 수 있다.Accordingly, the host unit 200 may control the hardware 100 according to a control command generated from the guest unit 300 and transmitted through the kernel unit 400.

예를 들어, 커널부(400)는 리눅스의 가상화 기술인 KVM(Kernel-based Virtual Machine)에 의한 하이퍼바이저로 이해할 수 있으며, 이와 관련하여, 하이퍼바이저는 가상화를 통해 설치된 운영체제로부터 발생하는 명령을 하드웨어(100)에 직접 설치된 운영체제에 전달할 수 있도록 구비되며, 이에 따라, 하드웨어(100)에 직접 설치된 운영체제는 하이퍼바이저를 통해 전달된 명령에 따라 하드웨어(100)를 제어하도록 구비되는 것으로 이해할 수 있다.For example, the kernel unit 400 can be understood as a hypervisor based on a Kernel-based Virtual Machine (KVM), which is a virtualization technology of Linux, and in this regard, the hypervisor transmits commands generated from an operating system installed through virtualization to hardware ( 100) is provided so as to be delivered to an operating system directly installed on the hardware 100, and accordingly, it can be understood that the operating system directly installed on the hardware 100 is provided to control the hardware 100 according to a command transmitted through the hypervisor.

한편, 본 발명의 일 실시예를 설명하는데 사용되는 단어의 혼재를 방지하기 위해, 호스트부(200) 및 게스트부(300)의 운영체제로부터 생성되는 명령을 하드웨어에 전달하는 커널(Kernal)은 생략하는 것으로 이해할 수 있으나, 본 발명을 실시함에 있어서, 호스트부(200) 및 게스트부(300)의 운영체제로부터 생성되는 명령은 각각의 운영체제의 커널을 통해 하드웨어(100)의 제어를 수행하거나, 하이퍼바이저에 전달될 수도 있음은 물론이다.On the other hand, in order to prevent a mixture of words used to describe an embodiment of the present invention, a kernel that transmits commands generated from the operating systems of the host unit 200 and the guest unit 300 to the hardware is omitted. Although it can be understood that, in the implementation of the present invention, the command generated from the operating system of the host unit 200 and the guest unit 300 performs control of the hardware 100 through the kernel of each operating system, or Of course it can be delivered.

이와 관련하여, 하이퍼바이저는 하드웨어(100)에 직접 설치된 운영체제의 커널과 통합되어 동작할 수도 있다. 이러한 경우, 커널부(400)는 호스트부(200)의 커널로써, 게스트부(300)로부터 전달받는 명령에 따라 하드웨어(100)를 제어할 수 있다.In this regard, the hypervisor may operate by being integrated with the kernel of the operating system directly installed on the hardware 100. In this case, the kernel unit 400 is a kernel of the host unit 200 and may control the hardware 100 according to a command received from the guest unit 300.

커널부(400)는 가상 디바이스(500)의 생성을 호스트부(200)에 요청할 수 있다. 이때, 호스트부(200)는 커널부(400)의 요청에 따라 가상 디바이스(500)를 생성할 수 있으며, 호스트부(200)는 하드웨어(100)에 의해 생성되는 메모리 공간의 일부분을 가상 디바이스(500)에 할당할 수 있다.The kernel unit 400 may request the host unit 200 to generate the virtual device 500. At this time, the host unit 200 may generate the virtual device 500 according to the request of the kernel unit 400, and the host unit 200 may use a portion of the memory space generated by the hardware 100 to be a virtual device ( 500).

가상 디바이스(500)는 하드웨어(100)의 저장 장치로부터 생성되는 메모리 공간의 일부분을 나타내는 공유 메모리를 포함할 수 있다.The virtual device 500 may include a shared memory representing a portion of a memory space generated from a storage device of the hardware 100.

이에 따라, 게스트부(300)는 커널부(400)를 통해 가상 디바이스(500)에 접근할 수 있으며, 게스트부(300)는 가상 디바이스(500) 내의 공유 메모리에 접근할 수 있다.Accordingly, the guest unit 300 may access the virtual device 500 through the kernel unit 400, and the guest unit 300 may access the shared memory in the virtual device 500.

게스트부(300)가 가상 디바이스(500)에 접근하는 방법에 대한 자세한 설명은 이하에서 보다 상세히 설명하도록 한다.A detailed description of how the guest unit 300 accesses the virtual device 500 will be described in more detail below.

도2는 도1의 호스트부를 나타내는 개략도이다.Fig. 2 is a schematic diagram showing the host unit of Fig. 1;

호스트부(200)는 하드웨어(100)에 설치되는 운영체제로 이해할 수 있으며, 이에 따라, 호스트부(200)는 어플리케이션(310)이 설치되어 어플리케이션(310)의 목적에 따른 명령을 수행할 수 있다.The host unit 200 may be understood as an operating system installed on the hardware 100, and accordingly, the host unit 200 may execute a command according to the purpose of the application 310 by installing the application 310.

이때, 호스트부(200)는 하드웨어(100)의 메모리에 저장되는 데이터에 대한 접근 경로를 물리 주소 정보(220)로 나타낼 수 있다.In this case, the host unit 200 may represent an access path for data stored in the memory of the hardware 100 as physical address information 220.

이에 따라, 호스트부(200)에서 실행되는 어플리케이션(310)은 물리 주소 정보(220)에 따라 하드웨어(100)에 저장된 데이터에 대한 제어를 수행할 수 있다.Accordingly, the application 310 executed by the host unit 200 may control data stored in the hardware 100 according to the physical address information 220.

한편, 호스트부(200)는 관리 모듈(210)을 포함할 수 있다.Meanwhile, the host unit 200 may include a management module 210.

관리 모듈(210)은 커널부(400)의 가상 디바이스 생성 요청에 따라 가상 디바이스(500)를 생성할 수 있으며, 이때, 가상 디바이스(500)는 호스트부(200)에서 생성되는 것으로 이해할 수 있다.The management module 210 may generate the virtual device 500 according to a request for creating a virtual device from the kernel unit 400, and in this case, it may be understood that the virtual device 500 is generated by the host unit 200.

이때, 관리 모듈(210)은 게스트부(300)의 가상 디바이스(500)에 대한 접근 권한을 관리할 수 있다. 이와 관련하여, 관리 모듈(210)은 게스트부(300)의 가상 디바이스(500)에 대한 접근을 허용 또는 차단할 수 있으며, 이때, 관리 모듈(210)은 가상 디바이스(500)의 공유 메모리에 저장되는 데이터 중 일부 데이터에 대한 접근 권한을 각각 설정할 수 있다.In this case, the management module 210 may manage access rights of the guest unit 300 to the virtual device 500. In this regard, the management module 210 may allow or block access to the virtual device 500 of the guest unit 300, and at this time, the management module 210 is stored in the shared memory of the virtual device 500. You can set access rights for some of the data individually.

이때, 관리 모듈(210)은 커널부(400)로부터 게스트부(300)의 가상 디바이스(500)에 대한 접근 권한 요청을 수신할 수 있으며, 이에 따라, 관리 모듈(210)은 게스트부(300)의 가상 디바이스(500)에 대한 접근 권한을 부여할 수 있다.At this time, the management module 210 may receive a request for access rights to the virtual device 500 of the guest unit 300 from the kernel unit 400, and accordingly, the management module 210 is the guest unit 300 It is possible to grant access rights to the virtual device 500 of.

여기에서, 접근 권한은 가상 디바이스(500)에 대한 접근이 가능한 자격을 나타내며, 이와 관련하여, 관리 모듈(210)이 접근 권한을 부여하는 것은 가상 디바이스(500)에 접근이 가능하도록 자격을 부여하는 것을 의미할 수 있다.Here, the access right represents a qualification that can access the virtual device 500, and in this regard, granting the access right by the management module 210 grants the qualification to allow access to the virtual device 500. Can mean that.

이에 따라, 접근 권한이 존재하지 않는 것은 가상 디바이스(500)에 접근할 수 있는 자격이 부족한 것을 나타내며, 이는 가상 디바이스(500)에 접근할 수 없는 것을 의미할 수 있다. 이러한 경우, 게스트부(300)는 커널부(400)를 통해 관리 모듈(210)에 접근 권한을 요청하고, 관리 모듈(210)로부터 접근 권한을 부여받아 가상 디바이스(500)에 접근할 수 있는 자격을 얻을 수 있다.Accordingly, the absence of the access right indicates a lack of qualification to access the virtual device 500, which may mean that the virtual device 500 cannot be accessed. In this case, the guest unit 300 requests access rights to the management module 210 through the kernel unit 400, and is granted access rights from the management module 210 to access the virtual device 500 Can be obtained.

또한, 관리 모듈(210)은 호스트부(200)에 설치되는 어플리케이션의 가상 디바이스(500)에 대한 접근 권한을 관리할 수 있다. 이와 관련하여, 관리 모듈(210)은 어플리케이션의 가상 디바이스(500)에 대한 접근을 허용 또는 차단할 수 있으며, 이때, 관리 모듈(210)은 가상 디바이스(500)의 공유 메모리에 저장되는 데이터 중 일부 데이터에 대한 접근 권한을 각각 설정할 수 있다.In addition, the management module 210 may manage access rights to the virtual device 500 of an application installed in the host unit 200. In this regard, the management module 210 may allow or block the application's access to the virtual device 500, and at this time, the management module 210 may include some of the data stored in the shared memory of the virtual device 500. You can set access rights for each.

또한, 관리 모듈(210)은 호스트부(200)에 설치되는 복수의 어플리케이션 중 임의의 어플리케이션의 가상 디바이스(500)의 대한 접근 권한을 각각 다르게 설정할 수 있다.In addition, the management module 210 may set different access rights to the virtual device 500 of an arbitrary application among a plurality of applications installed in the host unit 200.

예를 들어, 관리 모듈(210)은 호스트부(200)에 설치된 제1 어플리케이션은 가상 디바이스(500)에 접근할 수 있도록 설정할 수 있으며, 동시에, 호스트부(200)에 설치된 제2 어플리케이션은 가상 디바이스(500)에 접근하지 못하도록 설정할 수도 있다.For example, the management module 210 may set the first application installed on the host unit 200 to access the virtual device 500, and at the same time, the second application installed on the host unit 200 is a virtual device. It can also be set to prevent access to (500).

도3은 도1의 게스트부를 나타내는 개략도이다.Fig. 3 is a schematic diagram showing the guest portion of Fig. 1;

게스트부(300)는 호스트부(200)에 가상으로 설치되는 운영체제로 이해할 수 있으며, 이에 따라, 게스트부(300)는 어플리케이션(310)이 설치되어 어플리케이션(310)의 목적에 따른 명령을 수행할 수 있다.The guest unit 300 can be understood as an operating system that is virtually installed on the host unit 200, and accordingly, the guest unit 300 is installed with the application 310 to execute a command according to the purpose of the application 310. I can.

이때, 게스트부(300)는 호스트부(200)를 통해 하드웨어(100)의 메모리에 저장되는 데이터에 대한 접근 경로를 가상 주소 정보(330)로 나타낼 수 있다.In this case, the guest unit 300 may indicate an access path to data stored in the memory of the hardware 100 through the host unit 200 as virtual address information 330.

이에 따라, 게스트부(300)에서 실행되는 어플리케이션(310)은 가상 주소 정보(330)에 따라 하드웨어(100)에 저장된 데이터에 대한 제어를 수행할 수 있으며, 이때, 게스트부(300)의 하드웨어(100)에 대한 제어 명령은 커널부(400)에 전달되어, 호스트부(200)에 의해 수행될 수 있다.Accordingly, the application 310 executed in the guest unit 300 may control data stored in the hardware 100 according to the virtual address information 330, and at this time, the hardware ( The control command for 100) is transmitted to the kernel unit 400 and may be executed by the host unit 200.

한편, 게스트부(300)는 페이지 테이블 정보(320)를 포함할 수 있다. 페이지 테이블 정보(320)는 게스트부(300)에서 이용되는 가상 주소 정보(330)와 커널부(400)에서 이용되는 매개 주소 정보를 포함할 수 있다.Meanwhile, the guest unit 300 may include page table information 320. The page table information 320 may include virtual address information 330 used in the guest unit 300 and intermediate address information used in the kernel unit 400.

이와 관련하여, 페이지 테이블 정보(320)는 특정한 가상 주소 정보(330)에 매칭되는 매개 주소 정보를 나열한 데이터 테이블로 이해할 수 있으며, 이에 따라, 페이지 테이블 정보(320)는 임의의 가상 주소 정보(330)를 매개 주소 정보로 변환할 수 있다.In this regard, the page table information 320 may be understood as a data table listing each address information matched with the specific virtual address information 330, and accordingly, the page table information 320 is provided with arbitrary virtual address information 330. ) Can be converted into individual address information.

한편, 게스트부(300)의 어플리케이션(310)은 가상 디바이스(500)에 접근하기 위한 접근 요청을 커널부(400)에 전달할 수 있다.Meanwhile, the application 310 of the guest unit 300 may transmit an access request for accessing the virtual device 500 to the kernel unit 400.

이에 따라, 커널부(400)는 게스트부(300)로부터 전달받은 접근 요청을 호스트부(200)에 전달할 수 있으며, 호스트부(200)는 게스트부(300)에 설치되는 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한을 관리할 수 있다.Accordingly, the kernel unit 400 can transmit the access request received from the guest unit 300 to the host unit 200, and the host unit 200 is a virtual device of the application 310 installed in the guest unit 300. It is possible to manage access rights to the device 500.

이와 관련하여, 호스트부(200)는 게스트부(300)에 설치되는 어플리케이션(310)의 가상 디바이스(500)에 대한 접근을 허용 또는 차단할 수 있으며, 이때, 호스트부(200)는 가상 디바이스(500)의 공유 메모리에 저장되는 데이터 중 일부 데이터에 대한 접근 권한을 각각 설정할 수 있다.In this regard, the host unit 200 may allow or block access to the virtual device 500 of the application 310 installed in the guest unit 300, and at this time, the host unit 200 ), you can set access rights to some of the data stored in the shared memory.

또한, 호스트부(200)는 게스트부(300)에 설치되는 복수의 어플리케이션(310) 중 임의의 어플리케이션(310)의 가상 디바이스(500)의 대한 접근 권한을 각각 다르게 설정할 수 있다.In addition, the host unit 200 may set different access rights for the virtual device 500 of an arbitrary application 310 among a plurality of applications 310 installed in the guest unit 300.

예를 들어, 호스트부(200)는 게스트부(300)에 설치된 제1 어플리케이션은 가상 디바이스(500)에 접근할 수 있도록 설정할 수 있으며, 동시에, 게스트부(300)에 설치된 제2 어플리케이션은 가상 디바이스(500)에 접근하지 못하도록 설정할 수도 있다.For example, the host unit 200 may set the first application installed in the guest unit 300 to access the virtual device 500, and at the same time, the second application installed in the guest unit 300 is a virtual device It can also be set to prevent access to (500).

도4는 도1의 커널부를 나타내는 개략도이다.Fig. 4 is a schematic diagram showing the kernel unit of Fig. 1;

커널부(400)는 제어 모듈(410) 및 주소 데이터 정보(420)를 포함할 수 있다.The kernel unit 400 may include a control module 410 and address data information 420.

제어 모듈(410)은 게스트부(300)의 어플리케이션(310)으로부터 가상 디바이스(500)에 대한 접근 요청을 수신할 수 있다.The control module 410 may receive an access request for the virtual device 500 from the application 310 of the guest unit 300.

이때, 제어 모듈(410)은 어플리케이션(310)으로부터 수신하는 접근 요청에 대한 가상 디바이스(500)가 존재하지 않는 경우에, 호스트부(200)에 접근 요청에 대한 가상 디바이스(500)의 생성을 요청할 수 있다.In this case, when the virtual device 500 for the access request received from the application 310 does not exist, the control module 410 requests the host unit 200 to generate the virtual device 500 for the access request. I can.

또한, 제어 모듈(410)은 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 요청할 수 있다. 이때, 제어 모듈(410)은 접근 권한 요청을 어플리케이션(310)으로부터 전달받아 호스트부(200)에 전달할 수 있다.In addition, the control module 410 may request access rights of the application 310 to the virtual device 500. In this case, the control module 410 may receive an access permission request from the application 310 and transmit it to the host unit 200.

이와 관련하여, 제어 모듈(410)은 가상 디바이스(500)의 생성을 호스트부(200)에 요청한 경우에, 어플리케이션의 접근 권한을 호스트부(200)에 즉시 요청할 수도 있다.In this regard, when the control module 410 requests the host unit 200 to generate the virtual device 500, the control module 410 may immediately request the host unit 200 for access rights of the application.

제어 모듈(410)은 게스트부(300)에 설치되는 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한을 확인할 수 있다.The control module 410 may check the access authority for the virtual device 500 of the application 310 installed in the guest unit 300.

이를 위해, 제어 모듈(410)은 호스트부(200)에서 설정되는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 호스트부(200)에서 열람할 수 있다.To this end, the control module 410 may view the access rights of the application 310 to the virtual device 500 set by the host unit 200 from the host unit 200.

제어 모듈(410)은 어플리케이션(310)의 가상 디바이스(500)에 대한 접근이 허가되어 있는 경우에, 어플리케이션(310)으로부터 가상 디바이스(500)에 저장된 데이터에 대한 매개 주소 정보(430)를 요청할 수 있다.The control module 410 may request intermediate address information 430 for data stored in the virtual device 500 from the application 310 when access to the virtual device 500 of the application 310 is permitted. have.

제어 모듈(410)은 어플리케이션(310)으로부터 매개 주소 정보(430)를 전달받고, 커널부(400)에 포함되는 주소 데이터 정보(420)에 따라 매개 주소 정보(430)를 물리 주소 정보로 변환할 수 있다.The control module 410 receives each address information 430 from the application 310, and converts the address information 430 into physical address information according to the address data information 420 included in the kernel unit 400. I can.

이때, 주소 데이터 정보(420)는 특정한 매개 주소 정보(430)에 매칭되는 물리 주소 정보를 나열한 데이터 테이블로 이해할 수 있으며, 이에 따라, 주소 데이터 정보(420)는 임의의 매개 주소 정보(430)를 물리 주소 정보로 변환할 수 있다.At this time, the address data information 420 may be understood as a data table listing physical address information matching specific individual address information 430, and accordingly, the address data information 420 includes arbitrary intermediate address information 430. It can be converted into physical address information.

제어 모듈(410)은 변환된 물리 주소 정보를 호스트부(200)에 전달할 수 있다.The control module 410 may transmit the converted physical address information to the host unit 200.

제어 모듈(410)은 게스트부(300)에 설치된 어플리케이션(310)이 가상 디바이스(500)에 대한 접근 권한을 소유한 경우에, 어플리케이션(310)에 가상 디바이스(500)에 대한 접근 경로를 전달할 수 있다.When the application 310 installed in the guest unit 300 owns access rights to the virtual device 500, the control module 410 may transmit an access path to the virtual device 500 to the application 310. have.

다시 말해서, 제어 모듈(410)은 호스트부(200)의 명령에 따라 가상 디바이스(500)의 데이터에 변화가 발생하는 경우에, 호스트부(200)로부터 변화된 데이터에 대한 물리 주소 정보(220)를 전달받을 수 있으며, 제어 모듈(410)은 물리 주소 정보(220)를 주소 데이터 정보(420)에 따라 매개 주소 정보(430)로 변환하여, 게스트부(300)에 전달할 수 있다.In other words, when a change occurs in the data of the virtual device 500 according to the command of the host unit 200, the control module 410 receives the physical address information 220 for the changed data from the host unit 200. The transmission may be received, and the control module 410 may convert the physical address information 220 into each address information 430 according to the address data information 420 and transmit it to the guest unit 300.

이에 따라, 게스트부(300)는 제어 모듈(410)로부터 전달받은 매개 주소 정보(430)를 페이지 테이블 정보(320)에 따라 가상 주소 정보(330)로 변환할 수 있다.Accordingly, the guest unit 300 may convert the intermediate address information 430 received from the control module 410 into the virtual address information 330 according to the page table information 320.

한편, 커널부(400)는 호스트부(200)에서 하드웨어(100)를 제어하는 커널과 통합되어 운영될 수 있으며, 이러한 경우, 커널부(400)는 게스트부(300)로부터 전달받은 제어 명령에 따라 하드웨어(100)를 제어할 수 있다.Meanwhile, the kernel unit 400 may be operated by being integrated with the kernel that controls the hardware 100 by the host unit 200. In this case, the kernel unit 400 responds to the control command received from the guest unit 300. Accordingly, the hardware 100 can be controlled.

도5는 본 발명의 일 실시예에 따른 메모리 공유 방법을 나타내는 개략도이다.5 is a schematic diagram illustrating a memory sharing method according to an embodiment of the present invention.

도5를 참조하면, 게스트부(300)는 가상 디바이스(500)의 공유 메모리에 대한 주소를 가상 주소 정보(330)의 형태로 소유하는 것으로 이해할 수 있다.Referring to FIG. 5, it can be understood that the guest unit 300 owns the address of the shared memory of the virtual device 500 in the form of virtual address information 330.

이에 따라, 게스트부(300)는 가상 주소 정보(330)를 페이지 테이블 정보(320)에 저장된 정보와 비교하여 매개 주소 정보(430)로 변환할 수 있다.Accordingly, the guest unit 300 may compare the virtual address information 330 with information stored in the page table information 320 to convert the virtual address information 430 into each address information 430.

한편, 게스트부(300)의 어플리케이션(310)은 커널부(400)에 가상 디바이스(500)에 대한 접근을 요청할 수 있다.Meanwhile, the application 310 of the guest unit 300 may request the kernel unit 400 to access the virtual device 500.

이에 따라, 커널부(400)는 호스트부(200)에서 설정되는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 확인할 수 있다.Accordingly, the kernel unit 400 may check the access right of the application 310 to the virtual device 500 set by the host unit 200.

이때, 커널부(400)는 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한이 허가되지 않은 경우에, 호스트부(200)에 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한을 요청할 수 있으며, 호스트부(200)는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 변경할 수 있다.At this time, when the access right of the application 310 to the virtual device 500 is not permitted, the kernel unit 400 provides the host unit 200 with the access right to the virtual device 500 of the application 310. Request may be made, and the host unit 200 may change the access authority of the application 310 to the virtual device 500.

한편, 커널부(400)는 게스트부(300)의 어플리케이션(310)의 접근 요청에 따른 가상 디바이스(500)가 존재하지 않는 것으로 확인되는 경우에, 호스트부(200)에 가상 디바이스(500)의 생성을 요청할 수 있다.On the other hand, when it is determined that the virtual device 500 does not exist according to an access request from the application 310 of the guest unit 300, the kernel unit 400 sends the virtual device 500 to the host unit 200. You can request creation.

이에 따라, 호스트부(200)는 하드웨어의 메모리 중 일부를 공유 메모리로써 포함하는 가상 디바이스(500)를 생성할 수 있다.Accordingly, the host unit 200 may create a virtual device 500 including some of the hardware memories as shared memory.

한편, 게스트부(300)의 어플리케이션(310)은 가상 디바이스(500)에 대한 접근 권한을 소유한 경우에, 페이지 테이블 정보(320)를 이용하여 변환된 매개 주소 정보(430)를 커널부(400)에 전달할 수 있다.On the other hand, when the application 310 of the guest unit 300 has access rights to the virtual device 500, the converted intermediate address information 430 using the page table information 320 is transferred to the kernel unit 400 ).

이에 따라, 커널부(400)는 매개 주소 정보(430)를 주소 데이터 정보(420)에 저장된 정보와 비교하여 물리 주소 정보(220)로 변환할 수 있다.Accordingly, the kernel unit 400 may compare the respective address information 430 with information stored in the address data information 420 and convert it into physical address information 220.

커널부(400)는 주소 데이터 정보(420)를 이용하여 변환된 물리 주소 정보(220)를 호스트부(200)에 전달할 수 있으며, 호스트부(200)는 물리 주소 정보(220)를 전달받고, 물리 주소 정보(220)에 따라 하드웨어(100)의 메모리에 저장된 데이터에 접근할 수 있다.The kernel unit 400 may transfer the converted physical address information 220 using the address data information 420 to the host unit 200, and the host unit 200 receives the physical address information 220, Data stored in the memory of the hardware 100 may be accessed according to the physical address information 220.

이때, 물리 주소 정보(220)에 따라 접근 가능한 하드웨어(100)의 메모리는 가상 디바이스(500)에 포함되는 공유 메모리로 지정된 메모리일 수 있다.In this case, the memory of the hardware 100 accessible according to the physical address information 220 may be a memory designated as a shared memory included in the virtual device 500.

이에 대해, 게스트부(300)는 가상 주소 정보(330)의 형태로 저장되는 가상 디바이스(500)의 공유 메모리에 커널부(400) 및 호스트부(200)를 거쳐 물리 주소 정보(220)의 형태로 하드웨어(100)의 메모리에 지정된 가상 디바이스(500)의 공유 메모리 부분에 접근하는 것으로 이해할 수 있다.In contrast, the guest unit 300 is in the form of physical address information 220 through the kernel unit 400 and the host unit 200 in the shared memory of the virtual device 500 stored in the form of virtual address information 330. It can be understood as accessing the shared memory portion of the virtual device 500 designated in the memory of the hardware 100.

도6는 본 발명의 일 실시예에 따른 메모리 공유 방법의 순서도이다.6 is a flowchart of a memory sharing method according to an embodiment of the present invention.

메모리 공유 방법은 접근 요청을 수신하는 단계(600), 접근 권한을 확인하는 단계(610), 매개 주소 정보로 변환하는 단계(620), 물리 주소 정보로 변환하는 단계(630) 및 메모리에 접근하는 단계(640)를 포함할 수 있다.The memory sharing method includes steps of receiving an access request (600), checking access rights (610), converting to individual address information (620), converting to physical address information (630), and accessing the memory. Step 640 may be included.

한편, 본 발명의 일 실시예에 따른 메모리 공유 방법은 도 1에 도시된 메모리 공유 시스템(1)과 실질적으로 동일한 구성 상에서 진행되므로, 도 1의 메모리 공유 시스템(1)과 동일한 구성요소에 대해 동일한 도면 부호를 부여하고, 반복되는 설명은 생략하기로 한다.Meanwhile, since the memory sharing method according to an embodiment of the present invention proceeds on substantially the same configuration as the memory sharing system 1 shown in FIG. 1, the same components as the memory sharing system 1 of FIG. Reference numerals are given, and repeated descriptions will be omitted.

접근 요청을 수신하는 단계(600)는 게스트부(300)의 어플리케이션(310)으로부터 가상 디바이스(500)에 대한 접근 요청을 수신할 수 있다.In the step 600 of receiving the access request, an access request for the virtual device 500 may be received from the application 310 of the guest unit 300.

이때, 접근 요청을 수신하는 단계(600)는 어플리케이션(310)으로부터 수신하는 접근 요청에 대한 가상 디바이스(500)가 존재하지 않는 경우에, 호스트부(200)에 접근 요청에 대한 가상 디바이스(500)의 생성을 요청할 수 있다.At this time, in the step 600 of receiving the access request, when the virtual device 500 for the access request received from the application 310 does not exist, the virtual device 500 for the access request to the host unit 200 You can request the creation of

이에 따라, 호스트부(200)는 접근 요청을 수신하는 단계(600)의 가상 디바이스(500) 생성 요청에 따라 하드웨어(100)의 메모리로부터 사전에 설정되는 크기의 메모리 용량이 할당되는 공유 메모리를 포함하는 가상 디바이스(500)를 생성할 수 있다.Accordingly, the host unit 200 includes a shared memory to which a memory capacity of a preset size is allocated from the memory of the hardware 100 according to the request to create the virtual device 500 in the step 600 of receiving the access request. It is possible to create a virtual device (500).

또한, 접근 요청을 수신하는 단계(600)는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 요청할 수 있다. 이때, 접근 요청을 수신하는 단계(600)는 접근 권한 요청을 어플리케이션(310)으로부터 전달받아 호스트부(200)에 전달할 수 있다.In addition, the step 600 of receiving the access request may request access rights of the application 310 to the virtual device 500. In this case, in the step 600 of receiving the access request, the request for access permission may be transmitted from the application 310 and transmitted to the host unit 200.

이와 관련하여, 접근 요청을 수신하는 단계(600)는 가상 디바이스(500)의 생성을 호스트부(200)에 요청한 경우에, 어플리케이션의 접근 권한을 호스트부(200)에 즉시 요청할 수도 있다.In this regard, in the step 600 of receiving the access request, when the host unit 200 requests the creation of the virtual device 500, the access right of the application may be immediately requested from the host unit 200.

이에 따라, 호스트부(200)는 접근 요청을 수신하는 단계(600)의 접근 권한 요청에 따라 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 부여할 수 있다.Accordingly, the host unit 200 may grant the access authority of the application 310 to the virtual device 500 according to the access authority request in operation 600 of receiving the access request.

접근 권한을 확인하는 단계(610)는 게스트부(300)에 설치되는 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한을 확인할 수 있다.In the step 610 of checking the access authority, the access authority to the virtual device 500 of the application 310 installed in the guest unit 300 may be checked.

접근 권한을 확인하는 단계(610)는 호스트부(200)에서 설정되는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 확인할 수 있다.In the step 610 of checking the access right, the access right of the application 310 to the virtual device 500 set by the host unit 200 may be checked.

이때, 접근 권한을 확인하는 단계(610)는 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한이 허가되지 않은 경우에, 호스트부(200)에 어플리케이션(310)의 가상 디바이스(500)에 대한 접근 권한을 요청할 수 있으며, 이에 따라, 호스트부(200)는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근 권한을 변경할 수 있다.In this case, in the step 610 of checking the access right, if the access right to the virtual device 500 of the application 310 is not permitted, the host unit 200 is sent to the virtual device 500 of the application 310. Access rights to the virtual device 500 may be requested, and accordingly, the host unit 200 may change the access rights of the application 310 to the virtual device 500.

매개 주소 정보로 변환하는 단계(620)는 가상 디바이스(500)에 대한 어플리케이션(310)의 접근이 허용된 경우에, 게스트부(300)에 저장된 페이지 테이블 정보(320)에 따라 게스트부(300)에 저장되는 가상 주소 정보(330)를 매개 주소 정보(430)로 변환할 수 있다.In the step 620 of converting to each address information, when the access of the application 310 to the virtual device 500 is allowed, the guest unit 300 according to the page table information 320 stored in the guest unit 300 The virtual address information 330 stored in the device may be converted into each address information 430.

물리 주소 정보로 변환하는 단계(630)는 매개 주소 정보(430)를 호스트부(200)에서 이용되는 물리 주소 정보(220)로 변환할 수 있다.In the step 630 of converting to physical address information, each address information 430 may be converted into physical address information 220 used in the host unit 200.

이를 위해, 물리 주소 정보로 변환하는 단계(630)는 어플리케이션(310)으로부터 매개 주소 정보(430)를 전달받고, 커널부(400)에 포함되는 주소 데이터 정보(420)에 따라 매개 주소 정보(430)를 물리 주소 정보(220)로 변환할 수 있다.To this end, in the step 630 of converting to physical address information, each address information 430 is received from the application 310, and according to the address data information 420 included in the kernel unit 400, each address information 430 ) Can be converted into physical address information 220.

메모리에 접근하는 단계(640)는 어플리케이션(310)이 물리 주소 정보(220)에 따른 하드웨어(100)의 메모리에 접근하는 단계일 수 있다.The step 640 of accessing the memory may be a step of the application 310 accessing the memory of the hardware 100 according to the physical address information 220.

이와 같은, 메모리 공유 방법은 어플리케이션으로 구현되거나 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다.Such a memory sharing method may be implemented as an application or in the form of program instructions that can be executed through various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.

상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거니와 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다.The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention, and may be known and usable to those skilled in the computer software field.

컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD 와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다.Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magnetic-optical media such as floptical disks. media), and a hardware device specially configured to store and execute program instructions such as ROM, RAM, flash memory, and the like.

프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of the program instructions include not only machine language codes such as those produced by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.

이상에서는 실시예들을 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to embodiments, those skilled in the art will understand that various modifications and changes can be made to the present invention without departing from the spirit and scope of the present invention described in the following claims. I will be able to.

1: 메모리 공유 시스템
100: 하드웨어
200: 호스트부
300: 게스트부
400: 커널부
500: 가상 드라이브
1: memory sharing system
100: hardware
200: host unit
300: guest part
400: kernel part
500: virtual drive

Claims (11)

호스트부, 상기 호스트부에 가상의 운영체제로 설치되는 게스트부 및 커널부를 포함하는 메모리 공유 시스템을 이용하는 메모리 공유 방법에 있어서,
게스트부에 설치되는 어플리케이션으로부터 가상 디바이스에 대한 접근 요청을 수신하는 단계;
상기 어플리케이션의 상기 가상 디바이스에 대한 접근 권한을 확인하는 단계;
상기 가상 디바이스에 대한 상기 어플리케이션의 접근이 허용된 경우, 상기 게스트부에 사전에 저장되는 페이지 테이블 정보에 따라 상기 가상 디바이스에 대한 가상 주소 정보를 매개 주소 정보로 변환하는 단계;
상기 매개 주소 정보를 호스트부에서 이용되는 물리 주소 정보로 변환하는 단계; 및
상기 어플리케이션이 상기 물리 주소 정보에 따른 메모리에 접근하는 단계를 포함하고,
상기 매개 주소 정보를 호스트부에서 이용되는 물리 주소 정보로 변환하는 단계는,
상기 커널부에 사전에 저장되는 주소 데이터 정보에 따라 매개 주소 정보를 상기 호스트부가 설치되는 하드웨어에 대한 물리 주소 정보로 변환하는 단계이며,
상기 페이지 테이블 정보는 임의의 가상 주소 정보에 매칭되는 매개 주소 정보를 나열한 데이터 테이블이고,
상기 주소 데이터 정보는 임의의 매개 주소 정보에 매칭되는 물리 주소 정보를 나열한 데이터 테이블인, 메모리 공유 방법.
In a memory sharing method using a memory sharing system including a host unit, a guest unit installed as a virtual operating system on the host unit, and a kernel unit,
Receiving an access request for a virtual device from an application installed in the guest unit;
Checking access rights of the application to the virtual device;
Converting virtual address information for the virtual device into individual address information according to page table information stored in advance in the guest unit when access of the application to the virtual device is permitted;
Converting the respective address information into physical address information used in a host unit; And
Including the step of the application accessing the memory according to the physical address information,
The step of converting the respective address information into physical address information used in the host unit,
Converting each address information into physical address information for hardware on which the host unit is installed according to the address data information stored in advance in the kernel unit,
The page table information is a data table listing each address information matching arbitrary virtual address information,
The address data information is a data table listing physical address information matching arbitrary individual address information.
제1항에 있어서, 상기 가상 디바이스는,
상기 호스트부 및 상기 게스트부 중 적어도 하나의 요소에서 실행되는 어플리케이션의 접근이 가능한 공유 메모리를 포함하는, 메모리 공유 방법.
The method of claim 1, wherein the virtual device,
A memory sharing method comprising a shared memory capable of accessing an application executed in at least one element of the host unit and the guest unit.
제2항에 있어서, 상기 공유 메모리는,
상기 호스트부가 실행되는 하드웨어의 메모리로부터 사전에 설정되는 크기의 메모리 용량이 할당되는, 메모리 공유 방법.
The method of claim 2, wherein the shared memory,
A memory sharing method in which a memory capacity of a predetermined size is allocated from a memory of hardware in which the host unit is executed.
제1항에 있어서,
상기 어플리케이션으로부터 수신하는 접근 요청에 대한 가상 디바이스가 존재하지 않는 경우,
상기 접근 요청에 따른 가상 디바이스를 생성하는 단계 및;
상기 가상 디바이스에 대한 상기 어플리케이션의 접근 권한을 부여하는 단계를 더 포함하는, 메모리 공유 방법.
The method of claim 1,
When there is no virtual device for an access request received from the application,
Creating a virtual device according to the access request;
Further comprising the step of granting access rights of the application to the virtual device, the memory sharing method.
제1항에 있어서, 상기 접근 권한은,
상기 가상 디바이스에 대한 접근 권한을 소유한 어플리케이션의 요청에 따라, 상기 호스트부에 의해 상기 접근 권한이 변경되는, 메모리 공유 방법.
The method of claim 1, wherein the access right,
The method of sharing a memory, wherein the access right is changed by the host unit according to a request of an application having access right to the virtual device.
제1항에 있어서, 상기 접근 권한은,
상기 호스트부 및 상기 게스트부 중 적어도 하나의 요소에서 실행되는 서로 다른 복수의 어플리케이션에 대해 각각의 접근 권한이 다르게 설정되는, 메모리 공유 방법.
The method of claim 1, wherein the access right,
The memory sharing method, wherein access rights are set differently for a plurality of different applications executed in at least one element of the host unit and the guest unit.
제1항 내지 제6항 중 어느 하나의 항에 따른 메모리 공유 방법을 수행하기 위한, 컴퓨터 프로그램이 기록된 컴퓨터로 판독 가능한 기록매체.
A computer-readable recording medium having a computer program recorded thereon for performing the memory sharing method according to any one of claims 1 to 6.
하드웨어에 설치되는 호스트부;
상기 호스트부에 가상의 운영체제로 설치되는 게스트부; 및
상기 게스트부에 설치되는 어플리케이션으로부터 가상 디바이스에 대한 접근 요청을 수신하고, 상기 어플리케이션의 상기 가상 디바이스에 대한 접근 권한을 확인하여, 상기 가상 디바이스에 대한 어플리케이션의 접근이 허용된 경우, 상기 어플리케이션에 상기 가상 디바이스에 대한 접근 경로를 전달하는 커널부를 포함하고,
상기 게스트부는,
상기 게스트부에 사전에 저장되는 페이지 테이블 정보에 따라 상기 가상 디바이스에 대한 가상 주소 정보를 매개 주소 정보로 변환하며,
상기 커널부는,
상기 커널부에 사전에 저장되는 주소 데이터 정보에 따라 상기 매개 주소 정보를 상기 호스트부가 설치되는 하드웨어에 대한 물리 주소 정보로 변환하고,
상기 페이지 테이블 정보는 임의의 가상 주소 정보에 매칭되는 매개 주소 정보를 나열한 데이터 테이블이고,
상기 주소 데이터 정보는 임의의 매개 주소 정보에 매칭되는 물리 주소 정보를 나열한 데이터 테이블인, 메모리 공유 시스템.
A host unit installed in hardware;
A guest unit installed as a virtual operating system on the host unit; And
When an access request for a virtual device is received from an application installed in the guest unit, access rights for the virtual device of the application are checked, and the application access to the virtual device is permitted, Includes a kernel unit that delivers an access path to the device,
The guest unit,
Converting virtual address information for the virtual device into each address information according to page table information stored in advance in the guest unit,
The kernel unit,
Converts the respective address information into physical address information for hardware on which the host unit is installed according to address data information stored in advance in the kernel unit,
The page table information is a data table listing each address information matching arbitrary virtual address information,
The address data information is a data table listing physical address information matching arbitrary individual address information.
제8항에 있어서, 상기 커널부는,
상기 어플리케이션으로부터 수신하는 접근 요청에 대한 가상 디바이스가 존재하지 않는 경우,
상기 호스트부에 상기 접근 요청에 따른 가상 디바이스의 생성을 요청하는, 메모리 공유 시스템.
The method of claim 8, wherein the kernel unit,
When there is no virtual device for an access request received from the application,
A memory sharing system that requests the host unit to generate a virtual device according to the access request.
삭제delete 삭제delete
KR1020190128192A 2019-10-16 2019-10-16 Memory sharing system, method, and program for performing for sharing memory in virtualization system KR102199509B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190128192A KR102199509B1 (en) 2019-10-16 2019-10-16 Memory sharing system, method, and program for performing for sharing memory in virtualization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190128192A KR102199509B1 (en) 2019-10-16 2019-10-16 Memory sharing system, method, and program for performing for sharing memory in virtualization system

Publications (1)

Publication Number Publication Date
KR102199509B1 true KR102199509B1 (en) 2021-01-06

Family

ID=74127970

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190128192A KR102199509B1 (en) 2019-10-16 2019-10-16 Memory sharing system, method, and program for performing for sharing memory in virtualization system

Country Status (1)

Country Link
KR (1) KR102199509B1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080089002A (en) * 2007-03-30 2008-10-06 삼성전자주식회사 Method of controlling memory access
JP2010262356A (en) * 2009-04-30 2010-11-18 Nec Corp Shared memory virtualization device and shared memory virtualization method
JP2011216017A (en) * 2010-04-01 2011-10-27 Toshiba Corp Memory sharing apparatus
KR20120070326A (en) * 2010-12-21 2012-06-29 한국전자통신연구원 A apparatus and a method for virtualizing memory
KR20130050156A (en) * 2011-11-07 2013-05-15 한국전자통신연구원 Apparatus for translating virtual address space
KR20150039377A (en) * 2013-10-02 2015-04-10 포항공과대학교 산학협력단 Method for device virtualization and apparatus therefor
KR20160109848A (en) * 2015-03-13 2016-09-21 한국전자통신연구원 Virtualization Device and Method for Managing Physical Memory Using the Same

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080089002A (en) * 2007-03-30 2008-10-06 삼성전자주식회사 Method of controlling memory access
JP2010262356A (en) * 2009-04-30 2010-11-18 Nec Corp Shared memory virtualization device and shared memory virtualization method
JP2011216017A (en) * 2010-04-01 2011-10-27 Toshiba Corp Memory sharing apparatus
KR20120070326A (en) * 2010-12-21 2012-06-29 한국전자통신연구원 A apparatus and a method for virtualizing memory
KR20130050156A (en) * 2011-11-07 2013-05-15 한국전자통신연구원 Apparatus for translating virtual address space
KR20150039377A (en) * 2013-10-02 2015-04-10 포항공과대학교 산학협력단 Method for device virtualization and apparatus therefor
KR20160109848A (en) * 2015-03-13 2016-09-21 한국전자통신연구원 Virtualization Device and Method for Managing Physical Memory Using the Same

Similar Documents

Publication Publication Date Title
JP6903682B2 (en) Data protection using virtual resource view
US10831889B2 (en) Secure memory implementation for secure execution of virtual machines
US9922045B2 (en) Data management in a multi-tenant distributive environment
US20070174897A1 (en) Method and apparatus for protecting data stored in data storage devices
US8695104B2 (en) System and method for creating conditional immutable objects in a storage device
KR20140075781A (en) Data center with continuous world switch security
KR101323858B1 (en) Apparatus and method for controlling memory access in virtualized system
US10061701B2 (en) Sharing of class data among virtual machine applications running on guests in virtualized environment using memory management facility
US10394711B2 (en) Managing lowest point of coherency (LPC) memory using a service layer adapter
US10713081B2 (en) Secure and efficient memory sharing for guests
US20170249106A1 (en) Multiple input-output memory management units with fine grained device scopes for virtual machines
TW202101266A (en) Secure execution guest owner controls for secure interface control
US20150058926A1 (en) Shared Page Access Control Among Cloud Objects In A Distributed Cloud Environment
US10169062B2 (en) Parallel mapping of client partition memory to multiple physical adapters
US8140810B2 (en) Storage management command control in virtualized environment
US20200201691A1 (en) Enhanced message control banks
KR102199509B1 (en) Memory sharing system, method, and program for performing for sharing memory in virtualization system
US9600190B2 (en) Virtual machine functions for multiple privileged pages
US9372635B2 (en) Methods and apparatus for dividing secondary storage
KR20150010095A (en) Apparatus for configuring operating system and method thereof
US10055606B2 (en) Implementing block device extent granularity authorization model processing in CAPI adapters
US10423603B2 (en) Systems and methods for implementing a multi-host record lock mechanism
US11003378B2 (en) Memory-fabric-based data-mover-enabled memory tiering system
US20150379039A1 (en) Integrating virtual machine file system into a native file explorer
Zhang et al. Rowhammering Storage Devices

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant