KR102283739B1 - Apparatus ane method for sharing data between partitions - Google Patents
Apparatus ane method for sharing data between partitions Download PDFInfo
- Publication number
- KR102283739B1 KR102283739B1 KR1020190152879A KR20190152879A KR102283739B1 KR 102283739 B1 KR102283739 B1 KR 102283739B1 KR 1020190152879 A KR1020190152879 A KR 1020190152879A KR 20190152879 A KR20190152879 A KR 20190152879A KR 102283739 B1 KR102283739 B1 KR 102283739B1
- Authority
- KR
- South Korea
- Prior art keywords
- partition
- shared
- data
- shared memory
- write
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/526—Mutual exclusion algorithms
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Storage Device Security (AREA)
Abstract
본 발명의 일 실시예에 따른 파티션 간 데이터 공유방법은 공유 메모리와, 오너 파티션과, 게스트 파티션과, 상기 오너 파티션 및 게스트 파티션의 상기 공유 메모리로의 접근 여부를 제어하는 제어유닛으로 구성된 파티션 간 데이터 공유장치를 이용한 파티션 간 데이터 공유 방법에 관한 것이다. Inter-partition data sharing method according to an embodiment of the present invention includes inter-partition data comprising a shared memory, an owner partition, a guest partition, and a control unit controlling whether the owner partition and the guest partition access the shared memory. It relates to a method of sharing data between partitions using a sharing device.
Description
본 발명은 파티션 간 데이터 공유장치 및 공유방법에 관한 것으로, 구체적으로는 공유 메모리를 통한 파티션 간 데이터를 공유할 수 있는 장치 및 방법에 관한 것이다. The present invention relates to an apparatus and method for sharing data between partitions, and more particularly, to an apparatus and method for sharing data between partitions through a shared memory.
파티셔닝(Partitioning)이란 시공간적으로 분리되어 있다는 의미로써 파티셔닝이 적용된 프로그램 유닛을 파티션(Partition)이라고 부른다. Partitioning means that they are separated in space and time, and a program unit to which partitioning is applied is called a partition.
이러한 파티션들은 시간적으로 분리되어 있기 때문에 한번에 하나의 파티션만 실행되어야 하고, 아울러 공간적으로도 분리되어 있기 때문에 파티션의 메모리 영역이 중복되지 않아야 한다. Since these partitions are temporally separated, only one partition should be executed at a time, and since they are spatially separated, the memory area of the partition should not be overlapped.
이러한 파티션 간의 데이터 공유를 위한 방법으로는 메시지 패싱(Massagme Passing)을 고려해 볼 수 있다. As a method for sharing data between such partitions, message passing may be considered.
메시지 패싱은 어느 하나의 파티션이 커널(Kernel)로 메시지를 보내면, 커널이 메시지를 다른 파티션으로 보내주는 방식으로, 안정적이고 동기화의 문제가 없다는 장점이 있으나, 성능이 떨어지기 때문에 실행 주기가 매우 짧은 프로그램에서는 사용하기 어려운 단점이 있다. Message passing is a method in which when one partition sends a message to the kernel, the kernel sends the message to the other partition. The program has the disadvantage of being difficult to use.
파티션 간의 데이터 공유를 위한 다른 방법으로는 파티션들 간의 공유된 메모리(Shared Memory)를 생성한 후 각 파티션들이 메모리에 직접적으로 접근이 가능하기 때문에 메시지 패싱 방법 대비 높은 성능을 갖고 있으나, 공유 메모리를 통하여 파티션들 간의 에러가 전파될 가능성이 있는 등 메시지 패싱 방법 대비 안정성이 떨어지는 단점이 있다. Another method for sharing data between partitions is to create shared memory between partitions, and since each partition can directly access the memory, it has higher performance than the message passing method, but through shared memory There is a disadvantage of lower stability compared to the message passing method, such as the possibility of propagation of errors between partitions.
따라서, 안정성을 담보함과 동시에 실행 주기가 빠르거나 많은 데이터 공유를 필요로 하는 시스템에서 적용 가능함과 동시에 안정성을 담보할 수 있는 파티션 간의 데이터 공유 장치 및 방법의 필요성이 요구되고 있는 실정이다. Therefore, there is a need for an apparatus and method for sharing data between partitions that can ensure stability and at the same time ensure stability and can be applied to a system that has a fast execution cycle or requires a lot of data sharing.
한편, 하기 선행기술문헌에는 논리적 파티션 사이에서의 운용 시스템의 커널 공유에 대한 내용을 개시하고 있으며, 본 발명의 기술적 요지는 개시하고 있지 않다.On the other hand, the following prior art document discloses the contents of the kernel sharing of the operating system between logical partitions, but does not disclose the technical gist of the present invention.
본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치 및 공유방법은 전술한 문제점을 해결하기 위하여 다음과 같은 해결과제를 목적으로 한다.An apparatus for sharing data between partitions and a sharing method according to an embodiment of the present invention has the following object in order to solve the above-described problems.
종래 공유 메모리를 통한 파티션 간 데이터 공유방법의 문제점인 안정성 및 보안성 문제를 해소할 수 있는 파티션 간 데이터 공유장치 및 방법을 제공하는 것이다. An object of the present invention is to provide an apparatus and method for sharing data between partitions that can solve problems of stability and security, which are problems of a method of sharing data between partitions through a conventional shared memory.
본 발명의 해결과제는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 해결과제들은 아래의 기재로부터 당해 기술분야에 있어서의 통상의 지식을 가진 자에게 명확하게 이해되어 질 수 있을 것이다.The problems to be solved of the present invention are not limited to those mentioned above, and other problems not mentioned will be clearly understood by those of ordinary skill in the art from the following description.
본 발명의 일 실시예에 따른 파티션 간 데이터 공유방법은 공유 메모리와, 오너 파티션과, 게스트 파티션과, 상기 오너 파티션 및 게스트 파티션의 상기 공유 메모리로의 접근 여부를 제어하는 제어유닛으로 구성된 파티션 간 데이터 공유장치를 이용한 파티션 간 데이터 공유 방법에 관한 것으로, 상기 오너 파티션은 상기 공유 메모리 내에서의 공유 데이터의 쓰기 및 읽기 기능이 허용되도록 설정되고, 상기 게스트 파티션은 상기 공유 메모리 내에서의 공유 데이터의 읽기 기능이 허용되도록 설정되며, 상기 공유 메모리에는 공유설정정보를 포함하는 헤더가 저장되고, 상기 제어유닛은 상기 공유설정정보에 기초하여 실행 파티션의 상기 공유 메모리 접근을 차단한다. Inter-partition data sharing method according to an embodiment of the present invention includes inter-partition data comprising a shared memory, an owner partition, a guest partition, and a control unit controlling whether the owner partition and the guest partition access the shared memory. A method of sharing data between partitions using a sharing device, wherein the owner partition is configured to allow writing and reading functions of shared data in the shared memory, and the guest partition is configured to read shared data in the shared memory a function is set to be allowed, a header including shared setting information is stored in the shared memory, and the control unit blocks access to the shared memory of an execution partition based on the shared setting information.
상기 공유설정정보는 상기 헤더의 크기, 상기 오너 파티션의 아이디, 다음 주기의 오너 파티션의 아이디, 쓰기 시작 카운터, 쓰기 끝 카운터 및 공유 파티션의 아이디를 포함하는 것이 바람직하다.Preferably, the sharing setting information includes a size of the header, an ID of the owner partition, an ID of an owner partition of a next cycle, a write start counter, a write end counter, and an ID of a shared partition.
실행 파티션이 상기 공유 메모리에 공유데이터 쓰기를 시도하는 경우, 상기 제어유닛이 상기 실행 파티션의 아이디가 상기 공유 파티션의 아이디에 포함되는지 여부를 판단하는 단계; 상기 제어유닛이 상기 실행 파티션의 아이디가 상기 오너 파티션의 아이디와 일치하는지 여부를 판단하는 단계; 상기 제어유닛이 상기 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하는지 여부를 판단하는 단계; 및 상기 실행 파티션이 데이터 쓰기 기능을 수행하는 단계;를 포함하는 것이 바람직하다.determining, by the control unit, whether the ID of the execution partition is included in the ID of the shared partition when the execution partition attempts to write shared data to the shared memory; determining, by the control unit, whether the ID of the execution partition matches the ID of the owner partition; determining, by the control unit, whether the write start counter and the write end counter match; and performing, by the execution partition, a data write function.
상기 데이터 쓰기 기능을 수행하는 단계는, 상기 제어유닛이 상기 쓰기 시작 카운터를 업데이트하는 단계; 상기 제어유닛이 상기 실행 파티션에서 전송된 공유 데이터를 상기 공유 메모리 내에 쓰는 단계; 및 상기 제어유닛이 상기 쓰기 끝 카운터를 업데이트하는 단계;를 포함하는 것이 바람직하다.The performing of the data write function may include: updating, by the control unit, the write start counter; writing, by the control unit, the shared data transmitted from the execution partition into the shared memory; and updating, by the control unit, the write end counter.
상기 공유 메모리 내에 쓰는 단계 및 쓰기 끝 카운터를 업데이트하는 단계 사이에는, 상기 제어유닛이 다음 주기의 오너 파티션의 아이디를 업데이트 하는 단계를 더 포함하는 것이 바람직하다. Preferably, between the step of writing in the shared memory and the step of updating the write end counter, the step of the control unit updating the ID of the owner partition of the next cycle is further included.
실행 파티션이 상기 공유 메모리에 공유데이터 읽기를 시도하는 경우, 상기 제어유닛이 상기 실행 파티션의 아이디가 상기 공유 파티션의 아이디에 포함되는지 여부를 판단하는 단계; 상기 제어유닛이 상기 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하는지 여부를 판단하는 단계; 및 상기 제어유닛이 상기 공유 메모리에 저장된 공유 데이터를 상기 실행 파티션으로 전송하는 단계;를 포함하는 것이 바람직하다.determining, by the control unit, whether the ID of the execution partition is included in the ID of the shared partition when the execution partition attempts to read shared data into the shared memory; determining, by the control unit, whether the write start counter and the write end counter match; and transmitting, by the control unit, the shared data stored in the shared memory to the execution partition.
본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치는 공유설정정보를 포함한 헤더가 저장된 공유 메모리; 상기 공유 메모리 내에서의 공유 데이터의 쓰기 및 읽기 기능이 허용된 오너 파티션; 상기 공유 메모리 내에서의 공유 데이터의 읽기 기능이 허용된 게스트 파티션; 및 실행 파티션의 상기 공유 메모리로의 접근 여부를 제어하는 제어유닛;을 포함하고, 상기 공유설정정보는 상기 헤더의 크기, 상기 오너 파티션의 아이디, 다음 주기의 오너 파티션의 아이디, 쓰기 시작 카운터, 쓰기 끝 카운터 및 공유 파티션의 아이디를 포함하고, 상기 제어유닛은 상기 공유설정정보에 기초하여 실행 파티션의 상기 공유 메모리 접근을 차단한다.An apparatus for sharing data between partitions according to an embodiment of the present invention includes: a shared memory in which a header including sharing setting information is stored; an owner partition allowing write and read functions of shared data in the shared memory; a guest partition allowing a read function of shared data in the shared memory; and a control unit that controls whether or not an execution partition accesses the shared memory, wherein the sharing setting information includes a size of the header, an ID of the owner partition, an ID of an owner partition of a next cycle, a write start counter, and a write an end counter and an ID of the shared partition, wherein the control unit blocks access to the shared memory of the execution partition based on the sharing setting information.
본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치 및 공유방법은 공유 메모리에 대한 쓰기 및 읽기 과정을 분리하고, 오너 파티션과 게스트 파티션 간의 접근 권한을 다르게 설정함으로써 데이터 공유의 보안성을 높일 수 있는 효과를 기대할 수 있다. A data sharing device and a sharing method between partitions according to an embodiment of the present invention can increase the security of data sharing by separating the write and read processes of the shared memory and set different access rights between the owner partition and the guest partition. effect can be expected.
또한, 쓰기 기능 과정에서 시작 및 끝 카운터의 업데이트 기능을 구비함으로써 읽기 기능 수행시 비정상적인 쓰기 기능으로 인한 에러(Error) 전파의 가능성을 최소화할 수 있는 효과를 기대할 수 있다. In addition, by having the update function of the start and end counters in the process of the write function, an effect of minimizing the possibility of error propagation due to the abnormal write function when performing the read function can be expected.
본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당해 기술분야에 있어서의 통상의 지식을 가진 자에게 명확하게 이해되어질 수 있을 것이다.Effects of the present invention are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those of ordinary skill in the art from the following description.
도 1은 본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치를 간략히 도시한 개념도이다.
도 2는 본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치에서 공유 메모리의 헤더 설정의 일 예이다.
도 3 및 도 4는 본 발명의 일 실시예에 따른 파티션 간 데이터 공유방법을 시계열적으로 도시한 플로우차트이다. 1 is a conceptual diagram schematically illustrating an apparatus for sharing data between partitions according to an embodiment of the present invention.
2 is an example of setting a header of a shared memory in an apparatus for sharing data between partitions according to an embodiment of the present invention.
3 and 4 are flowcharts showing a method for sharing data between partitions in time series according to an embodiment of the present invention.
첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하되, 도면 부호에 관계없이 동일하거나 유사한 구성 요소는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. A preferred embodiment according to the present invention will be described in detail with reference to the accompanying drawings, but the same or similar components are assigned the same reference numerals regardless of reference numerals, and overlapping descriptions thereof will be omitted.
또한, 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 발명의 사상을 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 발명의 사상이 제한되는 것으로 해석되어서는 아니 됨을 유의해야 한다.In addition, in the description of the present invention, if it is determined that a detailed description of a related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted. In addition, it should be noted that the accompanying drawings are only for easy understanding of the spirit of the present invention, and should not be construed as limiting the spirit of the present invention by the accompanying drawings.
이하 도 1 내지 도 4를 참조하여 본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치 및 공유방법에 대하여 설명하도록 한다. Hereinafter, an apparatus for sharing data between partitions and a sharing method according to an embodiment of the present invention will be described with reference to FIGS. 1 to 4 .
본 발명의 일 실시예에 따른 파티션 간 데이터 공유장치는 도 1에 도시된 바와 같이 공유 메모리(100), 복수 개의 공유 파티션(200) 및 제어유닛(300)을 포함하도록 구성된다. Inter-partition data sharing apparatus according to an embodiment of the present invention is configured to include a shared
공유 메모리(100)는 후술할 공유 파티션(200)들 간의 데이터 공유를 위한 메모리이며, 이러한 공유 메모리의 시작 주소 및 크기는 모든 파티션들이 이미 알고 있도록 설정되며, 공유 메모리(100) 내에는 공유설정정보를 포함한 헤더가 저장되는데 이에 대한 구체적인 설명은 후술하도록 한다. The shared
공유 파티션(200)은 여러 파티션들 중 상술한 공유 메모리(100)에 접근 가능한 파티션으로, 오너 파티션(210)과 게스트 파티션(220)으로 구분될 수 있다.The shared
오너 파티션(210)은 공유 메모리(100)에 대한 쓰기 및 읽기 기능을 모두 갖고 있는 파티션으로, 공유 파티션(200) 중에서 오직 하나의 파티션만이 오너 파티션(210)이 될 수 있다.The
한편, 오너 파티션(210)이 공유 메모리(100)에 쓰기 기능을 수행하기 전 및 후에 공유 메모리(100)의 헤더에 쓰기 시작 기록 및 쓰기 끝 기록을 남김으로써 데이터 공유의 안정성을 담보할 수 있는데, 이에 대한 구체적인 내용 또한 후술하도록 한다. On the other hand, by leaving a write start record and write end record in the header of the shared
아울러, 오너 파티션(210)으로 지정된 파티션은 고정되어 있는 것이 아니라 변경이 가능하며, 이는 오너 파티션(210)이 다음 번 오너 파티션(210)을 지정함으로써 오너 파티션(210)의 변경이 가능할 수 있다. In addition, the partition designated as the
게스트 파티션(220)은 공유 메모리(100)에 대한 읽기 권한만을 가지고 있는 파티션으로, 공유 파티션(200) 중 오너 파티션(210)을 제외한 나머지 파티션이 모두 게스트 파티션(220)에 해당된다. The
한편, 게스트 파티션(220)은 읽기 기능을 수행하기에 앞서 공유 메모리(100) 헤더를 읽은 후 오너 파티션(210)이 기록한 쓰기 시작 및 쓰기 끝 기록의 일치 여부를 고려하여 읽기 기능을 수행하는데, 이에 대한 자세한 내용은 후술하도록 한다. On the other hand, the
제어유닛(300)은 오너 파티션(210) 및 게스트 파티션(220)의 공유 메모리(100)로의 접근 여부를 제어하는 기능을 수행하는 구성인데, 이러한 제어유닛은 공유 파티션(200) 내부의 일 구성일 수도 있으며, 공유 메모리(100) 내부의 일 구성일 수도 있으며, 나아가 파티션(200) 및 공유 메모리(100)와는 별개인 CPU 등의 구성일 수도 있다. The
이러한 제어유닛(300)은 공유 메모리(100)의 헤더에 포함된 공유설정정보에 기초하여 실행 파티션의 공유 메모리 접근을 허용 또는 차단한다. This
여기에서 헤더는 공유 메모리(100)의 정보를 가지고 있는 프로토콜로써, 헤더에 저장된 공유설정정보는 도 2에 도시된 바와 같이 헤더의 크기, 오너 파티션의 아이디, 다음 주기의 오너 파티션의 아이디, 쓰기 시작 카운터, 쓰기 끝 카운터 및 공유 파티션의 아이디를 포함하도록 구성된다. Here, the header is a protocol having information of the shared
특히 공유 파티션이 도 1에 도시된 바와 같이 총 4개, 즉 오너 파티션(210), 제1 게스트 파티션(220a), 제2 게스트 파티션(220b) 및 제3 게스트 파티션(220c)으로 이루어질 경우, 공유설정정보 중 공유 파티션의 아이디는 도 2에 도시시된 바와 같이 총 4개가 구성될 수 있다. In particular, when the shared partition consists of a total of four, that is, the
이하 도 3 및 도 4를 참조하여 본 발명의 일 실시예에 따른 파티션 간 데이터 공유방법에 대하여 설명하도록 한다. Hereinafter, a method for sharing data between partitions according to an embodiment of the present invention will be described with reference to FIGS. 3 and 4 .
먼저 실행 파티션이 공유 메모리(100)에 쓰기 기능을 수행하는 경우에 대하여 도 3을 참조하여 설명하도록 한다. First, a case in which the execution partition performs a write function on the shared
실행 파티션이 공유 메모리(100)에 공유데이터의 쓰기를 시도하는 경우, 먼저 공유 메모리(100)에 저장된 헤더 정보 즉, 공유설정정보를 읽는 단계(S110)가 수행된다. When the execution partition attempts to write the shared data to the shared
이후, 제어유닛(300)이 실행 파티션의 아이디가 공유 파티션(200)의 아이디에 포함되는지 여부를 판단하는 단계(S120)가 수행되는데, 이때 실행 파티션이 아이디가 공유 파티션(200)에 해당하지 않을 경우에는 접근 금지 에러가 발생됨으로써 과정이 종료되고, 해당할 경우에는 다음 단계가 진행된다. Thereafter, the
즉, 제어유닛(300)이 실행 파티션의 아이디가 헤더의 공유설정정보에서 지정된 오너 파티션(210)의 아이디와 일치하는지 여부를 판단하는 단계(S130)가 수행된다. That is, the
이때 실행 파티션의 아이디가 오너 파티션(210)의 아이디와 일치하지 않는 것으로 판단되는 경우 실행 파티션의 쓰기 권한이 없다는 이유로 에러가 발생됨으로써 과정이 종료되고, 일치하는 것으로 판단되는 경우 다음 단계가 수행된다. At this time, if it is determined that the ID of the execution partition does not match the ID of the
즉, 제어유닛(300)이 공유 메모리(100) 헤더에 저장된 쓰기 시작 카운터 및 쓰기 끝 카운터의 값이 상호 일치하는지 여부를 판단하는 단계(S140)가 수행되는데, 이때 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하지 않을 경우 이전 공유 메모리(100)의 쓰기 과정에서 문제가 발생한 것으로 파악하고 해당 과정을 종료시킨다. That is, the
반대로 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하는 것으로 판단될 경우, 실행 파티션이 공유 메모리(100) 내에 공유 데이터의 쓰기 기능을 수행하는 단계(S150)가 진행된다. Conversely, if it is determined that the write start counter and the write end counter match, the execution partition performs a write function of the shared data in the shared memory 100 ( S150 ).
이러한 쓰기 기능을 수행하는 단계(S150)는 구체적으로 4개의 단계로 세분화할 수 있는데, 먼저 제어유닛(300)이 쓰기 시작 카운터를 업데이트하는 단계(S151)가 수행된다. The step (S150) of performing such a write function can be specifically subdivided into four steps. First, the step (S151) of the
구체적으로 이전의 쓰기 시작 카운터의 값을 1만큼 증가시킴으로써 헤더의 쓰기 시작 카운터 값을 업데이트하며, 이후 실행 파티션은 공유 데이터를 공유 메모리(100)에 쓰는 단계(S152)가 수행된다. Specifically, the value of the write start counter of the header is updated by increasing the value of the previous write start counter by 1, and then the execution partition writes the shared data to the shared memory 100 ( S152 ).
이후 제어유닛(300)이 다음 주기의 오너 파티션(210)의 아이디를 업데이트 하는 단계(S153)가 수행될 수 있는데, 이는 상술한 바와 같이 복수 개의 공유 파티션(200) 중 오너 파티션(210)의 변경시 필요한 단계라고 할 수 있다. Thereafter, the step (S153) of the
이후 제어유닛(300)이 쓰기 끝 카운터를 업데이트하는 단계(S154)가 수행되며, 이는 앞에서 업데이트된 쓰기 시작 카운터 값과 동일한 값이 될 수 있도록 쓰기 끝 카운터의 업데이트가 요구되며, 따라서 이전의 쓰기 끝 카운터의 값을 1만큼 증가시킴으로써 헤더의 쓰기 끝 카운터 값을 업데이트하는 것이 바람직하다. Thereafter, the
상기와 같은 과정을 통하여 공유 파티션 중 오너 파티션(210)에 의한 공유 메모리 상의 쓰기 기능이 수행되며, 이하에서는 도 4를 참조하여 공유 파티션(200)이 공유 메모리(100)에 저장된 공유 데이터의 읽기 과정에 대하여 설명하도록 한다. A write function on the shared memory is performed by the
실행 파티션이 공유 메모리(100)에 공유데이터의 읽기를 시도하는 경우, 먼저 공유 메모리(100)에 저장된 헤더 정보 즉, 공유설정정보를 읽는 단계(S210)가 수행된다. When the execution partition attempts to read the shared data in the shared
이후, 제어유닛(300)이 실행 파티션의 아이디가 공유 파티션(200)의 아이디에 포함되는지 여부를 판단하는 단계(S220)가 수행되는데, 이때 실행 파티션이 아이디가 공유 파티션(200)에 해당하지 않을 경우에는 접근 금지 에러가 발생됨으로써 과정이 종료되고, 해당할 경우에는 다음 단계가 진행된다. Thereafter, the
즉, 제어유닛(300)이 공유 메모리(100) 헤더에 저장된 쓰기 시작 카운터 및 쓰기 끝 카운터의 값이 상호 일치하는지 여부를 판단하는 단계(S230)가 수행되는데, 이때 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하지 않을 경우 공유 메모리(100)에 저장된 공유데이터가 비정상적인 데이터로 취급하여 해당 과정을 종료시킨다. That is, the
반대로, 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하는 것으로 판단될 경우, 실행 파티션이 공유 메모리(100) 내에 공유 데이터의 읽기 기능을 수행하는 단계(S240)가 진행된다. Conversely, if it is determined that the write start counter and the write end counter match, the execution partition performs a read function of the shared data in the shared memory 100 ( S240 ).
본 명세서에서 설명되는 실시예와 첨부된 도면은 본 발명에 포함되는 기술적 사상의 일부를 예시적으로 설명하는 것에 불과하다. 따라서 본 명세서에 개시된 실시예들은 본 발명의 기술적 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이므로, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것이 아님은 자명하다. 본 발명의 명세서 및 도면에 포함된 기술적 사상의 범위 내에서 당해 기술분야에 있어서의 통상의 지식을 가진 자가 용이하게 유추할 수 있는 변형 예와 구체적인 실시예는 모두 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다. The embodiments described in this specification and the accompanying drawings are merely illustrative of some of the technical ideas included in the present invention. Therefore, since the embodiments disclosed in the present specification are for explanation rather than limitation of the technical spirit of the present invention, it is obvious that the scope of the technical spirit of the present invention is not limited by these embodiments. Modifications and specific embodiments that can be easily inferred by a person of ordinary skill in the art within the scope of the technical idea included in the specification and drawings of the present invention are included in the scope of the present invention. will have to be interpreted
100: 공유 메모리 200: 공유 파티션
210: 오너 파티션 220: 게스트 파티션
300: 제어유닛100: shared memory 200: shared partition
210: owner partition 220: guest partition
300: control unit
Claims (7)
상기 오너 파티션은 상기 공유 메모리 내에서의 공유 데이터의 쓰기 및 읽기 기능이 허용되도록 설정되고, 상기 게스트 파티션은 상기 공유 메모리 내에서의 공유 데이터의 읽기 기능이 허용되도록 설정되며,
상기 공유 메모리에는 공유설정정보를 포함하는 헤더가 저장되고, 상기 제어유닛은 상기 공유설정정보에 기초하여 실행 파티션의 상기 공유 메모리 접근을 차단하고,
상기 실행 파티션이 상기 공유 메모리에 공유데이터 쓰기를 시도하는 경우,
상기 제어유닛이 상기 실행 파티션의 아이디가 공유 파티션의 아이디에 포함되는지 여부를 판단하는 단계; 및
상기 제어유닛이 상기 실행 파티션의 아이디가 상기 오너 파티션의 아이디와 일치하는지 여부를 판단하는 단계;를 포함하고,
상기 공유설정정보는 상기 오너 파티션의 아이디, 다음 주기의 오너 파티션의 아이디, 상기 공유 파티션의 아이디를 포함하는 파티션 간 데이터 공유방법.
A method for sharing data between partitions using an inter-partition data sharing device comprising a shared memory, an owner partition, a guest partition, and a control unit for controlling whether the owner partition and the guest partition access the shared memory, the method comprising:
The owner partition is configured to allow a function to write and read shared data in the shared memory, and the guest partition is configured to allow a function to read shared data in the shared memory,
A header including shared setting information is stored in the shared memory, and the control unit blocks access to the shared memory of an execution partition based on the shared setting information,
When the execution partition attempts to write shared data to the shared memory,
determining, by the control unit, whether the ID of the execution partition is included in the ID of the shared partition; and
determining, by the control unit, whether the ID of the execution partition matches the ID of the owner partition;
The sharing setting information includes an ID of the owner partition, an ID of an owner partition of a next cycle, and an ID of the shared partition.
상기 공유설정정보는 상기 헤더의 크기, 쓰기 시작 카운터 및 쓰기 끝 카운터를 포함하는 파티션 간 데이터 공유방법.
The method according to claim 1,
The sharing setting information includes a size of the header, a write start counter, and a write end counter.
실행 파티션이 상기 공유 메모리에 공유데이터 쓰기를 시도하는 경우,
상기 제어유닛이 상기 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하는지 여부를 판단하는 단계; 및
상기 실행 파티션이 데이터 쓰기 기능을 수행하는 단계;
를 포함하는 파티션 간 데이터 공유방법.
3. The method according to claim 2,
When the execution partition attempts to write shared data to the shared memory,
determining, by the control unit, whether the write start counter and the write end counter match; and
performing, by the execution partition, a data write function;
A method of sharing data between partitions, including
상기 제어유닛이 상기 쓰기 시작 카운터를 업데이트하는 단계;
상기 제어유닛이 상기 실행 파티션에서 전송된 공유 데이터를 상기 공유 메모리 내에 쓰는 단계; 및
상기 제어유닛이 상기 쓰기 끝 카운터를 업데이트하는 단계;
를 포함하는 파티션 간 데이터 공유방법.
The method according to claim 3, wherein performing the data write function comprises:
updating, by the control unit, the write start counter;
writing, by the control unit, the shared data transmitted from the execution partition into the shared memory; and
updating the write end counter by the control unit;
A method of sharing data between partitions, including
상기 제어유닛이 다음 주기의 오너 파티션의 아이디를 업데이트 하는 단계를 더 포함하는 파티션 간 데이터 공유방법.
5. The method of claim 4, wherein between writing into the shared memory and updating the end-of-write counter,
The inter-partition data sharing method further comprising the step of the control unit updating the ID of the owner partition of the next cycle.
실행 파티션이 상기 공유 메모리에 공유데이터 읽기를 시도하는 경우,
상기 제어유닛이 상기 실행 파티션의 아이디가 상기 공유 파티션의 아이디에 포함되는지 여부를 판단하는 단계;
상기 제어유닛이 상기 쓰기 시작 카운터 및 쓰기 끝 카운터가 일치하는지 여부를 판단하는 단계; 및
상기 제어유닛이 상기 공유 메모리에 저장된 공유 데이터를 상기 실행 파티션으로 전송하는 단계;
를 포함하는 파티션 간 데이터 공유방법.
3. The method according to claim 2,
When the execution partition attempts to read shared data in the shared memory,
determining, by the control unit, whether the ID of the execution partition is included in the ID of the shared partition;
determining, by the control unit, whether the write start counter and the write end counter match; and
transmitting, by the control unit, the shared data stored in the shared memory to the execution partition;
A method of sharing data between partitions, including
상기 공유 메모리 내에서의 공유 데이터의 쓰기 및 읽기 기능이 허용된 오너 파티션;
상기 공유 메모리 내에서의 공유 데이터의 읽기 기능이 허용된 게스트 파티션; 및
실행 파티션의 상기 공유 메모리로의 접근 여부를 제어하는 제어유닛;
을 포함하고,
상기 공유설정정보는 상기 오너 파티션의 아이디, 다음 주기의 오너 파티션의 아이디 및 공유 파티션의 아이디를 포함하고,
상기 제어유닛은 상기 공유설정정보에 기초하여 실행 파티션의 상기 공유 메모리 접근을 차단하고,
상기 실행 파티션이 상기 공유 메모리에 공유데이터 쓰기를 시도하는 경우,
상기 제어유닛이 상기 실행 파티션의 아이디가 공유 파티션의 아이디에 포함되는지 여부를 판단하고, 상기 실행 파티션의 아이디가 상기 오너 파티션의 아이디와 일치하는지 여부를 판단하는 파티션 간 데이터 공유장치.a shared memory in which a header including shared setting information is stored;
an owner partition allowing write and read functions of shared data in the shared memory;
a guest partition allowing a read function of shared data in the shared memory; and
a control unit for controlling whether an execution partition accesses the shared memory;
including,
The sharing setting information includes the ID of the owner partition, the ID of the owner partition of the next cycle, and the ID of the shared partition,
the control unit blocks access to the shared memory of the execution partition based on the sharing setting information;
When the execution partition attempts to write shared data to the shared memory,
An inter-partition data sharing device, wherein the control unit determines whether the ID of the execution partition is included in the ID of the shared partition, and determines whether the ID of the execution partition matches the ID of the owner partition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190152879A KR102283739B1 (en) | 2019-11-26 | 2019-11-26 | Apparatus ane method for sharing data between partitions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190152879A KR102283739B1 (en) | 2019-11-26 | 2019-11-26 | Apparatus ane method for sharing data between partitions |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20210064545A KR20210064545A (en) | 2021-06-03 |
KR102283739B1 true KR102283739B1 (en) | 2021-07-30 |
Family
ID=76396500
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190152879A KR102283739B1 (en) | 2019-11-26 | 2019-11-26 | Apparatus ane method for sharing data between partitions |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102283739B1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120233409A1 (en) * | 2011-03-11 | 2012-09-13 | Microsoft Corporation | Managing shared memory used by compute nodes |
JP2014154077A (en) | 2013-02-13 | 2014-08-25 | Nippon Telegr & Teleph Corp <Ntt> | Double update prevention system and double update prevention method |
US20180136842A1 (en) | 2016-11-11 | 2018-05-17 | Hewlett Packard Enterprise Development Lp | Partition metadata for distributed data objects |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0520146U (en) * | 1991-08-27 | 1993-03-12 | 日本電子機器株式会社 | Mutual energization device of control device |
WO2016134380A1 (en) * | 2015-02-20 | 2016-08-25 | Pristine Machine, LLC | Method to split data operational function among system layers |
-
2019
- 2019-11-26 KR KR1020190152879A patent/KR102283739B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120233409A1 (en) * | 2011-03-11 | 2012-09-13 | Microsoft Corporation | Managing shared memory used by compute nodes |
JP2014154077A (en) | 2013-02-13 | 2014-08-25 | Nippon Telegr & Teleph Corp <Ntt> | Double update prevention system and double update prevention method |
US20180136842A1 (en) | 2016-11-11 | 2018-05-17 | Hewlett Packard Enterprise Development Lp | Partition metadata for distributed data objects |
Also Published As
Publication number | Publication date |
---|---|
KR20210064545A (en) | 2021-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102271185B1 (en) | Method for coexistence of software with different safety levels in a multicore processor system | |
DE102015017399B3 (en) | Storage device, method of operation of the storage device, and electronic device with the storage device | |
JP5911835B2 (en) | Information processing device | |
US20170249183A1 (en) | Adaptive access control for hardware blocks | |
WO2015131446A1 (en) | Method and device for secure access control based on on-chip bus protocol | |
US9542112B2 (en) | Secure cross-process memory sharing | |
US20180025171A1 (en) | Method and apparatus for controlling application to access memory | |
US10664180B2 (en) | Semiconductor device, security process execution device, and security process execution method | |
TWI550630B (en) | Access controlled memory region | |
TW201621678A (en) | Indicating a privilege level | |
CN114356215A (en) | Distributed cluster and control method of distributed cluster lock | |
KR102283739B1 (en) | Apparatus ane method for sharing data between partitions | |
JP2001222466A (en) | Multiprocessor system, shared memory control system, its method, and recording medium | |
JP2010097432A (en) | Ram diagnosis apparatus and program thereof | |
US8028142B2 (en) | Controller of storage device, storage device, and control method of storage device | |
US10545885B2 (en) | Information processing device, information processing method, and computer program product | |
JP4902427B2 (en) | History information management method and history information management system | |
CN116089327A (en) | Data protection method and related equipment | |
US11269549B2 (en) | Storage device and command processing method | |
JP2017204083A (en) | Memory protection system | |
US20200026662A1 (en) | Direct memory access | |
US10706178B2 (en) | Data processing apparatus and access control method | |
US9773562B2 (en) | Storage apparatus, flash memory control apparatus, and program | |
US20150105019A1 (en) | Wireless communication device and wireless paring method thereof | |
US20230259302A1 (en) | Control device, control method, recording medium in which control program is recorded, and vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |