KR0154573B1 - Inter-process communication method in chill simultation environment - Google Patents

Inter-process communication method in chill simultation environment

Info

Publication number
KR0154573B1
KR0154573B1 KR1019940033807A KR19940033807A KR0154573B1 KR 0154573 B1 KR0154573 B1 KR 0154573B1 KR 1019940033807 A KR1019940033807 A KR 1019940033807A KR 19940033807 A KR19940033807 A KR 19940033807A KR 0154573 B1 KR0154573 B1 KR 0154573B1
Authority
KR
South Korea
Prior art keywords
shared memory
module
execution
command
chill
Prior art date
Application number
KR1019940033807A
Other languages
Korean (ko)
Other versions
KR960024999A (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 KR1019940033807A priority Critical patent/KR0154573B1/en
Publication of KR960024999A publication Critical patent/KR960024999A/en
Application granted granted Critical
Publication of KR0154573B1 publication Critical patent/KR0154573B1/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
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/1652Handling requests for interconnection or transfer for access to memory bus based on arbitration in a multiprocessor architecture
    • G06F13/1663Access to shared memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4208Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a system bus, e.g. VME bus, Futurebus, Multibus

Abstract

본 발명은 칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법에 관한 것으로, 교환기 소프트웨어를 호스트에서 시뮬레이션하기 위하여 모듈간 또는 모듈내의 프로세스간 통신 방법을 제공하기 위하여, 일반적인 컴퓨팅 환경에 적용되는 프로세스간 통신 방법에 있어서, 공통 공유 메모리 및 세마포어를 할당한 후에 모듈에 대한 실행 명령어를 수신하면 실행 모듈에 대한 국부 공유 메모리 및 세마포어를 할당하여 모듈을 수행시키는 제1단계; 실행 모듈은 할당된 공유 메모리들을 자신의 주소 공간으로 사용할 수 있도록 어태치한 후에 실행문을 수행시키는 제2단계; 칠(CHILL) 시뮬레이션커널은 프로세스 사이의 통신을 위하여 이벤트, 버퍼 및 시그널에 관한 기능들을 지원하는 제3단계; 및 실행 모듈의 수행이 끝난 후에 할당된 공유 메모리 및 자원을 회수하는 제4단계를 포함하여 통신 소프트웨어의 개발 시간을 단축할 수 있는 효과가 있다.The present invention relates to an interprocess communication method in a CHILL simulation environment, and provides an interprocess communication method in a general computing environment in order to provide an intermodule or intraprocess communication method for simulating a switch software in a host. A method, comprising: a first step of allocating a common shared memory and semaphore and then executing a module by allocating a local shared memory and semaphore for the executing module upon receiving an execution instruction for the module; The executing module executes an execution statement after attaching the allocated shared memories to use its own address space; The chill simulation kernel comprises: a third step of supporting functions on events, buffers, and signals for communication between processes; And a fourth step of recovering the allocated shared memory and the resource after the execution of the execution module is completed, thereby reducing the development time of the communication software.

Description

칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법Interprocess Communication Method in CHILL Simulation Environment

제1도는 본 발명이 적용되는 하드웨어의 구성예시도.1 is an exemplary configuration diagram of hardware to which the present invention is applied.

졔2도는 본 발명에 따른 프로세스간 통신의 개념도.2 is a conceptual diagram of interprocess communication according to the present invention;

제3도는 본 발명에 따른 칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법에 대한 일실시예 흐름도.3 is a flow diagram of an embodiment of an interprocess communication method in a CHILL simulation environment in accordance with the present invention.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

101: 메인 메모리 보드 102: 중앙 처리 보드101: main memory board 102: central processing board

103: 유닉스(UNIX)운영 체계 104: 보조 기억 장치103: UNIX operating system 104: auxiliary storage

105: 입/출력 장치 106: 시스템 버스105: input / output device 106: system bus

본 발명은 칠(CHILL : CCITT High Level Language) 시뮬레이션 환경에서의 프로세스간 통신 방법에 관한 것이다.The present invention relates to an inter-process communication method in a chill (CCITT High Level Language) simulation environment.

독립적으로 실행 가능한 칠(CHILL) 프로그램을 모듈이라 정의하면, 하나의 모듈이 실행될 때에 여러 프로세스가 생성되어 동시에 수행이 될 수 있다. 칠(CHILL)에서 병렬 처리를 위한 기본 단위는 프로세스이며, 프로세스 사이의 동기화 및 통신 기능으로는 이벤트(event), 버퍼(buffer), 시그널(signal)이 있다.If you define an independently executable CHILL program as a module, several processes can be created and executed simultaneously when one module is executed. In CHILL, the basic unit for parallel processing is a process. The synchronization and communication functions between processes are events, buffers, and signals.

이 기능들중 이벤트와 버퍼는 한 실행 모듈내에 있는 프로세스 사이의 동기화 및 통신을 위해서만 이용되며, 모듈간 통신은 시그널을 통해서만 가능하다. 호스트상에서 교환기 소프트웨어를 시뮬레이션하기 위해서는 프로세스간 동기화 및 통신 기능을 지원할 수 있어야 하며, 이들 기능을 지원하기 위하여 칠 쉘(Shell) 및 칠 시뮬레이션커널을 개발하였다.Among these functions, events and buffers are used only for synchronization and communication between processes in an execution module, and inter-module communication is only possible via signals. In order to simulate the exchange software on the host, it is necessary to be able to support inter-process synchronization and communication functions. In order to support these functions, the Chill shell and Chill simulation kernel have been developed.

한 모듈내의 프로세스 상호간 또는 여러 모듈간의 통신은 유닉스(UNIX) 환경하에서 공유 메모리를 통해서 이루어진다. 모듈과 모듈 사이의 통신은 여러 모듈이 공유하는 공통 공유 메모리를 통하여 이루어지고, 한 모듈내의 프로세스 사이의 동기화 및 통신은 그 모듈에 할당된 국부 공유 메모리를 통하여 이루어진다.Communication between processes in one module or between modules is via shared memory under the UNIX environment. Communication between modules is through a common shared memory shared by several modules, and synchronization and communication between processes within a module is through a local shared memory allocated to that module.

칠(CHILL) 쉘은 명령어 처리기로서 사용자에 의하여 주어지는 명령어들을 수행지키며, 사용자는 칠(CHILL) 쉘상에서만 모듈들을 실행시킬 수 있다. 칠(CHILL) 쉘은 모듈간 통신을 위해서 사용할 공통 공유 메모리 및 공유 메모리 상호 배제 기능을 제공하기 위한 세마포어를 할당하고 사용자 명령어를 기다린다.The CHILL shell executes commands given by the user as a command processor, and the user can run modules only on the CHILL shell. The CHILL shell allocates semaphores and waits for user commands to provide common shared memory and shared memory mutual exclusion for use in intermodule communication.

칠 쉘에서는 사용자에 의하여 주어진 명령어를 받아들여 실행시킨 후에 필요한 경우에는 사용자에게 그 정보를 보여준다. 칠 쉘에서 처리하는 명령어로는 실행 명령, 시그널 송신 명령, 현재 프로세스들의 상태를 사용자에게 보여주는 명령 등이 있다. 이들 명령어중 시그널 송신 명령은 사용자가 프로세스에게 직접 시그널 및 메시지를 전달하는 기능을 하며, 프로세스의 상태를 알려주는 명령어는 현재 실행중인 프로세스들의 상태를 사용자에게 알려주는 기능을 한다. 사용자가 시그널을 송신할 경우에는 시그널 및 메시지를 텍스트 형태로 입력하는데 실행중의 프로세스는 이진 데이터만 인식할 수 있으므로 텍스트 테이터를 이해할 수 없는 문제가 발생한다. 또한, 현재 실행 상태에 있는 프로세스의 상태를 사용자에게 알려주는 명령어 수행시 이진 데이터로 된 프로세스 관련 정보를 사용자가 이해할 수 없는 문제가 발생한다.The Chill shell accepts and executes commands given by the user and displays the information to the user if necessary. Commands handled by the Chill shell include commands to execute, commands to send signals, and commands to show the user the status of current processes. Among these commands, the send signal command allows the user to send signals and messages directly to the process, and the command to inform the status of the process is to inform the user of the status of the currently running processes. When the user sends a signal, the user inputs the signal and the message in text form. However, the running process can only recognize the binary data. Therefore, the text data cannot be understood. In addition, when a command that informs the user of the status of a process that is currently running, a user may not understand the process related information in binary data.

이와 같이 현재 실행중인 프로세스와 사용자간에 정보 전달을 위해서는 서로가 이해할 수 있는 형태로 정보를 변환해 주어야 한다. 이러한 문제를 해결하기 위해서 본 발명은 칠 쉘에서 사용자로부터 받아들인 텍스트 정보를 이진 데이터로 변환해 주는 기능 및 프로세스 관련 이진 데이터를 텍스트 데이터로 변환해 주는 기능을 제공한다.As such, in order to transfer information between a currently running process and a user, the information must be converted into a form that can be understood by each other. In order to solve this problem, the present invention provides a function of converting text information received from the user into binary data and a function of converting process related binary data into text data.

이와 같은 데이터 변환 기능을 구현하기 위해서 칠 쉘에서는 다음과 같은 과정을 수행한다. 먼저 칠 프로그램에서 사용되는 시그널 및 프로세스에 관한 정보를 읽어들여 이들 정보들에 대해서 구문 분석을 하면서 심볼 테이블을 구축한다. 다음에 어의분석을 하여 심볼테이블의 내용을 보완한다. 그 다음 사용자 명령어를 받아들여 시그널 송신 명령이면 텍스트로 받아들인 시그널 및 메시지 정보를 심볼 테이블에 있는 정보를 참조하여 프로세스가 이해할 수 있는 이진 데이터로 변환해 준다. 프로세스의 상태를 사용자에게 보여주는 명령이면 현재 칠 쉘상에 있는 프로세스들의 상태에 관한 이진 데이터들을 심볼 테이블을 참조하여 텍스트 데이터로 변환한 후에 사용자에게 보여준다.To implement this data conversion function, the Chill shell performs the following steps. First, it reads information about signals and processes used in the chill program, parses the information, and builds a symbol table. Next, we analyze the symbol table to complement the contents of the symbol table. The next command that accepts a user command and sends a signal converts the received signal and message information into text into binary data that the process can understand by referring to the information in the symbol table. This command shows the status of processes to the user after converting binary data about the status of processes currently in the shell to text data by referring to the symbol table.

프로세스간 동기화 및 통신을 위한 기능을 지원하기 위해서는 프로세스간에 공유 메모리를 공유할 수 있어야 하는데 프로세스간 공유 메모리 공유 방법을 자세히 설명하면 다음과 같다. 칠 쉘은 서로 다른 실행 모듈이 공유할 수 있는 공통 공유 메모리 공간을 배당한 후에 모듈 실행 명령어를 수행할 때마다 실행되는 모듈에 대한 국부 공유 메모리를 배당한다. 실행 모듈에 라이브러리 형태로 포함되는 칠 시뮬레이션 커널에서는 칠 쉘에서 배당한 공통 공유 메모리 및 국부 공유 메모리를 어태치하여 이들 공유 메모리를 사용 가능한 상태로 만든다. 칠 쉘에서 배당하는 공통 공유 메모리 및 국부 공유 메모리 영역은 필요에 따라 그 크기를 지정할 수 있으며, 본 발명에서는 1메가 정도의 크기로 배당한다. 본 발명이 적용되는 유닉스 시스템에서는 공유 메모리를 배당하는 횟수 및 한번에 배당할 수 있는 공유 메모리 크기를 제한하므로 공유 메모리를 통한 프로세스간 통신을 지원하기 위해서는 공유 메모리의 효율적인 관리가 필수적이다. 만약, 공유 메모리 공간이 부족하면 프로세스간 통신이 빈번히 발생하는 병행 프로그램들을 실행시킬 수가 없는 문제가 발생한다.In order to support the functions for interprocess synchronization and communication, shared memory should be shared between processes. The chill shell allocates a common shared memory space that can be shared by different executable modules, and then allocates local shared memory for the modules that are executed each time the module execute command is executed. The chill simulation kernel, included as a library in the executable module, attaches the shared and local shared memory allocated by the chill shell to make these shared memories available. The common shared memory and the local shared memory area allocated by the chill shell may be sized as needed, and the present invention allocates the size to about 1 megabyte. In the UNIX system to which the present invention is applied, the number of allocating the shared memory and the size of the shared memory that can be allocated at one time are limited. Therefore, efficient management of the shared memory is essential to support inter-process communication through the shared memory. If the shared memory space is insufficient, there is a problem that cannot execute parallel programs that frequently cause communication between processes.

이러한 문제를 해결하기 위해서 본 발명의 칠 시뮬레이션 커널은 이와 같이 배당된 공유 메모리 영역을 필요할 때마다 그 중에서 필요한 크기만큼 할당해서 프로세스간 통신을 위해서 사용하며, 사용후에는 다시 공유 메모리 영역에 회수하여 다시 사용할수 있도록 관리한다.In order to solve this problem, the chilled simulation kernel of the present invention allocates the allocated shared memory area as needed whenever necessary and uses it for inter-process communication. Manage for use.

이와 같이 공유 메모리 관리는 칠 시뮬레이션 커널에서 하는데 그 방법은 다음과 같다. 프로세스간 동기화 및 통신 기능중 시그널을 이용한 통신은 공통 공유 메모리를 통하여 이루어지는 데 시그널을 송신할 경우에는 송신할 시그널 및 메시지를 위해서 필요한 메모리를 공통 공유 메모리 영역에서 할당한다. 송신된 시그널은 다른 프로세스가 그 시그널 정보를 받아갈 때까지 수신 프로세스의 프로세스 컨트롤 블록에 저장된다. 시그널 수신 프로세스가 시그널을 수신했을 경우에 칠 시뮬레이션 커널은 그 시그널 및 메시지를 위해서 할당된 메모리 공간을 모두 공유 메모리 영역에 회수하여 다시 사용할 수 있도록 관리한다. 프로세스간 통신 기능중 이벤트 및 버퍼는 국부 공유 메모리를 통하여 이루어지는데 이벤트 지연이나 버퍼 송신을 할 경우에 칠 시뮬레이션 커널은 국부 공유 메모리 영역에서 필요한 크기 만큼의 메모리를 할당하고 이벤트 계속 연산이나 버퍼 수신 연산이 끝나면 이들에 할당된 메모리를 국부 공유 메모리 영역에 회수하여 재사용하도록 관리한다.Like this, shared memory management is done in Chill simulation kernel. In the process of interprocess synchronization and communication, communication using the signal is performed through the common shared memory. When the signal is transmitted, the memory required for the signal and the message to be transmitted is allocated in the common shared memory area. The transmitted signal is stored in the process control block of the receiving process until another process receives the signal information. When the signal-receiving process receives a signal, the chill simulation kernel manages to reclaim all the memory space allocated for the signal and its messages in the shared memory area for reuse. Among the interprocess communication functions, events and buffers are made through the local shared memory. In case of event delay or buffer transmission, the chill simulation kernel allocates as much memory as necessary in the local shared memory area and continues the event or buffer receiving operation. After that, the memory allocated to them is collected and reused in the local shared memory area.

칠 프로세스간에 동기화 및 통신을 위한 기능으로는 시그널, 버퍼, 이벤트가 있으며 이중 시그널은 서로 다른 모듈간 동기화 및 통신 기능을 지원하고 버퍼와 이벤트는 하나의 실행 모듈내에 있는 프로세서간 동기화 및 통신 기능을 지원한다. 칠 프로세스가 생성되어 실행될 경우에는 각자 독립된 메모리 영역에서 실행되기 때문에 프로세스간에 메시지 전달 및 동기화를 위한 통신을 하기 위해서는 동시에 병렬로 실행되는 프로세스들이 공통으로 접근할 수 있는 공유 메모리 영역을 지정하고 그 공유영역을 통하여 메시지 전달 및 통신을 한다. 그러나, 동시에 실행되는 프로세스가 공유 메모리 영역을 공유하므로서 같은 메모리 장소를 동시에 접근하거나 뜻하지 않은 데이터 수정으로 인한 오류가 발생되는 문제점이 있다.Functions for synchronization and communication between seven processes include signals, buffers, and events. Dual signals support synchronization and communication between different modules, and buffers and events support synchronization and communication between processors in one execution module. do. When a process is created and executed, each process is executed in a separate memory area. Therefore, in order to communicate and transfer messages between processes, a shared memory area that can be accessed in parallel by the processes running in parallel is designated. Message transmission and communication through. However, there is a problem in that an error occurs due to concurrent access to the same memory location or inadvertent modification of data due to simultaneous execution of a process sharing a shared memory area.

따라서, 이 공유 영역에 대한 동시 접근을 제어하는 방법으로 세마포어를 이용한다. 세마포어는 잠금 상태와 열림 상태의 두가지 상태를 가지는데 열림 상태에 있으면 공유 메모리를 사용 가능한 상태임을 나타내고 잠금 상태는 다른 프로세스가 공유 메모리를 사용하고 있으므로 사용할 수 없음을 나타낸다. 세마포어는 공통 공유 메모리 영역을 위한 세마포어 및 각 국부 공유 메모리 영역을 위해서 하나씩의 세마포어가 존재한다.Therefore, semaphores are used as a method of controlling simultaneous access to this shared area. Semaphores have two states: locked and open. When they are open, shared memory is available, and locked states are not available because other processes are using shared memory. A semaphore has semaphores for the common shared memory area and one semaphore for each local shared memory area.

시그널을 이용하여 프로세스간에 통신할 수 있는 연산으로는 시그널 송신과 시그널 수신이 있다. 시그널의 송신이 일어날 경우에는 먼저 세마포어의 상태를 검사하여 잠금 상태면 열림 상태가 될 때까지 기다리고, 열림 상태이면 세마포어를 잠금 상태로하고 공통 공유 메모리 영역에서 필요한 메모리를 할당받아서 시그널 및 메시지를 수신 프로세스에 전달하고 세마포어를 열림 상태로 한다.Operations that can communicate between processes using signals include sending signals and receiving signals. In case of signal transmission, first check the state of semaphore and wait until it is open if it is locked. If it is open, semaphore is locked and necessary memory is allocated from the common shared memory area to receive signals and messages. And the semaphore is left open.

이때, 시그널을 전달하는 방법은 다음과 같다. 만약, 시그널을 수신할 프로세스가 송신하는 시그널을 위해서 대기하고 있는 상태이면 시그널을 송신한 후에 수신 프로세스를 깨워주며 그렇지 않은 경우에는 수신 프로세스의 프로세스 컨트롤 블록에 시그널 및 메시지를 저장한다. 시그널을 수신할 때는 세마포어가 잠금 상태이면 열림 상태가 될 때까지 기다리고, 열림 상태이면 세마포어를 잠금 상태로 한 후에 공유 메모리 영역의 프로세스 컨트롤 블록에 이미 수신된 시그널이 존재하는지를 검사하여 존재할 경우에는 그 시그널 및 메시지를 수신하고 그렇지 않을 경우에는 세마포어를 열림 상태로 한 후에 다른 프로세스가 시그널을 보내줄 때까지 대기한다. 시그널 수신이 끝나면 시그널을 위해서 배당된 메모리를 공유 메모리 영역에 회수하고 세마포어를 열림 상태로 한다.At this time, the method of delivering the signal is as follows. If the process to receive the signal is waiting for the signal to be sent, it wakes up the receiving process after sending the signal. Otherwise, it stores the signal and message in the process control block of the receiving process. When receiving a signal, wait for the semaphore to be open if it is locked, if it is open then lock the semaphore and check if there are already received signals in the process control block of the shared memory area, if any. And receive the message, otherwise leave the semaphore open and wait for another process to signal. When the signal is received, the memory allocated for the signal is retrieved into the shared memory area and the semaphore is left open.

이벤트와 버퍼를 통한 프로세스간 통신은 하나의 실행 모듈내에 있는 프로세스간 통신이기 때문에 국부 공유 메모리를 통하여 통신이 이루어진다. 시그널을 이용한 통신과 마찬가지로 이 국부 공유 메모리도 여러 프로세스에 의하여 동시에 사용이 가능하므로 뜻하지 않는 동시 접근으로 인한 오류가 발생되는 문제점이 있다.Since interprocess communication through events and buffers is interprocess communication within a single execution module, communication is done through local shared memory. Like communication using signals, this local shared memory can be used by multiple processes at the same time, causing errors due to unintended concurrent access.

따라서, 오류를 방지하기 위하여 세마포어로 배타적 접근을 관리한다. 이벤트는 프로세스의 동기화 기능을 제공하는데 이벤트에 대해서 가능한 연산으로는 이벤트 지연(DELAY) 및 계속(CONTINUE) 연산이 있으며, 이벤트 지연 연산을 수행하는 프로세스는 다른 프로세스가 그 이벤트에 대해 계속 연산을 수행할 때까지 지연 상태에 빠진다. 이벤트 계속 연산은 주어진 이벤트에 지연된 프로세스가 있을 경우에 그 프로세스의 수행을 계속하도록 하는 기능을 제공한다. 이벤트 장소는 국부 공유 메모리에 존재하여 같은 모듈내에 있는 모든 프로세스가 공유할 수 있다. 이벤트에 대한 지연이나 계속 연산을 수행하기 위해서는 먼저 세마포어 상태를 검사하여 잠금 상태이면 열림 상태가 될 때까지 기다리고 열림 상태이면 세마포어를 잠금 상태로 한 후에 국부 공유 메모리내에 존재하는 이벤트 장소에 대해서 주어진 연산을 수행하고 세마포어를 열림 상태로 한다.Thus, to avoid errors, an exclusive approach is managed with semaphores. An event provides the synchronization capability of a process. Possible operations on an event include the DELAY and CONTINUE operations, and a process that performs an event-delay operation can continue to operate on that event. Until it falls into a delay state. The event continue operation provides the ability to continue the execution of a given event if there is a process that is delayed. Event locations reside in local shared memory and can be shared by all processes in the same module. To perform a delay or continue operation on an event, first check the semaphore state, wait for it to be open if it is locked, then lock the semaphore if it is open, and then perform the given operation on the event location in local shared memory. And leave the semaphore open.

버퍼 장소는 프로세스간 동기화 및 메시지 전달을 위한 기능을 제공하며, 버퍼 장소는 국부 공유 메모리내에 존재한다. 버퍼 장소에 대한 연산은 버퍼 송신 및 버퍼 수신이 있으며, 버퍼 장소에 메시지를 송신하거나 수신하고자 하는 프로세스는 세마포어가 잠금 상태에 있으면 열림 상태가 될 때까지 기다려야 하며, 열림상태에 있으면 세마포어를 잠금 상태로 한 후에 버퍼 장소에 메시지 송수신 연산을 수행한 후에 세마포어를 열림 상태로 한다. 버퍼 장소에 메시지를 송신할 때는 메시지 전달에 필요한 메모리를 국부 공유 메모리에서 할당받아 메시지를 버퍼에 송신하고, 버퍼로부터 메시지를 수신할 경우에는 할당받은 메모리를 국부 공유 메모리에 회수한다.The buffer location provides functionality for interprocess synchronization and message delivery, and the buffer location resides in local shared memory. Operations on buffer locations include buffer send and buffer receive, and processes that want to send or receive messages to the buffer location must wait until the semaphore is locked and open, and if it is open, semaphores are locked. After the message has been sent to or received from the buffer, the semaphore is left open. When sending a message to a buffer location, the memory required for message delivery is allocated from the local shared memory and the message is sent to the buffer. When receiving a message from the buffer, the allocated memory is recovered to the local shared memory.

따라서, 본 발명은 상기 제반 문제점을 해결하기 위하여 안출된 것으로, 교환기 소프트웨어를 호스트에서 시뮬레이션하기 위하여 모듈간 또는 모듈내의 프로세스간 통신방법을 제공하는데 그 목적이 있다.Accordingly, an object of the present invention is to provide a method for inter-module or inter-process communication within a module to simulate the exchange software in a host.

상기 목적을 달성하기 위하여 발명은, 컴퓨팅 환경에 적용되는 프로세스간 통신방법에 있어서, 공통 공유 메모리 및 세마포어를 할당한 후에 모듈에 대하 실행 명령어를 수신하면 실행 모듈에 대한 국부 공유 메모리 및 세마포어를 할당하여 모듈을 수행시키는 제 1 단계; 실행 모듈은 할당된 공유 메모리들을 자신의 주소 공간으로 사용할 수 있도록 어태치한 후에 실행문을 수행시키는 제 2 단계; 칠(CHILL) 시뮬레이션 커널은 프로세스 사이의 통신을 위하여 이벤트, 버퍼 및 시그널에 관한 기능들을 지원하는 제 3 단계; 및 실행 모듈의 수행이 끝난 후에 할당된 공유 메모리 및 자원을 회수하는 제 4 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, the present invention, in the inter-process communication method applied to the computing environment, after allocating the common shared memory and semaphore and receiving the execution instruction for the module, by assigning a local shared memory and semaphore for the execution module A first step of performing a module; The executing module executes an execution statement after attaching the allocated shared memories to use its own address space; The CHILL simulation kernel comprises: a third step of supporting functions relating to events, buffers, and signals for communication between processes; And recovering the allocated shared memory and resources after the execution of the execution module is completed.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

제1도는 본 발명이 적용되는 하드웨어의 구성예시도로서, 도면에 도시된 각 블록들의 기능을 살펴보면, 메인 메모리 보드(101)는 칠(CHILL) 쉘 및 실행 모듈 등이 탑재되는 보드이고, 중앙 처리 보드(102)는 메인 메모리에 탑재된 파일을 수행시키는 보드이다. 그리고, 보조 기억 장치(104)는 파일 및 데이터 등을 저장하는 장치로서 메인 메모리 보드(101)에 탑재되지 않는 파일과 도구들이 저장된다. 입/출력 장치(105)는 시뮬레이션을 수행하기 위해서 필요한 파일 및 데이터, 수행중에 발생하는 모든 오류 메시지를 입/출력하는 장치이다. 유닉스(UNIX) 운영 체제(103)는 상기의 각 보드 및 장치를 제어하고, 각 보드 및 장치간에 주고 받는 메시지 시스템 버스(106)를 통하여 전달된다.FIG. 1 is a diagram illustrating a configuration of hardware to which the present invention is applied. Referring to the functions of the blocks illustrated in the drawing, the main memory board 101 is a board on which a chill shell, an execution module, and the like are mounted. The board 102 is a board that executes a file mounted in the main memory. The auxiliary memory device 104 stores files, data, and the like, and stores files and tools that are not mounted on the main memory board 101. The input / output device 105 is an input / output device for inputting / outputting files and data necessary for performing a simulation and all error messages generated during the execution. The UNIX operating system 103 controls each board and device described above, and is transmitted through a message system bus 106 that exchanges information between boards and devices.

제2도는 본 발명에 따른 프로세스간 통신의 개념도이다.2 is a conceptual diagram of interprocess communication according to the present invention.

칠(CHILL) 쉘의 수행이 시작되면 모듈간 통신을 위하여 사용될 공통 공유 메모리 및 세마포어를 할당하고 사용자로부터의 명령어를 기다린다(201). 사용자가 모듈 실행 명령어를 수행시키면, 칠(CHILL)쉘은 모듈내의 프로세스간 통신을 위해서 필요한 국부 메모리 및 세마포어를 할당하고 모듈을 실행시킨다(202). 실행되는 모듈내에는 칠 시뮬레이션 커널(CSK)이 라이브러리 형태로 포함되어 있으며, 칠 시뮬레이션 커널(CSK)에서 프로세스간 통신을 위한 기능인 시그널, 버퍼, 이벤트들에 대한 기능 처리를 한다.When the execution of the CHILL shell is started, it allocates a common shared memory and semaphore to be used for inter-module communication and waits for a command from the user (201). When the user executes a module execution command, the CHILL shell allocates local memory and semaphores necessary for interprocess communication within the module and executes the module (202). Chill Simulation Kernel (CSK) is included in the module to be executed, and Chill Simulation Kernel (CSK) handles signals, buffers, and events, which are functions for interprocess communication.

시그널을 사용한 프로세스간 통신을 하는 경우에 공통 공유 메모리를 통하여 통신 및 정보의 전달이 이루어지며(204), 이벤트나 버퍼를 이용한 프로세스간 통신에는 각 모듈 전용으로 할당된 국부 공유 메모리를 통하여 통신 및 정보의 교환이 이루어진다(203). 제3도는 본 발명에 따른 칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법에 대한 일실시예 흐름도이다.In the case of interprocess communication using a signal, communication and information transfer are performed through a common shared memory (204), and interprocess communication using an event or a buffer is performed through local shared memory dedicated to each module. Exchange is made (203). 3 is a flow diagram of an embodiment of an interprocess communication method in a CHILL simulation environment in accordance with the present invention.

칠(CHILL)쉘은 공통 공유 메모리 및 세마포어를 할당하고 사용자로부터의 명령어를 기다린다(301). 사용자에 의하여 주어진 명령어가 종료 명령어이면 칠(CHILL)쉘의 수행을 종료하고(302,303), 종료 명령어가 아니면 명령어가 모듈 실행 명령어인지를 조사하여 모듈 실행 명령어가 아니면 주어진 명령어를 처리한 후에 다시 사용자로부터의 명령어를 기다린다(304,305,301). 이때, 주어진 명령어가 시그널 송신 명령어이면 텍스트 데이터를 이진 데이터로 변환한 후에 프로세스에 송신하고, 프로세스의 상태를 사용자에게 보여주는 명령어이면 프로세스 관련 이진 정보를 텍스트로 변환한 후에 사용자에게 보여준다.The CHILL shell allocates common shared memory and semaphores and waits for instructions from the user (301). If the command given by the user is an exit command, the execution of the CHILL shell is terminated (302,303). If the command is not an exit command, the command is examined to determine whether the command is a module execution command. Wait for the command (304, 305, 301). In this case, if the command is a signal transmission command, the text data is converted into binary data and then transmitted to the process. If the command shows the status of the process to the user, the binary information related to the process is converted to text and then displayed to the user.

사용자로부터 주어진 명령어가 모듈 실행 명령어이면(304) 새로운 프로세스를 포크(fork)하여(306) 부모 프로세스인지를 판단하여(307), 부모 프로세스이면 또다시 사용자로부터의 명령어를 기다리고(301), 부모 프로세스가 아닌 자 프로세스(child process)이면 주어진 모듈에 대한 국부 공유 메모리 및 세마포어를 할당하고 모듈을 실행시킨다(308).If the instruction given by the user is a module execution instruction (304), fork the new process (306) to determine whether it is a parent process (307), and if it is a parent process, wait for instructions from the user again (301). If not, the child process allocates local shared memory and semaphores for the given module and executes the module (308).

수행이 시작된 모듈에서 칠(CHILL)쉘에 의하여 할당된 공유 메모리들을 자신의 주소 공간으로 사용할 수 있도록 어태치하고 모듈에서 정의한 실행문을 수행시킨다(309). 실행 모듈에 라이브러리 형태로 포함된 칠(CHILL) 시뮬레이션 커널은 프로세스 사이의 통신을 위하여 이벤트, 버퍼, 시그널에 관한 기능들을 지원한다. 시그널을 이용한 프로세스간 통신일 경우에는 공통 공유 메모리 영역으로부터 필요한 메모리를 할당받아서 필요한 정보를 저장하고 원하는 프로세스와 통신한 후에 할당받은 메모리를 공통 공유 메모리 영역에 회수한다. 이벤트 및 버퍼를 이용한 통신일 경우에는 국부 공유 메모리 영역으로부터 필요한 메모리를 할당받아서 필요한 정보를 저장하고 원하는 프로세스와 통신한 후에 할당받은 메모리를 국부 공유 메모리 영역에 회수한다(310). 모듈내의 실행문에 대한 수행이 끝나면 모듈에 할당되었던 자원을 회수하고 모듈 수행을 종료한다(311,312).In the module where execution is started, the shared memory allocated by the CHILL shell is attached to be used as its address space, and the execution statement defined in the module is executed (309). The CHILL simulation kernel, included as a library in the execution module, provides support for events, buffers, and signals for communication between processes. In the case of interprocess communication using a signal, a required memory is allocated from a common shared memory area to store necessary information, and after communicating with a desired process, the allocated memory is recovered to the common shared memory area. In case of communication using an event and a buffer, necessary memory is allocated from the local shared memory area to store necessary information, and after communication with a desired process, the allocated memory is recovered to the local shared memory area (310). When execution of the execution statement in the module is completed, the resources allocated to the module are recovered and the execution of the module is terminated (311, 312).

상기와 같은 본 발명은 칠(CHILL) 시뮬레이션 환경에서 프로세서간 통신을 위한 기능을 지원함으로써 주로 프로세서간 통신에 의하여 정보의 교환이 이루어지는 통신 소프트웨어의 동작을 호스트에서 시뮬레이션할 수 있다. 특히, 공유 메모리를 통하여 서로 다른 모듈간의 통신이 가능하므로서 동시에 상호 연관을 가지고 동작하는 모듈들의 동작을 호스트에서 분석하고 시험하여 대부분의 오류를 호스트에서 수정하여 목적 시스템에 탑재하여 수행할 수 있어 통신 소프트웨어의 개발 시간을 단축할 수 있는 효과가 있다.As described above, the present invention supports a function for interprocessor communication in a CHILL simulation environment, thereby enabling the host to simulate an operation of communication software in which information is exchanged mainly by interprocessor communication. In particular, since communication between different modules is possible through shared memory, the operation of modules operating with mutual correlation at the same time can be analyzed and tested at the host, and most errors can be corrected at the host and mounted on the target system for communication software. There is an effect that can reduce the development time of the.

Claims (3)

컴퓨팅 환경에 적용되는 프로세스간 통신 방법에 있어서, 공통 공유 메모리 및 세마포어를 할당한 후에 모듈에 대한 실행 명령어를 수힌하면 실행 모듈에 대한 국부 공유 메모리 및 세마포어를 할당하여 모듈을 수행시키는 제 1 단계; 실행 모듈은 할당된 공유 메모리들을 자신의 주소 공간으로 사용할 수 있도록 어태치한 후에 실행문을 수행시키는 제 2 단계; 칠(CHILL) 시뮬레이션 커널은 프로세스 사이의 통신을 위하여 이벤트, 버퍼 및 시그널에 관한 기능들과 공유 메모리 할당/회수 기능을 지원하는 제 3 단계; 및 실행 모듈의 수행이 끝난 후에 할당된 공유 메모리 및 자원을 회수하는 제 4 단계를 포함하여 이루어진 칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법.An interprocess communication method applied to a computing environment, comprising: a first step of allocating a common shared memory and a semaphore and then executing a module by allocating a local shared memory and a semaphore for the executed module if the execution instruction for the module is easily received; The executing module executes an execution statement after attaching the allocated shared memories to use its own address space; The chill simulation kernel comprises: a third step of supporting functions for events, buffers, and signals and shared memory allocation / retrieval functions for communication between processes; And a fourth step of reclaiming the allocated shared memory and the resource after the execution of the execution module is completed. 제1항에 있어서, 상기 제 1 단계는, 칠(CHILL) 쉘이 상기 공통 공유 메모리 및 세마포어를 할당하고 사용자로부터의 명령어를 기다리는 제 5 단계; 사용자 명령어가 종료 명령이면 칠(CHILL) 쉘의 수행을 종료하고, 사용자 명령어가 종료 명령이 아니면 모듈 실행 명령어인지를 판단하는 제 6 단계; 이는 제 6 단계의 판단 결과, 모듈 실행 명령어가 아니고 시그널 송신 명령어이면 텍스트 데이터를 이진 데이터로 변환한 후에 프로세스에 송신하고, 프로세스의 상태를 사용자에게 보여주는 명령어이면 프로세스관련 이진 정보를 텍스트로 변환한 후에 사용자에게 보여준 후에 상기 제 5 단계의 사용자 명령어 대기 과정부터 반복 수행하는 제 7 단계; 및 상기 제 6 단계의 판단 결과, 실행 명령어이면 새로운 프로세스를 포크(fork)하여 부모 프로세스이면 상기 제 5 단계의 사용자 명령어 대기 과정부터 반복 수행하고, 부모 프로세스가 아닌 자 프로세스이면 주어진 모듈에 대한 상기 국부 공유 메모리 및 세마포어를 할당하여 모듈을 실행시키는 제 8 단계를 포함하여 이루어진 칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법.The method of claim 1, wherein the first step comprises: a fifth step in which a CHILL shell allocates the common shared memory and semaphore and waits for instructions from a user; If the user command is a termination command, terminating the execution of the CHILL shell, and determining whether the user command is a module execution command if the user command is not a termination command; As a result of the judgment in the sixth step, if the command is not a module execution command but a signal transmission command, the text data is converted into binary data and then transmitted to the process. If the command shows the status of the process to the user, the process related binary information is converted into text. A seventh step of repeating the user command waiting process of the fifth step after showing to the user; And as a result of the determination of the sixth step, if the execution command forks a new process and repeats the process of waiting for the user command of the fifth step if the parent process, and if the child process other than the parent process, the local to the given module. An interprocess communication method in a CHILL simulation environment comprising an eighth step of allocating shared memory and semaphores to execute a module. 제1항 또는 제2항에 있어서, 상기 제 3 단계는, 모듈 수행시 프로세스간 통신을 할 때, 상기 시그널을 이용한 프로세스간 통신일 경우에는 상기 공통 공유 메모리 영역으로부터 필요한 메모리를 할당받아서 필요한 정보를 저장하고 원하는 프로세스와 통신한 후에 할당받은 메모리 상기 공통 공유 메모리 영역에 회수하며, 상기 이벤트 및 상기 버퍼를 이용한 프로세스간 통신일 경우에는 상기 국부 공유 메모리 영역으로부터 필요한 정보를 저장하고 원하는 프로세스와 통신한 후에 할당받은 메모리를 상기 국부 공유 메모리 영역에 회수하는 것을 특징으로 하는 칠(CHILL) 시뮬레이션 환경에서의 프로세스간 통신 방법.The method of claim 1 or 2, wherein the third step includes, when performing inter-process communication during module execution, in case of inter-process communication using the signal, necessary information is allocated from the common shared memory area to obtain necessary information. After storing and communicating with the desired process, the allocated memory is retrieved into the common shared memory area, and in case of inter-process communication using the event and the buffer, after storing necessary information from the local shared memory area and communicating with the desired process. And recovering the allocated memory into the local shared memory area.
KR1019940033807A 1994-12-12 1994-12-12 Inter-process communication method in chill simultation environment KR0154573B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019940033807A KR0154573B1 (en) 1994-12-12 1994-12-12 Inter-process communication method in chill simultation environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019940033807A KR0154573B1 (en) 1994-12-12 1994-12-12 Inter-process communication method in chill simultation environment

Publications (2)

Publication Number Publication Date
KR960024999A KR960024999A (en) 1996-07-20
KR0154573B1 true KR0154573B1 (en) 1998-11-16

Family

ID=19401110

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019940033807A KR0154573B1 (en) 1994-12-12 1994-12-12 Inter-process communication method in chill simultation environment

Country Status (1)

Country Link
KR (1) KR0154573B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100441742B1 (en) * 2002-07-26 2004-07-23 (주)엔텔스 A method for controlling inter-process communication data using an information exchange bus and the system thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100441742B1 (en) * 2002-07-26 2004-07-23 (주)엔텔스 A method for controlling inter-process communication data using an information exchange bus and the system thereof

Also Published As

Publication number Publication date
KR960024999A (en) 1996-07-20

Similar Documents

Publication Publication Date Title
US5553291A (en) Virtual machine control method and virtual machine system
EP0247374B1 (en) Provision of virtual storage resources to an operating system control program
US6691146B1 (en) Logical partition manager and method
KR100733852B1 (en) Computer system
US4860190A (en) Computer system for controlling virtual machines
Herrera et al. Systematic embedded software generation from SystemC
US5748959A (en) Method of conducting asynchronous distributed collective operations
EP0321723A2 (en) Apparatus for a data processing system having a peer relationship among a plurality of central processing units
CN100511156C (en) Apparatus for compulsively terminating thread blocked on input/output operation and method for the same
EP0321724A2 (en) Apparatus and method for alterable resource partitioning enforcement in a data processing system having central processing units using different operating systems
US5404477A (en) Extended memory address conversion and data transfer control system
CN101546275B (en) Method for realizing multiprocessor system with hardware semaphore module
AU603876B2 (en) Multiple i/o bus virtual broadcast of programmed i/o instructions
CN114168255A (en) Operation method and device of heterogeneous instruction set container in container cloud platform
EP0564388A2 (en) Generalized control for starting of tasks (processes and threads)
KR0154573B1 (en) Inter-process communication method in chill simultation environment
US6338125B1 (en) Dynamic slot allocation and tracking of multiple memory requests
CN100492299C (en) Embedded software developing method and system
EP0543607B1 (en) Image processing system
EP0509946A2 (en) Apparatus and method for implementing a distributed program stack
KR100310291B1 (en) Method for simulating parallel program on single system
EP0319280A2 (en) Apparatus and system of performing distributed processing based on hierarchy structure
Ford et al. Low level architecture features for supporting process communication
Halsall et al. Development environment for the design and test of applications software for a distributed multiprocessor computer system
CN117762840A (en) Interrupt forwarding method for jailhouse isolation PCIe network card

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
J201 Request for trial against refusal decision
B701 Decision to grant
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20040630

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee