KR100489942B1 - method of data transmission between processor using socket communication - Google Patents

method of data transmission between processor using socket communication Download PDF

Info

Publication number
KR100489942B1
KR100489942B1 KR10-2003-0010191A KR20030010191A KR100489942B1 KR 100489942 B1 KR100489942 B1 KR 100489942B1 KR 20030010191 A KR20030010191 A KR 20030010191A KR 100489942 B1 KR100489942 B1 KR 100489942B1
Authority
KR
South Korea
Prior art keywords
data
processor
socket
write operation
job
Prior art date
Application number
KR10-2003-0010191A
Other languages
Korean (ko)
Other versions
KR20040074435A (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-2003-0010191A priority Critical patent/KR100489942B1/en
Publication of KR20040074435A publication Critical patent/KR20040074435A/en
Application granted granted Critical
Publication of KR100489942B1 publication Critical patent/KR100489942B1/en

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D88/00Large containers
    • B65D88/02Large containers rigid
    • B65D88/06Large containers rigid cylindrical
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D88/00Large containers
    • B65D88/74Large containers having means for heating, cooling, aerating or other conditioning of contents
    • B65D88/745Large containers having means for heating, cooling, aerating or other conditioning of contents blowing or injecting heating, cooling or other conditioning fluid inside the container

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Computer And Data Communications (AREA)

Abstract

본 발명은 프로세서간 신뢰성 있는 데이터 교환을 위해 소켓 통신을 수행하는 방법에 관한 것으로, 종래에는 전송하고 하는 데이터가 있어 전송 작업을 수행하면서 미 완료 작업이 있는 경우, 그 데이터 전송을 우선적으로 완료하기 위하여 반복 수행함으로 인하여, 작업을 더 이상 수행하지 못하는 블러킹(blocking) 현상이 발생하였다.The present invention relates to a method of performing socket communication for reliable data exchange between processors. In the prior art, if there is data to be transmitted and there is an unfinished task while performing a transmission operation, the data transmission is preferentially completed. As a result of the repetition, a blocking phenomenon occurs in which the work can no longer be performed.

이에 본 발명은, 데이터 전송 작업이 완료되지 않은 경우라도 시스템의 작업이 원활하게 수행될 수 있도록 하기 위하여, 미 완료된 데이터 전송 작업을 다음 작업을 수행한 다음 수행될 수 있도록 하여 블러킹 현상을 제거하는 것이다.Accordingly, the present invention eliminates the blocking phenomenon by allowing the uncompleted data transfer operation to be performed after performing the next operation so that the system operation can be performed smoothly even if the data transfer operation is not completed. .

Description

소켓 통신을 이용한 프로세서간 데이터 전송 방법{method of data transmission between processor using socket communication } Method of data transmission between processor using socket communication}

본 발명은 소켓 통신을 이용한 프로세서간 데이터 전송 방법에 관한 것으로, 더욱 자세하게는 유닉스 기반의 프로세서간에 신뢰성 있는 데이터 교환을 위한 소켓 통신에서 발생하는 블러킹 현상을 제거하는 소켓 통신을 이용한 프로세서간 데이터 전송 방법에 관한 것이다.The present invention relates to a method for transmitting data between processors using socket communication, and more particularly, to a method for transmitting data between processors using socket communication which eliminates the blocking phenomenon occurring in socket communication for reliable data exchange between UNIX-based processors. It is about.

소켓 통신이란, 유닉스(UNIX)나 리눅스(LINUX) 파일 디스크립터(File Descriptor)를 이용하여 프로세서간 데이터를 교환하는 것이다.Socket communication is the exchange of data between processors using UNIX or Linux file descriptors.

이러한 소켓 통신은, 소켓-스트림(sock-stream) 타입의 소켓을 사용하여, 교환되는 데이터의 시퀸스(sequence)를 유지하고, 데이터의 유실을 방지하여 신뢰성을 보장한다.This socket communication uses a socket-stream type of socket to maintain a sequence of exchanged data and to prevent loss of data to ensure reliability.

이때 소켓은, 두 개의 프로세서가 하위 네트워크에 관계없이 통신을 수행할 수 있도록 하는 것이다.In this case, the socket allows two processors to perform communication regardless of a lower network.

