JPH09101901A - System and method for message communication between processes performed on personal computer operated by multiprocess - Google Patents

System and method for message communication between processes performed on personal computer operated by multiprocess

Info

Publication number
JPH09101901A
JPH09101901A JP7286570A JP28657095A JPH09101901A JP H09101901 A JPH09101901 A JP H09101901A JP 7286570 A JP7286570 A JP 7286570A JP 28657095 A JP28657095 A JP 28657095A JP H09101901 A JPH09101901 A JP H09101901A
Authority
JP
Japan
Prior art keywords
message
queue
signal state
function
semaphore
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
JP7286570A
Other languages
Japanese (ja)
Inventor
Mayumi Kobayashi
まゆみ 小林
Sadamasa Adachi
定昌 安達
Kazuhiko Asanuma
和彦 浅沼
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.)
N T T DATA TSUSHIN KK
NTT Data Corp
Original Assignee
N T T DATA TSUSHIN KK
NTT Data Communications Systems Corp
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 N T T DATA TSUSHIN KK, NTT Data Communications Systems Corp filed Critical N T T DATA TSUSHIN KK
Priority to JP7286570A priority Critical patent/JPH09101901A/en
Publication of JPH09101901A publication Critical patent/JPH09101901A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide inter-process bidirectional communication with which whether or not the control of process is to be blocked can be designated each time a message is transmitted and received. SOLUTION: A message queue 8 is provided in the common memory area of plural processes 2 and 4 and this queue 8 is provided with a mutex 10, idle semaphore 12 and standby semaphore 14. When there is no process accessing the common memory area, the mutex 10 shows a signal state but when there is such a process, the mutex 10 shows a non-signal state. When there is an empty seat in the queue 8, the empty semaphore 12 shows the signal state but when there is no empty seat, the empty semaphore 12 shows the non-signal state. When there is a message in the queue 8, the standby semaphore 14 shows the signal state. Only when both the mutex 10 and the empty semaphore 12 show the signal state, a transmission process can write a new message in the queue 8 and only when both the mutex 10 and the standby semaphore 14 show the signal state, a reception process 2 can take the message out of the queue 8.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マルチプロセスO
Sで動作するパーソナルコンピュータ上で行われるプロ
セス間のメッセージ通信方式に関する。
TECHNICAL FIELD The present invention relates to a multi-process O
The present invention relates to a message communication method between processes performed on a personal computer operating in S.

【0002】[0002]

【従来の技術】パーソナルコンピュータ用のマルチプロ
セスOSの一つMicrosoft社のWindowsーNTでの通信方式
を例に挙げる。WindowsーNTでは、プロセス間通信の実現
のために、 ・メモリを共有するファイルマッピング ・双方向にストリーム型データのやりとりを行う名前付
パイプ ・単方向でデータの送受信を行うメールスロット ・クリップボード ・アプリケーション間で動的にデータ交換を行うDDE ・DCE/RCP などの手段が提供されている。
2. Description of the Related Art An example is a communication system of Windows-NT of Microsoft Corporation, which is one of multi-process OSs for personal computers. In Windows-NT, in order to realize inter-process communication, -File mapping that shares memory-Named pipe that exchanges stream type data bidirectionally-Mail slot that sends and receives data in one direction-Clipboard-Application Means such as DDE / DCE / RCP for dynamically exchanging data are provided.

【0003】しかし、メッセージ通信機能をもつのはこ
のうちメールスロットだけである。ここで、メッセージ
通信とは「共通に参照できるキューがあり、このキュー
を介して、プロセスまたはスレッド間で(バイト単位で
はなく)メッセージ単位に情報の交換ができること」と
定義する。
However, only the mail slot has the message communication function. Here, message communication is defined as "there is a queue that can be referred to in common, and information can be exchanged in message units (not in byte units) between processes or threads via this queue."

【0004】メールスロットはキューの一種であり、単
方向のプロセス間通信機能を実現する。即ち、プロセス
は、メールスロットを作成してメールスロットサーバに
なることができる。メールスロットクライアントと呼ば
れる他のプロセスは、そのメールスロットの名前を使っ
てそのメールスロットにアクセスし、メールサーバにメ
ッセージを送る。その送られたメッセージは、常にメー
ルスロットに付加される。メールスロットには、それを
作成したメールサーバがメッセージを読み取るまで、メ
ッセージが保存される。
The mail slot is a kind of queue and realizes a unidirectional interprocess communication function. That is, a process can create a mailslot to become a mailslot server. Another process, called the mailslot client, uses the name of the mailslot to access the mailslot and send the message to the mail server. The sent message is always added to the mailslot. A message is stored in the mailslot until the mail server that created it reads the message.

【0005】また、WindowsーNTのメールスロットにはな
いが、他の公知のメッセージ機構の中には、メッセージ
タイプを用いて、受信側でメッセージの選択受信ができ
るものがある。その機構によれば、送信側は送信する各
メッセージにメッセージタイプを付加することができ、
受信側は受信したいメッセージタイプを指定することに
より、送信されたメッセージの選択受信ができる。これ
により、必ずしもFIFOに限らず、より拡張した使い
方が可能なメッセージキューが実現できる。例えばメッ
セージタイプを次のように意味付けるなどして選択受信
を可能にする。
Although not provided in the Windows-NT mail slot, there are some other known message mechanisms that allow the receiving side to selectively receive a message using the message type. The mechanism allows the sender to add a message type to each message it sends,
The receiving side can selectively receive the transmitted message by designating the message type to be received. As a result, it is possible to realize a message queue that is not limited to the FIFO and can be used in a more expanded manner. For example, the following message types are given to enable selective reception.

【0006】・メッセージタイプが0=キューの先頭か
らメッセージを取り出す。 ・メッセージタイプが0より大きい整数=指定した番号
に一致するメッセージタイプをキューの先頭から探し、
最初に見つけたメッセージを取り出す。
Message type 0 = message is retrieved from the head of the queue. -Integer with message type greater than 0 = message type matching the specified number is searched from the top of the queue,
Retrieve the first message found.

【0007】更に、メッセージタイプはアプリケーショ
ン・プログラムによって、様々な目的で使用することが
できる。例えば次のような使い方が可能である。
Further, the message type can be used by the application program for various purposes. For example, the following usages are possible.

【0008】(1)同じメッセージキューを使用して2つ
のプロセスがお互いのメッセージを受け渡す場合、例え
ばメッセージタイプ1がプロセスAからプロセスBへの
メッセージ、メッセージタイプ2がプロセスBからプロ
セスAへのメッセージとする。 (2)メッセージの最後を知らせるマークとして、例えば
メッセージタイプ1が一般データ、メッセージタイプ2
が終了と定めて、受信側がメッセージの受信ループから
抜け出す時に使用する。 (3)メッセージを送信するプロセスが複数あり、受信側
がどのプロセスから送られてきたかを知る必要がある場
合、例えばメッセージタイプにプロセスIDを指定して
送信する。 (4)一つのプロセスから複数のプロセスにメッセージを
送信する場合、例えばメッセージタイプ1はプロセスA
へのメッセージ、メッセージタイプ2はプロセスBへの
メッセージとする。
(1) When two processes pass each other's messages using the same message queue, for example, message type 1 is a message from process A to process B, and message type 2 is from process B to process A. Let it be a message. (2) As a mark indicating the end of the message, for example, message type 1 is general data, message type 2
Is used when the receiver exits the message reception loop by defining the end. (3) When there are a plurality of processes for sending a message and it is necessary to know from which process the receiving side has sent, for example, the process ID is specified as the message type and the message is sent. (4) When sending a message from one process to multiple processes, for example, message type 1 is process A
Message to process B is a message to process B.

【0009】[0009]

【発明が解決しようとする課題】従来のマルチプロセス
で動作するパーソナルコンピュータ上で行われるメッセ
ージ通信では、WindowsーNTのメールスロットを例に説明
したように、同一のメッセージキューを用いては単方向
のメッセージ通信しかできない。
In the conventional message communication performed on a personal computer operating in a multi-process, as described in the case of a mail slot of Windows-NT, the same message queue is used in one direction. Only the message communication of can be done.

【0010】また、ブロックモードとノンブロックモー
ドの指定をメッセージ毎に行うことができない。即ち、
プロセスがメッセージ送信又は受信を行おうとしたがそ
れが不可能であるとき、例えば送信時にキューが満杯で
あったり、受信時にキューが空であったような場合、プ
ロセスの振舞には次の2通りがある。一つは、送受信が
できないとき直ちに制御を戻し、次の処理に移行できる
ノンブロックモードであり、他の一つは、送受信ができ
るようになるまで一定時間又は無限に待ち続ける(つま
り、制御をブロックする)ブロックモードである。この
ブロック/ノンブロックモードの指定は、従来のメッセ
ージキュー、例えばWindowsーNTのメールスロットの場
合、メッセージキューの作成時に行われ、そのキューに
アクセスするプロセスは一律に指定されたモードを選択
しなければならない。そのため、例えば一旦ブロックモ
ードで作成されたメッセージキューについては、それに
アクセスしようとするプロセスは、いかなるアクセス機
会でも、キュー作成時に指定した時間又は無限にブロッ
クされる可能性を許容しなければならない。そのため、
プログラムの拡張性が大きく損なわれることがある。
Further, the block mode and the non-block mode cannot be designated for each message. That is,
When a process tries to send or receive a message but it is not possible, for example when the queue is full on send or empty on receive, the process behaves in two ways: There is. One is a non-block mode in which control is returned immediately when transmission / reception is not possible, and processing can shift to the next processing, and the other is waiting for a fixed time or infinitely until transmission / reception becomes possible (that is, control Block) Block mode. This blocking / non-blocking mode is specified when creating a message queue in the case of a conventional message queue, for example, a mail slot of Windows-NT, and processes that access the queue must select the specified mode uniformly. I have to. So, for example, once a message queue has been created in block mode, the process trying to access it must allow any access opportunity to be blocked for the time specified at queue creation or indefinitely. for that reason,
The extensibility of the program may be greatly impaired.

【0011】従って、本発明の目的は、マルチプロセス
で動作するパーソナルコンピュータ上で、メッセージの
送信及び受信ごとにプロセスの制御をブロックする/し
ないを指定できるプロセス間の双方向のメッセージ通信
を実現することにある。
Therefore, an object of the present invention is to realize bidirectional message communication between processes, which can specify whether to block or not control the process each time a message is sent or received on a personal computer operating in a multi-process. Especially.

【0012】[0012]

【課題を解決するための手段】本発明に従うプロセス間
メッセージ通信では、複数プロセスの共有メモリ領域を
利用して形成されたメッセージキュー機構が用いられ
る。このメッセージキュー機構には、プロセス間のメッ
セージ送受を中継するための共有メモリ領域上に形成さ
れたメッセージキューと、キューへのアクセス動作の同
期をプロセス間でとるための3種の同期オブジェクトと
が含まれる。
In the interprocess message communication according to the present invention, a message queue mechanism formed by utilizing a shared memory area of a plurality of processes is used. This message queue mechanism includes a message queue formed on a shared memory area for relaying message transmission / reception between processes, and three types of synchronization objects for synchronizing access operations to the queues between processes. included.

【0013】第1の同期オブジェクトは、メッセージキ
ューにアクセスしているプロセスが存在しないときシグ
ナル状態を示し、存在するとき非シグナル状態を示す。
第2の同期オブジェクトは、メッセージキュー内に空席
が存在するときシグナル状態を示し、存在しないとき非
シグナル状態を示す。第3の同期オブジェクトは、メッ
セージキュー内にメッセージが存在するときシグナル状
態を示し、存在しないとき非シグナル状態を示す。
The first synchronization object indicates a signal state when there is no process accessing the message queue, and a non-signal state when it exists.
The second synchronization object indicates a signal state when there is an empty seat in the message queue and a non-signal state when there is no seat. The third synchronization object indicates a signal state when a message exists in the message queue and a non-signal state when the message does not exist.

【0014】このようなメッセージキュー機構を用いる
ことにより、複数のプロセスは相互間でメッセージの送
信及び受信を支障なく行うことができる。例えば、第1
の同期オブジェクトがシグナル状態であるときのみ、プ
ロセスに新たなメッセージ送信又は受信が許されるよう
にすることにより、一度に一つのプロセスのみがキュー
にアクセスする排他制御が実現される。また、第2の同
期オブジェクトがシグナル状態であるときのみ新たなメ
ッセージ送信が許され、第3の同期オブジェクトがシグ
ナル状態であるときのみ新たなメッセージ受信が許され
るようにすることにより、各プロセスは同じメッセージ
キューを介してメッセージ送信及び受信のいずれをも行
えるようになり、双方向通信が実現される。
By using such a message queue mechanism, a plurality of processes can send and receive messages to each other without any trouble. For example, the first
Exclusive control in which only one process accesses the queue at a time is realized by allowing the process to send or receive a new message only when the synchronization object of is in the signal state. Also, by allowing a new message to be sent only when the second synchronization object is in the signal state, and allowing a new message to be received only when the third synchronization object is in the signal state, each process is Both messages can be transmitted and received through the same message queue, and bidirectional communication is realized.

【0015】更に、それら同期オブジェクトによってメ
ッセージキューの状態が管理され、それを全てのプロセ
スが参照できることにより、各プロセスがメッセージ毎
にブロックモード又はノンブロックモードを自由に選択
しても、他のプロセスは支障なく正常に動作することが
できる。従って、メッセージ毎のブロック/ノンブロッ
クモードの選択が可能となる。
Further, since the state of the message queue is managed by these synchronization objects and all processes can refer to it, even if each process freely selects the block mode or non-block mode for each message, other processes can be selected. Can operate normally without any problems. Therefore, it is possible to select the block / non-block mode for each message.

【0016】好適な実施形態では、メッセージ送信関数
及びメッセージ受信関数が各プロセスとメッセージキュ
ー機構との間に介在して、メッセージキュー機構に対す
る操作を代行し、その際、プロセスのブロック/ノンブ
ロックモードの指定にも応じられる。従って、各プロセ
スとしては送受信に当たってそれら関数を呼出すだけで
良いため、各プロセスに対応するアプリケーションプロ
グラムの作成が容易である。
In a preferred embodiment, a message sending function and a message receiving function intervene between each process and the message queuing mechanism to act on behalf of the message queuing mechanism, with the process's blocking / non-blocking mode. Can also be specified. Therefore, since each process only needs to call those functions for transmission and reception, it is easy to create an application program corresponding to each process.

【0017】更に、従来技術であるメッセージタイプに
よる選択受信の技術を併用することにより、より自由度
の高いメッセージ通信が可能となる。
Further, by using the technique of selective reception according to the message type, which is a conventional technique, it is possible to perform message communication with a higher degree of freedom.

【0018】[0018]

【発明の実施形態】以下、本発明の実施形態を図面によ
り詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0019】図1は、本発明に係るメッセージ通信方式
の一実施形態で用いられるメッセージキュー機構を示
す。
FIG. 1 shows a message queue mechanism used in an embodiment of a message communication system according to the present invention.

【0020】マルチプロセスOS、例えばWindows-NT、
で動作するパーソナルコンピュータ上では、図1に示す
ように、複数のプロセス2、4が同時並行的に動作する
ことができる。図1では説明の都合上2つのプロセス
2、4しか示さないが、より多くのプロセスが動作して
いてもよい。それら複数のプロセス2、4間のメッセー
ジ通信手段としてメッセージキュー機構6が設けられ
る。このメッセージキュー機構6には、複数プロセス
2、4が共有する共有メモリ上に形成された、プロセス
間で授受されるべきメッセージM1、M2、…を蓄える
ためのメッセージキュー8が含まれる。更に、このキュ
ー機構6には、プロセス間でメッセージキュー8へのア
クセス動作の同期をとるための3つの同期オブジェクト
(一種の状態変数)10、12、14とが含まれる。図
1では1つのメッセージキュー機構6しか示してない
が、異なるIDを持った複数のメッセージキュー機構6
が並設されていてもよい。
Multi-process OS, eg Windows-NT,
As shown in FIG. 1, a plurality of processes 2 and 4 can simultaneously operate in parallel on a personal computer that operates in accordance with. Although only two processes 2 and 4 are shown in FIG. 1 for the sake of explanation, more processes may be operating. A message queue mechanism 6 is provided as a message communication means between the plurality of processes 2 and 4. The message queue mechanism 6 includes a message queue 8 formed on a shared memory shared by a plurality of processes 2 and 4 for storing messages M1, M2, ... Further, the queue mechanism 6 includes three synchronization objects (a kind of state variable) 10, 12, 14 for synchronizing the access operation to the message queue 8 between processes. Although only one message queue mechanism 6 is shown in FIG. 1, a plurality of message queue mechanisms 6 having different IDs are shown.
May be provided in parallel.

【0021】メッセージキュー8には、ユーザの指定し
た最大メッセージ数までの個数のメッセージをキューイ
ングすることができる。各メッセージM1、M2、…に
はメッセージタイプを付けることができる。メッセージ
タイプは、従来技術と同様な態様で選択受信のために利
用することができる。
The message queue 8 can queue up to the maximum number of messages designated by the user. A message type can be attached to each message M1, M2, .... The message type can be used for selective reception in a manner similar to the prior art.

【0022】メッセージキュー8に付属して、3つの同
期オブジェクト、つまり、一つのミューテックスオブジ
ェクト10と、2つのセマフォオブジェクト12、14
とが設けられる(以下、単にミューテックス及びセマフ
ォという)。2つのセマフォのうち、一方のセマフォ1
2は空きセマフォと呼ばれ、他方のセマフォ14は待ち
セマフォと呼ばれる。ミューテックス10及びセマフォ
12、18は待機関数と共に用いられ、シグナル状態と
非シグナル状態の2つの状態をもつ。
Attached to the message queue 8 are three synchronization objects, that is, one mutex object 10 and two semaphore objects 12 and 14.
And are provided (hereinafter simply referred to as mutex and semaphore). One of the two semaphores 1
2 is called an empty semaphore, and the other semaphore 14 is called a waiting semaphore. The mutex 10 and the semaphores 12 and 18 are used together with a waiting function and have two states, a signal state and a non-signal state.

【0023】ミューテックス10は、同時に一つのプロ
セスのみがキュー8へアクセスできるようにするための
排他制御に利用されるものである。即ち、ミューテック
ス10は、いかなるプロセス又はスレッド(以下、プロ
セスと総称する)にも所有されていないとき(つまり、
いかなるプロセスもキュー8にアクセスしていない、又
はアクセスを試みていないとき)にシグナル状態とな
り、いずれかのプロセスに所有されているときは非シグ
ナル状態となる。キュー8にアクセスしようとする(つ
まり、メッセージを送信又は受信しようとする)プロセ
スは、必ずその前にミューテックス10を所有しなけれ
ばならない。その場合、ミューテックス10がシグナル
状態でなければ、そのミューテックス10を所有するこ
とができない。。従って、一度に一つのプロセスのみ
が、ミューテックス10を所有できる(つまり、キュー
8にアクセスできる)。そして、アクセスの操作が終わ
り次第、プロセスはミューテックス10を解放しなけれ
ばならない。
The mutex 10 is used for exclusive control so that only one process can access the queue 8 at the same time. That is, when the mutex 10 is not owned by any process or thread (hereinafter, collectively referred to as a process) (that is,
Signaled when no process is accessing or attempting to access queue 8) and non-signaling when owned by any process. A process wishing to access the queue 8 (i.e. trying to send or receive a message) must always own the mutex 10 before it. In that case, unless the mutex 10 is in the signal state, the mutex 10 cannot be owned. . Therefore, only one process can own the mutex 10 (ie, access queue 8) at a time. Then, the process must release the mutex 10 as soon as the access operation is completed.

【0024】セマフォ12、14は、0からある最大値
までのカウント値を持ち、カウント値が0を越える正の
整数値のときにシグナル状態であり、0のときには非シ
グナル状態である。各セマフォ12、14は、シグナル
状態にあるときのみプロセスによって獲得され得る。
The semaphores 12 and 14 have count values from 0 to a certain maximum value, and are in a signal state when the count value is a positive integer value exceeding 0, and are in a non-signal state when 0. Each semaphore 12, 14 can only be acquired by the process when it is in the signaled state.

【0025】空きセマフォ12は、メッセージを送信し
ようとするプロセス(以下、送信プロセスという)に対
し、そのメッセージのための空席がキュー8内にあるか
否かを示すために使用される。送信プロセスは、メッセ
ージの送信に先立ち必ず空きセマフォ12を獲得しなけ
ればならない。空きセマフォ12には、キューイングで
きる最大メッセージ個数が初期カウント値としてセット
されており、空きセマフォ12が送信プロセスによって
獲得されたとき、そのカウント値は1だけ減らされる。
また、メッセージがプロセスに受信された時、そのカウ
ント値は1だけ増やされる。従って、空きセマフォ12
のカウント値はそのキュー8内の空席数を示し(1以上
ならシグナル状態)、キュー8が満杯になると0となる
(非シグナル状態)。空きセマフォ12が非シグナル状
態になると、いずれのプロセスも空きセマフォ12がシ
グナル状態に戻るまで、メッセージ送信を待たなくては
ならない。
The empty semaphore 12 is used to indicate to a process (hereinafter referred to as a sending process) trying to send a message whether or not there is an empty seat in the queue 8 for the message. The sending process must always acquire an empty semaphore 12 before sending a message. The maximum number of messages that can be queued is set as an initial count value in the empty semaphore 12, and when the empty semaphore 12 is acquired by the transmission process, the count value is decremented by 1.
Also, when a message is received by a process, its count value is incremented by one. Therefore, the empty semaphore 12
The count value of indicates the number of empty seats in the queue 8 (signal state if 1 or more), and becomes 0 when the queue 8 is full (non-signal state). When the empty semaphore 12 becomes non-signaled, any process has to wait for message transmission until the empty semaphore 12 returns to the signaled state.

【0026】待ちセマフォ14は、メッセージを受信し
ようとするプロセス(以下、受信プロセスという)に対
し、キュー8内にメッセージがあるか否かを示すために
使用される。受信プロセスは、メッセージの受信に先立
ち必ず待ちセマフォ14を獲得しなければならない。待
ちセマフォ14には、0が初期カウント値としてセット
され、送信プロセスがメッセージを送信したときにその
カウント値は1だけ増やされ、また、受信プロセスが待
ちセマフォ14を獲得した時にそのカウントは1だけ減
らされる。また、受信プロセスが待ちセマフォ14を一
旦獲得したものの、選択受信の対象たるメッセージをキ
ュー8から検索できなかった場合も、待ちセマフォ14
のカウント値は1だけ増やされる(つまり、獲得時の1
減が帳消しされる)。従って、待ちセマフォ14のカウ
ント値は、キュー8内に在るメッセージ数を示し(1以
上ならシグナル状態)、キュー8が完全に空になると0
となる(非シグナル状態)。待ちセマフォ14が非シグ
ナル状態になると、いずれのプロセスも待ちセマフォ1
2がシグナル状態に戻るまで、メッセージ受信を待たな
くてはならない。
The waiting semaphore 14 is used to indicate to a process (hereinafter, a receiving process) trying to receive a message whether or not there is a message in the queue 8. The receiving process must acquire the waiting semaphore 14 before receiving the message. The waiting semaphore 14 is set to 0 as an initial count value, the count value is incremented by 1 when the sending process sends a message, and the count value is incremented by 1 when the receiving process acquires the waiting semaphore 14. Reduced. In addition, even if the receiving process once acquires the waiting semaphore 14 but cannot retrieve the message targeted for selective reception from the queue 8, the waiting semaphore 14
The count value of is increased by 1 (that is, 1 at the time of acquisition)
The reduction is written off). Therefore, the count value of the waiting semaphore 14 indicates the number of messages in the queue 8 (signal state if 1 or more), and becomes 0 when the queue 8 is completely empty.
Becomes (non-signal state). When the wait semaphore 14 becomes non-signal state, all processes wait for semaphore 1
It must wait for the message to be received until the 2 returns to the signaled state.

【0027】以上のようなメッセージキュー機構6を用
いた各プロセスの動作の流れは次の通りである。
The flow of operation of each process using the above message queue mechanism 6 is as follows.

【0028】動作しているプロセス2、4のいずれか
が、パラメータに特定のキー情報などを指定して「メッ
セージキューの割り当て」関数を呼び出すことによって
(S1又はR1)、必要サイズの共有メモリ領域が確保
され、指定されたキー情報に1対1で対応したIDをも
ったメッセージキュー機構6が新規生成され、そして、
そのキュー機構6はそれを生成したプロセスに割り当て
られる。このキュー機構6には、確保された共有メモリ
領域上に形成されたメッセージキュー8と、それに付属
するミューテックス10及びセマフォ12、14を含
む。このキュー機構6を使用したい他のプロセスは、パ
ラメータにキュー機構6に対応するキー情報などを指定
して「メッセージキューの割り当て」関数を呼び出すこ
とにより、そのキュー機構8を割り当てられる(つま
り、そのキュー機構6を使用できる)。こうして同一の
キュー機構6を割り当てられた複数のプロセス2、4
は、そのキュー機構6を介して双方向のメッセージ通信
を行うことが可能になる。何れのプロセス2、4もメッ
セージを送信し且つ受信することができる。以下、図1
に示すように一方のプロセス2が送信プロセス、他方の
プロセス4が受信プロセスである場合を例に説明する。
Any one of the operating processes 2 and 4 calls a "message queue allocation" function by specifying specific key information or the like as a parameter (S1 or R1), and a shared memory area of a required size is obtained. Is secured, a message queue mechanism 6 having an ID corresponding to the specified key information in a one-to-one correspondence is newly generated, and
The queue mechanism 6 is assigned to the process that created it. The queue mechanism 6 includes a message queue 8 formed on the secured shared memory area, and a mutex 10 and semaphores 12 and 14 attached to the message queue 8. Other processes wishing to use this queue mechanism 6 are assigned that queue mechanism 8 by calling the "allocate message queue" function by specifying the key information etc. corresponding to the queue mechanism 6 in the parameter (that is, the queue mechanism 8). The queue mechanism 6 can be used). In this way, a plurality of processes 2, 4 assigned the same queue mechanism 6
Can perform two-way message communication via the queue mechanism 6. Either process 2, 4 can send and receive messages. Hereinafter, FIG.
An example will be described in which one process 2 is a transmission process and the other process 4 is a reception process as shown in FIG.

【0029】送信プロセス2は、メッセージを送信した
いとき、使用するメッセージ機構6のIDや送信メッセ
ージ(送信データ)やブロック/ノンブロックモード指
定を示すブロックフラグなどをパラメータに指定して、
メッセージ「送信」関数を呼び出す(S2)。メッセー
ジ送信関数は、後述するような操作をキュー機構6に対
して行う。その結果、メッセージ送信が成功すれば、メ
ッセージ送信関数はその旨の値(例えば、送信したメッ
セージのサイズ)を送信プロセス2に返却する。しか
し、次の様な場合にはメッセージ送信に失敗する。
When the transmission process 2 wants to transmit a message, it designates the ID of the message mechanism 6 to be used, the transmission message (transmission data), the block flag indicating the block / non-block mode designation, etc. as parameters,
The message "send" function is called (S2). The message transmission function performs an operation described later on the queue mechanism 6. As a result, if the message transmission is successful, the message transmission function returns a value to that effect (for example, the size of the transmitted message) to the transmission process 2. However, message transmission fails in the following cases.

【0030】キュー8が満杯である(空きセマフォ1
2が獲得できない)。 他のプロセスがキュー8にアクセスしている(ミュー
テックス10が獲得できない)。
Queue 8 is full (empty semaphore 1
2 cannot be obtained). Another process is accessing the queue 8 (the mutex 10 cannot be acquired).

【0031】メッセージ送信に失敗した場合、送信関数
は、指定されたモードがブロックかノンブロックかによ
って異なる動作を行う。即ち、ブロックモードの場合、
送信関数は上記失敗の原因が解消するまで待つことにな
り、その間、送信プロセス2はブロックされる。一方、
ノンブロックモードの場合は、送信関数は送信失敗を示
す返却値(例えば、−1)を送信プロセス2に返却し、
それにより送信プロセス2はリターンする。
When the message transmission fails, the transmission function performs different operations depending on whether the designated mode is block or non-block. That is, in the block mode,
The send function will wait until the cause of the failure is resolved, while the send process 2 is blocked. on the other hand,
In the non-block mode, the transmission function returns a return value (for example, -1) indicating the transmission failure to the transmission process 2,
As a result, the transmission process 2 returns.

【0032】受信プロセス4は、メッセージを受信した
いとき、メッセージ機構6のIDや受信バッファやブロ
ックフラグなどをパラメータに指定して、メッセージ
「受信」関数を呼び出す(R2)。メッセージ受信関数
は、後述するような操作をキュー機構6に対して行う。
その結果、メッセージ受信が成功すれば、メッセージ受
信関数はその旨の値(例えば、受信したメッセージのサ
イズ)を受信プロセス4に返却する。しかし、次の様な
場合にはメッセージ受信に失敗する。
When the receiving process 4 wants to receive a message, it designates the ID of the message mechanism 6, the receiving buffer, the block flag, etc. as parameters and calls the message "reception" function (R2). The message reception function performs an operation described later on the queue mechanism 6.
As a result, if the message reception is successful, the message reception function returns a value to that effect (for example, the size of the received message) to the reception process 4. However, message reception fails in the following cases.

【0033】キュー8が空である(待ちセマフォ14
が獲得できない)。 他のプロセスがキュー8にアクセスしている(ミュー
テックス10が獲得できない)。 キュー8にメッセージがあるが、いずれも指定したメ
ッセージタイプではない。
Queue 8 is empty (wait semaphore 14
Cannot be obtained). Another process is accessing the queue 8 (the mutex 10 cannot be acquired). There are messages in queue 8, but none of them are of the specified message type.

【0034】メッセージ受信に失敗した場合、受信関数
は、指定されたモードがブロックかノンブロックかによ
って異なる動作を行う。即ち、ブロックモードの場合、
受信関数は上記失敗の原因が解消するまで待つことにな
り、その間、受信プロセス4はブロックされる。一方、
ノンブロックモードの場合は、受信関数は受信失敗を示
す返却値(例えば、−1)を受信プロセス4に返却し、
それにより受信プロセス4はリターンする。
When the message reception is unsuccessful, the reception function performs different operations depending on whether the designated mode is block or non-block. That is, in the block mode,
The receiving function will wait until the cause of the failure is resolved, during which the receiving process 4 will be blocked. on the other hand,
In the non-block mode, the reception function returns a return value indicating reception failure (for example, -1) to the reception process 4,
As a result, the receiving process 4 returns.

【0035】各プロセス2、4は、パラメータにキュー
機構6のIDなどを指定して「メッセージキューの消
滅」関数を呼びだすことにより、その指定したキュー機
構6の利用を終了することができる。キュー機構6は、
それを利用するプロセスが全く無くなるときにメッセー
ジキューの消滅関数によって消去される。
The processes 2 and 4 can terminate the use of the specified queue mechanism 6 by calling the "message queue disappearance" function by specifying the ID of the queue mechanism 6 as a parameter. The queue mechanism 6
It is cleared by the message queue's kill function when there are no processes using it.

【0036】図2はメッセージ送信関数の動作流れを示
し、図3はメッセージ受信関数の動作流れを示す。
FIG. 2 shows the operation flow of the message transmission function, and FIG. 3 shows the operation flow of the message reception function.

【0037】まず、図2を参照して、メッセージ送信の
動作を説明する。メッセージ送信関数は、まず、空きセ
マフォ12を獲得するために所定の待機関数を呼出す
(S11)。待機関数は、空きセマフォ12がシグナル
状態(つまり、キュー8内に空席がある)ならば、それ
を獲得してそのカウント値を1だけ減少させる(S11
1)。
First, the operation of message transmission will be described with reference to FIG. The message transmission function first calls a predetermined standby function to acquire a free semaphore 12 (S11). If the empty semaphore 12 is in the signaled state (that is, there is an empty seat in the queue 8), the waiting function acquires it and decreases its count value by 1 (S11).
1).

【0038】しかし、キュー8が満杯状態のときは、空
きセマフォ12は非シグナル状態であるため、これを獲
得できない。そのときは、ブロックモードの場合には、
待機関数は空きセマフォ12がシグナル状態に戻るまで
待機し、戻ったところでこれを獲得する。尚、空きセマ
フォ12がシグナル状態に戻るのは、受信プロセスがメ
ッセージを受信して空きセマフォ12のカウント値を増
加させたとき(図3のR16)である。一方、ノンブロ
ックモードの場合は、待機関数は直ちに獲得失敗の旨の
値を返却し、それを受けてメッセージ送信関数が送信失
敗の旨の値を送信プロセス2に返却し(S112)、よ
って送信プロセスはリターンする。
However, when the queue 8 is full, the empty semaphore 12 is in a non-signal state and cannot be acquired. At that time, in the case of block mode,
The wait function waits until the empty semaphore 12 returns to the signal state, and acquires it when it returns. The empty semaphore 12 returns to the signal state when the receiving process receives the message and increases the count value of the empty semaphore 12 (R16 in FIG. 3). On the other hand, in the non-block mode, the standby function immediately returns a value indicating that the acquisition has failed, and in response to this, the message transmission function returns a value indicating that the transmission has failed to the transmission process 2 (S112). The process returns.

【0039】空きセマフォ12が獲得されると次に、メ
ッセージ送信関数は再び待機関数を呼出して、ミューテ
ックス10の取得を試みる(S12)。待機関数は、ミ
ューテックスがシグナル状態(つまり、他のプロセスに
よって所有されてない)ならばこれを取得する(S12
1)。しかし、ミューテックス10が非シグナル状態で
あるため取得不可能なときには、空きセマフォの獲得失
敗のときと同様に、ブロックモードの場合はシグナル状
態に戻るまで待機し、ノンブロックモードの場合は送信
プロセス2に失敗値を返し(S122)、それにより送
信プロセス2は直ちにリターンする。尚、非シグナル状
態のミューテックス10がシグナル状態に戻るのは、ミ
ューテックス10を所有している他のプロセスがミュー
テックス10を解放したとき(S15、図3のR17又
はR20)である。
When the empty semaphore 12 is acquired, the message transmission function next calls the standby function again to try to acquire the mutex 10 (S12). The wait function obtains the mutex if it is in a signaled state (that is, not owned by another process) (S12).
1). However, when the mutex 10 cannot be acquired because it is in the non-signal state, it waits until it returns to the signal state in the block mode, and the transmission process 2 in the non-block mode, as in the case of the acquisition failure of the empty semaphore. (S122), the transmission process 2 immediately returns. The mutex 10 in the non-signal state returns to the signal state when another process owning the mutex 10 releases the mutex 10 (S15, R17 or R20 in FIG. 3).

【0040】ミューテックス10が取得できると、それ
は他のプロセスに対してキュー8をロックした(つま
り、アクセスを禁じた)ことを意味する。次に、メッセ
ージ送信関数は、このロックしたキュー8に、送信すべ
きメッセージを書込む(S13)。このキューイング操
作が終わると、メッセージ送信関数は、新たなメッセー
ジがキュー8に追加されたことを他のプロセスに知らせ
るために、待ちセマフォ14を1だけ解放する(つま
り、待ちセマフォ14のカウント値を1だけ増やす)。
続いて、メッセージ送信関数は、キュー8のロックを解
除するため、ミューテックス10を解放し(S15)、
送信動作を終える。
When the mutex 10 can be acquired, it means that the queue 8 is locked (that is, access is prohibited) to another process. Next, the message transmission function writes the message to be transmitted in this locked queue 8 (S13). At the end of this queuing operation, the message send function releases the waiting semaphore 1 by 1 (that is, the count value of the waiting semaphore 14) in order to notify other processes that a new message has been added to the queue 8. Increase by 1).
Subsequently, the message transmission function releases the mutex 10 to release the lock of the queue 8 (S15),
The transmission operation ends.

【0041】次に、図3を参照して、メッセージ受信動
作を説明する。メッセージ受信関数は、まず、待ちセマ
フォ14の獲得のために所定の待機関数を呼出す(R1
1)。待機関数は、待ちセマフォ14がシグナル状態
(つまり、キュー8内にメッセージがある)ならば、そ
れを獲得してそのカウント値を1だけ減少させる(R1
11)。
Next, the message receiving operation will be described with reference to FIG. The message receiving function first calls a predetermined waiting function to acquire the waiting semaphore 14 (R1
1). If the wait semaphore 14 is in the signaled state (that is, there is a message in queue 8), the wait function acquires it and decrements its count value by 1 (R1
11).

【0042】しかし、キュー8内にメッセージが無いと
きは、待ちセマフォ14は非シグナル状態であるため、
これを獲得できない。そのときは、ブロックモードの場
合には、待機関数は待ちセマフォ14がシグナル状態に
戻るまで待機し、戻ったところでこれを獲得する。尚、
待ちセマフォ12がシグナル状態に戻るのは、送信プロ
セスがメッセージを送信して待ちセマフォ14のカウン
ト値を増加させたとき(図2のS14)である。一方、
ノンブロックモードの場合は、待機関数は直ちに獲得失
敗の旨の値を返却し、それを受けてメッセージ受信関数
が受信失敗の旨の値を受信プロセス4に返却し(R11
2)、よって受信プロセス4はリターンする。
However, when there is no message in the queue 8, the waiting semaphore 14 is in the non-signal state,
You can't get this. At that time, in the block mode, the wait function waits until the wait semaphore 14 returns to the signal state, and acquires it when it returns. still,
The waiting semaphore 12 returns to the signal state when the sending process sends a message and increases the count value of the waiting semaphore 14 (S14 in FIG. 2). on the other hand,
In the non-block mode, the standby function immediately returns a value indicating that the acquisition has failed, and in response to this, the message reception function returns a value indicating that the reception has failed to the receiving process 4 (R11
2), so the receiving process 4 returns.

【0043】待ちセマフォ14が獲得されると次に、メ
ッセージ受信関数は再び待機関数を呼出して、ミューテ
ックス10の取得を試みる(R12)。この動作は既に
説明した送信動作におけるそれと同じであり、ミューテ
ックス10が非シグナル状態で取得不可能なときには、
ブロックモードの場合はシグナル状態に戻るまで待機
し、ノンブロックモードの場合は受信プロセス4を直ち
にリターンさせる(R122)。
When the waiting semaphore 14 is acquired, the message receiving function next calls the waiting function again to try to acquire the mutex 10 (R12). This operation is the same as that in the transmission operation described above, and when the mutex 10 is in a non-signal state and cannot be acquired,
In the block mode, it waits until it returns to the signal state, and in the non-block mode, the receiving process 4 is immediately returned (R122).

【0044】ミューテックス10が取得できると、メッ
セージ受信関数は、キュー8の中から、要求するメッセ
ージタイプに一致するメッセージを検索する(R1
3)。この検索の結果、要求したタイプのメッセージが
見つかると、メッセージ受信関数は、そのメッセージを
キュー8から取り出して、受信プロセス4が指定した受
信バッファへ書込む(R15)。これにより、キュー8
に空席が1つ増えたので、それを他のプロセスに知らせ
るために、メッセージ受信関数は、空きセマフォ12を
1だけ解放する(R16)。続いて、メッセージ受信関
数は、キュー8のロックを解除するためにミューテック
ス10を解放し(R17)、そして受信成功の旨の値を
受信プロセス4に返却して受信動作を終える(R1
8)。
When the mutex 10 can be acquired, the message reception function searches the queue 8 for a message matching the requested message type (R1).
3). When a message of the requested type is found as a result of this search, the message reception function extracts the message from the queue 8 and writes it in the reception buffer specified by the reception process 4 (R15). This makes cue 8
Since there is one more vacant seat, the message receiving function releases one free semaphore 12 to notify the other processes (R16). Subsequently, the message reception function releases the mutex 10 to unlock the queue 8 (R17), and returns a value indicating successful reception to the reception process 4 to end the reception operation (R1).
8).

【0045】また、ステップR13において、要求する
タイプのメッセージがキュー8内に無かったときは、最
初に取得した待ちセマフォ14のカウント値を元に戻す
ため、待ちセマフォ14のカウント値を1だけ増加する
(R19)。これにより、新たなメッセージの送信を待
っている他の受信プロセスに、受信の機会を逐次に与え
ることができるようになる。続いて、メッセージ受信関
数は、キュー8のロックを解除するためにミューテック
ス10を解放し(R20)、そして、ブロックモードの
場合は新たなメッセージの送信を待ち(R23)、その
間、受信ブロック4はブロックされることになる。一
方、ノンブロックモードの場合は、メッセージ受信関数
は受信失敗の旨の値を受信プロセス4に返却し(R2
2)、それにより、受信プロセス4はリターンする。
If there is no message of the requested type in the queue 8 in step R13, the count value of the waiting semaphore 14 that has been acquired first is returned to the original value. Therefore, the count value of the waiting semaphore 14 is incremented by one. (R19). This makes it possible to successively give other receiving processes waiting for the transmission of a new message, an opportunity of reception. Subsequently, the message receiving function releases the mutex 10 to release the lock of the queue 8 (R20), and waits for the transmission of a new message in the block mode (R23), during which the receiving block 4 Will be blocked. On the other hand, in the non-block mode, the message reception function returns a value indicating reception failure to the reception process 4 (R2
2), which causes the receiving process 4 to return.

【0046】以上、本発明の一実施形態を説明したが、
これは例示にすぎず、本発明は他の種々の態様によって
も実施することができる。例えば、上記実施形態はWind
ows-NTで動作するパーソナルコンピュータに適合させた
ものであるが、他のマルチプロセスOSで動作するパー
ソナルコンピュータにおいては、そのOSに適合した形
態で本発明を実施することが可能である。
The embodiment of the present invention has been described above.
This is merely an example, and the present invention can be implemented by various other aspects. For example, the above embodiment is Wind
Although it is adapted to a personal computer operating on ows-NT, in a personal computer operating on another multi-process OS, the present invention can be implemented in a form adapted to the OS.

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

【図1】本発明に係るメッセージ通信方式の一実施形態
で用いられるメッセージキュー機構を示すブロック図。
FIG. 1 is a block diagram showing a message queue mechanism used in an embodiment of a message communication system according to the present invention.

【図2】メッセージ送信関数の動作流れを示すフローチ
ャート。
FIG. 2 is a flowchart showing an operation flow of a message transmission function.

【図3】メッセージ受信関数の動作流れを示すフローチ
ャート。
FIG. 3 is a flowchart showing an operation flow of a message reception function.

【符号の説明】[Explanation of symbols]

2、4 プロセス 6 メッセージキュー機構 8 メッセージキュー 10 ミューテックス 12 空きセマフォ 14 待ちセマフォ 2, 4 processes 6 Message queue mechanism 8 Message queue 10 Mutex 12 Free semaphore 14 Waiting semaphore

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 マルチプロセスで動作するパーソナルコ
ンピュータ上で行われるプロセス間のメッセージ通信方
式において、 複数のプロセスに共有される共有メモリ領域と、 この共有メモリ領域を利用して形成されたメッセージキ
ュー機構とを備え、 前記メッセージキュー機構が、 前記共有メモリ領域上に形成された、プロセス間でのメ
ッセージの送受を中継するためのメッセージキューと、 前記メッセージキューにアクセスしているプロセスが存
在しないときシグナル状態を示し、存在するとき非シグ
ナル状態を示す第1の同期オブジェクトと、 前記メッセージキュー内に空席が存在するときシグナル
状態を示し、存在しないとき非シグナル状態を示す第2
の同期オブジェクトと、 前記メッセージキュー内にメッセージが存在するときシ
グナル状態を示し、存在しないとき非シグナル状態を示
す第3の同期オブジェクトと、を含むことを特徴とする
メッセージ通信方式。
1. In a message communication method between processes performed on a personal computer operating in a multi-process, a shared memory area shared by a plurality of processes and a message queue mechanism formed by utilizing this shared memory area. A message queue for relaying transmission / reception of a message between processes formed on the shared memory area; and a signal when a process accessing the message queue does not exist. A first synchronization object that indicates a state and indicates a non-signal state when present, and a second synchronization object that indicates a signal state when an empty seat exists in the message queue and indicates a non-signal state when there is no seat
And a third synchronization object that indicates a signal state when a message exists in the message queue and a non-signal state when the message does not exist in the message queue.
【請求項2】 請求項1記載の方式において、 メッセージを送信しようとする第1のプロセスからの呼
出に応答し、前記メッセージキュー機構内の前記第1及
び第2の同期オブジェクトが共にシグナル状態であると
きのみ、前記第1のプロセスが送信しようとするメッセ
ージを前記メッセージキューに書込むメッセージ送信関
数と、 メッセージを受信しようとする第2のプロセスからの呼
出に応答し、前記メッセージキュー機構内の前記第1及
び第3の同期オブジェクトが共にシグナル状態であると
きのみ、前記第1のプロセスが受信しようとするメッセ
ージを前記メッセージキューから取り出すメッセージ受
信関数と、を更に備えたことを特徴とするメッセージ通
信方式。
2. The method of claim 1, wherein the first and second synchronization objects in the message queue mechanism are both signaled in response to a call from a first process attempting to send a message. In some cases, in response to a message send function that writes a message to be sent by the first process to the message queue and a call from a second process that is to receive the message, The message further comprising a message receiving function for taking out a message to be received by the first process from the message queue only when both the first and third synchronization objects are in a signal state. Communication method.
【請求項3】 請求項2記載の方式において、 前記メッセージ送信関数が、前記第1及び第2の同期オ
ブジェクトの少なくとも一方が非シグナル状態であると
き、前記第1のプロセスが指定したブロックモードに応
じて、前記第1のプロセスをブロックするための第1の
動作及び前記第1のプロセスをリターンさせるための第
2の動作のいずれか一方を選択的に行ない、 前記メッセージ受信関数が、前記第1及び第3の同期オ
ブジェクトの少なくとも一方が非シグナル状態であると
き、前記第2のプロセスが指定したブロックモードに応
じて、前記第2のプロセスをブロックするための第3の
動作及び前記第2のプロセスをリターンさせるための第
4の動作のいずれか一方を選択的に行なうことを特徴と
するメッセージ通信方式。
3. The method according to claim 2, wherein the message transmission function enters a block mode designated by the first process when at least one of the first and second synchronization objects is in a non-signal state. Accordingly, either one of the first operation for blocking the first process and the second operation for returning the first process is selectively performed, and the message receiving function is When at least one of the first and third synchronization objects is in a non-signal state, the third operation for blocking the second process and the second operation according to the block mode specified by the second process. 4. A message communication system characterized by selectively performing one of the fourth operations for returning the process.
【請求項4】 請求項1載の方式において、 各メッセージには、その送信時にメッセージタイプを付
加することができ、 前記第2のプロセスは、受信したいメッセージタイプを
前記メッセージ受信関数に対して指定することができ、 前記メッセージ受信関数は、指定されたメッセージタイ
プに一致するメッセージタイプを選択的に前記メッセー
ジキューから取り出すことを特徴とするメッセージ通信
方式。
4. The method according to claim 1, wherein a message type can be added to each message when the message is transmitted, and the second process specifies a message type to be received to the message reception function. The message communication function is characterized in that the message receiving function selectively retrieves a message type matching a designated message type from the message queue.
【請求項5】 マルチプロセスで動作するパーソナルコ
ンピュータ上で行われるプロセス間のメッセージ通信方
法において、 複数のプロセスに共有される共有メモリ領域を確保する
過程と、 この共有メモリ領域を利用してメッセージキュー機構を
形成する過程とを備え、 前記メッセージキュー機構が、 前記共有メモリ上に形成された、プロセス間でのメッセ
ージの送受を中継するためのメッセージキューと、 前記メッセージキューにアクセスしているプロセスが存
在しないときシグナル状態を示し、存在するとき非シグ
ナル状態を示す第1の同期オブジェクトと、 前記メッセージキュー内に空席が存在するときシグナル
状態を示し、存在しないとき非シグナル状態を示す第2
の同期オブジェクトと、 前記メッセージキュー内にメッセージが存在するときシ
グナル状態を示し、存在しないとき非シグナル状態を示
す第3の同期オブジェクトと、を含み、 更に、前記第1及び第2の同期オブジェクトの状態に基
づいて、各プロセスのメッセージ送信動作を制御する過
程と、 前記第1及び第3の同期オブジェクトの状態に基づい
て、各プロセスのメッセージ受信動作を制御する過程
と、を備えたことを特徴とするメッセージ通信方法。
5. A method of message communication between processes performed on a personal computer operating in a multi-process, the process of securing a shared memory area shared by a plurality of processes, and a message queue using this shared memory area. A message queue mechanism for relaying transmission / reception of messages between processes, which is formed on the shared memory, and a process accessing the message queue. A first synchronization object that indicates a signal state when it does not exist and a non-signal state when it exists, and a second synchronization object that indicates a signal state when there is an empty seat in the message queue and a non-signal state when it does not exist
And a third synchronization object that indicates a signal state when a message exists in the message queue, and a non-signal state when the message does not exist in the message queue, and further includes a third synchronization object of the first and second synchronization objects. A process of controlling a message sending operation of each process based on the state, and a process of controlling a message receiving operation of each process based on the states of the first and third synchronization objects. And message communication method.
JP7286570A 1995-10-06 1995-10-06 System and method for message communication between processes performed on personal computer operated by multiprocess Pending JPH09101901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7286570A JPH09101901A (en) 1995-10-06 1995-10-06 System and method for message communication between processes performed on personal computer operated by multiprocess

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7286570A JPH09101901A (en) 1995-10-06 1995-10-06 System and method for message communication between processes performed on personal computer operated by multiprocess

