JPH01214960A - System for exchanging message between multi-processor - Google Patents

System for exchanging message between multi-processor

Info

Publication number
JPH01214960A
JPH01214960A JP63039591A JP3959188A JPH01214960A JP H01214960 A JPH01214960 A JP H01214960A JP 63039591 A JP63039591 A JP 63039591A JP 3959188 A JP3959188 A JP 3959188A JP H01214960 A JPH01214960 A JP H01214960A
Authority
JP
Japan
Prior art keywords
mailbox
processor
message
processors
task
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
JP63039591A
Other languages
Japanese (ja)
Inventor
Hirokatsu Hiraga
平賀 洋勝
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP63039591A priority Critical patent/JPH01214960A/en
Publication of JPH01214960A publication Critical patent/JPH01214960A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To realize flexible and expandable message exchange by using a mail box in a single processor by using one or more processors as master processors and the remaining processors as slave processors and providing the mail box, etc., in the master processor. CONSTITUTION:One or more processors among plural processors 30 and 40 are used as master processors 30 and the remaining processors are used as slave processors 40 and a mail box 32 and a mail box directory 33 for managing mail box numbers and names are provided in the master processors 30. When the transmission task 41 of a specific slave processor 40 transmits a message, the master processor 30 registers the mail box name in the mail box directory 33 and gives the mail box number to the task 41 and the task 41 uses the number for message transmission thereafter. Therefore, flexible and expandable message exchange can be realized by using simple software while the function of conventional mail box in a single processor is utilized.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、各プロセッサ内に存在するタスク間のメツセ
ージ交換方式に係わり、特に単一プロセッサのメイルボ
ックスの機能を生かしつつメツセージの交換を行うマル
チプロセッサ間のメツセージ交換方式に関する。
[Detailed Description of the Invention] [Object of the Invention] (Industrial Application Field) The present invention relates to a message exchange method between tasks existing in each processor, and in particular, a method for exchanging messages between tasks existing in each processor. This invention relates to a message exchange method between multiprocessors for exchanging messages.

(従来の技術) オペレーティングシステムにおいては、複数のタスクが
互いに情報を交信しながら所望とする機能を実行する。
(Prior Art) In an operating system, a plurality of tasks execute desired functions while exchanging information with each other.

このとき、第9図に示すように単一プロセッサ1内のタ
スク間のメツセージ交換は、メツセージ送信タスク群2
とメツセージ受信タスク群3とがメイルボックス4を用
いて交信している場合が多い。このメイルボックス4は
送信タスク群2と受信タスク群3の間のメツセージを安
全にリンクする観点からメツセージキュー5および受信
待ちキュー6を持つている。7は送信路、8は受信路を
示す。
At this time, as shown in FIG. 9, messages are exchanged between tasks within the single processor 1 by the message sending task group
In many cases, the message receiving task group 3 and the message receiving task group 3 communicate using the mailbox 4. This mailbox 4 has a message queue 5 and a reception waiting queue 6 from the viewpoint of safely linking messages between the sending task group 2 and the receiving task group 3. 7 indicates a transmission path, and 8 indicates a reception path.

ところで、上記タスク間のメツセージ交換は、単一プロ
セッサ内のマルチタスク環境について述べたものである
が、マルチプロセッサ環境では複数のプロセッサにまた
がってタスク間でメツセージの交換を行う場合がある。
By the way, the above message exchange between tasks is described in a multi-task environment within a single processor, but in a multi-processor environment, messages may be exchanged between tasks across a plurality of processors.

従来、このように異なるプロセッサ内に存在するタスク
間のメツセージ交換は、第10図に示すようにシステム
バス10にメツセージ送信側プロセッサ11およびメツ
セージ受信側プロセッサ12のほかに共有メモリ13が
接続され、送信側となるプロセッサ例えば11のタスク
が図示(イ)矢印にしたがって共有メモリ13上にメツ
セージを書込んだ後、メツセージ受信側プロセッサ12
に対して図示(ロ)矢印の如くメツセージの送信を知ら
せる信号(例えば割込み信号)を送信する。ここで、受
信側プロセッサ12はメツセージの到着を検知すると共
有メモリ13からメツセージを図示(ハ)矢印の如く読
出して受信側タスクキューに渡す。
Conventionally, in order to exchange messages between tasks existing in different processors, a shared memory 13 is connected to a system bus 10 in addition to a message sending processor 11 and a message receiving processor 12, as shown in FIG. After the processor on the sending side, for example task 11, writes a message on the shared memory 13 according to the arrow shown in the figure (a), the processor on the message receiving side 12
A signal (for example, an interrupt signal) notifying the transmission of a message is transmitted as shown by the arrow (b) in the figure. Here, when the receiving processor 12 detects the arrival of a message, it reads the message from the shared memory 13 as shown by the arrow (c) and passes it to the receiving task queue.

(発明が解決しようとする課!i) 従って、以上のようなメツセージ交換方式においては・
共有メモリ13に対するデータの読出し、書込みが読出
し、書込みアドレスを用いて行うために各プロセッサ1
1.12と共有メモリ13は必要不可欠な関係にあり、
それだけ各プロセッサ11.12の独立性が失われる。
(Problem to be solved by the invention!i) Therefore, in the above message exchange system,
Each processor 1 reads and writes data to the shared memory 13 using read and write addresses.
1.12 and shared memory 13 have an essential relationship,
The independence of each processor 11, 12 is accordingly lost.

また、共有メモリ13のアクセスに関し1例えばメツセ
ージの書込み中には他のプロセッサが読み出しできない
ように排他制御を行う必要があり、そのためのインター
ロック手段が必要となり、かつ、ソフトウェアの負担が
増加する。さらに、従来のように単一プロセッサ内のメ
イルボックスを用いたメツセージの交換と全く異なる方
式であるので、この面でもソフトウェアの煩雑さを増す
問題がある。
Furthermore, regarding access to the shared memory 13, it is necessary to perform exclusive control so that other processors cannot read it, for example, while a message is being written, which requires an interlock means and increases the burden on the software. Furthermore, since this is a completely different method from the conventional method of exchanging messages using a mailbox within a single processor, there is also the problem of increasing the complexity of the software.

本発明は以上のような問題点を除去するためになされた
もので、異なるプロセッサ内に存在するタスク間でメツ
セージ交換を行うマルチプロセッサ環境において、従来
の単一プロセッサ内のメイルボックスの機能を生かしつ
つ簡単なソフトウェアを用いて柔軟で拡張性に富んだメ
ツセージ交換を実現するマルチプロセッサ間のメツセー
ジ交換方式を提供することを目的とする。
The present invention was made in order to eliminate the above-mentioned problems, and utilizes the conventional mailbox function in a single processor in a multiprocessor environment where messages are exchanged between tasks existing in different processors. The purpose of this invention is to provide a message exchange method between multiprocessors that realizes flexible and highly expandable message exchange using simple software.

[発明の構成] (課題を解決するための手段および作用)本発明による
マルチプロセッサ間のメツセージ交換方式は、複数のプ
ロセッサのうち少なくとも1個以上のプロセッサをマス
タープロセッサとし、他の残りのプロセッサをスレーブ
プロセッサとし、前記メインプロセッサにはメイルボッ
クスと、メイルボックス番号、メイルボックス名を管理
するメイルボックスディレクトリとを設け、特定の前記
プロセッサの送信タスクがメツセージを送信する場合、
前記特定のプロセッサの送信タスクからメイルボックス
名を含むメイルボックス生成要求メツセージを送信し、
前記メインプロセッサは前記メイルボックス生成要求メ
ツセージを前記メイルボックスに割当てると共に前記メ
イルボックスディレクトリにメイルボックス名を登録し
、かつ、そのメイルボックス名からメイルボックス番号
を送信し、前記特定のプロセッサはそのメイルボックス
番号を送信タスクに渡す。その送信タスクは、以降メイ
ルボックス番号を用いてメツセージを送信する。
[Structure of the Invention] (Means and Effects for Solving the Problems) A message exchange method among multiprocessors according to the present invention has at least one processor among a plurality of processors as a master processor, and the remaining processors as master processors. A slave processor is provided, and the main processor is provided with a mailbox and a mailbox directory for managing mailbox numbers and mailbox names, and when a transmission task of a specific processor sends a message,
Sending a mailbox generation request message including a mailbox name from the sending task of the specific processor;
The main processor allocates the mailbox generation request message to the mailbox, registers a mailbox name in the mailbox directory, and transmits a mailbox number from the mailbox name, and the specific processor Pass the box number to the send task. The sending task then uses the mailbox number to send messages.

他のもう1つの発明であるマルチプロセッサ間のメツセ
ージ交換方式は、複数のプロセッサのうち少なくとも1
個以上のプロセッサをマスタープロセッサとし、他の残
りのプロセッサをスレーブプロセッサとし、前記メイン
プロセッサにはメイルボックスと、メイルボックス番号
、メイルボックス名を管理するメイルボックスディレク
トリとを設け、特定の前記プロセッサの受信タスクがメ
ツセージを受けたい場合、前記特定のプロセッサの受信
タスクから既知のメイルボックス名をパラメータとして
メイルボックス参照要求メツセージを送信し、前記メイ
ンプロセッサはメイルボックス参照要求メツセージを受
けると前記メイルボックスディレクトリを参照しながら
メイルボックス名に対応するメイルボックス番号を求め
て送信し、前記特定のプロセッサの受信タスクはそのメ
イルボックス番号を用いてメツセージ受信要求を行うも
のである。
Another invention is a message exchange method between multiple processors, in which at least one of the multiple processors
The main processor is provided with a mailbox and a mailbox directory for managing mailbox numbers and mailbox names, and the main processor is provided with a mailbox and a mailbox directory for managing mailbox numbers and mailbox names. When the receiving task wants to receive a message, the receiving task of the specific processor sends a mailbox reference request message with a known mailbox name as a parameter, and when the main processor receives the mailbox reference request message, it sends a mailbox reference request message to the mailbox directory. The mailbox number corresponding to the mailbox name is determined and transmitted while referring to the mailbox name, and the reception task of the specific processor uses the mailbox number to issue a message reception request.

(実施例) 以下、本発明方式の実施例について図面を参照して説明
する。第1図は本発明方式を適用したマルチプロセッサ
システムの構成例であって、システムバス20上には少
なくとも1個のマスクプロセッサ30およびそれ以外の
複数のスレーブプロセッサ40.・・・が設けられてい
る。このマスクプロセッサ30はシステムワイドな自己
のメイルボックスを管理する機能を持ったプロセッサで
あり、従って、メイルボックスを持たないプロセッサを
スレーブプロセッサ40と定義する。図中。
(Example) Hereinafter, an example of the system of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration example of a multiprocessor system to which the method of the present invention is applied, in which at least one mask processor 30 and a plurality of other slave processors 40 . ...is provided. This mask processor 30 is a processor that has the function of managing its own system-wide mailbox, and therefore, a processor without a mailbox is defined as a slave processor 40. In the figure.

31.41はタスクである。31.41 is a task.

次に、第2図は前記マスクプロセッサ30の構成を示す
図、である。すなわち、このマスクプロセッサ30は、
1個以上のタスク(図示゛せず)のほかに、システムメ
イルボックス32、このシステムワイドなメイルボック
ス番号(例えばボックスシリアル番号)およびメイルボ
ックス名IDを管理するシス央ムメイルボックスディレ
クトリ33、システムメイルボックスを管理するメイル
ボックス管理モジュール34および各プロセッサ30゜
40間のメツセージ通信を行うメツセージ通信モジュー
ル35等の機能が設けられている。前記システムメイル
ボックス32はメツセージキュー36と受信待タスクキ
ニ−37のほかに、メイルボックス管理情報等で構成さ
れている。メツセージキュー36は到着したメツセージ
をキューイングし、一方1、受信待キュー37はメツセ
ージの受信を待つタスクをキューイングする。因みに、
前記マスクプロセッサ30内のテーブルは例えば第3図
のように構成されている。
Next, FIG. 2 is a diagram showing the configuration of the mask processor 30. That is, this mask processor 30
In addition to one or more tasks (not shown), a system mailbox 32, a system central mailbox directory 33 that manages system-wide mailbox numbers (e.g., box serial numbers) and mailbox name IDs; Functions such as a mailbox management module 34 for managing mailboxes and a message communication module 35 for communicating messages between the processors 30 and 40 are provided. The system mailbox 32 is composed of a message queue 36, a reception waiting task skin 37, and mailbox management information. The message queue 36 queues arrived messages, while the reception queue 37 queues tasks waiting to receive messages. By the way,
The table in the mask processor 30 is configured as shown in FIG. 3, for example.

一方、スレーブプロセッサ40は、第4図に示すように
他のプロセッサ内タスク31.41とメツセージの通信
を行うタスク群41.・・・、プロセッサ内のメツセー
ジ受信待タスクをキューイングするためのローカルな受
信待多スクキニ−42、システムメイルボックス32を
管理するメイルボックス管理モジュール43およびプロ
セッサ間のメツセージ通信を行うメツセージ通信モジュ
ール44等の機能が設けられている。
On the other hand, the slave processor 40, as shown in FIG. 4, has a task group 41.41 that communicates messages with other intra-processor tasks 31.41. . . ., a local reception waiting screen 42 for queuing messages waiting tasks in the processors, a mailbox management module 43 for managing the system mailbox 32, and a message communication module 44 for communicating messages between processors. The following functions are provided.

次に、以上のようなマルチプロセッサシステムにおける
プロセッサ間のメツセージ交換方式の動作について第5
図ないし第8図を参照して説明する。先ず、上記マルチ
プロセッサ環境での各プロセッサ30,40.・・・は
それぞれ特定のプロセッサ番号が割り当てられており、
そのうち全てのプロセッサはマルチプロセッサ30およ
び自分のプロセッサ番号を知っているものとする。
Next, the fifth section will discuss the operation of the message exchange method between processors in the multiprocessor system as described above.
This will be explained with reference to FIGS. 8 through 8. First, each processor 30, 40 . ... are each assigned a specific processor number,
It is assumed that all of the processors know the multiprocessor 30 and their own processor numbers.

(1) あるプロセッサ40内のタスク41が他のプロ
セッサ例えば30内のあるタスク31に対してメツセー
ジを送信する場合(第5図、第7図および第8図)。
(1) A case in which a task 41 in a processor 40 sends a message to another processor, for example, a task 31 in the processor 30 (FIGS. 5, 7, and 8).

先ず、メーセージを送信すべき送信タスク41がメイル
ボックス生成要求コードを送出すると(Sl、S2)、
このメイルボックス管理モジュール43はその要求コー
ドからメイルボックスの生成要求であると判断しメイル
ボックス生成要求メツセージを作成した後(S31.5
41)、メイルボックス名IDを含むメイルボックス生
成要求メツセージをメツセージ通信モジュール44へ送
出する。このメツセージ通信モジュール44はそのメイ
ルボックス名ID、 メツセージ等に自プロセッサ番号
とマスクプロセッサ番号を付加しシステムバス20を介
して第5図Alに示すようにマスクプロセッサ30へ伝
送する(S6)。このとき、送信タスク41はローカル
な受信タスクキュー42につながれ、受信待ちのサスペ
ンド状態におかれる(35.37)。
First, when the sending task 41 that is to send a message sends a mailbox generation request code (Sl, S2),
The mailbox management module 43 determines from the request code that it is a mailbox generation request and creates a mailbox generation request message (S31.5).
41), sends a mailbox generation request message including the mailbox name ID to the message communication module 44; This message communication module 44 adds its own processor number and mask processor number to the mailbox name ID, message, etc., and transmits it to the mask processor 30 via the system bus 20 as shown in FIG. 5A (S6). At this time, the sending task 41 is connected to the local receiving task queue 42 and placed in a suspended state waiting for reception (35.37).

マスタープロ妄ツサ30のメツセージ通信モジュール3
5がメイルボックス生成要求を受けると、このメツセー
ジ通信モジュール35からの起動によりメイルボックス
管理モジュール34はその生成要求コードに基づいてメ
イルボックス生成要求であると判断しくTI、T2.T
3t ) 、第3図に示すシステムメイルボックス32
のメモリにテーブルに割り当て(741) 、かつ、メ
イルボックス名IDをメイルボックスディレクトリ33
上に登録する(T51)。しかる後、メイルボックス管
理モジュール34は応答メツセージにメイルボックスを
識別するためのメイルボックス名に対応するメイルボッ
クス番号をセットしメツセージ通信モジュール35を通
してメイルボックス生成要求を行ったスレーブプロセッ
サ4oへ返送する( A 2 、T 61 、T 7 
)。
Master Pro Delusa 30's Message Communication Module 3
When TI, T2. T
3t), system mailbox 32 shown in FIG.
(741), and assign the mailbox name ID to the table in the memory of the mailbox directory 33.
Register above (T51). Thereafter, the mailbox management module 34 sets a mailbox number corresponding to the mailbox name for identifying the mailbox in the response message, and sends it back to the slave processor 4o that made the mailbox generation request through the message communication module 35 ( A2, T61, T7
).

ここで、スレーブプロセッサ40のメツセージ通信モジ
ュール44は応答メツセージ等を受信すると、メツセー
ジ通信モジュール44からの起動によりメモリボックス
管理モジュール43は受信待タスクキュー42から要求
タスク41を探し出し、当該タスク41にメイルボック
ス番号を渡す(811〜813)。従って、このタスク
41は以降メイルボックス番号を指定してシステムメイ
ルボックス32へ必要なメツセージを送信し、それに基
づいてマスクプロセッサ3oがら完了信号を受ける様に
なっている。
Here, when the message communication module 44 of the slave processor 40 receives a response message, etc., upon activation from the message communication module 44, the memory box management module 43 searches for the requesting task 41 from the reception waiting task queue 42, and sends a mail to the task 41. Pass the box number (811-813). Therefore, this task 41 thereafter specifies the mailbox number, transmits a necessary message to the system mailbox 32, and receives a completion signal from the mask processor 3o based on the message.

次に、送信タスク41がシステムメイルボックス32に
対しメツセージ送信要求を行う場合、メツセージ送信要
求コードをメイルボックス管理モジュール34に送出す
る。ここで、メイルボックス管理モジュール34はS3
4.S44のようにメイルボックス番号とメツセージ送
信要求メツセージを作成し、第5図A3に示すようにメ
ツセージ通信モジュール44を介してマスタープロセッ
サ30へ送信しくS6)、かつ、送信タスク41はその
送信完了の応答を受けるためにローカルな受信待タスク
キュー42につながれる(S5)。
Next, when the sending task 41 requests the system mailbox 32 to send a message, it sends a message sending request code to the mailbox management module 34 . Here, the mailbox management module 34 is S3
4. The mailbox number and message transmission request message are created as in S44, and transmitted to the master processor 30 via the message communication module 44 as shown in FIG. The task is connected to the local receiving task queue 42 to receive a response (S5).