도 1은 일반적인 소켓 통신망의 구성을 설명하기 위한 블록도이다.1 is a block diagram illustrating a configuration of a general socket communication network.

도 1에 도시된 바와 같이, 프로세서(1,3)와, 버퍼부(2)로 이루어져 있고, 프로세서(1,3)간의 소켓 통신을 위한 데이터 교환은 버퍼부(2)를 통해 이루어짐을 알 수 있다.As shown in FIG. 1, a processor 1 and 3 and a buffer unit 2 are provided, and data exchange for socket communication between the processors 1 and 3 is performed through the buffer unit 2. have.

이러한 프로세서(1,3)간의 소켓 통신의 일례로, 라우터에서 시스템 프로세서와 네트워크 프로세서간의 포워딩(forwarding) 데이터를 교환하는 소켓 통신을 들어 설명한다.As an example of such socket communication between the processors 1 and 3, a socket communication in which a router exchanges forwarding data between a system processor and a network processor will be described.

일반적인 라우터(router)는, 동일한 전송 프로토콜을 사용하는 분리된 네트워크를 연결하는 장치로 네트워크 계층 간을 서로 연결하는 기능을 하고, 수신되는 패킷을 경로 배정표에 따라 다른 네트워크 또는 자신의 네트워크 내의 노드를 결정하고, 여러 경로 중 가장 효율적인 경로를 선택하여 패킷을 출력한다.A general router is a device that connects separate networks using the same transport protocol, and functions to connect network layers to each other, and determines incoming or outgoing packets according to a routing schedule to determine a node in another network or its own network. The packet is output by selecting the most efficient path among several paths.

이러한 라우터에서 시스템 프로세서는, 라우팅 프로토콜을 처리하고, 패킷 포워딩에 이용되는 포워딩 테이블을 관리하는 라우팅 테이블 매니저(routing table manager)의 기능을 수행하고, 네트워크 프로세서는 수신되는 패킷의 포워딩을 위한 라우트 데이터를 시스템 프로세서로부터 획득하여 패킷 포워딩을 수행하는 포워딩 엔진(forwarding engine)의 기능을 수행한다.In such a router, the system processor performs a function of a routing table manager, which processes a routing protocol and manages a forwarding table used for packet forwarding, and a network processor receives route data for forwarding received packets. It performs the function of a forwarding engine that acquires from a system processor and performs packet forwarding.

이때, 네트워크 프로세서와 시스템 프로세서간의 데이터 교환은, 신뢰성 있는 데이터 교환을 위해 소켓 통신을 통하여 수행한다.In this case, data exchange between the network processor and the system processor is performed through socket communication for reliable data exchange.

즉, 네트워크 프로세서는 시스템 프로세서가 가지고 있는 포워딩 데이터를 획득하여 수신되는 패킷의 포워딩을 수행하고자 할 때, 프로세서간 데이터 교환은 신뢰성을 보장받기 위하여 소켓 통신을 이용한다. That is, when the network processor attempts to perform forwarding of a received packet by acquiring forwarding data owned by the system processor, data exchange between processors uses socket communication to ensure reliability.

도 2는 일반적인 프로세서간의 소켓 통신 방법의 흐름을 설명하는 흐름도이다.2 is a flowchart illustrating a flow of a socket communication method between a general processor.

도 1과 도 2를 참조하면, 서버 프로세서인 프로세서 A(1)가 소켓 통신을 수행하기 위한 구조, 즉 소켓을 생성한다(S 1).1 and 2, processor A (1), which is a server processor, generates a structure for performing socket communication, that is, a socket (S 1).

그리고, 생성된 소켓을 이용하여 프로세서 A(1)는 소켓 통신을 할 수 있도록 자신을 설정한다(S 2).Then, using the generated socket, processor A (1) sets itself to enable socket communication (S 2).

이러한, 소켓 통신을 위한 사전 작업을 완료하고, 프로세서 B(3)로부터 소켓 통신 접속 요청이 수신되기를 기다린다(S 3).This completes the preliminary work for socket communication and waits for the socket communication connection request from the processor B 3 to be received (S 3).

프로세서 B(3)가 소켓 통신을 위한 소켓을 생성하여 설정하고,(S 4), 프로세서 A(1)와 데이터 교환을 하기 위한 소켓 통신 접속 요청을 한다(S 5).Processor B (3) creates and sets a socket for socket communication (S 4), and makes a socket communication connection request for data exchange with processor A (S 5).

프로세서 A(1)는 프로세서 B(3)로부터 접속 요청이 수신되면, 이를 수락하고, 소켓 통신을 수행하기 위하여 접속한다(S 6).When the processor A 1 receives a connection request from the processor B 3, the processor A 1 accepts the connection request and connects to perform socket communication (S 6).

클라이언트 프로세서인 프로세서 B(3)가 데이터를 전송하기 위하여 소켓인 버퍼부(2)에 데이터를 임시 저장한다(S 7).Processor B (3), which is a client processor, temporarily stores data in a buffer unit (2), which is a socket, in order to transmit data (S7).

서버 프로세서인 프로세서 A(1)는 버퍼부(2)에 저장되어 있는 데이터를 획득하고(S 8), 데이터를 획득했음을 버퍼부(2)에 저장한다(S 9).The processor A 1, which is a server processor, acquires data stored in the buffer unit 2 (S 8), and stores the acquired data in the buffer unit 2 (S 9).

프로세서 B(3)는 버퍼부(2)에 저장되어 있는 프로세서 A(1)가 데이터를 획득했음을 인지하고, 다음 작업을 수행한다(S 10).Processor B (3) recognizes that the processor A (1) stored in the buffer unit 2 has acquired data, and performs the next operation (S 10).

이와 같은 방법은, 일례를 들어 리눅스 커널(kernel)에서 제공하는 'TCP window size' 소켓 타입의 버퍼부(2)를 사용하는 경우, 버퍼부(2)에 임시 저장되는 데이터 용량에 한계가 있으므로, 짧은 시간에 전송할 데이터의 용량이 많아지는 경우, 버퍼부(2)에 데이터가 모두 차게된다(full).This method, for example, when using the 'TCP window size' socket type buffer unit 2 provided by the Linux kernel, there is a limit to the data capacity temporarily stored in the buffer unit 2, When the capacity of data to be transmitted in a short time increases, the data in the buffer unit 2 is full.

이에 따라, 서버 프로세서가 어떠한 이유로 인하여 소켓에 임시 저장된 데이터를 리드하지 못하여 소켓에 데이터가 꽉 차게 되는 경우, 클라이언트 프로세서는 데이터 전송을 위한 라이트(write) 작업을 우선적으로 처리하기 위하여 반복적으로 수행하게 되어, 다음 작업을 수행하지 못하게 되는 블러킹(blocking) 현상이 발생하는 문제가 있다.Accordingly, when the server processor fails to read data temporarily stored in the socket due to some reason and the data is filled in the socket, the client processor repeatedly executes the write process for data transmission first. However, there is a problem that blocking occurs that prevents the next operation.

따라서, 본 발명은 상기와 같은 문제를 해결하기 위하여 고안된 것으로, 프로세서간 신뢰성 있는 데이터 교환을 위해 소켓 통신을 수행하면서 데이터를 수신하는 프로세서에 문제가 발생하여 읽기 작업이 잠시 정체되어 소켓에 데이터가 차게되는 경우에 발생하는 블러킹(blocking) 현상을 미연에 방지 할 수 있는 소켓 통신을 이용한 프로세서간 데이터 전송 방법을 제공하는 것에 그 목적이 있다. Accordingly, the present invention has been devised to solve the above problems, and a problem occurs in a processor receiving data while performing socket communication for reliable data exchange between processors, causing a read operation to be stalled for a while, thereby filling the socket with data. It is an object of the present invention to provide a method for transferring data between processors using socket communication, which can prevent the blocking phenomenon that occurs in the event of a failure.

상기 목적을 달성하기 위하여 본 발명의 일 측면에 따른 소켓 통신을 이용한 프로세서간 데이터 전송 방법은, 전송하고자 하는 데이터를 서버 프로세서가 리드(read)할 수 있도록 소켓에 라이트(write) 작업을 수행하는 단계와, 라이트 작업을 수행하고, 리턴 값(return value)을 수신하여 라이트 작업이 완료되었는지 여부를 판단하는 단계와, 판단 결과, 라이트 작업이 완료되지 않은 경우, 리턴 값을 통해 라이트 작업이 완료되지 않은 데이터 값을 파악하는 단계와, 파악된 데이터 값에 대한 해당 라이트 작업을 일정 시간이 지나고 수행될 수 있도록 등록하는 단계와, 해당 라이트 작업을 등록하고, 시간을 카운트하여, 그 카운트된 시간이 일정 시간 이상이 되는 경우, 등록된 라이트 작업을 수행하는 단계를 포함하여 이루어진다.In order to achieve the above object, an inter-processor data transmission method using socket communication according to an aspect of the present invention includes performing a write operation on a socket so that a server processor can read data to be transmitted. And performing a write operation and receiving a return value to determine whether the write operation is completed. If the write operation is not completed, the write operation is not completed through the return value. Identifying a data value, registering a corresponding write operation on the identified data value to be performed after a predetermined time, registering the corresponding write task, counting a time, and counting the time, In case of abnormality, the method includes performing a registered write operation.

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

도 3은 본 발명의 바람직한 일실시예에 따른 소켓 통신을 이용한 프로세서간 데이터 전송 방법의 흐름을 설명하는 흐름도이다.3 is a flowchart illustrating a flow of a method for transmitting data between processors using socket communication according to an embodiment of the present invention.

도 3을 참조하면, 클라이언트 프로세서인 프로세서 B(3)는 소켓 통신을 위한 소켓을 생성하여 설정한다(S 20).Referring to FIG. 3, processor B (3), which is a client processor, generates and sets a socket for socket communication (S 20).

그리고, 자신이 처리해야 하는 작업이 있는지 여부를 판단하고(S 21), 그 판단 결과, 처리해야 하는 작업이 있는 경우, 그 작업에 해당하는 함수(function)를 호출(callback)하여 처리한다.Then, it is determined whether there is a job to be processed (S 21), and if there is a job to be processed as a result of the determination, a function (call) corresponding to the job is called and processed.

즉, 처리해야 하는 작업이 데이터 전송을 위한 라이트(write) 작업인지 여부를 판단하여(S 22), 그 판단 결과, 라이트 작업인 경우, 라이트용 함수를 호출하여 처리한다(S 23).That is, it is determined whether the job to be processed is a write job for data transmission (S 22), and if the result of the determination is a write job, the write function is called and processed (S 23).

도 4는 본 발명의 바람직한 일실시예에 따른 라이트 작업을 수행하는 방법의 흐름을 설명하는 흐름도이다.4 is a flowchart illustrating a flow of a method of performing a write operation according to an exemplary embodiment of the present invention.

도 4를 참조하면, 라이트 작업을 처리해야 하는 경우, 라이트 작업 리스트에서 우선 처리해야 하는 작업을 찾는다(S 23a).Referring to FIG. 4, when a write job needs to be processed, a job to be processed first is found in the write job list (S 23a).

그리고, 라이트 작업을 수행하여 전송해야 하는 데이터의 용량을 파악하고(S 23b), 그 파악된 용량이 '0' 보다 큰지 여부를 파악한다(S 23c).Then, the capacity of the data to be transmitted is determined by performing the write operation (S 23b), and whether the determined capacity is greater than '0' (S 23c).

즉, 클라이언트 프로세서에서 서버 프로세서로 전송할 데이터가 있는지 여부를 판단한다.That is, it is determined whether there is data to be transmitted from the client processor to the server processor.

판단 결과, 파악된 용량이 '0'보다 큰 경우, 즉 전송할 데이터가 있는 경우, 그 데이터를 버퍼부(2)에 라이트하여 프로세서 A(1)가 리드(read)할 수 있도록 한다(S 23d).As a result of the determination, when the determined capacity is larger than '0', that is, when there is data to be transmitted, the data is written to the buffer unit 2 so that the processor A 1 can read it (S 23d). .

즉, 클라이언트 프로세서인 프로세서 B(3)와 서버 프로세서인 프로세서 A(1)는 소켓인 버퍼부(2)를 공유하고, 프로세서 B(3)가 버퍼부(2)에 데이터를 라이트하여 저장하면, 프로세서 A(1)가 버퍼부(2)에 접근하여 데이터를 리드한다.That is, when the processor B (3), which is a client processor, and the processor A (1), which is a server processor, share the buffer unit 2, which is a socket, and the processor B 3 writes and stores data in the buffer unit 2, Processor A (1) approaches the buffer section (2) to read data.

그리고, 프로세서 A(1)가 데이터를 리드하면, 그 데이터는 버퍼부(2)에서 삭제한다.When the processor A 1 reads out data, the data is deleted from the buffer unit 2.

이때, 라이트 작업의 구조문은 'write(fd, ptr, size)'와 같은 구조문 형식으로 표현될 수 있으며, 'fd'는 서버 프로세서와 연결된 세션(session) 등의 소켓 관련 데이터가 저장되어 있는 파일 디스크립터 값을 나타내는 것이고, 'ptr'은 읽어야 하는 데이터가 저장되어 있는 위치 값을 나타내는 것이고, 'size'는 'fd'와 'ptr'를 읽어서 라이트 작업을 수행해야 하는 데이터 크기 값을 나타내는 것이다.At this time, the structure statement of the write operation may be expressed in the form of a structure statement such as 'write (fd, ptr, size)', and 'fd' stores socket related data such as a session connected to the server processor. 'Ptr' indicates a location value where data to be read is stored, and 'size' indicates a data size value to be read by reading 'fd' and 'ptr'.

클라이언트 프로세서는 라이트 작업을 수행하고, 데이터를 전송하기 위한 라이트 작업이 올바르게 수행되었는지 여부를 판단한다(S 23e).The client processor performs a write operation and determines whether a write operation for transmitting data is correctly performed (S 23e).

판단 결과, 라이트 작업이 올바르게 수행되지 않은 경우, 즉 전송하고자 하는 데이터가 모두 전송되지 않으면, 전송되지 않은 데이터를 파악한다(S 23f).As a result of the determination, when the write operation is not correctly performed, that is, when all data to be transmitted are not transmitted, the untransmitted data is identified (S 23f).

이때, 전송되지 않은 라이트 작업의 용량은, 데이터를 소켓에 라이트하고 수신되는 리턴(return) 값을 통해 알 수 있다.At this time, the capacity of the unsent write operation may be known through a return value received after writing data to the socket.

그러한 리턴 값은, 'return value'로 표현될 수 있고, 이 값은 클라이언트 프로세서가 소켓에 라이트 작업을 수행한 용량 값이므로, 리턴 값이 '0'보다 작은 경우, 데이터를 전송하기 위한 라이트 작업을 수행할 수 없는 소켓이 닫혀진 (close) 상태를 나타낸다.Such a return value can be expressed as a 'return value', which is the value of the capacity of the client processor to write to the socket, so if the return value is less than '0', the write operation to send data is performed. Indicates that a socket that cannot be executed is closed.

한편, 리턴 값이 '0'인 경우, 소켓이 블록킹(blocking)된 상태를 나타내고, 리턴 값이 'size' 값과 같은 경우, 전송하고자 하는 데이터에 대하여 정상적으로 라이트 작업이 수행된 것을 나타낸다.On the other hand, when the return value is '0', it indicates that the socket is blocked, and when the return value is equal to the 'size' value, it indicates that the write operation is normally performed on the data to be transmitted.

또한, 리턴 값이 '0'과 'size' 값 사이인 경우, 전송하고 하는 데이터의 용량 값과 리턴 값의 차이 값이 수행되지 않은 라이트 작업의 용량을 나타내며, 이 값만큼 라이트 작업을 다시금 수행하여 전송하여야 한다. In addition, when the return value is between '0' and 'size', the difference between the capacity value and the return value of the data to be transmitted indicates the capacity of the write job that has not been performed. Must be transmitted.

전송되지 않은 데이터를 파악하고, 그 파악된 데이터를 서버 프로세서로 전송하기 위한 라이트 작업, 즉 미 완료 라이트 작업이 임의의 시간이 지나고 수행될 수 있도록 등록한다(S g).The data that has not been transmitted is identified, and a write operation for transmitting the identified data to the server processor, that is, an uncompleted write operation, is registered to be performed after a certain time (S g).

일례를 들어, 임의의 시간이 지나고 미 완료 라이트 작업이 수행될 수 있도록 타이머 작업에 미 완료 라이트 작업을 등록한다. For example, an uncompleted write job is registered in a timer job so that an uncompleted write job can be performed after a certain time.

미 완료 라이트 작업을 등록하고, 다음 작업을 수행한다(S 23h).The incomplete write job is registered and the next job is performed (S 23h).

라이트 작업을 수행하고, 처리해야 하는 작업이 타이머(timer)작업인지 여부를 판단하여(S 24), 그 판단 결과, 타이머 작업인 경우, 타이머 작업에 등록된 작업이 있는지 여부를 판단한다(S 25).The write operation is performed, and it is determined whether the job to be processed is a timer job (S 24). As a result of the determination, in the case of the timer job, it is determined whether there is a job registered in the timer job (S 25). ).

즉, 라이트 작업이 올바르게 완료되지 않아 일정 시간이 지나고 미 완료 라이트 작업이 수행될 수 있도록 등록된 작업이 있는지 여부를 판단한다.That is, it is determined whether there is a job registered so that the write job is not completed correctly and a predetermined time has elapsed and an incomplete write job is performed.

판단 결과, 미 완료 라이트 작업이 등록되어 있는 경우, 그 등록된 미 완료 라이트 작업을 수행한다(S 26).As a result of the determination, if an incomplete write job is registered, the registered incomplete write job is performed (S26).

이때, 미 완료 라이트 작업의 수행은, 임의의 관리자로부터 설정되는 횟수로 반복하여 수행하거나, 한 번 수행하여도 완료되지 않은 경우에는 재 등록하는 방법 등이 사용될 수 있다.In this case, the execution of the unfinished write job may be repeatedly performed a number of times set by an arbitrary administrator, or re-registered when it is not completed even once.

한편 판단 결과, 등록된 미 완료 라이트 작업이 없거나, 등록된 미 완료 라이트 작업이 있으면 그 작업을 수행하고, 타이머 작업을 처리하기 위하여 타이머용 함수를 호출하여 처리한다(S 27).On the other hand, if it is determined that there is no registered uncompleted write job or there is a registered uncompleted write job, the job is performed and a timer function is called to process the timer job (S 27).

그리고, 처리해야 하는 다른 작업이 있는지 여부를 판단하여, 다른 작업이 있는 경우, 해당 작업을 처리하기 위한 함수를 호출하여 처리한다.In addition, it determines whether there is another task to be processed, and if there is another task, calls a function for processing the task and processes it.

즉, 처리해야 하는 작업이 리드(read) 작업인지 여부를 판단하여(S 28), 그 판단 결과, 처리해야 하는 리드 작업이 있는 경우, 리드용 함수를 호출하여 처리한다(S 29).That is, it is determined whether or not the job to be processed is a read job (S 28), and if there is a read job to be processed as a result of the determination, the read function is called and processed (S 29).

또한, 처리해야 하는 작업이 이벤트(event)작업인지 여부를 판단하여(S 30), 그 판단 결과, 처리해야 하는 이벤트 작업이 있는 경우, 이벤트용 함수를 호출하여 처리한다(S 31).In addition, it is determined whether the task to be processed is an event task (S 30), and if there is an event task to be processed as a result of the determination, the event function is called and processed (S 31).

즉, 서버 프로세서가 어떠한 이유로 인하여 소켓에 저장된 데이터를 리드하지 못하는 경우, 클라이언트 프로세서는 데이터를 전송하기 위한 라이트 작업을 우선적으로 완료하기 위하여 반복 수행을 하는 것이 아니라, 완료되지 않은 라이트 작업을 하나의 프로세싱(processing)으로 분류하거나 타 작업에 등록하고, 다른 작업을 수행하면서 임의의 시간이 지나고 다시금 수행되도록 하여, 클라이언트 프로세서에서 처리하는 작업의 흐름을 원활하게 하는 것이다.In other words, if the server processor fails to read the data stored in the socket for some reason, the client processor does not iterate to complete the write operation to send the data preferentially, but rather to process one uncompleted write operation. By classifying as (processing) or registering to another task, and performing another task, it is allowed to be executed again after a certain time, thereby smoothing the flow of the task processed by the client processor.

본 발명의 상세 설명에서는 일례를 들어 라이트 작업을 수행하면서 블러킹이 발생하여 타이머 작업에 등록하는 경우에 대하여 설명하나 타 경우도 이와 동일함을 알 수 있다.In the detailed description of the present invention, for example, a case in which blocking occurs while performing a write operation and a registration in a timer task will be described.

이상에서 본 발명은 기재된 구체 예에 대해서만 상세히 설명하였지만 본 발명의 기술 사상 범위 내에서 다양한 변형 및 수정이 가능함은 당업자에게 있어서 명백한 것이며, 이러한 변형 및 수정이 첨부된 특허청구범위에 속함은 당연한 것이다.Although the present invention has been described in detail only with respect to the described embodiments, it will be apparent to those skilled in the art that various modifications and changes are possible within the technical spirit of the present invention, and such modifications and modifications belong to the appended claims.

상기한 바와 같이, 본 발명에 따르면, 프로세서간 신뢰성 있는 데이터를 교환하기 위해 소켓 통신을 수행하면서, 서버 프로세서에 문제가 발생하여 소켓에 임시 저장된 데이터를 리드하지 못하여 클라이언트 프로세서가 데이터 제공하기 위한 라이트 작업이 완료될 때까지 반복 수행함으로 인하여 발생하는 블러킹 현상을 제거하여 시스템의 작업을 원활하게 수행할 수 있는 효과가 있다.As described above, according to the present invention, while performing socket communication for exchanging reliable data between processors, a write operation for providing data by the client processor due to a problem in the server processor and failing to read data temporarily stored in the socket. It is possible to smoothly perform the work of the system by removing the blocking phenomenon caused by the repeated execution until this is completed.

도 1은 일반적인 소켓 통신망의 구성을 설명하기 위한 블록도.1 is a block diagram for explaining the configuration of a general socket communication network.

도 2는 일반적인 프로세서간의 소켓 통신 방법의 흐름을 설명하는 흐름도.2 is a flow chart illustrating the flow of a socket communication method between general processors.

도 3은 본 발명의 바람직한 일실시예에 따른 소켓 통신을 이용한 프로세서간 데이터 전송 방법의 흐름을 설명하는 흐름도.3 is a flowchart illustrating a flow of a method for transmitting data between processors using socket communication according to an embodiment of the present invention.

도 4는 본 발명의 바람직한 일실시예에 따른 라이트 작업을 수행하는 방법의 흐름을 설명하는 흐름도.4 is a flowchart illustrating a flow of a method of performing a write operation according to an embodiment of the present invention.

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

1, 3 : 프로세서 2 : 버퍼부 1, 3 processor 2 buffer unit

Claims (2)

클라이언트 프로세서가 서버 프로세서와 소켓 통신을 통해 데이터를 교환하기 위하여 소켓을 설정하여, 상기 서버 프로세서로 데이터를 전송하는 방법에 있어서, In the method for the client processor to establish a socket for exchanging data through the socket communication with the server processor, to transmit data to the server processor, 전송하고자 하는 데이터를 상기 서버 프로세서가 리드(read)할 수 있도록 상기 소켓에 라이트(write) 작업을 수행하는 단계와,Performing a write operation on the socket to allow the server processor to read data to be transmitted; 상기 라이트 작업을 수행하고, 리턴 값(return value)을 수신하여 라이트 작업이 완료되었는지 여부를 판단하는 단계와,Performing the write operation and receiving a return value to determine whether the write operation is completed; 상기 판단 결과, 상기 라이트 작업이 완료되지 않은 경우, 상기 리턴 값을 통해 라이트 작업이 완료되지 않은 데이터 값을 파악하는 단계와,As a result of the determination, when the write operation is not completed, determining a data value for which the write operation is not completed through the return value; 상기 파악된 데이터 값에 대한 해당 라이트 작업을 일정 시간이 지나고 수행될 수 있도록 등록하는 단계와,Registering the write operation on the identified data value to be performed after a predetermined time; 상기 해당 라이트 작업을 등록하고, 시간을 카운트하여, 그 카운트된 시간이 상기 일정 시간 이상이 되는 경우, 상기 등록된 라이트 작업을 수행하는 단계를 포함하여 이루어지는 소켓 통신을 이용한 프로세서간 데이터 전송 방법.Registering the corresponding write job, counting a time, and performing the registered write job when the counted time is equal to or greater than the predetermined time. 제 1항에 있어서, 상기 라이트 작업 등록은,The method of claim 1, wherein the write job registration, 임의의 관리자로부터 설정되는 임의의 시간이 지나고 수행되도록 등록하거나, 상기 클라이언트 프로세서에서 처리하는 프로그램 루틴 주기에 따라 수행되도록 등록하는 것을 특징으로 하는 소켓 통신을 이용한 프로세서간 데이터 전송 방법.Registering to be performed after a certain time set from any manager, or to be performed according to the program routine cycle processed by the client processor.
KR10-2003-0010191A 2003-02-18 2003-02-18 method of data transmission between processor using socket communication KR100489942B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2003-0010191A KR100489942B1 (en) 2003-02-18 2003-02-18 method of data transmission between processor using socket communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2003-0010191A KR100489942B1 (en) 2003-02-18 2003-02-18 method of data transmission between processor using socket communication

Publications (2)

Publication Number Publication Date
KR20040074435A KR20040074435A (en) 2004-08-25
KR100489942B1 true KR100489942B1 (en) 2005-05-17

Family

ID=37361158

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2003-0010191A KR100489942B1 (en) 2003-02-18 2003-02-18 method of data transmission between processor using socket communication

Country Status (1)

Country Link
KR (1) KR100489942B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202704B (en) * 2007-09-07 2010-08-18 深圳市同洲电子股份有限公司 Method and system for transmitting data

Also Published As

Publication number Publication date
KR20040074435A (en) 2004-08-25

Similar Documents

Publication Publication Date Title
US6675218B1 (en) System for user-space network packet modification
US5848234A (en) Object procedure messaging facility
EP1891787B1 (en) Data processing system
US7249192B1 (en) Protocol for insuring exactly once semantics of transactions across an unordered, unreliable network
US8238350B2 (en) Message batching with checkpoints systems and methods
JP2003177930A (en) Method and apparatus for interprocess communication
EP1892929A1 (en) A method, an apparatus and a system for message transmission
US6101533A (en) Multiple interface data communication system and method utilizing multiple connection library interfaces with buffer and lock pool sharing
US8566833B1 (en) Combined network and application processing in a multiprocessing environment
JP3214454B2 (en) Packet processing device with built-in program
US6009463A (en) Cooperative service interface with buffer and lock pool sharing, for enhancing message-dialog transfer between network provider and distributed system services
US6081834A (en) Network data path interface method and system for enhanced data transmission
KR101975082B1 (en) Methods for managing transaction in software defined networking network
US20030065741A1 (en) Concurrent bidirectional network communication utilizing send and receive threads
KR100489942B1 (en) method of data transmission between processor using socket communication
WO2015112916A1 (en) Methods, systems and computer readable media for testing network devices using simulated application traffic
US7454491B2 (en) Method and system for efficiently transferring a self-defined non-contiguous message in a one-sided communication model
US10333792B2 (en) Modular controller in software-defined networking environment and operating method thereof
CN111586040B (en) High-performance network data receiving method and system
Riddoch et al. Distributed computing with the CLAN network
JP2006260543A (en) Method and apparatus for transmitting data to network, and method and apparatus for receiving data from network
US7962656B1 (en) Command encoding of data to enable high-level functions in computer networks
KR100534618B1 (en) apparatus method of exchange packet in socket communication processor
EP3229145A1 (en) Parallel processing apparatus and communication control method
JP3644158B2 (en) Data transmission / reception method in parallel computer

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120427

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20130429

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee