JPH08202566A - Inter-processor communication system - Google Patents

Inter-processor communication system

Info

Publication number
JPH08202566A
JPH08202566A JP863895A JP863895A JPH08202566A JP H08202566 A JPH08202566 A JP H08202566A JP 863895 A JP863895 A JP 863895A JP 863895 A JP863895 A JP 863895A JP H08202566 A JPH08202566 A JP H08202566A
Authority
JP
Japan
Prior art keywords
queue buffer
message data
data
external storage
message
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP863895A
Other languages
Japanese (ja)
Inventor
Muneyuki Mori
宗之 森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nissin Electric Co Ltd
Original Assignee
Nissin Electric Co Ltd
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 Nissin Electric Co Ltd filed Critical Nissin Electric Co Ltd
Priority to JP863895A priority Critical patent/JPH08202566A/en
Publication of JPH08202566A publication Critical patent/JPH08202566A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To smoothly perform an inter-process communication by preventing deadlock at the time of a data rush. CONSTITUTION: When a queue buffer is full, message data by a transmission task are temporarily stored on an external storage device in FIFO basis and when the queue buffer has a vacancy, the message data on the external storage device are taken out on the FIFO basis and sent to the queue buffer. Therefore, even when the queue buffer is full, the transmission task stores the message data to be sent on the external storage device without waiting for the queue buffer to have a vacancy, and can end its processing; and the process never stops in the wait state of message data transmission and the deadlock and the destruction of an OS function can be prevented.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、キューバッファを介
してプロセス間でメッセージデータを通信するプロセス
間通信システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an interprocess communication system for communicating message data between processes via a queue buffer.

【0002】[0002]

【従来の技術】従来より、例えば一般的なワークステー
ションなど、マルチタスク環境のOS(オペレーティン
グシステム)とCPU、入出力動作の並列処理機構、割
込み機構、記憶保護機構などのハードウェアを備えたコ
ンピュータでは、各プロセスに独立した仮想空間と仮想
CPU(タスク)が割り当てられる。例えば、端末表示
処理中に、データ処理を並行して行う場合など、1つの
プログラムのなかに複数の実行の流れを設けて並列処理
を行う場合、各並列処理ごとにプロセスが生成され、各
プロセス間でデータを共用しながら処理が進められる。
その際、各プロセスの仮想空間はそれぞれ独立して割り
当てられるので、プロセス間でデータを共用するため
に、例えばプロセス間でメッセージデータを交信する方
法、プロセス間でメモリを共有する共有メモリを利用す
る方法、複数のプロセス間で予め決めておいたファイル
を用いて通信を行う方法などの各種プロセス間通信が行
われる。
2. Description of the Related Art Conventionally, for example, a computer such as a general workstation equipped with an OS (operating system) in a multitasking environment and a CPU, a parallel processing mechanism for input / output operations, an interrupt mechanism, a memory protection mechanism, etc. In, an independent virtual space and virtual CPU (task) are assigned to each process. For example, when performing parallel processing by providing a plurality of execution flows in one program, such as when performing data processing in parallel during terminal display processing, a process is generated for each parallel processing, and each process is generated. Processing proceeds while sharing data between them.
At that time, since the virtual space of each process is independently allocated, in order to share data between processes, for example, a method of exchanging message data between processes or a shared memory that shares memory between processes is used. Various inter-process communication such as a method, a method of performing communication using a predetermined file among a plurality of processes, and the like are performed.

【0003】ここで、メッセージを利用したプロセス間
通信のプロセス構成図を図12に示す。また、複数のプ
ロセス間で行われるメッセージ通信の流れの例を図13
に示す。各プロセスは送信タスクと受信タスクを含み、
図12に示したように、送信タスクにより、他のプロセ
スに対して送信すべきメッセージデータをOSを介し
て、OSの設定したメモリ上のキューバッファに一旦記
憶する。受信タスクはそのキューバッファの記憶内容を
OSを介して受信する。このように、OSの管理するキ
ューバッファを介して、例えば図13に示したように、
メッセージを利用してプロセス間で通信を行う。
Here, a process configuration diagram of inter-process communication using a message is shown in FIG. Further, FIG. 13 shows an example of the flow of message communication performed between a plurality of processes.
Shown in Each process contains a send task and a receive task,
As shown in FIG. 12, the send task temporarily stores the message data to be sent to another process via the OS in the queue buffer on the memory set by the OS. The reception task receives the storage contents of the queue buffer via the OS. Thus, via the queue buffer managed by the OS, for example, as shown in FIG.
Communicate between processes using messages.

【0004】[0004]

【発明が解決しようとする課題】ところが、このように
OSの設定したキューバッファを用いて、プロセス間で
メッセージ通信を行うシステムでは、複数のプロセス間
での通信量が増えて、キューバッファが満杯になる場合
が生じ、キューバッファが満杯となればシステムに重大
な悪影響を及ぼす。例えば図13に示したプロセスYの
処理手順が図14に示すようなものである場合、プロセ
スYはプロセスXからあるメッセージデータを受信し、
所定の処理を施してプロセスZに対してメッセージデー
タを送信するが、メッセージデータ送信の際、キューバ
ッファが満杯であれば、送信待ち状態となり、プロセス
Yの処理がそのまま停止することになる。さらに、この
プロセスYによるメッセージデータの送信が行われるま
で、プロセスZが受信待ち状態となる場合、キューバッ
ファに空きが生じて、そのキューバッファにプロセスY
によるメッセージデータが入るまで、プロセスZは受信
待ち状態に陥る。キューバッファが満杯となれば、この
ような送信待ち状態と受信待ち状態が複数のプロセスで
同時に発生し、複数のプロセスの処理が互いに他のプロ
セスの処理を待ち合わせる、いわゆるデッドロック状態
が生じてOSの機能が異常となる。例えば監視制御装置
にLANを介して複数の端末装置が接続されているシス
テムにおいて、各端末装置から伝送されてくる情報を読
み取り、監視制御装置が各端末装置の状態を集中的に監
視・制御する場合、もし各端末装置の電源である商用電
源が停電した場合など、各端末の状態が一斉に変化した
場合、それぞれの端末装置が状態変化のデータ(停電に
なったことを示すデータなど)を監視制御装置へ伝送す
ることになり、監視制御装置内では複数のプロセス間通
信の単位時間当たりの通信量が急激に増大(以下「デー
タラッシュ」という。)し、キューバッファが満杯とな
るおそれがあった。
However, in a system for performing message communication between processes by using the queue buffer set by the OS as described above, the communication volume between a plurality of processes increases and the queue buffer becomes full. If the queue buffer becomes full, the system will be seriously adversely affected. For example, when the processing procedure of the process Y shown in FIG. 13 is as shown in FIG. 14, the process Y receives a certain message data from the process X,
The message data is transmitted to the process Z after a predetermined process is performed. If the queue buffer is full at the time of transmitting the message data, the process waits for transmission and the process of the process Y is stopped. Further, if the process Z is in the reception waiting state until the message data is transmitted by the process Y, the queue buffer becomes empty, and the process Y is stored in the queue buffer.
The process Z enters the reception waiting state until the message data is received. If the queue buffer becomes full, such a transmission waiting state and a reception waiting state occur simultaneously in a plurality of processes, and a so-called deadlock state occurs in which the processes of the plurality of processes wait for the processes of other processes, resulting in a OS. Function becomes abnormal. For example, in a system in which a plurality of terminal devices are connected to a monitoring control device via a LAN, the information transmitted from each terminal device is read, and the monitoring control device centrally monitors and controls the state of each terminal device. In this case, if the status of each terminal changes all at once, such as when the commercial power supply that is the power source of each terminal device fails, the data of the status change of each terminal device (such as data indicating a power failure) is displayed. Transmission to the supervisory controller causes a sudden increase in the communication volume of a plurality of inter-process communications per unit time (hereinafter referred to as “data rush”) within the supervisory controller, and the queue buffer may become full. there were.

【0005】上記メッセージによるプロセス間通信の機
能は例えばUNIX SystemVでサポートされた通信方
式により行われるが、OSの構造上、最初にキューバッ
ファの数(容量)を設定しておく必要があり、通常は同
時に発生し得るメッセージデータの量を考慮して利用者
が設定する。しかし、上述のように、プロセス間通信の
単位時間当たりの通信量は短時間に急激に増大すること
があり、これに対応してすべての発生し得る量に設定す
ると、莫大なメモリエリアが必要となり非現実的であ
る。通常は、CPUの処理能力に対するデータラッシュ
の発生頻度を考慮して、適切な値を設定することになる
が、CPUの処理能力に対するプログラムの量の変化に
よって、一定に決められるものではない。仮に、余裕を
もってキューバッファの数を設定しても、それが本来余
裕をもっているものか否かの判断は困難である。
The function of inter-process communication by the message is performed by a communication system supported by UNIX System V, for example, but it is necessary to set the number (capacity) of queue buffers first because of the structure of the OS. Is set by the user in consideration of the amount of message data that can occur at the same time. However, as mentioned above, the communication volume per unit time of inter-process communication may increase rapidly in a short time, and if all the possible volumes are set correspondingly, a huge memory area is required. Next to it is unrealistic. Usually, an appropriate value is set in consideration of the occurrence frequency of data rush with respect to the processing capacity of the CPU, but it is not fixed according to the change in the amount of the program with respect to the processing capacity of the CPU. Even if the number of queue buffers is set with a margin, it is difficult to judge whether or not the number of queue buffers has a margin.

【0006】この発明の目的は、キューバッファが満杯
状態であっても、送信タスクは待ち状態とならずに直ち
にその処理を終了できるようにして、上述した問題を解
消したプロセス間通信システムを提供することにある。
An object of the present invention is to provide an inter-process communication system which solves the above-mentioned problem by allowing a transmitting task to end its processing immediately without waiting even if the queue buffer is full. To do.

【0007】[0007]

【課題を解決するための手段】この発明は、あるプロセ
スに含まれている送信タスクがキューバッファにメッセ
ージデータを送信し、あるプロセスに含まれる受信タス
クがキューバッファからメッセージデータを受信するこ
とによって、プロセス間でメッセージ通信を行うシステ
ムにおいて、キューバッファが満杯のときでも送信タス
クが待ち状態とならないように、請求項1に記載したと
おり、キューバッファが満杯のとき、送信タスクによる
メッセージデータを外部記憶装置に先入れ先出し形式で
一時記憶するメッセージデータ外部記憶手段と、キュー
バッファに空きがあるとき、前記外部記憶装置のメッセ
ージデータを先入れ先出し形式で取り出し、キューバッ
ファへ送信する外部記憶装置メッセージデータ送信手段
とを設ける。
According to the present invention, a send task included in a process sends message data to a queue buffer, and a receive task included in a process receives message data from the queue buffer. In a system for performing message communication between processes, as described in claim 1, when the queue buffer is full, the message data from the send task is externalized so that the send task does not wait even when the queue buffer is full. Message data external storage means for temporarily storing in the storage device in the first-in first-out format, and external storage device message data transmission means for taking out the message data in the external storage device in the first-in first-out format and transmitting it to the queue buffer when the queue buffer has a space. To provide.

【0008】また、この発明は、送信タスクだけによら
ずに、前記外部記憶装置に記憶されたメッセージデータ
をキューバッファへ送信するために、請求項2に記載し
たとおり、キューバッファにメッセージデータがなく、
且つキューバッファに空きがあるとき、前記外部記憶装
置に記憶されているメッセージデータを先入れ先出し形
式で取り出し、キューバッファへ送信する手段を受信タ
スクに設ける。
Further, according to the present invention, in order to transmit the message data stored in the external storage device to the queue buffer independently of the transmission task, as described in claim 2, the message data is stored in the queue buffer. Without
Further, when the queue buffer has a free space, the receiving task is provided with means for taking out the message data stored in the external storage device in the first-in first-out format and transmitting it to the queue buffer.

【0009】ここで、この発明のプロセス構成の例を図
1に示す。図1はある1つのプロセス間通信における1
つの送信タスクと1つの受信タスクについての構成につ
いてのみ示している。請求項1に係るプロセス間通信シ
ステムでは、図1において、送信タスクがキューバッフ
ァに対してメッセージデータを送信する際、キューバッ
ファが満杯のとき、送信タスクによるメッセージデータ
を外部記憶装置に先入れ先出し形式で一時記憶し、キュ
ーバッファに空きが生じたとき、外部記憶装置に既に記
憶されているメッセージデータをキューバッファへ送信
する。さらに請求項2に係るプロセス間通信システムで
は、キューバッファにメッセージデータがなく、且つキ
ューバッファに空きがあるとき、受信タスクが、外部記
憶装置に記憶されているメッセージデータを先入れ先出
し形式で取り出し、キューバッファへ送信する。
Here, an example of the process configuration of the present invention is shown in FIG. Fig. 1 shows one interprocess communication
Only the configuration for one send task and one receive task is shown. In the inter-process communication system according to claim 1, in FIG. 1, when the transmission task transmits message data to the queue buffer, when the queue buffer is full, the message data by the transmission task is stored in the external storage device in a first-in first-out format. When the queue buffer is temporarily stored and there is a space in the queue buffer, the message data already stored in the external storage device is transmitted to the queue buffer. Further, in the interprocess communication system according to claim 2, when there is no message data in the queue buffer and there is a space in the queue buffer, the receiving task retrieves the message data stored in the external storage device in the first-in first-out format, Send to buffer.

【0010】[0010]

【作用】この発明の請求項1に係るプロセス間通信シス
テムでは、メッセージデータ外部記憶手段は、キューバ
ッファが満杯のとき、送信タスクによるメッセージデー
タを外部記憶装置に先入れ先出し形式で一時記憶し、外
部記憶装置メッセージデータ送信手段は、キューバッフ
ァに空きがあるとき、外部記憶装置のメッセージデータ
を先入れ先出し形式で、すなわち最も先に記憶されたメ
ッセージデータから取り出してこれをキューバッファへ
送信する。従って、キューバッファが満杯のときでも、
送信タスクはキューバッファが空くのを待つことなく、
送信すべきメッセージデータを外部記憶装置に記憶し
て、送信タスクとしての処理を終了することができる。
このため、前述したように、メッセージデータ送信の待
ち状態でプロセスが停止することがなく、上述したデッ
ドロックおよびOS機能の破壊が防止される。
In the interprocess communication system according to claim 1 of the present invention, the message data external storage means temporarily stores the message data by the transmission task in the external storage device in the first-in first-out format when the queue buffer is full, and the external storage When the queue buffer has a free space, the device message data transmitting means extracts the message data in the external storage device in the first-in first-out format, that is, the message data stored first and transmits it to the queue buffer. Therefore, even when the queue buffer is full,
The sending task does not wait for the queue buffer to become empty,
The message data to be transmitted can be stored in the external storage device, and the processing as the transmission task can be ended.
Therefore, as described above, the process does not stop in the waiting state for message data transmission, and the above-mentioned deadlock and destruction of the OS function are prevented.

【0011】請求項2に係るプロセス間通信システムで
は、受信タスクがキューバッファからメッセージデータ
を受信する際、受信すべきメッセージデータがキューバ
ッファに無く、且つキューバッファに空きがあるとき、
外部記憶装置に記憶されているメッセージデータを先入
れ先出し形式で、すなわち最も先に記憶されたメッセー
ジデータから取り出し、これをキューバッファへ送信す
る。これにより、受信タスクにおけるメッセージデータ
の受信待ち時間に、空いているキューバッファに対し
て、外部記憶装置に記憶されているメッセージデータが
送信され、メッセージ通信の処理効率が向上する。
In the interprocess communication system according to claim 2, when the receiving task receives the message data from the queue buffer, when there is no message data to be received in the queue buffer and there is a space in the queue buffer,
The message data stored in the external storage device is taken out in the first-in first-out format, that is, the message data stored first is taken out and transmitted to the queue buffer. As a result, the message data stored in the external storage device is transmitted to the empty queue buffer during the message data reception waiting time in the reception task, and the processing efficiency of message communication is improved.

【0012】[0012]

【実施例】この発明の実施例であるプロセス間通信シス
テムを適用した監視制御システムの構成をブロック図と
して図2に示す。この例では、監視制御装置と複数の端
末装置とをそれぞれLANを介して接続することによっ
て監視制御システムを構成し、監視制御装置は複数の端
末装置から各種状態を表すデータを受け取り、また各端
末装置に対して制御用のデータを伝送する。
FIG. 2 is a block diagram showing the configuration of a supervisory control system to which an interprocess communication system according to an embodiment of the present invention is applied. In this example, a monitoring control system is configured by connecting a monitoring control device and a plurality of terminal devices via a LAN, respectively, and the monitoring control device receives data representing various states from the plurality of terminal devices and Control data is transmitted to the device.

【0013】次に、図2に示した監視制御装置の構成を
ブロック図として図3に示す。図3においてCPU1は
ROM2に予め書き込んだプログラムおよびハードディ
スクドライブ装置5またはフロッピーディスクドライブ
装置7からRAM3にロードしたプログラムを実行す
る。また、RAM3はプロセス間通信の際のキューバッ
ファとしてその一部を用いる。ハードディスクドライブ
装置5はこの発明に係る外部記憶装置であり、ハードデ
ィスクコントローラ4がデータの読み書き制御を行う。
フロッピーディスクドライブ装置7はプログラムやデー
タのロードおよびセーブの際に用い、フロッピーディス
クコントローラ6がその制御を行う。CRT9は各端末
装置の状態などを表示するために用い、CRTコントロ
ーラ8がその表示制御を行う。LANコントローラ10
はLANを介して複数の端末装置との間でデータ伝送制
御を行う。
Next, FIG. 3 is a block diagram showing the configuration of the supervisory control device shown in FIG. In FIG. 3, the CPU 1 executes the program previously written in the ROM 2 and the program loaded from the hard disk drive device 5 or the floppy disk drive device 7 into the RAM 3. Further, the RAM 3 uses a part thereof as a queue buffer at the time of interprocess communication. The hard disk drive device 5 is an external storage device according to the present invention, and the hard disk controller 4 controls reading and writing of data.
The floppy disk drive device 7 is used for loading and saving programs and data, and the floppy disk controller 6 controls the floppy disk drive device 7. The CRT 9 is used to display the status of each terminal device, and the CRT controller 8 controls the display. LAN controller 10
Performs data transmission control with a plurality of terminal devices via the LAN.

【0014】次に、図3に示したハードディスクドライ
ブ装置5内の主要部の基本構成を図4に示す。図4はあ
る1つのプロセス間通信の際に、1つの送信タスクが用
いるデータ構成についてのみ示している。図4において
「バッファ領域」は複数のメッセージデータを記憶する
領域であり、予め十分な領域を確保している。「メッセ
ージ数カウンタ」はバッファ領域に記憶されている現在
のメッセージデータ数を記憶する領域、「書込ポイン
タ」は次回にバッファ領域内にメッセージデータを書き
込むべき位置を示すデータの記憶領域、「読み出しポイ
ンタ」は次回にバッファ領域から読み出すべきメッセー
ジデータの記憶位置を示すデータの記憶領域である。こ
のようなデータ構成を各送信タスク毎に設け、これらの
データ記憶領域を用いて、バッファ領域に対して先入れ
先出し形式でメッセージデータの書込みおよび読み出し
を行う。
Next, FIG. 4 shows a basic structure of a main part in the hard disk drive device 5 shown in FIG. FIG. 4 shows only the data structure used by one transmission task in one interprocess communication. In FIG. 4, a "buffer area" is an area for storing a plurality of message data, and a sufficient area is secured in advance. The "message number counter" is an area for storing the current number of message data stored in the buffer area, the "write pointer" is a data storage area for indicating the position where message data should be written next time in the buffer area, and "readout". The "pointer" is a data storage area indicating a storage location of message data to be read next time from the buffer area. Such a data structure is provided for each transmission task, and message data is written to and read from the buffer area in a first-in first-out format using these data storage areas.

【0015】図5は上記監視制御装置における各種プロ
セスによるメッセージデータの流れの例を示す図であ
る。図5において通信制御回路はLANを介して端末装
置から伝送されたデータを読み取る。監視プロセスは通
信ドライバを介して通信制御回路が受け取ったデータを
読み取り、表示プロセスおよび故障管理プロセスに対し
それぞれのメッセージデータを送信する。これらのメッ
セージデータはキューバッファに一旦書き込まれる。表
示プロセスは監視プロセスによりキューバッファに送信
されたメッセージデータを受信し、表示すべきデータを
生成して表示ドライバへ出力する。表示ドライバはこれ
によってCRTに対する表示信号を発生する。故障管理
プロセスは監視プロセスから送信されたメッセージデー
タを受信し、所定の処理を行って、他のプロセスに対し
メッセージデータを送信する。
FIG. 5 is a diagram showing an example of the flow of message data by various processes in the monitoring control device. In FIG. 5, the communication control circuit reads the data transmitted from the terminal device via the LAN. The monitoring process reads the data received by the communication control circuit via the communication driver, and sends respective message data to the display process and the failure management process. These message data are once written in the queue buffer. The display process receives the message data sent to the queue buffer by the monitoring process, generates data to be displayed, and outputs the data to the display driver. The display driver thereby generates the display signal for the CRT. The failure management process receives the message data sent from the monitoring process, performs a predetermined process, and sends the message data to another process.

【0016】図6は図5に示した監視プロセスの処理手
順を示すフローチャートである。まず通信ドライバから
の受信を待ち、通信ドライバから故障データ(端末装置
が何らかの故障を検出した際に、その端末装置から伝送
されてくるデータ)であれば、そのデータを表示プロセ
スに対するメッセージデータおよび故障管理プロセスに
対するメッセージデータとして送信する。(n1→n2
→n3→n4→n5)。通信ドライバから故障データで
はなく、通常の状態変化のデータを受信した場合には、
その状態変化のメッセージデータを表示プロセスおよび
故障管理プロセスに対するメッセージデータとしてそれ
ぞれ送信する(n6→n7)。
FIG. 6 is a flow chart showing the processing procedure of the monitoring process shown in FIG. First, it waits for reception from the communication driver, and if it is failure data from the communication driver (data transmitted from the terminal device when the terminal device detects some failure), that data is used as message data and failure for the display process. Send as message data for management process. (N1 → n2
→ n3 → n4 → n5). If you receive normal state change data from the communication driver instead of failure data,
The message data of the state change is transmitted as message data for the display process and the failure management process (n6 → n7).

【0017】図7は表示プロセスの処理手順を示すフロ
ーチャートである。まず監視プロセスから送信され、キ
ューバッファに記憶されているメッセージデータを受信
し、端末の故障状態または状態変化の表示を行う(n1
1→n12→n13)。その後、他の処理を行って一連
の表示プロセスを繰り返す。
FIG. 7 is a flowchart showing the processing procedure of the display process. First, the message data transmitted from the monitoring process and stored in the queue buffer is received, and the failure status or status change of the terminal is displayed (n1
1 → n12 → n13). Then, another process is performed and a series of display processes are repeated.

【0018】図8は故障管理プロセスの手順を示すフロ
ーチャートである。まず監視プロセスから送信され、キ
ューバッファに記憶されているメッセージデータを受信
し、そのデータに応じた故障管理処理を行う(n21→
n22→n23)。その後、他の処理を行って一連の表
示プロセスを繰り返す。
FIG. 8 is a flowchart showing the procedure of the failure management process. First, the message data transmitted from the monitoring process and stored in the queue buffer is received, and the failure management processing is performed according to the data (n21 →
n22 → n23). Then, another process is performed and a series of display processes are repeated.

【0019】次に、図6におけるステップn4,n5,
n6,n7に示した送信タスクの手順を総じて1つのフ
ローチャートとして図9に示す。まず外部記憶装置であ
るハードディスクドライブ装置に記憶されているメッセ
ージデータ(以下「ディスクデータ」という。)の有無
をチェックし、ディスクデータが無ければ、今回の送信
すべきメッセージデータを送信する(n31→n32→
n33)。その際、キューバッファが満杯でなければ、
そのまま送信タスクの処理を終了する。ステップn33
の送信で、キューバッファが満杯であることのエラーが
OSから返ってくれば、今回のメッセージデータを新た
なディスクデータとしてハードディスクへ書き込む(n
34→n35)。また、ディスクデータのチェックを行
って、ディスクデータが既に存在する場合には、今回送
信すべきメッセージデータをハードディスクへ追加書込
みし、(先入れ先出し形式で書き込み、)その後、後述
するディスクデータ送信処理を行う(n36→n3
7)。上記ステップn35,n36がこの発明に係る
「メッセージデータ外部記憶手段」に相当し、ステップ
n37がこの発明に係る「外部記憶装置メッセージデー
タ送信手段」に相当する。
Next, in steps n4, n5 and FIG.
The procedure of the transmission tasks shown in n6 and n7 is shown in FIG. First, the presence / absence of message data (hereinafter referred to as “disk data”) stored in a hard disk drive which is an external storage device is checked, and if there is no disk data, the message data to be sent this time is sent (n31 → n32 →
n33). At that time, if the queue buffer is not full,
The processing of the transmission task ends as it is. Step n33
If the OS returns an error indicating that the queue buffer is full, the message data this time is written to the hard disk as new disk data (n
34 → n35). Also, if the disk data is checked, and if the disk data already exists, the message data to be sent this time is additionally written to the hard disk (after writing in the first-in first-out format), and then the later-described disk data transmission processing is performed. (N36 → n3
7). The steps n35 and n36 correspond to "message data external storage means" according to the present invention, and step n37 corresponds to "external storage device message data transmission means" according to the present invention.

【0020】このようにキューバッファが満杯であって
も、メッセージデータをハードディスクに書き込むこと
によって、直ちに送信タスクが終了するため、送信タス
クで待ち状態が発生することがなく、データラッシュ時
におけるプロセスの停止によるデッドロックなどを避け
ることができる。
As described above, even if the queue buffer is full, the sending task ends immediately by writing the message data to the hard disk. Therefore, the sending task does not wait and the process at the time of data rush does not occur. It is possible to avoid deadlock due to stoppage.

【0021】図10は図9におけるステップn37のデ
ィスクデータ送信処理の手順を示すフローチャートであ
る。まずディスクデータの有無をチェックし、ディスク
データがあれば、そのディスクデータのうち最も古いデ
ータ(最も先に入れたデータ)を送信する。その際、キ
ューバッファが満杯であることのエラーがOSから返ら
なければ、再びディスクデータのチェックを行う。この
処理を繰り返すことによって、ディスクデータのうち最
も古いものから順にメッセージデータをキューバッファ
へ送信する。すべてのディスクデータをキューバッファ
へ送信した場合や、キューバッファが満杯となった場合
にこの処理を終了する。
FIG. 10 is a flow chart showing the procedure of the disk data transmission process of step n37 in FIG. First, the presence / absence of disk data is checked, and if there is disk data, the oldest data (first inserted data) of the disk data is transmitted. At this time, if the OS does not return the error that the queue buffer is full, the disk data is checked again. By repeating this process, the message data is transmitted to the queue buffer in order from the oldest disk data. This process ends when all the disk data is sent to the queue buffer or when the queue buffer becomes full.

【0022】図11は図7および図8に示したステップ
n11,n21における受信タスクの手順を示すフロー
チャートである。まず、WAITなしのデータ受信を行
う(n41)。もし、このタイミングでたまたまキュー
バッファにメッセージデータがあれば、そのデータを読
み取り、この受信タスクを終了する(n41→n42→
END)。もし受信データがなければ、キューバッファ
にメッセージデータが入るのを待つことなく、この時間
を利用して、ディスクデータ送信処理を行う(n4
3)。この処理は図10に示した処理と同じであり、こ
のステップn43がこの発明の請求項2に係る手段に相
当する。その後、まだディスクデータが存在する場合に
は、この時点で再びWAITなしのデータ受信を行い、
受信データがなければ、再びステップn43へ戻る(n
44→n45→n46→n43)。この処理を繰り返
し、ディスクデータを順次キューバッファへ送信するこ
とによって、ディスクデータがなくなれば、WAIT付
きのデータ受信を行う。すなわちキューバッファにメッ
セージデータが入るまで待ち、メッセージデータが入れ
ばそれを受信する(n47)。ステップn45またはn
47でデータ受信を行い、その際にOSから受信エラー
が返らなければそのまま処理を終了する。もし受信エラ
ーが生じれば、そのエラー表示を行う(n48→n4
9)。
FIG. 11 is a flow chart showing the procedure of the receiving task in steps n11 and n21 shown in FIGS. 7 and 8. First, data reception without WAIT is performed (n41). If, by chance, there is message data in the queue buffer at this timing, the message data is read and this reception task ends (n41 → n42 →
END). If there is no received data, the disk data transmission process is performed using this time without waiting for message data to enter the queue buffer (n4
3). This processing is the same as the processing shown in FIG. 10, and this step n43 corresponds to the means according to claim 2 of the present invention. After that, if the disk data still exists, the data reception without WAIT is performed again at this point,
If there is no received data, the process returns to step n43 (n
44 → n45 → n46 → n43). By repeating this process and sequentially transmitting the disk data to the queue buffer, if the disk data is exhausted, data reception with WAIT is performed. That is, it waits until message data is entered in the queue buffer, and if message data is entered, it is received (n47). Step n45 or n
The data is received at 47, and if no reception error is returned from the OS at that time, the process is terminated. If a reception error occurs, the error is displayed (n48 → n4
9).

【0023】このように、受信タスクにおいても、キュ
ーバッファにメッセージデータがなく且つキューバッフ
ァに空きがあるときに、ディスクデータをキューバッフ
ァへ送信するようにしたため、送信タスクだけでなく受
信タスクによっても、ディスクデータをキューバッファ
へ効率よく転送することができる。
As described above, even in the receiving task, the disk data is transmitted to the queue buffer when there is no message data in the queue buffer and there is a space in the queue buffer. , Disk data can be efficiently transferred to the queue buffer.

【0024】[0024]

【発明の効果】この発明の請求項1に係るプロセス間通
信システムによれば、キューバッファが満杯のときで
も、送信タスクはキューバッファが空くのを待つことな
く、送信すべきメッセージデータを外部記憶装置に記憶
して、送信タスクとしての処理を終了することができ、
メッセージデータ送信の待ち状態でプロセスが停止する
ことがなく、デッドロックおよびOS機能の破壊が防止
される。
According to the interprocess communication system according to the first aspect of the present invention, even when the queue buffer is full, the transmission task does not wait for the queue buffer to become empty and externally stores the message data to be transmitted. You can store it in the device and finish the process as a transmission task.
The process does not stop in the waiting state for sending the message data, and the deadlock and the destruction of the OS function are prevented.

【0025】請求項2に係るプロセス間通信システムに
よれば、受信タスクにおけるメッセージデータの受信待
ち時間に、空いているキューバッファに対して、外部記
憶装置に記憶されているメッセージデータが送信され、
メッセージ通信の処理効率が向上する。
According to the interprocess communication system of the second aspect, the message data stored in the external storage device is transmitted to the empty queue buffer during the reception waiting time of the message data in the receiving task.
The processing efficiency of message communication is improved.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明のプロセス間通信システムのプロセス
構成の例を示す図である。
FIG. 1 is a diagram showing an example of a process configuration of an inter-process communication system of the present invention.

【図2】この発明の実施例である監視制御システムの構
成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a supervisory control system according to an embodiment of the present invention.

【図3】図2に示す監視制御装置の構成を示すブロック
図である。
FIG. 3 is a block diagram showing a configuration of a supervisory control device shown in FIG.

【図4】ハードディスク装置内のデータ構成の例を示す
図である。
FIG. 4 is a diagram showing an example of a data configuration in a hard disk device.

【図5】監視制御装置の各プロセス間におけるデータの
流れを示す図である。
FIG. 5 is a diagram showing a data flow between processes of the monitoring control device.

【図6】図5に示す監視プロセスの処理手順を示すフロ
ーチャートである。
FIG. 6 is a flowchart showing a processing procedure of the monitoring process shown in FIG.

【図7】図5における表示プロセスの処理手順を示すフ
ローチャートである。
7 is a flowchart showing a processing procedure of a display process in FIG.

【図8】図5における故障管理プロセスの処理手順を示
すフローチャートである。
8 is a flowchart showing a processing procedure of a failure management process in FIG.

【図9】図6におけるステップn4,n5,n6,n7
の送信タスクの処理手順を示すフローチャートである。
9 is a flowchart showing steps n4, n5, n6 and n7 in FIG.
5 is a flowchart showing the processing procedure of the transmission task of FIG.

【図10】図9および図11におけるディスクデータ送
信処理の手順を示すフローチャートである。
FIG. 10 is a flowchart showing a procedure of a disk data transmission process in FIGS. 9 and 11.

【図11】図7および図8におけるステップn11,n
21の受信タスクの処理手順を示すフローチャートであ
る。
FIG. 11 is a flowchart showing steps n11 and n in FIGS.
It is a flowchart which shows the processing procedure of the receiving task of 21.

【図12】従来のプロセス間通信システムのプロセス構
成図である。
FIG. 12 is a process configuration diagram of a conventional interprocess communication system.

【図13】各プロセス間における通信の例を示す図であ
る。
FIG. 13 is a diagram illustrating an example of communication between processes.

【図14】図13におけるプロセスYの処理手順を示す
フローチャートである。
14 is a flowchart showing a processing procedure of process Y in FIG.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 キューバッファにメッセージデータを送
信する送信タスクを含むプロセスを実行する手段と、キ
ューバッファからメッセージデータを受信する受信タス
クを含むプロセスを実行する手段とを備え、キューバッ
ファを介して、プロセス間でメッセージの通信を行うプ
ロセス間通信システムにおいて、 キューバッファが満杯のとき、送信タスクによるメッセ
ージデータを外部記憶装置に先入れ先出し形式で一時記
憶するメッセージデータ外部記憶手段と、キューバッフ
ァに空きがあるとき、前記外部記憶装置のメッセージデ
ータを先入れ先出し形式で取り出し、キューバッファへ
送信する外部記憶装置メッセージデータ送信手段とを送
信タスクに設けたことを特徴とするプロセス間通信シス
テム。
1. A means for executing a process including a sending task for sending message data to a queue buffer, and a means for executing a process including a receiving task for receiving message data from the queue buffer, the method comprising: , In an inter-process communication system that performs message communication between processes, when the queue buffer is full, there is a free space in the queue buffer and the message data external storage unit that temporarily stores the message data by the sending task in the external storage device in the first-in first-out format. An interprocess communication system, characterized in that, at a certain time, a message is sent from the external storage device in a first-in first-out format and is sent to a queue buffer.
【請求項2】 キューバッファにメッセージデータがな
く、且つキューバッファに空きがあるとき、前記外部記
憶装置に記憶されているメッセージデータを先入れ先出
し形式で取り出し、キューバッファへ送信する手段を受
信タスクに設けた請求項1記載のプロセス間通信システ
ム。
2. The receiving task is provided with means for taking out message data stored in the external storage device in a first-in first-out format and transmitting the message data to the queue buffer when the queue buffer has no message data and the queue buffer has a free space. The interprocess communication system according to claim 1.
JP863895A 1995-01-24 1995-01-24 Inter-processor communication system Pending JPH08202566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP863895A JPH08202566A (en) 1995-01-24 1995-01-24 Inter-processor communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP863895A JPH08202566A (en) 1995-01-24 1995-01-24 Inter-processor communication system

Publications (1)

Publication Number Publication Date
JPH08202566A true JPH08202566A (en) 1996-08-09

Family

ID=11698502

Family Applications (1)

Application Number Title Priority Date Filing Date
JP863895A Pending JPH08202566A (en) 1995-01-24 1995-01-24 Inter-processor communication system

Country Status (1)

Country Link
JP (1) JPH08202566A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100420422B1 (en) * 2000-01-04 2004-03-04 인터내셔널 비지네스 머신즈 코포레이션 Queue manager for a buffer
JP2004229316A (en) * 1999-03-17 2004-08-12 Schlumberger Syst Message authentication device
JP2005284924A (en) * 2004-03-30 2005-10-13 Oki Electric Ind Co Ltd Information processor
US7019863B2 (en) * 2002-06-10 2006-03-28 Sharp Laboratories Of America, Inc. Method to move queued data back to the network to make room in the device to complete other jobs
CN100426222C (en) * 2004-06-15 2008-10-15 中兴通讯股份有限公司 Deadlock solution in multi-task operating system
CN100461882C (en) * 2005-07-04 2009-02-11 中兴通讯股份有限公司 Method for retesting net-element in shortmessage system
JP2013541091A (en) * 2010-09-14 2013-11-07 マイクロソフト コーポレーション Message queue management

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004229316A (en) * 1999-03-17 2004-08-12 Schlumberger Syst Message authentication device
KR100420422B1 (en) * 2000-01-04 2004-03-04 인터내셔널 비지네스 머신즈 코포레이션 Queue manager for a buffer
US7019863B2 (en) * 2002-06-10 2006-03-28 Sharp Laboratories Of America, Inc. Method to move queued data back to the network to make room in the device to complete other jobs
JP2005284924A (en) * 2004-03-30 2005-10-13 Oki Electric Ind Co Ltd Information processor
CN100426222C (en) * 2004-06-15 2008-10-15 中兴通讯股份有限公司 Deadlock solution in multi-task operating system
CN100461882C (en) * 2005-07-04 2009-02-11 中兴通讯股份有限公司 Method for retesting net-element in shortmessage system
JP2013541091A (en) * 2010-09-14 2013-11-07 マイクロソフト コーポレーション Message queue management

Similar Documents

Publication Publication Date Title
KR950002713B1 (en) Communications adapter
US5606703A (en) Interrupt protocol system and method using priority-arranged queues of interrupt status block control data structures
EP0365731B1 (en) Method and apparatus for transferring messages between source and destination users through a shared memory
US5752078A (en) System for minimizing latency data reception and handling data packet error if detected while transferring data packet from adapter memory to host memory
US7124207B1 (en) I2O command and status batching
JP3208397B2 (en) Control element transfer system
EP0768609B1 (en) Multimedia data transferring method
US5604866A (en) Flow control system having a counter in transmitter for decrementing and incrementing based upon transmitting and received message size respectively for indicating free space in receiver
US7234004B2 (en) Method, apparatus and program product for low latency I/O adapter queuing in a computer system
JPH0824320B2 (en) Method and device for buffer chaining in communication control device
EP1199641B1 (en) Data processing device used in serial communication system
US6061757A (en) Handling interrupts by returning and requeuing currently executing interrupts for later resubmission when the currently executing interrupts are of lower priority than newly generated pending interrupts
JPH08202566A (en) Inter-processor communication system
CN108958903B (en) Embedded multi-core central processor task scheduling method and device
US6775723B2 (en) Efficient reading of a remote first in first out buffer
US6668205B1 (en) Control method of factory automation system, recording medium recording a program therefor and central processor of factory automation system
KR100357284B1 (en) The one chip asynchronous microprocessor Inter Processor Communication circuit
EP0535284A1 (en) Method and apparatus for extending the connection capability of a communication system
CN117312202B (en) System on chip and data transmission method for system on chip
JPH09269936A (en) Remote reading processing method and device therefor
US7111301B1 (en) Request and completion queue load balancing
JPH0750455B2 (en) Computer system
JPH07306946A (en) Parallel readout processing by composition of transaction
JP2848370B2 (en) Communication line monitoring device
KR960006472B1 (en) Fddi firmware driving method for ticom iop environment