一方、マスタープロセッサ30のメイルボックス管理モ
ジュール34は、スレーブプロセッサ40から受けたメ
ツセージコードに基づいてディレクトリ33を参照し、
該当するシステムメイルボックス32が判断される(7
44 )。もし、このときシステムメイルボックス32
上の受信待タスクキュー37にタスクが存在すれば、メ
ツセージをそのタスクの存在するプロセッサ40に送信
L(T54)、その受信待タスクキュー37から該当タ
スクを外すと共に該当タスクの存在するプロセッサ40
へ送信完了のメツセージを送信する(A4 * T54
 ’ 、T64 )。一方、システムメイルボックス3
2上の受信待タスクキューが存在しない場合、メツセー
ジはシステムメイルボックス32のメツセージキュー3
6に付けられると共に該当送信タスク41のプロセッサ
4oへ送信完了のメツセージを送信する(ST54 、
T64 )。
On the other hand, the mailbox management module 34 of the master processor 30 refers to the directory 33 based on the message code received from the slave processor 40,
The corresponding system mailbox 32 is determined (7
44). In this case, if the system mailbox 32
If a task exists in the task queue 37 waiting for reception, the message is sent to the processor 40 where the task exists (T54), and the corresponding task is removed from the task queue 37 waiting for reception, and the message is sent to the processor 40 where the task exists.
Send a message of completion to (A4 * T54
', T64). On the other hand, system mailbox 3
If there is no incoming task queue on 2, the message is sent to message queue 3 on system mailbox 32.
6, and sends a transmission completion message to the processor 4o of the corresponding transmission task 41 (ST54,
T64).

ここで、送信側タスク41のメイルボックス管理モジュ
ール43は送信完了のメツセージを受けてローカルな受
信待タスクキュー42上にある送信タスクの動作を再開
させる。
Here, the mailbox management module 43 of the sending task 41 receives the transmission completion message and restarts the operation of the sending task on the local reception waiting task queue 42.

次に、システムメイルボックス32の削除は、スレーブ
プロセッサ4oがらメイルボックス番号を指定して行う
。すなわち、削除要求はスレーブプロセッサ40のメイ
ルボックス管理モジュール43でメイルボックス削除要
求メツセージを作成しメツセージ通信モジュール44を
介してマスタープロセッサ3oへ送信する(A5)。こ
こで、マスタープロセッサ3oのメイルボックス管理モ
ジュール34は指定されたメイルボックス番号のシステ
ムメイルボックス32が削除可能な状態であれば、メイ
ルボックス用メモリを解放しディレクトリ33上よりメ
イルボックスの登録を削除する。そして、メモリボック
スが削除されたならば、マスタープロセッサ30から削
除完了の信号が削除要求のあったスレーブプロセッサ3
0へ送信される(A6)。
Next, the system mailbox 32 is deleted by specifying the mailbox number from the slave processor 4o. That is, for the deletion request, the mailbox management module 43 of the slave processor 40 creates a mailbox deletion request message and transmits it to the master processor 3o via the message communication module 44 (A5). Here, if the system mailbox 32 with the specified mailbox number can be deleted, the mailbox management module 34 of the master processor 3o releases the mailbox memory and deletes the mailbox registration from the directory 33. do. When the memory box is deleted, a deletion completion signal is sent from the master processor 30 to the slave processor 3 that requested the deletion.
0 (A6).

(2) あるプロセッサ40内のタスク41がメツセー
ジを受けたい場合(第6図〜第8図)。
(2) When a task 41 in a certain processor 40 wants to receive a message (FIGS. 6 to 8).

メツセージを受信すべき受信タスク41は、メイルボッ
クスディレクトリ参照要求コードを送出する。ここで、
メイルボックス管理モジュール43は既知のメイルボッ
クス名IDをパラメータとしてメイルボックス参照要求
メツセージを作成しメツセージ通信モジュール44およ
びシステムバス20を介して第6図B、に示す如くマス
タープロセッサ30へ送信しくSl、B2.S33゜S
43.B6)、当該受信タスク41はローカルな受信待
タスクキュー42につながれ、サスペンド状態に設定さ
れる(B5.S7)。
The receiving task 41 that should receive the message sends a mailbox directory reference request code. here,
The mailbox management module 43 creates a mailbox reference request message using the known mailbox name ID as a parameter, and sends it to the master processor 30 via the message communication module 44 and the system bus 20 as shown in FIG. 6B. B2. S33゜S
43. B6), the receiving task 41 is connected to the local receiving task queue 42 and set to a suspended state (B5.S7).

ここで、マスタープロセッサ30のメイルボックス管理
モジュール34は前記メイルボックス参照要求コードに
基づいてメイルボックスディレクトリ参照と判断すると
(TI、T2.T33 )、メモリメイルボックスディ
レクトリ33を参照し、メイルボックス名IDと一致す
るシステムメイルボックス32のメイルボックス番号を
求め、応答メツセージにこのメイルボックス番号をセッ
トしてメツセージ通信モジュール35を介して参照結果
(B2)として受信タスク41の存在するプロセッサ4
0へ送信する(T43 、T53 、T7)。
Here, when the mailbox management module 34 of the master processor 30 determines that the mailbox directory is to be referenced based on the mailbox reference request code (TI, T2.T33), it refers to the memory mailbox directory 33 and identifies the mailbox name ID. Find the mailbox number of the system mailbox 32 that matches the message, set this mailbox number in the response message, and send it to the processor 4 where the receiving task 41 exists as a reference result (B2) via the message communication module 35.
0 (T43, T53, T7).

このスレーブプロセッサ40のメイルボックス管理モジ
ュール43は、ローカルな受信待タスクキュー42から
受信タスク41をはずし、メイルボックス番号を受信タ
スク41に渡して動作を再開させる。この受信タスク4
1は以降メイルボックス番号を指定しマスタープロセッ
サ40に対しメツセージ受信要求を行う。つまり、受信
側プロセッサ40がメツセージを受信する場合、自プロ
セッサ40のメイルボックス管理モジュール43に対し
、メモリボックス番号を指定しメツセージ受信要求を出
す(B3)。なお、このとき受信タスク41はローカル
な受信待タスクキュー42へ付けられて受信待ちの状態
でサスペンドする。
The mailbox management module 43 of this slave processor 40 removes the receiving task 41 from the local receiving task queue 42, passes the mailbox number to the receiving task 41, and restarts the operation. This receiving task 4
1 then specifies the mailbox number and requests the master processor 40 to receive a message. That is, when the receiving processor 40 receives a message, it specifies the memory box number and issues a message reception request to the mailbox management module 43 of its own processor 40 (B3). At this time, the reception task 41 is added to the local reception waiting task queue 42 and suspended in a reception waiting state.

マスタープロセッサ30は、受信側プロセッサ40から
メツセージ受信要求を受けると、メイルボックス管理モ
ジュール34がメイルボックスディレクトリ33から指
定のメイルボックスを見付け、そのメツセージキュー3
6にメツセージが付けられているか否かを調べる。もし
、メツセージが存在すれば、メツセージキュー36から
メツセージをはずし、受信タスク41の存在するプロセ
ッサ40ヘメツセージ(B4)を送信する。もし、メツ
セージキュー36にメツセージが存在しない場合、受信
待タスクキュー37に要求をつけてメツセージの到着を
待つ。他のプロセッサの送信タスクからメツセージが到
着すると、受信待タスクキュー37から要求をはずし、
メツセージを受信側プロセッサ40へ送信する。受信側
プロセッサ40のメモリボックス管理モジュール43は
メツセージが送られてくると、ローカルの受信待タスク
キュー42を探し、該当受信タスク41ヘメツセージを
渡すと共に受信タスク41の動作を再開させるものであ
る。
When the master processor 30 receives a message reception request from the receiving processor 40, the mailbox management module 34 finds the specified mailbox from the mailbox directory 33, and stores the message in the message queue 3.
Check whether a message is attached to 6. If a message exists, the message is removed from the message queue 36, and the message (B4) is sent to the processor 40 where the receiving task 41 exists. If the message does not exist in the message queue 36, a request is placed in the reception waiting task queue 37 and the message arrives. When a message arrives from a sending task of another processor, the request is removed from the receiving task queue 37,
Send the message to the receiving processor 40. When a message is sent to the memory box management module 43 of the receiving processor 40, the memory box management module 43 searches the local receiving task queue 42, passes the message to the corresponding receiving task 41, and restarts the operation of the receiving task 41.

従って、以上のような実施例の構成によれば、複数のプ
ロセッサのタスク31.・・・、41間でメツセージの
交換を行う場合、スレーブプロセッサ側で所要とする要
求メツセージを作成しマスタープロセッサ30へ送信す
ると、このマスクプロセッサ30ではメモリボックス3
2を有効に利用しつつメイルボックス名等からメイルボ
ックス番号を求めて要求したスレーブプロセッサ40へ
返送してくるので、当該プロセッサの要求タスクはその
メイルボックス番号を用いてメツセージの交換を行うこ
とができ、従来の単一のプロセッサ内のメイルボックス
によるメツセージ交換の考えを生かしてメツセージの交
換を行うことが可能となり、これによって標準的なメツ
セージ交換のソフトウェアを確立できる。しかも、ハー
ドウェアに依存することなく柔軟で拡張性に富んだマル
チブロセッサシステムを容易に構築できる。
Therefore, according to the configuration of the embodiment as described above, tasks 31 . .
2, the mailbox number is obtained from the mailbox name, etc., and sent back to the requesting slave processor 40, so the requesting task of the processor can exchange messages using the mailbox number. This makes it possible to exchange messages by making use of the conventional idea of exchanging messages using a mailbox within a single processor, thereby making it possible to establish standard message exchange software. Moreover, a flexible and highly expandable multiprocessor system can be easily constructed without depending on hardware.

〔発明の効果] 以上詳記したように本発明の請求項1.2によれば、従
来の単一プロセッサ内のメイルボックスの機能を生かし
つつ簡単なソフトウェアを用いてメツセージの交換に必
要な種々の機能を適切に行うことができ、柔軟性および
拡張性に富んだメツセージの交換を実現しうるマルチプ
ロセッサ間のメツセージ交換方式を提供できる。
[Effects of the Invention] As detailed above, according to claim 1.2 of the present invention, various functions necessary for exchanging messages can be achieved using simple software while taking advantage of the conventional mailbox function in a single processor. It is possible to provide a message exchange method between multiprocessors that can perform the functions appropriately and realize message exchange with high flexibility and expandability.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図ないし第8図は本発明に係わるマルチプロセッサ
間のメツセージ交換方式の一実施例を説明するために示
したもので、第1図はマルチプロセッサシステムの概略
構成図、第2図は第1図に示すマスタープロセッサの機
能構成図、第3図はマスタープロセッサ内のテーブル構
成図、第4図は第1図に示すスレーブプロセッサの機能
構成図、第5図および第6図はメツセージ交換の制御手
順図、第7図はスレーブプロセッサ側の動作流れ図、第
8図はマスタープロセッサ側の動作流れ図、第9図およ
び第10図はそれぞれ従来のタスク間のメツセージ交換
方式を説明する図である。 20・・・システムバス、30・・・マスタープロセッ
サ、31・・・タスク、32・・・システムメイルボッ
クス、34・・・メイルボックス管理モ、ジュール、3
6・・・メツセージキュー、37・・・受信待タスクキ
ュー、40・・・スレーブプロセッサ、41・・・タス
ク、42・・・受信待タスクキュー、43・・・メイル
ボックス管理モジュール。 出願人代理人 弁理士 鈴 江 武 彦U 第1図 第2図 第4図 第5凶 第9図 第10図
1 to 8 are shown to explain an embodiment of the message exchange method between multiprocessors according to the present invention. FIG. 1 is a schematic configuration diagram of the multiprocessor system, and FIG. Figure 1 shows the functional configuration of the master processor, Figure 3 shows the table configuration in the master processor, Figure 4 shows the functional configuration of the slave processor shown in Figure 1, and Figures 5 and 6 show the message exchange. FIG. 7 is a flowchart of operation on the slave processor side, FIG. 8 is a flowchart of operation on the master processor side, and FIGS. 9 and 10 are diagrams each explaining a conventional message exchange method between tasks. 20... System bus, 30... Master processor, 31... Task, 32... System mailbox, 34... Mailbox management module, module, 3
6...Message queue, 37...Reception waiting task queue, 40...Slave processor, 41...Task, 42...Reception waiting task queue, 43...Mailbox management module. Applicant's representative Patent attorney Takehiko Suzue Figure 1 Figure 2 Figure 4 Figure 5 Figure 9 Figure 10

Claims (2)

【特許請求の範囲】[Claims] (1)複数のプロセッサのタスク間でメッセージの交換
を行うマルチプロセッサ間のメッセージ交換方式におい
て、 前記複数のプロセッサのうち少なくとも1個以上のプロ
セッサをマスタープロセッサとし、他の残りのプロセッ
サをスレーブプロセッサとし、前記メインプロセッサに
はメイルボックスと、メイルボックス番号、メイルボッ
クス名を管理するメイルボックスディレクトリとが設け
られ、特定の前記プロセッサがメッセージを送信する場
合、前記特定のプロセッサからメイルボックス名を含む
メイルボックス生成要求メッセージを送信し、前記メイ
ンプロセッサは前記メイルボックス生成要求メッセージ
を前記メイルボックスに割当てると共に前記メイルボッ
クスディレクトリにメイルボックス名を登録し、かつ、
そのメイルボックス名からメイルボックス番号を求めて
送信し、前記特定のプロセッサはそのメイルボックス番
号を用いてメッセージを送信することを特徴とするマル
チプロセッサ間のメッセージ交換方式。
(1) In a multiprocessor message exchange method in which messages are exchanged between tasks of a plurality of processors, at least one processor among the plurality of processors is designated as a master processor, and the remaining processors are designated as slave processors. , the main processor is provided with a mailbox and a mailbox directory that manages mailbox numbers and mailbox names, and when a specific processor sends a message, a mail including a mailbox name is sent from the specific processor. transmitting a box generation request message, the main processor assigns the mailbox generation request message to the mailbox, and registers a mailbox name in the mailbox directory, and
A message exchange method between multiprocessors, characterized in that a mailbox number is determined from the mailbox name and transmitted, and the specific processor transmits a message using the mailbox number.
(2)複数のプロセッサのタスク間でメッセージの交換
を行うマルチプロセッサ間のメッセージ交換方式におい
て、 前記複数のプロセッサのうち少なくとも1個以上のプロ
セッサをマスタープロセッサとし、他の残りのプロセッ
サをスレーブプロセッサとし、前記メインプロセッサに
はメイルボックスと、メイルボックス番号、メイルボッ
クス名を管理するメイルボックスディレクトリとが設け
られ、特定の前記プロセッサがメッセージを受けたい場
合、前記特定のプロセッサから既知のメイルボックス名
をパラメータとしてメイルボックス参照要求メッセージ
を送信し、前記メインプロセッサはメイルボックス参照
要求メッセージを受けると前記メイルボックスディレク
トリを参照しながらメイルボックス名に対応するメイル
ボックス番号を求めて送信し、前記特定のプロセッサは
そのメイルボックス番号を用いてメッセージ受信要求を
行うことを特徴とするマルチプロセッサ間のメッセージ
交換方式。
(2) In a multiprocessor message exchange method in which messages are exchanged between tasks of a plurality of processors, at least one processor among the plurality of processors is designated as a master processor, and the remaining processors are designated as slave processors. , the main processor is provided with a mailbox and a mailbox directory that manages mailbox numbers and mailbox names, and when a specific processor wants to receive a message, it receives a known mailbox name from the specific processor. A mailbox reference request message is sent as a parameter, and when the main processor receives the mailbox reference request message, it refers to the mailbox directory, obtains and sends a mailbox number corresponding to the mailbox name, and sends the mailbox number corresponding to the mailbox name to the specific processor. is a message exchange method between multiprocessors, characterized in that a message reception request is made using the mailbox number.
JP63039591A 1988-02-24 1988-02-24 System for exchanging message between multi-processor Pending JPH01214960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63039591A JPH01214960A (en) 1988-02-24 1988-02-24 System for exchanging message between multi-processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63039591A JPH01214960A (en) 1988-02-24 1988-02-24 System for exchanging message between multi-processor

Publications (1)

Publication Number Publication Date
JPH01214960A true JPH01214960A (en) 1989-08-29

Family

ID=12557347

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63039591A Pending JPH01214960A (en) 1988-02-24 1988-02-24 System for exchanging message between multi-processor

Country Status (1)

Country Link
JP (1) JPH01214960A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998041927A1 (en) * 1997-03-19 1998-09-24 Hitachi, Ltd. Parallel computer
JP2014524068A (en) * 2011-06-10 2014-09-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Execute operator message start command
JP2014524067A (en) * 2011-06-10 2014-09-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Operator message command processing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998041927A1 (en) * 1997-03-19 1998-09-24 Hitachi, Ltd. Parallel computer
JP2014524068A (en) * 2011-06-10 2014-09-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Execute operator message start command
JP2014524067A (en) * 2011-06-10 2014-09-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Operator message command processing

Similar Documents

Publication Publication Date Title
US5390316A (en) Multicomputer complex having a distributed shared memory system for providing a single system view from multiple consoles
JP4416658B2 (en) System and method for explicit communication of messages between processes running on different nodes of a clustered multiprocessor system
EP1021764B1 (en) I/o forwarding in a cache coherent shared disk computer system
JPS63201860A (en) Network managing system
GB2110442A (en) Multiprocessing interrupt arrangement
TW200411403A (en) System and method for transferring data between virtual machines or other computer entities
US5606666A (en) Method and apparatus for distributing control messages between interconnected processing elements by mapping control messages of a shared memory addressable by the receiving processing element
JPH1069391A (en) General communication mechanism for application that operate in multitask environment
EP0317481B1 (en) Remote storage management mechanism and method
US5204954A (en) Remote storage management mechanism and method
JPH05227253A (en) Method of exchanging message between shared memory using efficient logical protocol and communication adapter
JPH01137356A (en) Inter-process communication
JPH01214960A (en) System for exchanging message between multi-processor
KR100356919B1 (en) An interprocess communication method utilizing message queue combined with shared memory
JPS63263557A (en) Adjustment of access by simultaneous transaction for hierarchical related resource
JPH06301655A (en) Distributed processing system
Schröder-Preikschat Peace—A distributed operating system for high-performance multicomputer systems
JPH02213976A (en) Communication method between multiprocessing computer and processor
JP3799741B2 (en) Bus controller
JP3014112B2 (en) Message communication method in multiprocessor system
JP3006187B2 (en) Distributed processing system
JPH0784921A (en) Network system
JP2812274B2 (en) Transaction load balancing system for loosely coupled multi-computer systems
JP2898985B2 (en) Image processing method
JPH0619855A (en) Method and device for queueing message