Publications (1)

Publication Number Publication Date
JPH09101901A true JPH09101901A (en) 1997-04-15

Family

ID=17706127

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7286570A Pending JPH09101901A (en) 1995-10-06 1995-10-06 System and method for message communication between processes performed on personal computer operated by multiprocess

Country Status (1)

Country Link
JP (1) JPH09101901A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006500649A (en) * 2002-09-23 2006-01-05 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Middleware application message / event model
JP2006190265A (en) * 2004-12-30 2006-07-20 Microsoft Corp Server queuing system and method thereof
US7761504B2 (en) 2006-07-19 2010-07-20 Panasonic Corporation Message communication device
CN102355423A (en) * 2011-10-19 2012-02-15 迈普通信技术股份有限公司 Forwarded resource access method and routing system
JP2014527215A (en) * 2011-06-30 2014-10-09 インターナショナル・ビジネス・マシーンズ・コーポレーション Computer program product, computer system and method for facilitating communication in a communication environment
JP2015527658A (en) * 2012-08-02 2015-09-17 アマデウス エス.エイ.エス Method, system, and computer program product for asynchronous message sequencing in a distributed parallel environment
CN108268214A (en) * 2017-12-15 2018-07-10 中国航空工业集团公司西安飞行自动控制研究所 A kind of method of multithreading fast cycle serial peripheral operation nonvolatile storage

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55129823A (en) * 1979-03-27 1980-10-08 Toshiba Corp Information processing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55129823A (en) * 1979-03-27 1980-10-08 Toshiba Corp Information processing system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006500649A (en) * 2002-09-23 2006-01-05 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Middleware application message / event model
JP2006190265A (en) * 2004-12-30 2006-07-20 Microsoft Corp Server queuing system and method thereof
US7761504B2 (en) 2006-07-19 2010-07-20 Panasonic Corporation Message communication device
JP2014527215A (en) * 2011-06-30 2014-10-09 インターナショナル・ビジネス・マシーンズ・コーポレーション Computer program product, computer system and method for facilitating communication in a communication environment
CN102355423A (en) * 2011-10-19 2012-02-15 迈普通信技术股份有限公司 Forwarded resource access method and routing system
CN102355423B (en) * 2011-10-19 2013-11-27 迈普通信技术股份有限公司 Forwarded resource access method and routing system
JP2015527658A (en) * 2012-08-02 2015-09-17 アマデウス エス.エイ.エス Method, system, and computer program product for asynchronous message sequencing in a distributed parallel environment
CN108268214A (en) * 2017-12-15 2018-07-10 中国航空工业集团公司西安飞行自动控制研究所 A kind of method of multithreading fast cycle serial peripheral operation nonvolatile storage
CN108268214B (en) * 2017-12-15 2021-04-20 中国航空工业集团公司西安飞行自动控制研究所 Method for operating non-volatile memory by multi-thread fast cycle serial peripheral

Similar Documents

Publication Publication Date Title
US5434975A (en) System for interconnecting a synchronous path having semaphores and an asynchronous path having message queuing for interprocess communications
JP4358437B2 (en) System and method for scheduling and processing message transmissions in a digital data network
US5367643A (en) Generic high bandwidth adapter having data packet memory configured in three level hierarchy for temporary storage of variable length data packets
AU767085B2 (en) Optimizing the transfer of data packets between LANs
US7549151B2 (en) Fast and memory protected asynchronous message scheme in a multi-process and multi-thread environment
JP3553634B2 (en) Interconnect interface
US6640245B1 (en) Real-time channel-based reflective memory based upon timeliness requirements
US5931915A (en) Method for processing early arrival messages within a multinode asynchronous data communications system
US5613068A (en) Method for transferring data between processors on a network by establishing an address space for each processor in each other processor's
CA2245963C (en) Distributed kernel operating system
CA2011935A1 (en) Dual-path computer interconnect system with four-ported packet memory control
JPH03126158A (en) Method and apparatus for scheduling
JPH09101901A (en) System and method for message communication between processes performed on personal computer operated by multiprocess
JPH01142964A (en) Memory management
JPH0779353B2 (en) Message exchange method between shared memory and communication adapter using efficient logical protocol
JP4391819B2 (en) I / O node of computer system
JPH0773290B2 (en) Link switching method for order-preserving data stream transmission
US5878226A (en) System for processing early arrival messages within a multinode asynchronous data communications system
US6105071A (en) Source and destination initiated interrupt system for message arrival notification
Tokuda et al. An interprocess communication model for a distributed software testbed
JP3115801B2 (en) Parallel computer system
US6098104A (en) Source and destination initiated interrupts for message arrival notification, and related data structures
JP2937552B2 (en) Task scheduling method and method
US6421712B1 (en) Method and apparatus for broadcasting invalidation messages in a computer system
JP3550402B2 (en) Method, system and computer program product for data communication using an interconnect architecture