KR100397502B1 - Dynamic interface method across multiple processor units in a multiprocessing system - Google Patents

Dynamic interface method across multiple processor units in a multiprocessing system Download PDF

Info

Publication number
KR100397502B1
KR100397502B1 KR10-2001-0041163A KR20010041163A KR100397502B1 KR 100397502 B1 KR100397502 B1 KR 100397502B1 KR 20010041163 A KR20010041163 A KR 20010041163A KR 100397502 B1 KR100397502 B1 KR 100397502B1
Authority
KR
South Korea
Prior art keywords
message
area
size
blocks
block
Prior art date
Application number
KR10-2001-0041163A
Other languages
Korean (ko)
Other versions
KR20030005734A (en
Inventor
박창서
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR10-2001-0041163A priority Critical patent/KR100397502B1/en
Publication of KR20030005734A publication Critical patent/KR20030005734A/en
Application granted granted Critical
Publication of KR100397502B1 publication Critical patent/KR100397502B1/en

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

본 발명은 다중처리시스템에서 전달하려는 메시지에 대한 정보와 메시지 내용을 분리하여 관리하는 기법을 통해 송신 메시지 크기에 따라 가변적인 메모리 할당을 수행함으로써 공유메모리의 활용도를 증대시킨 것으로, 이러한 본 발명은, 다중처리시스템의 각 프로세서 유닛 사이의 인터페이스를 위해 큐 방식의 메시지 풀 운용시, 프로세서 유닛간에 전송될 메시지를 저장하기 위한 공유 메모리의 저장공간을 메시지 정보영역과 메시지 기록영역으로 구분하여, 메시지 정보영역에 대해서는 각 메시지 블록마다 일정한 크기를 할당하고, 메시지 기록영역에 대해서는 최후로 기록된 어드레스에 이어쓰는 순차쓰기가 적용되도록 하여 메시지 풀을 구성한 후 초기화하는 단계와; 메시지 풀을 통해 메시지 전송이 요청되는 경우, 메시지 기록영역의 현재 어드레스 포인터 위치를 포함하여 해당 메시지에 대한 정보를 메시지 정보영역에 기록하고, 메시지 정보영역에 기록된 어드레스 포인터가 지시하는 위치에 전송대상 메시지의 메시지 내용을 순차쓰기한 후, 정보영역의 어드레스 포인터 위치와 상기 기록된 전송대상 메시지의 크기를 합산한 결과에 따라 현재 어드레스 포인터 위치를 갱신시키는 단계를 포함하여 이루어져, 메모리 사용효율의 증대를 가능케 하고 메시지 크기의 제한 극복할 수 있게 된다.The present invention is to increase the utilization of the shared memory by performing a variable memory allocation according to the transmission message size through a technique for separating and managing information about the message to be delivered in the multi-processing system and the message content, the present invention, In the queued message pool operation for the interface between each processor unit of the multiprocessing system, the message information area is divided into a message information area and a message recording area for storing a storage space for storing messages to be transmitted between the processor units. Assigning a predetermined size for each message block, and configuring and initializing a message pool by applying a sequential write following the last recorded address in the message recording area; When a message transmission is requested through the message pool, information on the message, including the current address pointer position in the message recording area, is recorded in the message information area, and the transmission destination is located at the location indicated by the address pointer recorded in the message information area. After sequentially writing the message contents of the message, updating the current address pointer position according to the result of summing the address pointer position of the information area and the size of the recorded transfer target message, thereby increasing memory usage efficiency. It allows you to overcome the limitations of message size.

Description

다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법 {Dynamic interface method across multiple processor units in a multiprocessing system}Dynamic interface method across multiple processor units in a multiprocessing system}

본 발명은 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법에 관한 것으로, 보다 상세하게는 다중처리시스템에서 전달하려는 메시지에 대한 정보와 메시지 내용을 분리하여 관리하는 기법을 통해 송신 메시지 크기에 따라 가변적인 메모리 할당을 수행함으로써 공유메모리의 활용도를 증대시키기 위한 다중처리시스템의 프로세서 유닛 사이의 동적 인터페이스 방법에 관한 것이다.The present invention relates to a dynamic interface method between processor units of a multiprocessing system. More particularly, the present invention relates to a memory that is variable according to a transmission message size through a technique of separately managing information and message content of a message to be delivered in a multiprocessing system. A dynamic interface method between processor units of a multiprocessing system for increasing the utilization of shared memory by performing allocation.

일반적으로 다중처리시스템은 다수의 프로세서 유닛이 메모리 모듈을 공유하여 운용되는 것으로, 수행속도를 포함하는 성능개선과 신뢰성, 유연성, 가용성 향상을 실현한다.In general, a multiprocessing system is a system in which a plurality of processor units share a memory module, thereby improving performance, including performance, and improving reliability, flexibility, and availability.

도1은 다중처리스템의 블록도이다.1 is a block diagram of a multiprocessing system.

도1에 따르면, 다중처리시스템은 프로세서 유닛을 n개 구비하고 각 프로세서는 국부 메모리를 제어한다. 다수의 프로세서 유닛이 P1(110), P2(120), .... , Pn 일 때 국부 메모리는 LM1(111), LM2(121), ... , LMn 이다(n은 임의의 양의 정수).According to Fig. 1, a multiprocessing system has n processor units and each processor controls a local memory. When multiple processor units are P1 110, P2 120,..., Pn the local memory is LM1 111, LM2 121, ..., LMn (n is any positive integer) ).

각 프로세서 유닛은 공유 메모리를 비롯하여 입출력 채널과 입출력 장치들에 대한 접근 권한을 갖는다. 더불어 프로세서는 처리기 인터럽트 회로망(130)을 이용하여 다른 프로세서와 직접 통신을 통한 데이터 교환을 수행할 수 있다.Each processor unit has access to input / output channels and input / output devices, including shared memory. In addition, the processor may perform data exchange through direct communication with another processor using the processor interrupt network 130.

한편, 공유 메모리를 통하여 프로세서간 간접 통신이 수행된다. 간접통신은 각 프로세서 유닛들이 연결된 상호연결 회로망(140)과, 이 상호연결 회로망(140)상의 데이터를 공유 메모리 또는 입출력 채널과 상호 교환하기 위한 입출력 상호연결 회로망(150)을 경유하여 이루어진다. 이처럼 상호연결 회로망(140)과 입출력 상호연결 회로망(150)은 각 프로세서 유닛과 공유 메모리(160)간 데이터 교환을 위한 인터페이스 기능을 수행하게 된다.Indirect communication between processors is performed through the shared memory. Indirect communication is achieved via an interconnect network 140 to which each processor unit is connected and an input / output interconnect network 150 for exchanging data on the interconnect network 140 with a shared memory or input / output channel. As such, the interconnect network 140 and the input / output interconnect network 150 perform an interface function for data exchange between each processor unit and the shared memory 160.

그리고 공유 메모리(160)는 다수의 프로세서에 의해 생성되고 요청되는 데이터를 저장하기 위한 것으로, 다수의 기억모듈로 이루어진다. 즉 공유 메모리는 기억모듈1, 기억모듈2, ... , 기억모듈m으로 이루어진다(m은 임의의 양의 정수).The shared memory 160 is for storing data generated and requested by a plurality of processors, and includes a plurality of storage modules. That is, the shared memory is composed of storage module 1, storage module 2, ..., storage module m (m is any positive integer).

공유 메모리(160)를 통한 간접통신으로 각 프로세서 유닛간 인터페이스가 수행되는 경우의 메시지 송수신법을 살펴보면, 일반적으로 고정된 크기의 메시지 큐(Queue)를 이용하는 방식이 적용된다.Looking at the message transmission and reception method when the interface between each processor unit is performed by indirect communication through the shared memory 160, a method using a message queue of a fixed size is generally applied.

메시지 큐를 이용하여 인터페이스하는 방식은 프로세서 유닛간에 주고받을 메시지를 정의한 것들 중에서 최대크기의 메시지를 기준으로 메시지 큐의 크기를 설정한다. 송수신 메시지의 정의시 최대크기의 메시지가 결정되면 이를 수용할 수 있는 크기의 블록을 단위로 나누어 전체 공유 메모리(160)를 분할 이용하는 방식이다.The interface using the message queue sets the size of the message queue based on the maximum size message among those defining messages to be exchanged between the processor units. When the maximum message size is determined when defining a transmission / reception message, the entire shared memory 160 is divided by dividing a block having a size that can accommodate the message.

인터페이스를 위한 공유 메모리의 크기가 32K 바이트이고 임의의 두 프로세서 유닛간 인터페이스 메시지 중 최대 크기의 메시지가 256 바이트인 경우를 가정한다. 그러면 공유 메모리를 256 바이트 단위의 블록으로 나누면 128개의 블록이 형성된다. 형성된 블록을 송신 큐와 수신 큐로 구분하면 각각 64개의 인터페이스 블록 큐가 형성된다. 이러한 메시지 큐의 구성은 풀(Pool) 구조를 이룬다.Assume that the size of the shared memory for the interface is 32K bytes and the maximum size of the interface messages between any two processor units is 256 bytes. Then, if shared memory is divided into blocks of 256 bytes, 128 blocks are formed. When the formed blocks are divided into a transmission queue and a reception queue, 64 interface block queues are formed. The configuration of these message queues forms a pool structure.

도2에는 메시지 풀 구성예가 도시되어 있다.2 shows an example message pool configuration.

도2에 따르면 메시지 풀은 최대 메시지 크기가 256 바이트로 설정되어 있고, 각 메시지 블록은 메시지 유형과 메시지 크기를 지시하기 위해 1바이트와 2바이트가 각각 할당된다. 그리고 나머지 253바이트에는 메시지 내용이 실릴 수 있다. 그리고 전체 메시지 블록은 128개이고 그중 64개로써 송신 큐를 구성하고 나머지 64개로써 수신 큐를 구성한다. 공유 메모리의 전체 크기는 32K 바이트가 된다.According to FIG. 2, the message pool has a maximum message size of 256 bytes, and each message block is allocated one byte and two bytes to indicate a message type and a message size. The remaining 253 bytes may contain the content of the message. There are 128 message blocks, 64 of which constitute a send queue and 64 of which constitute a receive queue. The total size of shared memory is 32K bytes.

제시된 메시지 풀 구조에서의 메시지 전송은 다음과 같이 수행된다.Message transmission in the proposed message pool structure is performed as follows.

첫 번째 송신 메시지의 크기가 100 바이트라면 첫 번째 블록에 100 바이트의 공간을 이용하여 전송한다. 이어서 두 번째 송신 메시지가 발생하면 두 번째 블록을 통해 전송이 이루어진다.If the size of the first transmission message is 100 bytes, the data is transmitted using 100 bytes of space in the first block. Subsequently, when the second transmission message occurs, transmission is performed through the second block.

첫 번째 블록의 경우, 256 바이트중에서 오직 100 바이트만이 사용된다. 그러면 156 바이트의 공간은 사용되지 않은 채 이어지는 두 번째 블록이 사용된다. 이러한 체계로 송신 큐의 64개 블록이 모두 사용되면 귀환하여 첫 번째 블록부터 재 사용된다.For the first block, only 100 bytes out of 256 bytes are used. The next block of 156 bytes is then used unused. With this scheme, if all 64 blocks of the send queue are used, they are returned and reused from the first block.

그러나 고정크기의 메시지 큐를 이용하는 종래의 인터페이스 방식은 모든 인터페이스 메시지의 크기가 거의 동일할 때에는 공유 메모리의 사용 효율이 높은 반면, 전송되는 메시지의 최소크기와 최대크기의 편차가 심화됨에 따라 공유 메모리의 사용효율이 급격히 저하되는 문제점이 있다.However, the conventional interface method using a fixed-size message queue has high efficiency of using the shared memory when all the interface messages are almost the same size, while the variation of the minimum and maximum sizes of the transmitted messages is intensified. There is a problem that the use efficiency is sharply lowered.

예를 들어 10개의 인터페이스 메시지가 있고 이들의 크기는 (91, 100) 바이트의 구간에서 1 바이트씩 누증되는 풀 구조라면, 그 메모리 사용효율은 95.5%이다. 그런데 10개의 인터페이스 메시지의 크기가 (10, 100) 바이트 구간에서 10 바이트씩 누증되는 경우에는 메모리 사용효율이 55.5%이다. 더 심화된 편차를 예상해 보면, 10개의 메시지 중 9개의 메시지 크기가 10 바이트이고 나머지 1개의 메시지 크기가 100 바이트일 경우에는 메모리 사용효율이 19%로 떨어진다. 이처럼 메시지 크기의 편차에 따라 사용효율이 가변되는 특성으로 인해 다중처리시스템의 운용효율이 저하되는 것이다.For example, if there are 10 interface messages and their size is a full structure that accumulates by 1 byte in the interval of (91, 100) bytes, the memory efficiency is 95.5%. However, when the size of 10 interface messages is accumulated 10 bytes in the (10, 100) byte interval, the memory usage efficiency is 55.5%. If you anticipate further deviations, the memory usage drops to 19% if nine of the ten messages have a size of 10 bytes and one message has a size of 100 bytes. As such, the operational efficiency of the multiprocessing system is deteriorated due to the characteristic that the efficiency of use varies according to the variation of the message size.

또한, 각 프로세서 유닛간의 안정적인 메시지 전송을 위해 적정수의 인터페이스 블록을 형성하려면 메시지의 최대크기를 제한해야 한다. 종래의 인터페이스 방식은 메시지의 최대크기를 제한하게 되므로, 설정된 최대크기 이상의 메시지는 최대크기 이하가 되도록 분리한 후 두 개 이상의 메시지 블록에 실어 전송해야만 하는 문제점이 있다.In addition, to form an appropriate number of interface blocks for stable message transmission between each processor unit, it is necessary to limit the maximum size of the message. Since the conventional interface method limits the maximum size of a message, there is a problem in that a message having a predetermined maximum size or more must be separated to be less than or equal to the maximum size and then carried on two or more message blocks.

본 발명은 상기와 같은 종래의 문제점을 해소하기 위해 창출된 것으로, 본 발명의 목적은 다중처리시스템에서 전달하려는 메시지에 대한 정보와 메시지 내용을 분리하여 관리하는 기법을 통해 송신 메시지 크기에 따라 가변적인 메모리 할당을 수행함으로써 공유메모리의 활용도를 증대시킨 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법을 제공하는 데 있다.The present invention was created to solve the above-mentioned conventional problems, and an object of the present invention is to vary the information according to the transmission message size through a technique of separately managing information and message content for a message to be delivered in a multiprocessing system. The present invention provides a dynamic interface method between processor units of a multiprocessing system that increases the utilization of shared memory by performing memory allocation.

도1은 일반적인 다중처리시스템의 블록도.1 is a block diagram of a general multiprocessing system.

도2는 종래의 다중처리시스템 공유 메모리의 메시지 풀 구성예시도.2 is an exemplary message pool configuration of a conventional multiprocessing system shared memory.

도3은 본 발명에 따른 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법의 순서도.3 is a flowchart of a method for dynamic interface between processor units in a multiprocessing system according to the present invention.

도4는 본 발명에 따른 공유 메모리의 메시지 풀 구성 예시도.4 is an exemplary message pool configuration of a shared memory according to the present invention.

상기 목적을 달성하기 위한 본 발명의 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법은, (a) 상기 공유메모리는 전송대상 메시지의 내용을 기록하기 위한 메시지 기록영역과 상기 메시지 기록영역에 기록되는 메시지의 정보를 기록하기 위한 메시지 정보영역으로 구성되고, 상기 메시지 정보영역은 복수의 메시지 블록으로 구성되며, 상기 메시지 블록의 각각은 전송대상 메시지의 유형을 나타내는 유형 영역, 전송대상 메시지의 크기를 나타내는 사이즈 영역, 및 상기 메시지 기록영역의 현재 어드레스 포인터 위치를 나타내는 어드레스 영역으로 구성되도록, 상기 공유메모리의 메시지 풀을 구성하는 단계; (b) 상기 공유메모리의 메시지 풀을 초기화하는 단계; (c) 메시지 전송 요청이 있는 경우, 전송대상 메시지의 유형 및 사이즈와 메시지 기록영역의 현재 어드레스 포인터값을 메시지 정보영역의 메시지 블록에 각각 기록하는 단계; (d) 상기 현재 어드레스 포인터값에 의해 지시되는 메시지 기록영역 상의 위치에 상기 전송대상 메시지의 내용을 순차적으로 기록하는 단계; (e) 상기 메시지 블록에 기록된 전송대상 메시지의 크기값과 현재 어드레스 포인터값을 합산하여, 그 합산한 값에 따라 현재 어드레스 포인터 위치를 갱신하는 단계; 및 (f) 상기 복수의 메시지 블록이 모두 사용되었는지를 확인하는 단계를 포함하는 것을 특징으로 한다.Dynamic interface method between the processor unit of the multi-processing system of the present invention for achieving the above object, (a) the shared memory is a message recording area for recording the contents of the message to be transferred and the message recorded in the message recording area A message information area for recording information, wherein the message information area includes a plurality of message blocks, each of the message blocks having a type area indicating a type of a message to be transmitted, and a size area indicating a size of a message to be transmitted. And configuring a message pool of the shared memory so as to consist of an address area indicating a current address pointer position of the message recording area; (b) initializing a message pool of the shared memory; (c) if there is a message transmission request, recording the type and size of the message to be transmitted and the current address pointer value of the message recording area into the message block of the message information area, respectively; (d) sequentially writing the contents of the message to be transmitted to a position on the message recording area indicated by the current address pointer value; (e) summing the size value of the transmission target message and the current address pointer value recorded in the message block, and updating the current address pointer position according to the sum value; And (f) checking whether all of the plurality of message blocks have been used.

이러한 시계열적 흐름을 갖는 본 발명은 다중처리 시스템의 프로세서 유닛간 인터페이스에 적용된다. 다수의 프로세서 유닛이 공유 메모리에 접근하는 과정이 인터페이스 기법에 의해 제어된다. 본 발명은 인터페이스에 동적 메모리 할당기법을 적용함으로써 동적 인터페이스를 실현한다.The present invention having such a time series flow is applied to an interface between processor units of a multiprocessing system. The process by which multiple processor units access shared memory is controlled by interface techniques. The present invention realizes a dynamic interface by applying a dynamic memory allocation technique to the interface.

다중처리 시스템의 공유 메모리는 큐(Queue) 방식으로 운용되는데, 공유 메모리에 대한 메시지 풀 구성시 메시지 정보영역과 메시지 기록영역으로 구분 운용한다. 메시지 정보영역은 메시지에 대한 주요정보를 저장하는 영역이며, 메시지 기록영역은 메시지의 내용을 기록하는 영역이다. 메시지 정보영역은 메시지 풀 초기화시 일정한 크기로 세팅되는데 비해, 메시지 기록영역은 어드레스 포인터가 지시하는 위치에 메시지 내용이 순차적으로 기록되는 방식으로 운용된다.Shared memory of a multiprocessing system is operated in a queue manner. When a message pool for shared memory is configured, it is divided into a message information area and a message recording area. The message information area is an area for storing main information about the message, and the message recording area is an area for recording the contents of the message. While the message information area is set to a certain size when the message pool is initialized, the message recording area is operated in such a manner that the message contents are sequentially recorded at the location indicated by the address pointer.

전송대상 메시지가 발생하면 해당 메시지에 대한 일정한 정보가 메시지 정보영역에 기록된다. 정보영역에 기록되는 메시지 정보는 메시지 유형, 메시지 사이즈 및 메시지 어드레스를 포함하는 것이 바람직하다. 여기서, 메시지 어드레스는 메시지 기록영역에서의 어드레스 포인터의 현재 위치를 나타낸다.When a message to be transmitted occurs, certain information about the message is recorded in the message information area. The message information recorded in the information area preferably includes a message type, a message size and a message address. Here, the message address indicates the current position of the address pointer in the message recording area.

메시지 정보영역에 기록이 이루어지면, 해당 전송대상 메시지를 메시지 어드레스가 지시하는 위치에서부터 연속적으로 기록한다. 메시지 내용의 기록이 완료되면 현재 포인터는 최후의 기록이 끝난 직후의 어드레스를 지시하게 된다. 메모리의 포인터 운용기법은 잘 알려진 바와 같으며, 그 기법상의 상이로 인해 본 발명의 구성 및 작용이 한정되지 않는다.When recording is made in the message information area, the message to be transmitted is continuously recorded from the position indicated by the message address. When the recording of the message contents is completed, the current pointer indicates the address immediately after the last recording. The pointer operating technique of the memory is well known, and the construction and operation of the present invention are not limited due to the difference in the technique.

본 발명에서 메시지 기록영역은 미리 일정한 크기 단위로 분할되어 운용되지 않고 순차쓰기 방식으로 운용되며 동적 메모리 할당이 이루어진다. 종래 공유 메모리를 일정한 크기 단위로 미리 분할하여 설정된 크기 단위로 이용하는 점과 다른 것이다.In the present invention, the message recording area is not divided into a predetermined size unit in advance and is operated in a sequential write manner, and dynamic memory allocation is performed. The conventional shared memory is divided into predetermined size units in advance and used in a set size unit.

이하, 첨부도면을 참조하여 본 발명에 따른 적절한 실시예를 설명한다.Hereinafter, with reference to the accompanying drawings will be described a preferred embodiment according to the present invention.

도3은 본 발명에 따른 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법의 순서도이고, 도4는 본 발명에 따른 공유 메모리의 메시지 풀 구성 예시도이다.3 is a flowchart of a method for dynamic interface between processor units of a multiprocessing system according to the present invention, and FIG. 4 is a diagram illustrating a message pool configuration of a shared memory according to the present invention.

도3에 따르면, 본 실시예는 공유 메모리의 메시지 풀을 구성함에 있어서 메시지 정보영역과 메시지 기록영역으로 구분하여 운용한다(S310).According to FIG. 3, the present embodiment divides the message information area and the message recording area into a message pool of the shared memory in operation S310.

도4에 따르면, 메시지 정보영역은 바람직하게는 전송대상 메시지 유형영역, 전송대상 메시지의 크기를 기록하기 위한 사이즈 영역 및 전송대상 메시지가 메시지 기록영역에 기록되는 위치를 기록하기 위한 어드레스 영역을 포함하여 이루어진다. 예컨대, 메시지 정보영역의 블록수는 n개이다(n은 임의의 양의 정수). 그리고 각 블록에 대해 유형 영역에는 1 바이트, 사이즈 영역에는 2 바이트, 어드레스 영역에는 2 바이트를 각각 할당한다. 그러면 메시지 정보영역의 각 블록은 5개의 바이트로 이루어지게 된다.According to Fig. 4, the message information area preferably includes a transfer destination message type area, a size area for recording the size of the transfer destination message, and an address area for recording a location where the transfer destination message is recorded in the message recording area. Is done. For example, the number of blocks in the message information area is n (n is any positive integer). For each block, 1 byte is assigned to the type area, 2 bytes to the size area, and 2 bytes to the address area. Each block of the message information area then consists of five bytes.

본 실시예는 다중처리 시스템의 각 프로세서 유닛간 인터페이스에 적용될 수 있다. 다중처리 시스템의 공유 메모리는 큐 방식으로 운용되며, 종래와는 달리 메시지 풀 구성 및 초기화시마다 메시지 정보영역의 블록수를 가변시킬 수 있다. 즉 메시지의 최대크기를 기준으로 메시지 블록을 분할하는 것이 아니고, 메시지 내용은 기록영역에 순차쓰기 되므로 메시지 정보영역으로 할당된 메모리 공간의 크기에 따라 메시지 정보영역의 블록수는 가변될 수 있다. 다만, 단계 S310에서 메시지 풀의 구성시 메시지 블록수가 설정될 것이므로, 일단 한번 설정된 메시지 블록수는 해당 풀을 다시 초기화하지 않는 동안에는 설정된 대로 유지된다.This embodiment can be applied to an interface between each processor unit of a multiprocessing system. The shared memory of the multiprocessing system is operated in a queue manner, and unlike the related art, the number of blocks of the message information area may be changed at every message pool configuration and initialization. In other words, rather than dividing the message block based on the maximum size of the message, the contents of the message are sequentially written to the recording area, so the number of blocks of the message information area may vary according to the size of the memory space allocated to the message information area. However, since the number of message blocks is configured when the message pool is configured in step S310, the number of message blocks once set is maintained as set while not reinitializing the pool.

예컨대, 통계기법을 이용하여 메시지 내용의 표준적인 크기를 산정하고, 그 표준크기에 따라 메시지 풀에 기록될 메시지의 수를 예정하여 이 수치를 근거로 메시지 정보영역의 블록수를 결정할 수도 있다.For example, the statistical size may be used to calculate the standard size of the message content, and the number of messages to be recorded in the message pool according to the standard size may be determined, and the number of blocks of the message information area may be determined based on this number.

단계 S310에서 메시지 풀이 구성되면, 해당 메시지 풀을 초기화한다. 메시지 풀의 초기화는 적어도 두 가지 방식으로 이루어질 수 있다. 본 실시예에서 채용한 초기화 기법의 경우, 메시지 정보영역의 메시지 블록은 최선두 블록으로 복귀시키고 메시지 기록영역의 어드레스 포인터는 최선두 어드레스로 복귀시킨다(S320).If the message pool is configured in step S310, the message pool is initialized. Initialization of the message pool can be done in at least two ways. In the initialization technique employed in this embodiment, the message block of the message information area is returned to the most significant block and the address pointer of the message recording area is returned to the most significant address (S320).

가능한 초기화 기법의 예를 더 들어 보면, 메시지 풀 구성 직후의 최초 초기화시에는 본 실시예와 같이 메시지 블록과 어드레스 포인터를 최선두로 복귀시키는 한편, 메시지 풀 운용중에 설정된 메시지 블록이 모두 사용되어 초기화를 수행하는 경우에는 메시지 기록영역의 어드레스 포인터는 현재 위치에 그대로 유지시키고 메시지 정보영역의 메시지 블록만을 최선두로 복귀시키는 방식을 채택할 수도 있다.메시지 기록영역의 메시지 내용은 어드레스 포인터를 참조하여 언제든지 엑세스할 수 있기 때문에 선택에 따라서는 메시지 기록영역의 초기화를 재차 수행하지 않아도 되는 것이다.As an example of a possible initialization technique, in initial initialization immediately after the message pool configuration, the message block and the address pointer are returned to the head as shown in the present embodiment, and all the message blocks set during the message pool operation are used to perform initialization. In this case, the address pointer of the message recording area may be kept at the current position and only the message block of the message information area may be returned to the top. The message contents of the message recording area may be accessed at any time by referring to the address pointer. Therefore, depending on the selection, the message recording area does not need to be initialized again.

단계 S320에서 메시지 풀의 초기화가 이루어지면, 메시지 전송이 요구되는지를 판정한다(S330).When the message pool is initialized in step S320, it is determined whether message transmission is required (S330).

프로세서 유닛의 요청에 따라 전송하는 메시지를 전송대상 메시지라 칭하기로 한다. 전송대상 메시지는 송신 메시지와 수신 메시지로 구분할 수 있으나, 송수신에 따른 메시지 풀 운용 기법상의 상이점을 고려하지 않고 전송대상 메시지로 통칭하기로 하며, 이하에서는 메시지 송신시를 예시하여 설명한다.A message transmitted according to a request of the processor unit will be referred to as a transmission target message. The transmission target message may be classified into a transmission message and a reception message, but will be collectively referred to as a transmission target message without considering a difference in a message pool operation scheme according to transmission and reception. Hereinafter, the message transmission time will be described.

단계 S330에서 메시지 송신 요청이 발해지지 않는 동안에는 대기상태를 유지하다가 메시지 송신 요청이 확인되면, 첫 번째 송신될 전송대상 메시지에 대한 정보를 메시지 정보영역에 기록한다(S340~S350).If the message transmission request is confirmed while the message transmission request is not issued in step S330, the information on the first transmission target message is recorded in the message information area (S340 to S350).

단계 S340을 비롯하여 첨부도에 사용된 변수 'N'은 송신메시지의 전후 관계를 그 서열에 따라 나타내기 위한 것이다. 이에 따른 대응관계를 살펴보면, N번째 전송대상 메시지에 대한 정보는 (N-1)번 메시지 블록에 기록되는 체계로 이루어진다.The variable 'N' used in the accompanying drawings, including step S340, is for indicating the front-rear relation of the transmission message according to the sequence. According to the corresponding relationship, the information on the N th transmission target message is composed of a system recorded in the message block (N-1).

단계 S350에서 기록되는 전송대상 메시지에 대한 정보의 경우, 유형 영역에는 송신 메시지인지 수신 메시지인지 여부가 기록되고, 사이즈 영역에는 송신 메시지의 크기가 기록되며, 어드레스 영역에는 현재 어드레스 포인터값이 기록된다.In the case of the information on the transmission target message recorded in step S350, whether the transmission message or the reception message is recorded in the type area, the size of the transmission message is recorded in the size area, and the current address pointer value is recorded in the address area.

이어서 현재 어드레스 포인터로 지시되는 위치에 메시지 내용을 기록한다.메시지 기록영역에서 메시지는 순차쓰기 되며, 메시지가 기록됨에 따라 비어있는 공간은 줄어든다. 이때 기록되는 전송대상 메시지의 크기에 대한 제한은 없다(S360).Subsequently, the contents of the message are recorded at the position indicated by the current address pointer. In the message recording area, the messages are sequentially written, and the empty space is reduced as the message is written. At this time, there is no restriction on the size of the transmission target message (S360).

단계 S360에서 메시지 기록영역에 전송대상 메시지를 기록하였으면, 메모리 어드레스의 동적할당을 위해 어드레스 포인터를 적정한 위치로 이동시킨다. 메시지 기록영역이 순차쓰기 방식을 채용하고 있으므로, 어드레스 포인터의 이동위치는 상기 기록된 메시지의 크기와 현재의 포인터값을 합산한 결과에 따라 결정된다. 예를 들어 새로운 포인터값(address[N])은 현재 블록의 어드레스 영역값(address[N-1])과 현재 블록의 사이즈 영역값(size[N-1])의 합으로 산출될 수 있다(S370).If the transfer destination message is recorded in the message recording area in step S360, the address pointer is moved to an appropriate position for dynamic allocation of the memory address. Since the message recording area adopts a sequential writing method, the movement position of the address pointer is determined according to the result of summing the size of the recorded message and the current pointer value. For example, the new pointer value address [N] may be calculated as the sum of the address area value address [N-1] of the current block and the size area value size [N-1] of the current block ( S370).

단계 S370이 수행되어 현재 어드레스 포인터값이 결정되면, 단계 S310에서 구성된 메시지 정보영역의 메시지 블록이 모두 사용되었는지 여부를 판정한다. 예를 들어 메시지 블록이 n개이면, 누적 계수된 변수 N이 (n-1)값을 가질 때 메시지 블록이 모두 사용된 것으로 판정할 수 있다(S380).When step S370 is performed to determine the current address pointer value, it is determined whether all the message blocks of the message information area configured in step S310 are used. For example, if there are n message blocks, it may be determined that all of the message blocks are used when the cumulative counted variable N has a value of (n-1) (S380).

단계 S380에서 모든 메시지 블록이 사용되지 않은 것으로 판정되면, 단계 S330으로 복귀하여 다음 번 전송대상 메시지의 발생여부를 기다려 단계 S340~S380을 반복 수행한다. 이와는 달리 단계 S380에서 모든 메시지 블록이 사용되었음이 확인되면, 단계 S320으로 복귀하여 메시지 풀을 초기화한 후 단계 S330~S380을 반복 수행한다.If it is determined in step S380 that all message blocks are not used, the process returns to step S330 and waits for the next transmission target message to be generated and repeats steps S340 to S380. Unlike this, when it is confirmed in step S380 that all message blocks are used, the process returns to step S320 to initialize the message pool, and then repeats steps S330 to S380.

본 실시예에서 인터페이스를 위한 전체 공유 메모리의 크기가 32K 바이트일 때 하나의 메시지에 대한 정보를 표시하기 위한 메시지 블록의 크기를 5바이트로설정한 경우를 가정한다. 종래와 같이 128개의 메시지 블록수를 설정하게 되면, 메시지 정보영역 전체는 640(=5*128) 바이트를 점유하며 나머지 약 31.3K 바이트의 공유 메모리 영역은 메시지 기록영역으로 할당될 수 있다.In the present embodiment, it is assumed that the size of the message block for displaying information about one message is set to 5 bytes when the size of the total shared memory for the interface is 32K bytes. If the number of 128 message blocks is set as in the prior art, the entire message information area occupies 640 (= 5 * 128) bytes, and the remaining shared memory area of about 31.3K bytes can be allocated as the message recording area.

그래서 메시지 전송시 첫 번째 송신 메시지의 크기가 100 바이트라면 첫 번째 메시지에 대한 정보를 메시지 정보영역의 0번 블록에 기록한다. 그리고 메시지 기록영역의 0번 어드레스로부터 100 바이트의 공간에 메시지의 내용을 기록하여 전송한다. 이어서 두 번째 송신 메시지가 발생하면 두 번째 메시지에 대한 정보를 1번 블록에 기록하고 메시지 내용은 첫 번째 메시지 내용이 기록된 다음 위치부터 기록해 나가는 체계이다.Thus, if the size of the first message sent is 100 bytes, the information about the first message is recorded in block 0 of the message information area. Then, the content of the message is recorded and transmitted in a space of 100 bytes from address 0 of the message recording area. Subsequently, when the second outgoing message occurs, information about the second message is recorded in block 1, and the message content is recorded from the position after the first message content is recorded.

이상 설명한 실시예는 본 발명의 다양한 변화와 변경에 의한 균등물의 범위에 속하며, 실시예에 대한 기재내용은 본 발명의 특허청구범위를 한정하지 않는다.The embodiments described above fall within the scope of equivalents due to various changes and modifications of the present invention, and the description of the embodiments does not limit the claims of the present invention.

본 발명의 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법에 따르면, 종래 고정크기의 메시지 큐를 이용하는 방식처럼 메시지 크기에 따라 메모리 사용효율이 가변되지 않고 항상 최대의 효율을 갖게 되는 효과가 있다. 두 프로세서 유닛간 인터페이스 메시지에 있어서 메시지 성격에 따라 그 크기의 편차가 상당한 점을 고려해 보면 메모리 사용효율의 증대로 다중처리시스템의 가용성 향상 및 성능개선이 유도될 것이다.According to the dynamic interface method between the processor units of the multi-processing system of the present invention, the memory usage efficiency does not vary according to the message size as in the conventional method of using a message queue of fixed size, and there is an effect of always maximizing efficiency. Considering the considerable variation in the size of the interface messages between the two processor units depending on the nature of the messages, the increased memory usage efficiency will lead to increased availability and improved performance of the multiprocessing system.

또한, 본 발명은 주로 송수신하는 메시지의 크기가 작으면 작을수록 허용되는 메시지의 최대크기가 상대적으로 늘어날 수 있는 가변성이 제공됨으로써 실제적으로 메모리가 허용하는 한도내에서 메시지 크기에 대한 제한이 없어지는 효과를 갖는다.In addition, the present invention is that the smaller the size of the message to be transmitted and received, the smaller the maximum size of the allowed message is provided with the variability that can be relatively increased, so that the effect on the size of the message within the limit allowed by the memory is virtually eliminated Has

Claims (5)

공유메모리를 통하여 프로세서간 간접 통신을 수행하는 다중처리시스템의 각 프로세서 유닛간 인터페이스 방법에 있어서,In the interface method between each processor unit of a multi-processing system for performing indirect communication between processors through a shared memory, (a) 상기 공유메모리는 전송대상 메시지의 내용을 기록하기 위한 메시지 기록영역과 상기 메시지 기록영역에 기록되는 메시지의 정보를 기록하기 위한 메시지 정보영역으로 구성되고, 상기 메시지 정보영역은 복수의 메시지 블록으로 구성되며, 상기 메시지 블록의 각각은 전송대상 메시지의 유형을 나타내는 유형 영역, 전송대상 메시지의 크기를 나타내는 사이즈 영역, 및 상기 메시지 기록영역의 현재 어드레스 포인터 위치를 나타내는 어드레스 영역으로 구성되도록, 상기 공유메모리의 메시지 풀을 구성하는 단계;(a) The shared memory includes a message recording area for recording contents of a message to be transmitted and a message information area for recording information of a message recorded in the message recording area, wherein the message information area includes a plurality of message blocks. Wherein each of the message blocks comprises a type area indicating a type of a message to be transmitted, a size area indicating a size of a message to be transmitted, and an address area indicating a current address pointer position of the message recording area. Configuring a message pool of memory; (b) 상기 공유메모리의 메시지 풀을 초기화하는 단계;(b) initializing a message pool of the shared memory; (c) 메시지 전송 요청이 있는 경우, 전송대상 메시지의 유형 및 사이즈와 메시지 기록영역의 현재 어드레스 포인터값을 메시지 정보영역의 메시지 블록에 각각 기록하는 단계;(c) if there is a message transmission request, recording the type and size of the message to be transmitted and the current address pointer value of the message recording area into the message block of the message information area, respectively; (d) 상기 현재 어드레스 포인터값에 의해 지시되는 메시지 기록영역 상의 위치에 상기 전송대상 메시지의 내용을 순차적으로 기록하는 단계;(d) sequentially writing the contents of the message to be transmitted to a position on the message recording area indicated by the current address pointer value; (e) 상기 메시지 블록에 기록된 전송대상 메시지의 크기값과 현재 어드레스 포인터값을 합산하여, 그 합산한 값에 따라 현재 어드레스 포인터 위치를 갱신하는 단계; 및(e) summing the size value of the transmission target message and the current address pointer value recorded in the message block, and updating the current address pointer position according to the sum value; And (f) 상기 복수의 메시지 블록이 모두 사용되었는지를 확인하는 단계;를 포함하는 것을 특징으로 하는, 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법.(f) confirming whether all of the plurality of message blocks have been used. 제 1 항에 있어서,The method of claim 1, 상기 메시지 정보영역의 복수의 메시지 블록의 블록수는, 통계기법을 이용하여 전송대상 메시지 내용의 표준적인 크기를 산정하고 상기 표준크기에 따라 메시지 기록영역에 기록될 메시지의 수를 예정하여, 이 수치를 근거로 상기 단계 (a)에서 결정되는 것을 특징으로 하는 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법.The number of blocks of the plurality of message blocks in the message information area is calculated by calculating a standard size of the content of the message to be transmitted using a statistical technique and prescribing the number of messages to be recorded in the message recording area according to the standard size. Dynamic interface method between processor units of the multi-processing system, characterized in that determined in step (a) based on. 제 1 항 또는 제 2 항에 있어서,The method according to claim 1 or 2, 복수의 메시지 블록이 모두 사용되었는지를 확인하는 단계 (f)는,(F) checking whether all the plurality of message blocks have been used, 상기 메시지 블록이 모두 사용되지 않은 경우에는, 단계 (c)로 되돌아가서, 최후로 기록된 메시지 블록을 뒤따르는 메시지 블록에 다음 번 전송대상 메시지에 대한 정보가 기록될 수 있도록 하며,If all of the message blocks are not used, the process returns to step (c) so that the information about the next transmission target message can be recorded in the message block following the last recorded message block, 상기 메시지 블록이 모두 사용된 경우에는, 단계 (b)로 되돌아가서, 메시지 정보영역의 메시지 블록을 최선두 블록으로 복귀시키고 상기 최선두 메시지 블록에서부터 전송대상 메시지 정보가 다시 기록될 수 있도록 하는 단계를 더 포함하는 것을 특징으로 하는 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법.If all of the message blocks are used, returning to step (b) further includes returning the message block of the message information area to the headmost block and allowing the transfer destination message information to be rewritten from the headmost message block. Dynamic interface method between the processor unit of the multi-processing system, characterized in that. 제 3 항에 있어서,The method of claim 3, wherein 상기 메시지 블록이 모두 사용되어 메시지 정보영역의 메시지 블록을 최선두 블록으로 복귀시키는 경우, 메시지 기록영역의 어드레스 포인터는 최후의 기록종료 위치를 유지하는 것을 특징으로 하는 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법.When all of the message blocks are used to return the message block of the message information area to the first two blocks, the address pointer of the message recording area maintains the last recording end position. . 제 3 항에 있어서,The method of claim 3, wherein 상기 메시지 블록이 모두 사용되어 메시지 정보영역의 메시지 블록을 최선두 블록으로 복귀시키는 경우, 메시지 기록영역의 어드레스 포인터를 최선두 어드레스로 보귀시키는 것을 특징으로 하는 다중처리시스템의 프로세서 유닛간 동적 인터페이스 방법.And all of the message blocks are used to return the message block of the message information area to the most significant block, and return the address pointer of the message recording area to the most significant address.
KR10-2001-0041163A 2001-07-10 2001-07-10 Dynamic interface method across multiple processor units in a multiprocessing system KR100397502B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0041163A KR100397502B1 (en) 2001-07-10 2001-07-10 Dynamic interface method across multiple processor units in a multiprocessing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0041163A KR100397502B1 (en) 2001-07-10 2001-07-10 Dynamic interface method across multiple processor units in a multiprocessing system

Publications (2)

Publication Number Publication Date
KR20030005734A KR20030005734A (en) 2003-01-23
KR100397502B1 true KR100397502B1 (en) 2003-09-13

Family

ID=27714204

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0041163A KR100397502B1 (en) 2001-07-10 2001-07-10 Dynamic interface method across multiple processor units in a multiprocessing system

Country Status (1)

Country Link
KR (1) KR100397502B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6033628A (en) * 1983-08-04 1985-02-21 Nec Corp Variable queue memory
KR19980056298A (en) * 1996-12-28 1998-09-25 배순훈 Apparatus and method for transmitting dynamic data block using annular queue
KR19990032031A (en) * 1997-10-15 1999-05-06 서정욱 Variable length message handling in circular queue
JP2000148444A (en) * 1998-10-30 2000-05-30 Hewlett Packard Co <Hp> Multi-logical fifo system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6033628A (en) * 1983-08-04 1985-02-21 Nec Corp Variable queue memory
KR19980056298A (en) * 1996-12-28 1998-09-25 배순훈 Apparatus and method for transmitting dynamic data block using annular queue
KR19990032031A (en) * 1997-10-15 1999-05-06 서정욱 Variable length message handling in circular queue
JP2000148444A (en) * 1998-10-30 2000-05-30 Hewlett Packard Co <Hp> Multi-logical fifo system

Also Published As

Publication number Publication date
KR20030005734A (en) 2003-01-23

Similar Documents

Publication Publication Date Title
JP5715644B2 (en) System and method for storing data in a high speed virtual memory system
US6778548B1 (en) Device to receive, buffer, and transmit packets of data in a packet switching network
US8307053B1 (en) Partitioned packet processing in a multiprocessor environment
CN101681297B (en) Arrangements for memory allocation
US20070011396A1 (en) Method and apparatus for bandwidth efficient and bounded latency packet buffering
CN103384877A (en) Storage system comprising flash memory, and storage control method
US8312243B2 (en) Memory management in network processors
US20030056073A1 (en) Queue management method and system for a shared memory switch
CN109388590A (en) Promote the dynamic buffering block management method and device of multi-channel DMA access performance
US7000073B2 (en) Buffer controller and management method thereof
CN115129621B (en) Memory management method, device, medium and memory management module
US20040131055A1 (en) Memory management free pointer pool
US6349150B1 (en) Predictive data compression system and methods
KR100397502B1 (en) Dynamic interface method across multiple processor units in a multiprocessing system
US20130073815A1 (en) Flexible command packet-header for fragmenting data storage across multiple memory devices and locations
WO2012143975A1 (en) Storage apparatus and data control method of the same
US6647477B2 (en) Transporting data transmission units of different sizes using segments of fixed sizes
CN1463125A (en) Large capacity realtime stream processing method for removing dithering in using buffer memory
CN113778688A (en) Memory management system, memory management method, and memory management device
US6851027B2 (en) Memory system organized into blocks of different sizes and allocation method therefor
US20050141516A1 (en) Method and apparatus for using dual free link lists to manage packet memory
EP3244582B1 (en) Switch and data accessing method thereof
CN113722085B (en) Distribution method and distribution system of graphic resources
US20140068220A1 (en) Hardware based memory allocation system with directly connected memory
CN117742938A (en) Historical trend data management method and device

Legal Events

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

Payment date: 20090727

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee