KR20210051325A - Device and method for sharing data on an asymmetric multi-processing system - Google Patents

Device and method for sharing data on an asymmetric multi-processing system Download PDF

Info

Publication number
KR20210051325A
KR20210051325A KR1020190136449A KR20190136449A KR20210051325A KR 20210051325 A KR20210051325 A KR 20210051325A KR 1020190136449 A KR1020190136449 A KR 1020190136449A KR 20190136449 A KR20190136449 A KR 20190136449A KR 20210051325 A KR20210051325 A KR 20210051325A
Authority
KR
South Korea
Prior art keywords
data
shared
memory
area
shared data
Prior art date
Application number
KR1020190136449A
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 KR1020190136449A priority Critical patent/KR20210051325A/en
Publication of KR20210051325A publication Critical patent/KR20210051325A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox

Abstract

The present invention relates to a device and a method for sharing data on an asymmetric multi-processing system, capable of improving a system response by connecting predetermined information of a shared memory to a communication framework. The device for sharing the data on the asymmetric multi-processing system includes; a plurality of cores employing mutually different operating systems (OS); and the shared memory shared between the plurality of cores. Shared data are transmitted or received by the communication framework of each of the plurality of cores. The plurality of cores further include a shared data processing framework that allocates an area for storing the shared memory in addition to the communication frame, and allocates an area for storing a memory map having information on a storage address and a size of the shared data. A core performing a receive process may read and use the shared data, based on the memory map.

Description

비대칭 멀티프로세싱 시스템의 데이터 공유 장치 및 방법{Device and method for sharing data on an asymmetric multi-processing system}Device and method for sharing data on an asymmetric multi-processing system

본 발명은 비대칭 멀티프로세싱 시스템의 데이터 공유 장치 및 방법에 관한 것으로, 더 상세하게는 반복적이고 고정적인 데이터를 고속으로 공유하기 위한 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for sharing data in an asymmetric multiprocessing system, and more particularly, to an apparatus and method for sharing repetitive and fixed data at high speed.

멀티 프로세싱 시스템(Multi-Processing System)은 다수의 프로세서를 이용하여 하나의 작업을 병렬처리하는 시스템이다.Multi-Processing System (Multi-Processing System) is a system that processes one task in parallel using multiple processors.

멀티 프로세싱 시스템은 다수의 프로세서가 주변장치들을 공유하며 작업을 병렬처리하기 때문에 단일 프로세싱 시스템에 비하여 속도가 더 빠르며, 하나의 프로세서에 이상이 발생한 경우에도 시스템의 정지 없이 작업을 진행할 수 있어 신뢰성을 높일 수 있는 특징이 있다.Multi-processing systems are faster than single processing systems because multiple processors share peripheral devices and process tasks in parallel, and even if an error occurs in one processor, work can be performed without stopping the system, increasing reliability. There are features that can be used.

멀티 프로세싱 시스템은 대칭형 멀티 프로세싱(SMP, Symmetric Multi-Processing)과 비대칭형 멀티 프로세싱(AMP, Asymmetric Multi-Processing)으로 구분된다.Multi-processing systems are divided into symmetric multi-processing (SMP) and asymmetric multi-processing (AMP).

대칭형 멀티 프로세싱은 복수의 프로세서가 단일 프로그램을 수행하는 것으로, 하나의 운영체제(Operating System, OS)에 의해 모든 프로세서가 관리된다.Symmetrical multi-processing is that multiple processors execute a single program, and all processors are managed by one operating system (OS).

이에 반해 비대칭형 멀티 프로세싱은 다수의 프로세서 각각이 할당된 특정 작업을 수행하는 것으로, 주프로세서가 전체 시스템을 통제하고, 다른 프로세서들은 주프로세서의 제어에 따르거나 정해진 작업을 수행하도록 구성된다. 즉, 프로세서들은 주(master)-종(remote or slave) 시스템을 이룬다.On the other hand, asymmetric multiprocessing is configured to perform a specific task assigned to each of a plurality of processors, and the main processor controls the entire system, and other processors are configured to follow the control of the main processor or perform a specified task. In other words, the processors form a master-slave system.

특히, 최근에는 다른 여러 종류의 프로세서 코어를 통합하여 다양한 시스템에서 종합적으로 높은 성능을 발휘하도록 비대칭형 멀티 프로세싱 시스템을 설계하고 있다. 각각의 프로세서마다 서로 다른 특성의 OS를 적용하여 시스템 응답성 및 호환성과 데이터 처리 효율을 최적화시킬 수 있다.In particular, recently, asymmetric multi-processing systems are designed to exhibit high overall performance in various systems by integrating different types of processor cores. System responsiveness and compatibility and data processing efficiency can be optimized by applying different OS for each processor.

예를 들어, 응답성이 우선되는 기능에 대해서는 Non-OS 또는 RTOS(Real Time OS) 기반의 시스템을 특정 프로세서에 할당하고, 호환성 및 효율성이 우선되는 기능에 대해서는 Linux와 같은 고수준 운영체제를 나머지 프로세서에 적용할 수 있다.For example, for functions that prioritize responsiveness, non-OS or Real Time OS (RTOS)-based systems are assigned to specific processors, and for functions that prioritize compatibility and efficiency, a high-level operating system such as Linux is assigned to the rest of the processors. Can be applied.

이처럼 서로 다른 운영체제가 할당된 비대칭형 멀티 프로세싱 시스템은 운영체제의 차이에 의하여 특별한 프로세스 간 통신(Inter-Process Communication, IPC) 프레임워크가 요구된다. 이러한 프로세스 간 통신 프레임워크로 하이퍼바이저(Hypervisor), MCAPI(Multicore Communication API), 멘토 그래픽스(Mento Graphics)에서 개발한 오픈 소스인 OpenAMP 등이 있으며, 공유 메모리(shared memory)와 메시지 큐(message queue)를 사용하여 데이터를 공유하는 방식을 이용한다. As such, the asymmetric multiprocessing system in which different operating systems are allocated requires a special inter-process communication (IPC) framework due to differences in operating systems. These inter-process communication frameworks include Hypervisor, Multicore Communication API (MCAPI), and OpenAMP, an open source developed by Mento Graphics, and shared memory and message queues. Use a method of sharing data using.

이하에서는 OpenAMP를 사용하는 종래 비대칭 멀티프로세싱 시스템에 대하여 구체적으로 설명한다.Hereinafter, a conventional asymmetric multiprocessing system using OpenAMP will be described in detail.

도 1은 일반적인 비대칭 멀티 프로세싱 시스템의 블록 구성도이다.1 is a block diagram of a general asymmetric multiprocessing system.

도 1에는 리눅스 등 특정한 운영체제(OS1)를 사용하는 제1 및 제2코어(Core1, Core2)와 RTOS를 사용하는 RT 코어(RT Core)를 포함하는 비대칭 멀티 프로세싱 시스템의 예를 도시하였다.FIG. 1 shows an example of an asymmetric multiprocessing system including first and second cores Core1 and Core2 using a specific operating system OS1 such as Linux and an RT Core using an RTOS.

제1 및 제2코어(Core1, Core2)는 대칭형 멀티 프로세싱(SMP)을 구현하고 있으며, RT 코어(RT Core)를 포함하여, 비대칭 멀티 프로세싱 시스템을 이룬다.The first and second cores Core1 and Core2 implement symmetric multiprocessing (SMP), and comprise an RT core, forming an asymmetric multiprocessing system.

하나의 프로세서에는 적어도 하나 이상의 코어와 캐쉬 메모리를 포함하고 있으며, 도 1의 제1 및 제2코어(Core1, Core2)는 단일 또는 두 개의 프로세서의 것으로 이해될 수 있다.One processor includes at least one core and a cache memory, and the first and second cores Core1 and Core2 of FIG. 1 may be understood as being of a single or two processors.

제1 및 제2코어(Core1, Core2)는 동일한 운영체제인 OS1을 사용하기 때문에 메모리와 각종 디바이스를 단일 객체로 인식하여 쉽게 공유하여 사용할 수 있다.Since the first and second cores Core1 and Core2 use OS1, which is the same operating system, memory and various devices can be recognized as a single object and can be easily shared and used.

그러나 상기 제1 및 제2코어(Core1, Core2)와 RT 코어(RT Core)는 서로 다른 OS를 사용하기 때문에 독립된 메모리 공간과 디바이스를 서로 공유하지 않기 때문에 데이터의 공유와 자원 관리가 용이하지 않다.However, since the first and second cores Core1 and Core2 and the RT core use different OSs, they do not share an independent memory space and a device with each other, making it difficult to share data and manage resources.

상기 제1 및 제2코어(Core1, Core2)와 RT 코어(RT Core)는 공유 메모리(10)를 공유하며, 그 공유 메모리(10)를 통해 이종의 운영체제를 사용하는 코어 간의 데이터 통신을 수행하기 위하여 OpenAMP 프레임워크 등이 제안되었다.The first and second cores (Core1, Core2) and the RT core (RT Core) share a shared memory 10, and perform data communication between cores using different operating systems through the shared memory 10 For this, the OpenAMP framework has been proposed.

도 2는 OpenAMP 프레임워크의 블록도이다.2 is a block diagram of the OpenAMP framework.

도 2를 참조하면 마스터 어플리케이션(Master Application)은 제1코어(Core1) 또는 제2코어(Core2)에서 수행되는 프로세스이며, 리모트 어플리케이션(Remote Application)은 RT 코어(RT Core)에서 수행되는 프로세스이다.Referring to FIG. 2, a master application is a process performed in a first core (Core1) or a second core (Core2), and a remote application is a process performed in an RT core.

위의 두 프로세스는 OpenAMP 프레임워크(20)를 이용하여 공유 메모리(10)를 통해 메시지를 주고받으며 데이터를 공유한다. The above two processes share data by sending and receiving messages through the shared memory 10 using the OpenAMP framework 20.

OpenAMP 프레임워크는 3개의 영역으로 분할된 프로토콜 레이어로 표현할 수 있다.The OpenAMP framework can be expressed as a protocol layer divided into three areas.

도 3은 OpenAMP 프레임워크의 레이어 구획도이다.3 is a layer block diagram of the OpenAMP framework.

OpenAMP 프레임워크 레이어는, 마스터 또는 리모트 어플리케이션에서 메시지 전송을 위한 API(RPMsg)가 정의되는 된 트랜스포트 레이어(Transport Layer, 21), 메시지 큐 관리를 위한 미디어 억세스 레이어(MAC Layer, 22), 데이터 전송의 매개체가 정의된 피지컬 레이어(Physical Layer, 23)로 구분된다. The OpenAMP framework layer is a transport layer (Transport Layer, 21) in which an API (RPMsg) for message transmission in a master or remote application is defined, a media access layer (MAC Layer, 22) for message queue management, and data transmission. It is divided into a physical layer (23) in which the medium of is defined.

OpenAMP 프레임워크는 공유 메모리(10)를 이용하여 프로세서 사이에 메시지(데이터)를 공유할 수 있게 한다.The OpenAMP framework makes it possible to share messages (data) between processors using the shared memory 10.

송신 프로세서의 코어는 공유 메모리(10)에 송신 메시지를 복사하여 기록하고 수신 프로세서의 코어에 인터럽트를 발생시켜 메시지가 전송되었음을 알려준다. 인터럽트를 인식한 수신 프로세스 코어에서는 OpenAMP 프레임워크를 통해 공유 메모리(10)에 저장된 송신 프로세서 코어의 메시지를 수신 프로세스의 메모리 공간으로 복사한다. The core of the transmitting processor copies and records the transmission message in the shared memory 10, and generates an interrupt in the core of the receiving processor to notify that the message has been transmitted. The receiving process core recognizing the interrupt copies the message of the transmitting processor core stored in the shared memory 10 to the memory space of the receiving process through the OpenAMP framework.

도 4는 도 1에서 제1코어(Core 1)와 RT 코어(RT Core) 사이의 메시지 교환의 예시도이다.4 is an exemplary diagram of message exchange between a first core (Core 1) and an RT core (RT Core) in FIG. 1.

제1코어(Core 1)가 송신, RT 코어(RT Core)가 수신측일 때에는 제1코어(Core 1)에서 공유 메모리(10)의 할당된 영역에 송신 메시지를 저장하고, RT 코어(RT Core)에 인터럽트를 발생시켜, 공유 메모리(10)에 송신 메시지가 있음을 RT 코어(RT Core)가 인지할 수 있도록 한다.When the first core (Core 1) is the transmitting side and the RT core is the receiving side, the first core (Core 1) stores the transmission message in the allocated area of the shared memory 10, and the RT core By generating an interrupt in the shared memory 10, the RT core can recognize that there is a transmission message.

그 다음, RT 코어(RT Core)는 공유 메모리(10)에 저장된 송신 메시지를 호출하여 프로세서 내부 메모리(도 1에서 RAM)에 저장한다.Then, the RT core calls the transmission message stored in the shared memory 10 and stores it in the processor internal memory (RAM in FIG. 1).

반대로 RT 코어(RT Core)가 송신측이고, 제1코어(Core 1)가 수신측일 때, RT 코어(RT Core)는 공유 메모리(10)에 송신 메시지를 저장하고, 제1코어(Core 1)에 인터럽트를 발생시키며, 제1코어(Core 1)는 공유 메모리(10)에서 RT 코어(RT Core)의 송신 메시지를 호출하여 도 1에 도시한 캐쉬 메모리에 저장한다.On the contrary, when the RT Core is the transmitting side and the first core is the receiving side, the RT Core stores the transmission message in the shared memory 10, and the first core (Core 1) The first core (Core 1) calls the transmission message of the RT core (RT Core) from the shared memory 10 and stores it in the cache memory shown in FIG.

이와 같은 방식으로 OpenAMP 프레임워크를 이용하여 이종의 OS를 사용하는 코어간의 메시지 송수신이 가능하게 된다.In this way, message transmission/reception between cores using different OSes is possible using the OpenAMP framework.

상기 공유 메모리(10)의 사용은 OpenAMP 프레임 워크의 피지컬 레이어(23)를 통해 이루어진다.The shared memory 10 is used through the physical layer 23 of the OpenAMP framework.

도 5는 OpenAMP 프레임워크(20)의 미디어 억세스 레이어(22)의 구성도이다.5 is a configuration diagram of the media access layer 22 of the OpenAMP framework 20.

미디어 억세스 레이어(22)는 공유 메모리(10)의 효율적인 사용을 위해 정의되며, 링버퍼(Ring buffer) 형태의 메시지 큐 기법이 적용된다.The media access layer 22 is defined for efficient use of the shared memory 10, and a ring buffer type message queue technique is applied.

앞서 설명한 코어간 메시지 송수신을 위해 메모리 버퍼를 할당 및 해제하는 과정이 수반된다. The process of allocating and releasing memory buffers for message transmission and reception between cores described above is involved.

미디어 억세스 레이어(22)는 전체 OpenAMP 프레임워크의 핵심적인 부분이며, 미디어 억세스 레이어(22)에 의해 코어간 동기화가 요구되지 않는다. 이는 단일 송신기(single writer)-단일 수신기(single reader) 순환 버퍼링(circular buffering)이라는 기술에 의해 달성된다. The media access layer 22 is a core part of the entire OpenAMP framework, and synchronization between cores is not required by the media access layer 22. This is achieved by a technique called single writer-single reader circular buffering.

이러한 기술에 의해 다중 비동기 컨텍스트가 데이터를 교환할 수 있는 구조를 제공한다.This technique provides a structure in which multiple asynchronous contexts can exchange data.

도 5에서 VRING 요소는 "버퍼 디스크립터", "사용 가능한 링 버퍼", "사용된 링 버퍼", 3가지 기본 구성으로 이루어지며, 이 3가지 요소는 물리적으로 공유 메모리(10)에 저장된다.In FIG. 5, the VRING element consists of three basic configurations: “buffer descriptor”, “usable ring buffer”, and “used ring buffer”, and these three elements are physically stored in the shared memory 10.

상기 버퍼 디스크립터는 64비트의 버퍼 주소를 포함하며, 이 주소는 공유 메모리(10)에 저장된 32bit까지의 버퍼에 대한 주소, 16bit의 플래그 필드와 16bit의 다음 버퍼 스크립터와의 링크로 이루어진다.The buffer descriptor includes a 64-bit buffer address, which is composed of an address for a buffer of up to 32 bits stored in the shared memory 10, a flag field of 16 bits, and a link with the next buffer script of 16 bits.

입력 링버퍼에는 0번째 비트만 사용되는 자체 플래그 필드가 포함되어 있으며, 자체 플래그 필드가 설정되어 있을 때 송신기는 입력 또는 사용가능한 링 버퍼를 통지하지 않는다. The input ring buffer contains its own flag field in which only the 0th bit is used, and when its own flag field is set, the transmitter does not notify the input or available ring buffer.

기본적으로 비트가 설정되어 있지 않기 때문에 송신측은 인터럽트를 발생시켜 수신측에 통지해야 한다.Basically, since the bit is not set, the sending side must generate an interrupt and notify the receiving side.

OpenAMP 프레임워크에 적용된 메시지 프로토콜을 정의하는 트랜스포트 레이어(21)의 구조는 도 6에 도시한 바와 같다.The structure of the transport layer 21 defining a message protocol applied to the OpenAMP framework is as shown in FIG. 6.

소스 어드레스(source address)는 송신 프로세스, 데스티네이션 어드레스(destination address)는 수신 프로세스를 나타내며, 두 프로세스 간 공유 데이터는 패이로드(payload) 영역을 통해 공유된다. A source address represents a transmission process, a destination address represents a reception process, and data shared between the two processes is shared through a payload area.

상기 메시지는 송신 프로세스에서 미디어 억세스 레이어(22)를 통해 할당 받은 공유 메모리(10)의 영역을 통해 전송되며, 수신 프로세서에서 메시지 수신 후 할당받은 메모리를 해제하도록 구현되어 있다. The message is transmitted through an area of the shared memory 10 allocated through the media access layer 22 in the transmission process, and is implemented so that the receiving processor releases the allocated memory after receiving the message.

즉, 두 프로세서 간 데이터 공유를 위해서는 송신 프로세서의 메모리 영역에 위치한 데이터를 패이로드(payload) 영역으로 복사하고, 수신 측에서는 패이러드(payload)에 저장된 데이터를 수신 프로세서의 메모리 영역으로 복사하여야 한다. That is, in order to share data between two processors, data located in the memory area of the transmitting processor must be copied to the payload area, and the receiving side must copy the data stored in the payload to the memory area of the receiving processor.

이처럼 OpenAMP 프레임워크는 공유 메모리의 영역을 나누어 메시지 전송시 버퍼를 할당하고, 그 할당 위치를 수신측에 제공함으로써, 메모리 재사용 효율이 높다.In this way, the OpenAMP framework divides the shared memory area and allocates a buffer when transmitting a message, and provides the allocation location to the receiver, thereby improving memory reuse efficiency.

그러나 공유 메모리(10)의 일부 영역을 할당 및 해제시키기 위한 처리가 요구되고 메시지 전송을 위해 여러 차례 반복적으로 공유 메모리에 복사해야 하는 시스템 오버헤드가 수반된다. However, a process for allocating and releasing a partial area of the shared memory 10 is required, and a system overhead is required to repeatedly copy to the shared memory several times for message transmission.

또한, 메모리 효율을 높이기 위해 메시지 큐의 크기를 일정 크기 이하로 제한하여 사용하기 때문에 대용량의 정보를 전송할 경우 여러 차례 분할하여 전송해야 하며, 이러한 분할 전송 때문에 오버헤드로 인한 부담이 높아진다. In addition, in order to increase memory efficiency, the size of the message queue is limited to a certain size or less, so when transmitting a large amount of information, it must be divided and transmitted several times, and the overhead due to such divided transmission increases.

특히, 빠른 시스템 응답을 요구하는 제품을 구현함에 있어 상기 오버헤드는 비대칭 멀티프로세스 시스템 적용에 제약사항으로 작용되어 구조적으로 시스템 구성이 불가하거나 구현 복잡도가 급격히 높아지는 문제가 발생될 수 있는 문제점이 있었다.In particular, in implementing a product that requires a fast system response, the overhead acts as a constraint on the application of an asymmetric multi-process system, and there is a problem in that it is not possible to construct the system structurally or the complexity of the implementation is rapidly increased.

상기와 같은 문제점을 감안한 본 발명이 해결하고자 하는 과제는, 이종의 운영체계에 의해 동작하는 비대칭 멀티프로세서 시스템에서 오버헤드의 발생을 최소화할 수 있는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치 및 방법을 제공함에 있다.The problem to be solved by the present invention in consideration of the above problems is to provide a data sharing apparatus and method of an asymmetric multiprocessing system capable of minimizing the occurrence of overhead in an asymmetric multiprocessor system operated by heterogeneous operating systems. have.

더 상세하게, 본 발명은 미리 결정된 공유 메모리의 정보와 통신 프레임워크를 결합하여, 시스템 응답성을 개선할 수 있는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치 및 방법을 제공함에 있다.In more detail, the present invention is to provide an apparatus and method for sharing data of an asymmetric multiprocessing system capable of improving system responsiveness by combining information of a predetermined shared memory with a communication framework.

특히, 송수신 프로세서간 공유 데이터가 고정형태이고, 반복적으로 전송되거나 데이터가 큰 경우 응답 성능을 현저하게 개선시킬 수 있는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치 및 방법을 제공함에 있다.In particular, to provide a data sharing apparatus and method of an asymmetric multiprocessing system capable of remarkably improving response performance when shared data between transmission and reception processors is in a fixed form, and is repeatedly transmitted or when data is large.

상기와 같은 기술적 과제를 해결하기 위한 본 발명의 일측면에 따른 비대칭 멀티프로세싱 시스템의 데이터 공유 장치는, 서로 다른 운영체계를 사용하는 복수의 코어와, 상기 복수의 코어들이 공유하는 공유 메모리를 포함하여, 복수의 코어들 각각의 통신 프레임워크에 의해 공유 데이터를 송수신하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치에 있어서, 상기 복수의 코어는 상기 통신 프레임워크 외에 상기 공유 메모리에 공유 데이터가 저장되는 영역을 할당하고, 공유 데이터의 저장 주소 및 크기 정보인 메모리 맵을 저장하는 영역을 할당하는 공유 데이터 처리 프레임워크를 더 포함하고, 수신 프로세스를 수행하는 코어에서 상기 메모리 맵을 참조하여, 상기 공유 데이터를 읽어들여 사용할 수 있다.A data sharing apparatus of an asymmetric multiprocessing system according to an aspect of the present invention for solving the above technical problems includes a plurality of cores using different operating systems, and a shared memory shared by the plurality of cores. In the data sharing apparatus of an asymmetric multiprocessing system for transmitting and receiving shared data by a communication framework of each of a plurality of cores, the plurality of cores allocate an area in which shared data is stored in the shared memory in addition to the communication framework And a shared data processing framework for allocating an area for storing a memory map, which is information on a storage address and size of shared data, and reads the shared data by referring to the memory map in a core performing a receiving process. Can be used.

본 발명의 실시예에서, 상기 공유 메모리는, 상기 코어들의 프로세스를 각각 저장하는 영역들과, 상기 통신 프레임워크가 수행되는 통신 메모리 영역과, 상기 공유 데이터 처리 프레임워크가 수행되는 공유 데이터 메모리영역으로 구분될 수 있다.In an embodiment of the present invention, the shared memory includes areas each storing processes of the cores, a communication memory area in which the communication framework is executed, and a shared data memory area in which the shared data processing framework is executed. Can be distinguished.

본 발명의 실시예에서, 상기 공유 데이터 메모리영역은, 상기 메모리 맵을 저장하는 메모리 맵 정보영역과, 상기 코어들의 프로세스 수행에서 공유 데이터가 저장되는 공유 데이터영역으로 구분될 수 있다.In an embodiment of the present invention, the shared data memory area may be divided into a memory map information area for storing the memory map and a shared data area for storing shared data when performing processes by the cores.

본 발명의 실시예에서, 상기 공유 데이터 메모리영역은, 상기 공유 메모리가 싱글 포트 램 또는 더블 포트 램이 아닌 경우, 메모리의 접근 제한 정보가 저장되는 접근 제어 영역을 더 포함할 수 있다.In an embodiment of the present invention, when the shared memory is not a single port RAM or a double port RAM, the shared data memory area may further include an access control area in which access restriction information of the memory is stored.

본 발명의 실시예에서, 상기 메모리 맵의 주소는 인덱스 또는 오프셋 주소인 것일 수 있다.In an embodiment of the present invention, the address of the memory map may be an index or an offset address.

본 발명의 실시예에서, 상기 송신 프로세스에서 상기 공유 데이터영역의 공유 데이터를 읽는 방식은, 하드웨어 직접 메모리 억세스, 캐시된 메모리 접근 또는 직접 메모리 접근을 통해 읽을 수 있다.In an embodiment of the present invention, a method of reading shared data in the shared data area in the transmission process can be read through a hardware direct memory access, a cached memory access, or a direct memory access.

또한, 본 발명의 다른 측면에 따른 비대칭 멀티프로세싱 시스템의 데이터 공유 방법은, 상기한 비대칭 멀티프로세싱 시스템의 데이터 공유 장치를 이용하여 데이터를 공유하는 방법으로서, a) 송신 프로세스에서 설정된 공유 데이터 영역에 공유 데이터를 저장하는 단계와, b) 저장된 공유 데이터의 주소와 크기 정보를 포함하는 메모리 맵을 작성하여, 메모리 맵 정보영역에 저장하는 단계와, c) 데이터가 저장됨을 수신 프로세스측에 인지시키는 단계와, d) 수신 프로세스측에서 상기 공유 데이터를 읽어 수신하는 단계를 포함할 수 있다.In addition, a data sharing method of an asymmetric multiprocessing system according to another aspect of the present invention is a method of sharing data using a data sharing device of the asymmetric multiprocessing system, a) sharing in a shared data area set in a transmission process. Storing data; b) creating a memory map including address and size information of the stored shared data and storing it in the memory map information area; c) making the receiving process aware that the data is stored; and , d) reading and receiving the shared data at the receiving process side.

본 발명의 실시예에서, 상기 송신 프로세스의 데이터 공유 처리 프레임워크에서, 공유 데이터 영역에 저장한 공유 데이터 접근을 제한하여, 복수의 프로세스가 동시에 동일 공유 데이터에 접근하는 것을 차단하는 단계를 더 포함할 수 있다In an embodiment of the present invention, in the data sharing processing framework of the transmission process, it may further include the step of restricting access to the shared data stored in the shared data area, thereby preventing a plurality of processes from accessing the same shared data at the same time. Can be

본 발명의 실시예에서, 상기 공유 데이터 접근을 제한하는 단계는, 뮤텍스(Mutex), 세마포어(Semaphore) 또는 플래그(Flag)인 공유 자원 보호 기법을 사용할 수 있다.In an embodiment of the present invention, the step of restricting access to shared data may use a shared resource protection scheme such as a mutex, a semaphore, or a flag.

본 발명의 실시예에서, 상기 메모리 맵의 주소는, 인덱스 또는 오프셋 주소를 사용할 수 있다.In an embodiment of the present invention, the address of the memory map may use an index or an offset address.

본 발명의 실시예에서, 상기 d) 단계는, 하드웨어 직접 메모리 억세스, 캐시된 메모리 접근 또는 직접 메모리 접근을 이용할 수 있다.In an embodiment of the present invention, step d) may use a hardware direct memory access, a cached memory access, or a direct memory access.

본 발명은 이종의 운영체계에 의해 동작되는 프로세서를 포함하는 시스템에서, 데이터 공유를 위한 통신 프레임워크와 미리 정의된 공유 메모리의 정보를 제공 프레임워크를 결합하여, 메모리 버퍼 설정과 해제의 빈도를 줄여 오버헤드 발생을 감소시킴으로써, 시스템 응답성을 개선할 수 있는 효과가 있다.The present invention reduces the frequency of setting and canceling memory buffers by combining a communication framework for data sharing and a framework for providing information on a predefined shared memory in a system including processors operated by heterogeneous operating systems. By reducing the occurrence of overhead, there is an effect of improving system responsiveness.

도 1은 일반적인 비대칭 멀티 프로세싱 시스템의 블록 구성도이다.
도 2는 OpenAMP 프레임워크의 블록도이다.
도 3은 OpenAMP 프레임워크의 레이어 구획도이다.
도 4는 이종 OS를 사용하는 코어간 메시지 교환의 예시도이다.
도 5는 OpenAMP 프레임워크의 미디어 억세스 레이어의 구성도이다.
도 6은 OpenAMP 프레임워크의 트랜스포트 레이어의 구성도이다.
도 7은 본 발명 비대칭 멀티프로세싱 시스템의 데이터 공유 장치의 블록 구성도이다.
도 8은 제1코어의 제1공유 데이터 처리 프레임워크의 레이어 구성도이다.
도 9는 본 발명의 바람직한 실시예에 따른 공유 메모리의 영역 구성도이다.
도 10은 공유 데이터 영역에 저장되는 공유 데이터와 메모리 맵 정보영역에 저장되는 메모리 맵의 관계를 나타낸 설명도이다.
도 11은 송수신 영역의 기능을 나타낸 설명도이다.
1 is a block diagram of a general asymmetric multiprocessing system.
2 is a block diagram of the OpenAMP framework.
3 is a layer block diagram of the OpenAMP framework.
4 is an exemplary diagram of message exchange between cores using a heterogeneous OS.
5 is a configuration diagram of a media access layer of the OpenAMP framework.
6 is a configuration diagram of a transport layer of the OpenAMP framework.
7 is a block diagram of an apparatus for sharing data in an asymmetric multiprocessing system according to the present invention.
8 is a layer configuration diagram of a first shared data processing framework of a first core.
9 is a block diagram of a shared memory area according to an exemplary embodiment of the present invention.
10 is an explanatory diagram showing a relationship between shared data stored in a shared data area and a memory map stored in a memory map information area.
11 is an explanatory diagram showing the function of a transmission/reception area.

본 발명의 구성 및 효과를 충분히 이해하기 위하여, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예들을 설명한다. 그러나 본 발명은 이하에서 개시되는 실시예에 한정되는 것이 아니라, 여러가지 형태로 구현될 수 있고 다양한 변경을 가할 수 있다. 단지, 본 실시예에 대한 설명은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위하여 제공되는 것이다. 첨부된 도면에서 구성요소는 설명의 편의를 위하여 그 크기를 실제보다 확대하여 도시한 것이며, 각 구성요소의 비율은 과장되거나 축소될 수 있다.In order to fully understand the configuration and effects of the present invention, preferred embodiments of the present invention will be described with reference to the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various forms and various modifications may be made. However, the description of the present embodiment is provided to complete the disclosure of the present invention, and to fully inform the scope of the invention to those of ordinary skill in the art to which the present invention pertains. In the accompanying drawings, for convenience of explanation, the size of the components is enlarged compared to the actual one, and the ratio of each component may be exaggerated or reduced.

'제1', '제2' 등의 용어는 다양한 구성요소를 설명하는데 사용될 수 있지만, 상기 구성요소는 위 용어에 의해 한정되어서는 안 된다. 위 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용될 수 있다. 예를 들어, 본 발명의 권리범위를 벗어나지 않으면서 '제1구성요소'는 '제2구성요소'로 명명될 수 있고, 유사하게 '제2구성요소'도 '제1구성요소'로 명명될 수 있다. 또한, 단수의 표현은 문맥상 명백하게 다르게 표현하지 않는 한, 복수의 표현을 포함한다. 본 발명의 실시예에서 사용되는 용어는 다르게 정의되지 않는 한, 해당 기술분야에서 통상의 지식을 가진 자에게 통상적으로 알려진 의미로 해석될 수 있다.Terms such as'first' and'second' may be used to describe various elements, but the elements should not be limited by the above terms. The above terms can be used only for the purpose of distinguishing one component from another component. For example, without departing from the scope of the rights of the present invention, the'first element' may be referred to as the'second element', and similarly, the'second element' may also be named as the'first element'. I can. In addition, expressions in the singular include plural expressions unless clearly expressed otherwise in the context. Terms used in the embodiments of the present invention may be interpreted as meanings commonly known to those of ordinary skill in the art, unless otherwise defined.

이하에서는, 도면을 참조하여 본 발명의 일실시예에 따른 모션 제어기의 오류 추적방법에 대하여 상세히 설명한다.Hereinafter, an error tracking method of a motion controller according to an embodiment of the present invention will be described in detail with reference to the drawings.

도 7은 본 발명 비대칭 멀티프로세싱 시스템의 데이터 공유 장치의 블록 구성도이다.7 is a block diagram of an apparatus for sharing data in an asymmetric multiprocessing system according to the present invention.

도 7을 참조하면 본 발명 비대칭 멀티프로세싱 시스템의 데이터 공유 장치는, 제1종의 OS(OS-1)에 의해 제1프로세스(110)를 수행하고, 제1통신 프레임워크(120)와 제1공유 데이터 처리 프레임워크(130)를 포함하는 제1코어(100)와, 상기 제1종의 OS와는 다른 종류인 제2종의 OS(OS-2)에 의해 제2프로세스(210)를 수행하고, 제2통신 프레임워크(220)와 제2공유 데이터 처리 프레임워크(230)를 포함하는 제2코어(200)와, 상기 제1프로세스(110)와 제2프로세스(210)를 각각 저장하는 제1영역(310) 및 제2영역(320)과, 상기 제1코어(100)와 제2코어(200)의 제1통신 프레임워크(120) 또는 제2통신 프레임워크(220)를 이용한 통신 데이터를 저장하는 통신 메모리영역(330) 및 제1공유 데이터 처리 프레임워크(230)와 제2공유 데이터 처리 프레임워크(230)의 데이터를 저장하는 공유 데이터 메모리영역(240)을 포함하는 공유 메모리(300)를 포함한다.Referring to FIG. 7, the data sharing apparatus of the asymmetric multiprocessing system of the present invention performs a first process 110 by a first type of OS (OS-1), and the first communication framework 120 and the first The second process 210 is performed by a first core 100 including a shared data processing framework 130 and a second type of OS (OS-2), which is a different type from the first type of OS, and , A second core 200 including a second communication framework 220 and a second shared data processing framework 230, and a first process for storing the first process 110 and the second process 210, respectively. Communication data using the first and second regions 310 and 320 and the first communication framework 120 or the second communication framework 220 of the first and second cores 100 and 200 A shared memory 300 including a communication memory area 330 for storing data and a shared data memory area 240 for storing data of the first shared data processing framework 230 and the second shared data processing framework 230. ).

이하, 상기와 같이 구성되는 본 발명 비대칭 멀티프로세싱 시스템의 데이터 공유 장치의 구성과 작용에 대하여 좀 더 상세히 설명 한다.Hereinafter, the configuration and operation of the data sharing device of the asymmetric multiprocessing system of the present invention configured as described above will be described in more detail.

먼저, 본 발명에서 언급하는 비대칭 멀티 프로세싱 시스템은 각기 다른 OS에의해 정해진 프로세스를 각각 수행하는 프로세서(필요에 따라서는 프로세서의 핵심 요소인 코어를 지칭함)를 포함한다.First, the asymmetric multi-processing system referred to in the present invention includes a processor (referring to a core, which is a core element of the processor, if necessary) that performs processes determined by different OSs.

프로세서는 CPU, MPU 등 좁은 의미로 해석되는 의미가 아닌 OS에 의해 구동되며, 연산을 통해 프로세스를 수행하는 장치의 개념으로 넓게 해석되어야 한다.The processor is driven by the OS, not in a narrow sense, such as CPU or MPU, and should be broadly interpreted as a concept of a device that performs a process through an operation.

제1코어(100)는 제1프로세서와 동일한 의미이며, 동일하게 제2코어(200) 역시 제2프로세서와 동일한 의미로 사용될 수 있다.The first core 100 has the same meaning as the first processor, and the second core 200 may also have the same meaning as the second processor.

도면의 구성에서 하드웨어의 구성과 소프트웨어(또는 데이터) 구성이 동시에 표시될 수 있으며, 이러한 소프트웨어 또는 데이터의 구성은 해당 하드웨어에서 실행 또는 해당 하드웨어에 저장되는 것으로 이해되어야 한다.In the configuration of the drawings, the configuration of the hardware and the configuration of software (or data) may be displayed at the same time, and it should be understood that the configuration of such software or data is executed on or stored in the corresponding hardware.

상기 제1코어(100)는 제1종의 OS(OS-1)에 의해 동작하며, 이때 제1종의 OS는 리눅스일 수 있으며, 제2코어(200)가 사용하는 제2종의 OS(OS-2)는 RTOS를 사용하는 것일 수 있다.The first core 100 is operated by a first type of OS (OS-1). In this case, the first type of OS may be Linux, and the second type of OS used by the second core 200 ( OS-2) may be to use an RTOS.

제1코어(100)와 제2코어(200)간 통신을 위한 제1통신 프레임워크(120)와 제2통신 프레임워크(220)로 OpenAMP를 사용할 수 있으나, 본 발명이 이에 제한되는 것은 아니다.OpenAMP may be used as the first communication framework 120 and the second communication framework 220 for communication between the first core 100 and the second core 200, but the present invention is not limited thereto.

비대칭 멀티프로세싱 시스템에서 사용할 수 있는 통신 프레임워크로 알려진 하이퍼바이저(Hypervisor) 또는 MCAPI(Multicore Communication API)를 사용할 수 있다.It is possible to use a hypervisor or MCAPI (Multicore Communication API) known as a communication framework that can be used in an asymmetric multiprocessing system.

제1코어(100)와 제2코어(200)의 제1프로세스(110)와 제2프로세스(210)는 하나의 공유 메모리(300)에 저장되며, 이때 제1프로세스(110)와 제2프로세스(210)는 각기 다른 영역인 제1영역(310)과 제2영역(320)에 각각 저장되는 것을 특징으로 한다.The first process 110 and the second process 210 of the first core 100 and the second core 200 are stored in one shared memory 300, and at this time, the first process 110 and the second process 210 is characterized in that they are respectively stored in the first area 310 and the second area 320, which are different areas.

제1코어(100)와 제2코어(200)는 통신 프레임워크 이외에 공유 데이터를 처리하기 위한 공유 데이터 처리 프레임워크를 각각 수행하는 것으로 한다. It is assumed that the first core 100 and the second core 200 respectively perform a shared data processing framework for processing shared data in addition to the communication framework.

도 8은 제1코어(100)의 제1공유 데이터 처리 프레임워크(130)의 레이어 구성도이다.8 is a layer configuration diagram of the first shared data processing framework 130 of the first core 100.

제1공유 데이터 처리 프레임워크(130)는 관리영역(131), 제어영역(132), 송수신영역(133)으로 이루어지며, 제2코어(200)의 제2공유 데이터 처리 프레임워크(230) 또한 별도의 도면으로 도시하지는 않았으나, 제1공유 데이터 처리 프레임워크(130)와 동일하게 관리영역, 제어영역, 송수신영역으로 이루어진다.The first shared data processing framework 130 is composed of a management area 131, a control area 132, and a transmission/reception area 133, and the second shared data processing framework 230 of the second core 200 is also Although not shown in a separate drawing, the first shared data processing framework 130 includes a management area, a control area, and a transmission/reception area.

제1공유 데이터 처리 프레임워크(130)의 구체적인 구성과 작용에 대해서는 이후에 좀 더 상세히 설명하기로 한다.A detailed configuration and operation of the first shared data processing framework 130 will be described in more detail later.

도 9는 본 발명의 바람직한 실시예에 따른 공유 메모리(300)의 영역 구성도이다. 9 is a block diagram of a shared memory 300 according to an exemplary embodiment of the present invention.

도 9를 참조하면 상기 공유 데이터 메모리 영역(340)은 다시 메모리 맵 정보영역(341), 접근 제어영역(342), 공유 데이터영역(343)으로 나눠진다.Referring to FIG. 9, the shared data memory area 340 is further divided into a memory map information area 341, an access control area 342, and a shared data area 343.

상기 공유 데이터 메모리 영역(340)은 제1코어(100)의 제1공유 데이터 처리 프레임워크(130)과 제2코어(200)의 제2공유 데이터 처리 프레임워크(230)에 의해 처리되는 것으로 한다.It is assumed that the shared data memory area 340 is processed by the first shared data processing framework 130 of the first core 100 and the second shared data processing framework 230 of the second core 200. .

앞서 설명한 바와 같이 제1공유 데이터 처리 프레임워크(130)은 관리 영역(131), 제어 영역(132), 송수신 영역(133)으로 이루어지며, 관리 영역(131)은 공유 메모리(300)의 공유 데이터 메모리 영역(340)의 메모리 맵 정보영역(341)에 공유 데이터의 정보를 저장하는 역할을 한다.As described above, the first shared data processing framework 130 includes a management area 131, a control area 132, and a transmission/reception area 133, and the management area 131 is the shared data of the shared memory 300. It serves to store shared data information in the memory map information area 341 of the memory area 340.

또한, 제어 영역(132)은 접근 제어영역(342)에 데이터를 기록하여 공유 메모리(300)에 대한 접근 제어를 설정한다.In addition, the control area 132 sets access control for the shared memory 300 by recording data in the access control area 342.

아울러 송수신 영역(133)은 공유 데이터를 공유 데이터 영역(343)에 저장하는 역할을 한다.In addition, the transmission/reception area 133 serves to store shared data in the shared data area 343.

도 10은 공유 데이터 영역(343)에 저장되는 공유 데이터와 메모리 맵 정보영역(341)에 저장되는 메모리 맵의 관계를 나타낸 설명도이다.10 is an explanatory diagram showing a relationship between shared data stored in the shared data area 343 and a memory map stored in the memory map information area 341.

도 10을 참조하면, 관리 영역(131)에는 제1코어(100)에서 프로그램의 수행으로 얻어진 데이터의 컴파일 입력과 외부 입력에 의해 정의되는 런타임 입력에 따라 메모리 맵을 지정하여 저장한다.Referring to FIG. 10, a memory map is designated and stored in the management area 131 according to a compilation input of data obtained by executing a program in the first core 100 and a runtime input defined by an external input.

상기 런타임의 입력은 프로세스의 처리 순서에 관한 것으로, 런타임 입력을 변화도 공유 데이터의 갱신으로 처리될 수 있다.The input of the runtime relates to a processing sequence of a process, and a change in the runtime input may be processed as an update of shared data.

메모리 맵 정보영역(341)에 저장되는 메모리 맵은 공유 데이터 영역(343)에 저장되는 데이터들의 저장영역 주소와 데이터 크기에 대한 정보를 가지고 있다.The memory map stored in the memory map information area 341 has information on a storage area address and data size of data stored in the shared data area 343.

도 11은 송수신 영역(133)의 기능을 나타낸 설명도이다.11 is an explanatory diagram showing the function of the transmission/reception area 133. As shown in FIG.

송수신 영역(133)은 프로세스가 송신일 때 공유 메모리(300)의 공유 데이터 영역(343)에 공유 데이터를 쓰고, 메모리 정보를 전송하며, 프로세스가 수신일 때 공유 데이터 영역(343)의 데이터를 읽는 기능을 한다.The transmission/reception area 133 writes shared data to the shared data area 343 of the shared memory 300 when the process is transmitting, transmits memory information, and reads the data of the shared data area 343 when the process is receiving Do it.

이때 메모리 정보는 수신 프로세스측에서 데이터를 공유 데이터 영역(343)에 썼다는 정보를 수신 프로세스측에 전달하는 것을 뜻한다.In this case, the memory information means that the receiving process side transmits information that the data has been written to the shared data area 343 to the receiving process side.

이때 메모리 정보는 제1통신 프레임워크(120)와 공유 메모리(300)의 통신 메모리 영역(330)을 통해 수신 프로세스측의 제2통신 프레임워크(220)로 전달될 수 있다.In this case, the memory information may be transmitted to the second communication framework 220 of the receiving process side through the first communication framework 120 and the communication memory area 330 of the shared memory 300.

아울러 수신 프로세스에서 공유 데이터 영역(343)의 데이터를 읽는다는 의미는 종래와 같이 공유 데이터를 메모리 복사 방식이 아닌 하드웨어 직접 메모리 억세스(direct memory access) 또는 캐시된 메모리 또는 직접 메모리 접근을 통해 읽는 것을 뜻한다.In addition, reading the data in the shared data area 343 in the receiving process means reading the shared data through hardware direct memory access, cached memory, or direct memory access, not through a memory copy method as in the prior art. do.

이러한 읽기 방식을 사용하여 해제 과정이 요구되지 않는다.Using this read method, no release process is required.

다시 도 7을 참조하면, 데이터를 송신하는 송신측이 제1코어(100), 데이터를 수신하는 수신측이 제2코어(200)인 경우로 한정하여 본 발명의 작용을 설명한다.Referring back to FIG. 7, the operation of the present invention will be described by limiting the case where the transmitting side transmitting data is the first core 100 and the receiving side receiving the data is the second core 200.

즉, 제1코어(100)의 제1프로세스(110)는 송신 프로세스이고, 제2코어(200)의 제2프로세스(210)는 데이터를 수신하는 수신 프로세스라 가정한다.That is, it is assumed that the first process 110 of the first core 100 is a transmission process, and the second process 210 of the second core 200 is a reception process that receives data.

제1코어(100)에서 제1프로세스(110)를 수행할 때 제1공유 데이터 처리 프레임워크(130)의 관리 영역(131)은 메모리 맵 관리를 통해 공유 데이터들이 저장되는 주소 및 크기 정보를 메모리 맵 정보영역(341)에 저장한다.When performing the first process 110 in the first core 100, the management area 131 of the first shared data processing framework 130 stores address and size information in which shared data is stored through memory map management. It is stored in the map information area 341.

이와 같은 메모리 맵 정보영역(431)에 저장된 메모리 맵은 제1코어(100)에서 수행되는 제1프로세스(110)와 제2코어(200)에서 수행되는 제2프로세스(210)에서 공유하며, 별도의 메모리 할당 및 해제 처리가 요구되지 않는다.The memory map stored in the memory map information area 431 is shared by the first process 110 performed in the first core 100 and the second process 210 performed in the second core 200, and No memory allocation and deallocation is required.

따라서 메모리의 할당 및 해제 처리의 빈번함에 따라 발생하는 오버 헤드가 발생하지 않는다.Therefore, overhead that occurs due to frequent allocation and deallocation of memory does not occur.

또한, 제1프로세스(110)가 공유(송신)하는 공유 데이터는 공유 메모리(300)의 공유 데이터영역(343)에 저장되어, 제2프로세스(210)에서 메모리 맵을 참조하여 읽어드려 공유하게 되기 때문에 데이터 송수신을 위한 메모리 복사 오버헤드가 발생하지 않는다.In addition, the shared data shared (transmitted) by the first process 110 is stored in the shared data area 343 of the shared memory 300, and is read and shared by the second process 210 by referring to the memory map. Therefore, there is no memory copy overhead for data transmission and reception.

이때, 공유 데이터의 크기에 따라 공유 데이터영역(343)을 가변적으로 설정하고 메모리 맵에 그 정보를 포함시키면 되기 때문에 데이터 크기에 따라 분할을 하는 등의 처리가 불필요하게 된다.In this case, since the shared data area 343 is variably set according to the size of the shared data and the information is included in the memory map, processing such as partitioning according to the data size is unnecessary.

종래에는 서로 다른 OS를 사용하는 비대칭 멀티프로세스 시스템이기 때문에 두 코어 각각의 프로세스 메모리는 상호 공유되지 않고, 메시지 큐의 메모리 할당 및 해제 동작으로 인해 통신 메모리 영역에는 데이터를 상주시킬 수 없으므로, 데이터 공유를 위한 메모리 복사 과정은 필수적으로 수반된다.In the past, since it is an asymmetric multi-process system using different OS, the process memory of each of the two cores is not shared with each other, and data cannot reside in the communication memory area due to memory allocation and release operations of the message queue. The memory copy process for this is essential.

즉, 종래에는 공유 메모리를 할당하지 않고, 통신 프레임워크를 통해 데이터를 메모리에 저장하고, 저장된 데이터가 상주하지 않도록 수신측에서 데이터를 읽은 후 해제하는 과정을 사용하기 때문에 오버헤드가 발생하지만, 본 발명에서는 통신 메모리 영역외에 공유 데이터 메모리 영역(340)을 두어 공유 데이터를 저장하고, 해제 과정 없이 사용이 가능하기 때문에 오버헤드의 발생 염려가 없다.That is, in the past, overhead is incurred because data is stored in memory through a communication framework without allocating shared memory, and the receiving side reads and releases data so that the stored data does not reside. In the present invention, since the shared data memory area 340 is placed in addition to the communication memory area to store shared data and can be used without a release process, there is no fear of overhead.

특히 공유 데이터가 갱신 없이 지속적으로 사용되는 것일 때에는 쓰기 과정을 생략할 수 있기 때문에 효율을 더욱 높일 수 있다.In particular, when the shared data is continuously used without updating, the writing process can be omitted, thereby further enhancing the efficiency.

이처럼 본 발명은 제1프로세스(110)와 제2프로세스(210)간에 데이터 공유가 빈번하게 발생되거나 데이터의 크기가 큰경우 효과를 극대화시킬 수 있으며, 오버헤드 최소화로 인해 빠른 시스템 응답이 요구되는 시스템 구현에 적용 가능하다.As described above, the present invention can maximize the effect when data sharing occurs frequently between the first process 110 and the second process 210 or the size of the data is large, and a system requiring a fast system response due to minimization of overhead. Applicable to implementation.

또한, 제1공유 데이터 처리 프레임워크(130)의 제어 영역(132)은 공유 데이터에 접근 가능한 프로세스를 제한할 수 있다. 본 발명의 예에서는 두 개의 프로세서(또는 코어)에서 수행하는 프로세스의 예에 대하여 설명하지만, OS의 종류가 서로 다른 셋 이상의 프로세서에서 수행될 수 있으며, 이때 공유 데이터에 접근 가능한 프로세서에 대한 정보를 제어 영역(132)에서 공유 메모리(300)의 접근 제어영역(342)에 저장함으로써 제한할 수 있다.In addition, the control area 132 of the first shared data processing framework 130 may limit processes that can access shared data. In the example of the present invention, an example of a process performed by two processors (or cores) is described, but it may be performed by three or more processors having different types of OS, and at this time, information on a processor that can access shared data is controlled. It can be restricted by storing in the access control area 342 of the shared memory 300 in the area 132.

즉, 공유 메모리(300)에 동시에 둘 이상의 접근이 발생하는 것을 방지할 수 있다. That is, it is possible to prevent two or more accesses to the shared memory 300 from occurring at the same time.

특히, 제어 영역(132)은 수신 프로세스에서 공유 메모리(300)에 저장된 데이터를 읽는 도중 송신 프로세스에서 데이터를 갱신하여 정보가 훼손되는 문제를 방지하기 위하여, 둘 이상의 접근을 방지하는 공유 자원 관리를 수행하며, 예를 들어 뮤텍스(Mutex), 세마포어(Semaphore), 플래그(Flag) 등의 공유 자원 보호 기법을 사용할 수 있다.In particular, the control area 132 performs shared resource management that prevents two or more accesses in order to prevent a problem in which information is damaged by updating data in the transmitting process while reading data stored in the shared memory 300 in the receiving process. And, for example, a shared resource protection technique such as a mutex, a semaphore, and a flag may be used.

또한, 제어 영역(132)은 공유 메모리(300) 사용을 완료한 후 타 프로세스에서 공유 데이터를 갱신 가능하도록 제한을 해제할 수 있다.In addition, after the use of the shared memory 300 is completed, the control area 132 may release the restriction so that other processes can update the shared data.

상기 공유 메모리(300)가 싱글 포트 램(Single ported RAM) 또는 다수의 읽기 및 쓰기가 가능한 듀얼 포트 램(Dual ported RAM)인 경우에 상기 제어 영역(132)은 생략될 수 있다.When the shared memory 300 is a single ported RAM or a dual ported RAM capable of reading and writing a plurality of reads and writes, the control region 132 may be omitted.

위의 설명에서는 앞서 가정한 바와 같이 제1코어(100)의 송신 프로세스와 제2코어(200)의 수신 프로세스에 대하여 설명한 것이고, 제2코어(200)가 송신 프로세스를 수행하고, 제1코어(100)가 수신 프로세스를 수행할 때, 제2코어(200)의 제2공유 데이터 처리 프레임워크(230)를 이용하여 공유 메모리(300)에 메모리 정보와 함께 공유 데이터를 기록하고, 제1코어(100)의 제1공유 데이터 처리 프레임워크(130)에서 공유된 데이터를 읽어 사용한다.In the above description, as previously assumed, the transmission process of the first core 100 and the reception process of the second core 200 are described, and the second core 200 performs the transmission process, and the first core ( When 100) performs the reception process, the second shared data processing framework 230 of the second core 200 is used to write shared data together with memory information in the shared memory 300, and the first core ( The shared data is read and used by the first shared data processing framework 130 of 100).

이상에서 본 발명에 따른 실시예들이 설명되었으나, 이는 예시적인 것에 불과하며, 당해 분야에서 통상적 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 범위의 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 다음의 청구범위에 의해서 정해져야 할 것이다.Although the embodiments according to the present invention have been described above, these are merely exemplary, and those of ordinary skill in the art will understand that various modifications and equivalent ranges of embodiments are possible therefrom. Therefore, the true technical protection scope of the present invention should be determined by the following claims.

100:제1코어 110:제1프로세스
120:제1통신 프레임워크 130:제1공유 데이터 처리 프레임워크
200:제2코어 210:제2프로세스
220:제2통신 프레임워크 230:제2공유 데이터 처리 프레임워크
300:공유 메모리 310:제1영역
320:제2영역 330:통신 메모리 영역
340:공유 데이터 메모리 영역
100: first core 110: first process
120: first communication framework 130: first shared data processing framework
200: second core 210: second process
220: second communication framework 230: second shared data processing framework
300: shared memory 310: first area
320: second area 330: communication memory area
340: shared data memory area

Claims (11)

서로 다른 운영체계를 사용하는 복수의 코어와, 상기 복수의 코어들이 공유하는 공유 메모리를 포함하여, 복수의 코어들 각각의 통신 프레임워크에 의해 공유 데이터를 송수신하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치에 있어서,
상기 복수의 코어는 상기 통신 프레임워크 외에 상기 공유 메모리에 공유 데이터가 저장되는 영역을 할당하고, 공유 데이터의 저장 주소 및 크기 정보인 메모리 맵을 저장하는 영역을 할당하는 공유 데이터 처리 프레임워크를 더 포함하고,
수신 프로세스를 수행하는 코어에서 상기 메모리 맵을 참조하여, 상기 공유 데이터를 읽어들여 사용하는 것을 특징으로 하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치.
A data sharing device of an asymmetric multiprocessing system that transmits and receives shared data by a communication framework of each of the plurality of cores, including a plurality of cores using different operating systems and a shared memory shared by the plurality of cores. In,
The plurality of cores further include a shared data processing framework for allocating an area for storing shared data in the shared memory in addition to the communication framework, and for allocating an area for storing a memory map, which is a storage address and size information of the shared data. and,
A data sharing apparatus of an asymmetric multiprocessing system, characterized in that a core performing a reception process refers to the memory map and reads and uses the shared data.
제1항에 있어서,
상기 공유 메모리는,
상기 코어들의 프로세스를 각각 저장하는 영역들과,
상기 통신 프레임워크가 수행되는 통신 메모리 영역과,
상기 공유 데이터 처리 프레임워크가 수행되는 공유 데이터 메모리영역으로 구분되는 것을 특징으로하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치.
The method of claim 1,
The shared memory,
Regions each storing the processes of the cores,
A communication memory area in which the communication framework is performed,
A data sharing apparatus of an asymmetric multiprocessing system, characterized in that divided into a shared data memory area in which the shared data processing framework is performed.
제2항에 있어서,
상기 공유 데이터 메모리영역은,
상기 메모리 맵을 저장하는 메모리 맵 정보영역과,
상기 코어들의 프로세스 수행에서 공유 데이터가 저장되는 공유 데이터영역으로 구분되는 것을 특징으로 하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치.
The method of claim 2,
The shared data memory area,
A memory map information area storing the memory map,
The data sharing apparatus of an asymmetric multiprocessing system, characterized in that the cores are divided into a shared data area in which shared data is stored in process execution.
제3항에 있어서,
상기 공유 데이터 메모리영역은,
상기 공유 메모리가 싱글 포트 램 또는 더블 포트 램이 아닌 경우,
메모리의 접근 제한 정보가 저장되는 접근 제어 영역을 더 포함하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치.
The method of claim 3,
The shared data memory area,
If the shared memory is not single port RAM or double port RAM,
A data sharing device of an asymmetric multiprocessing system further comprising an access control area in which access restriction information of a memory is stored.
제3항에 있어서,
상기 메모리 맵의 주소는 인덱스 또는 오프셋 주소인 것을 특징으로 하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치.
The method of claim 3,
The data sharing apparatus of an asymmetric multiprocessing system, characterized in that the address of the memory map is an index or an offset address.
제3항에 있어서,
상기 송신 프로세스에서 상기 공유 데이터영역의 공유 데이터를 읽는 방식은, 하드웨어 직접 메모리 억세스, 캐시된 메모리 접근 또는 직접 메모리 접근을 통해 읽는 것을 특징으로 하는 비대칭 멀티프로세싱 시스템의 데이터 공유 장치.
The method of claim 3,
The method of reading shared data in the shared data area in the transmission process is a data sharing apparatus of an asymmetric multiprocessing system, characterized in that reading through a hardware direct memory access, a cached memory access, or a direct memory access.
제1항의 비대칭 멀티프로세싱 시스템의 데이터 공유 장치를 이용하여 데이터를 공유하는 방법으로서,
a) 송신 프로세스에서 설정된 공유 데이터 영역에 공유 데이터를 저장하는 단계;
b) 저장된 공유 데이터의 주소와 크기 정보를 포함하는 메모리 맵을 작성하여, 메모리 맵 정보영역에 저장하는 단계;
c) 데이터가 저장됨을 수신 프로세스측에 인지시키는 단계; 및
d) 수신 프로세스측에서 상기 공유 데이터를 읽어 수신하는 단계를 포함하는 비대칭 멀티프로세싱 시스템의 데이터 공유 방법.
As a method of sharing data using the data sharing device of the asymmetric multiprocessing system of claim 1,
a) storing shared data in the shared data area set in the transmission process;
b) creating a memory map including address and size information of the stored shared data and storing it in a memory map information area;
c) notifying the receiving process side that the data is stored; And
d) A data sharing method of an asymmetric multiprocessing system comprising the step of reading and receiving the shared data at a receiving process side.
제7항에 있어서,
상기 송신 프로세스의 데이터 공유 처리 프레임워크에서, 공유 데이터 영역에 저장한 공유 데이터 접근을 제한하여, 복수의 프로세스가 동시에 동일 공유 데이터에 접근하는 것을 차단하는 단계를 더 포함하는 비대칭 멀티프로세싱 시스템의 데이터 공유 방법.
The method of claim 7,
In the data sharing processing framework of the transmission process, data sharing of an asymmetric multiprocessing system further comprises the step of restricting access to shared data stored in the shared data area, thereby preventing a plurality of processes from accessing the same shared data at the same time. Way.
제8항에 있어서,
상기 공유 데이터 접근을 제한하는 단계는,
뮤텍스(Mutex), 세마포어(Semaphore) 또는 플래그(Flag)인 공유 자원 보호 기법을 사용하는 비대칭 멀티프로세싱 시스템의 데이터 공유 방법.
The method of claim 8,
Restricting access to the shared data,
A method of sharing data in an asymmetric multiprocessing system using a shared resource protection technique such as Mutex, Semaphore, or Flag.
제8항에 있어서,
상기 메모리 맵의 주소는,
인덱스 또는 오프셋 주소인 것을 특징으로 하는 비대칭 멀티프로세싱 시스템의 데이터 공유 방법.
The method of claim 8,
The address of the memory map is,
Data sharing method of an asymmetric multiprocessing system, characterized in that the index or offset address.
제8항에 있어서,
상기 d) 단계는,
하드웨어 직접 메모리 억세스, 캐시된 메모리 접근 또는 직접 메모리 접근을 이용하는 비대칭 멀티프로세싱 시스템의 데이터 공유 방법.
The method of claim 8,
Step d),
A method of sharing data in asymmetric multiprocessing systems using hardware direct memory access, cached memory access, or direct memory access.
KR1020190136449A 2019-10-30 2019-10-30 Device and method for sharing data on an asymmetric multi-processing system KR20210051325A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190136449A KR20210051325A (en) 2019-10-30 2019-10-30 Device and method for sharing data on an asymmetric multi-processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190136449A KR20210051325A (en) 2019-10-30 2019-10-30 Device and method for sharing data on an asymmetric multi-processing system

Publications (1)

Publication Number Publication Date
KR20210051325A true KR20210051325A (en) 2021-05-10

Family

ID=75918177

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190136449A KR20210051325A (en) 2019-10-30 2019-10-30 Device and method for sharing data on an asymmetric multi-processing system

Country Status (1)

Country Link
KR (1) KR20210051325A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932454A (en) * 2023-09-15 2023-10-24 湖北芯擎科技有限公司 Data transmission method, device, electronic equipment and computer readable storage medium
KR20230174931A (en) 2022-06-22 2023-12-29 주식회사 아이닉스 System having multiple operation systems and operating method therefor
CN117632799A (en) * 2023-12-05 2024-03-01 合芯科技有限公司 Data processing method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230174931A (en) 2022-06-22 2023-12-29 주식회사 아이닉스 System having multiple operation systems and operating method therefor
CN116932454A (en) * 2023-09-15 2023-10-24 湖北芯擎科技有限公司 Data transmission method, device, electronic equipment and computer readable storage medium
CN117632799A (en) * 2023-12-05 2024-03-01 合芯科技有限公司 Data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11550627B2 (en) Hardware accelerated dynamic work creation on a graphics processing unit
EP3593496B1 (en) System and method for low latency node local scheduling in distributed resource management
JP2009265963A (en) Information processing system and task execution control method
JP4719655B2 (en) Processor control technology on the network
KR20210051325A (en) Device and method for sharing data on an asymmetric multi-processing system
US8533390B2 (en) Circular buffer in a redundant virtualization environment
EP3489815B1 (en) Method and system for low latency data management
WO2012131507A1 (en) Running a plurality of instances of an application
US8943516B2 (en) Mechanism for optimized intra-die inter-nodelet messaging communication
US20070198998A1 (en) Method, apparatus and program storage device for preserving locked pages in memory when in user mode
US11347546B2 (en) Task scheduling method and device, and computer storage medium
CN111857993B (en) Method for calling user mode function in kernel mode
US10241829B2 (en) Information processing device, information processing method, recording medium, calculation processing device, calculation processing method
US10459771B2 (en) Lightweight thread synchronization using shared memory state
Chen et al. A three-slot asynchronous reader/writer mechanism for multiprocessor real-time systems
US20130247065A1 (en) Apparatus and method for executing multi-operating systems
JP2019164661A (en) Information processing device, information processing method and program
KR20180065882A (en) Multi-core processor and operation method thereof
CN114371920A (en) Network function virtualization system based on graphic processor accelerated optimization
US10261817B2 (en) System on a chip and method for a controller supported virtual machine monitor
US7320044B1 (en) System, method, and computer program product for interrupt scheduling in processing communication
JP5163128B2 (en) Procedure calling method, procedure calling program, recording medium, and multiprocessor in shared memory multiprocessor
JP2021060707A (en) Synchronization control system and synchronization control method
TW201432461A (en) High throughput low latency user mode drivers implemented in managed code
WO2009110084A1 (en) Process control method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal