JPH05303503A - Synchronous type message communication device - Google Patents

Synchronous type message communication device

Info

Publication number
JPH05303503A
JPH05303503A JP10996492A JP10996492A JPH05303503A JP H05303503 A JPH05303503 A JP H05303503A JP 10996492 A JP10996492 A JP 10996492A JP 10996492 A JP10996492 A JP 10996492A JP H05303503 A JPH05303503 A JP H05303503A
Authority
JP
Japan
Prior art keywords
task
transmission
unit
identifier
reception
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
JP10996492A
Other languages
Japanese (ja)
Inventor
Hidetaka Oto
英隆 大戸
Hiroyuki Sasaki
裕之 佐々木
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10996492A priority Critical patent/JPH05303503A/en
Publication of JPH05303503A publication Critical patent/JPH05303503A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease the frequency of the dispatch of a receiving task and reduce the overhead by taking all transmitted messages out at the same time when the receiving task is in dispatch and sending them back to a transmitting task at the same time. CONSTITUTION:This synchronous type message communication device is equipped with a storage part 1, a wait part 2, an execution part 3, a reception part 4, a transmission part 5, a resetting part 6, an all-reception part 7, an all-execution part 8, an all-transmission part 9, and a decision part 10. When there are plural transmitted messages to the reception-destination task, the all-reception part 7 takes all the messages out at the same time when the reception-destination task is in dispatch, the all-execution part 8 executes the reception-destination task for all the transmission sources, and the all- transmission part 9 sends them back to all the transmission sources. The resetting part 6 deletes all transmitted and received information from the storage part 1 including the identifier of its task and when its task is a receiving task, the decision part 10 calls the all-execution part 8 and then calls the all- transmission part 9.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、計算機システムにおけ
る同期型メッセージ通信装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a synchronous message communication device in a computer system.

【0002】[0002]

【従来の技術】近年、計算機システムで同期型メッセー
ジ通信機能を使用する機会が多く、ユーザに対する実行
サービスの応答性や公平性が重要な課題となっている。
図4は従来の同期型メッセージ通信装置の構成図で、こ
の同期型メッセージ通信装置は、待ち部41と、実行部
42と、受信部43と、送信部44と、判定部45とを
備えている。待ち部41は、タスク開始ポイントを指定
して自タスクをタスク待ち状態へ移行する。実行部42
は、受信タスクの実行を行なう。受信部43は、送信タ
スクを指定してメッセージの受信を行なう。送信部44
は、メッセージを送信した後、待ち部41を起動する。
判定部45は、自タスクが送信先タスクからのメッセー
ジを受信した受信タスクであれば、実行部42を起動し
た後、受信部43を起動する。
2. Description of the Related Art In recent years, there have been many opportunities to use a synchronous message communication function in a computer system, and responsiveness and fairness of execution services to users have become important issues.
FIG. 4 is a block diagram of a conventional synchronous message communication device. The synchronous message communication device includes a waiting unit 41, an executing unit 42, a receiving unit 43, a transmitting unit 44, and a determining unit 45. There is. The waiting unit 41 specifies the task start point and shifts the own task to the task waiting state. Execution unit 42
Executes the receiving task. The receiving unit 43 receives a message by designating a transmission task. Transmission unit 44
Activates the waiting unit 41 after transmitting the message.
If the invoking task is the receiving task that has received the message from the destination task, the determining unit 45 activates the executing unit 42 and then activates the receiving unit 43.

【0003】この従来の同期型メッセージ通信装置の送
信タスク側としての動作を説明する。いま、判定部45
の状態変数は送信タスク状態となっている。 (1)先ず送信部44は、送信タスクの要求を受けてメ
ッセージを送信し、タスク再開ポイントとして受信部4
3を渡して待ち部41を起動する。 (2)これにより待ち部41は、受信部43をタスク再
開ポイントとしてタスク待ち状態へ移行する。
The operation of the conventional synchronous message communication device on the transmission task side will be described. Now, the determination unit 45
The state variable of is the transmission task state. (1) First, the transmission unit 44 transmits a message in response to a request from a transmission task, and the reception unit 4 as a task restart point.
3 is passed and the waiting section 41 is activated. (2) As a result, the waiting unit 41 shifts to the task waiting state with the receiving unit 43 as the task restart point.

【0004】(3)スケジューラによりディスパッチさ
れて受信部43が起動される。 (4)これにより受信部43は、メッセージを受信した
後、判定部45を起動する。 (5)これにより判定部45は、状態変数が送信タスク
状態であるため実行を終了する。
(3) The receiving section 43 is activated by dispatching by the scheduler. (4) As a result, the receiving unit 43 activates the determining unit 45 after receiving the message. (5) As a result, the determination unit 45 ends the execution because the state variable is the transmission task state.

【0005】以上で送信タスク側としての動作が終了す
る。次に従来の同期型メッセージ通信装置の受信タスク
側としての動作を説明する。いま、判定部45の状態変
数は受信タスク状態となっている。 (6)先ず受信部43は、送信タスクから送られたメッ
セージを受信した後、判定部45を起動する。
With the above, the operation on the transmission task side is completed. Next, the operation of the conventional synchronous message communication device on the receiving task side will be described. Now, the state variable of the determination unit 45 is the receiving task state. (6) First, the reception unit 43 activates the determination unit 45 after receiving the message sent from the transmission task.

【0006】(7)これにより判定部45は、状態変数
が受信タスク状態であるため実行部42を起動する。 (8)これにより実行部42は、受信タスクを実行す
る。 (9)次に判定部45は、送信部44を起動する。 (10)これにより送信部44は、送信タスクへ返信メ
ッセージを送った後、待ち部41を起動する。
(7) As a result, the determination unit 45 activates the execution unit 42 because the state variable is the receiving task state. (8) As a result, the execution unit 42 executes the reception task. (9) Next, the determination unit 45 activates the transmission unit 44. (10) As a result, the transmission unit 44 activates the waiting unit 41 after transmitting the reply message to the transmission task.

【0007】(11)これにより待ち部41は、受信部
43をタスク再開ポイントとしてタスク待ち状態へ移行
する。 以上で受信タスク側としての動作が終了する。次に上記
従来の同期型メッセージ通信装置の具体的な動作の一例
について、図5のタイミングチャートを参照しながら説
明する。
(11) As a result, the waiting unit 41 shifts to the task waiting state with the receiving unit 43 as the task restart point. Thus, the operation on the receiving task side is completed. Next, an example of a specific operation of the conventional synchronous message communication device will be described with reference to the timing chart of FIG.

【0008】いま、4つのタスクA,B,C,Dがあ
り、タスクA,タスクB,タスクCはそれぞれ受信タス
クDにメッセージを送信する送信タスクであるものとす
る。また、単位時間をtとすると、各タスクは3tのク
オンタムで動作し、タスク優先度はA=B=C>Dの関
係にあるものとする。また、タスクDはタスクのディス
パッチのオーバヘッドt/2を含め、各送信タスクから
のメッセージに対する全ての処理をt以下で処理するも
のとする。また、判定部45の参照する状態変数をstat
e とし、state=clinetのとき送信タスク状態、state=se
rverのとき受信タスク状態であるとする。つまり、タス
クA,タスクB,タスクCの状態変数state=clientであ
り、タスクDの状態変数state=serverであるとする。
Now, it is assumed that there are four tasks A, B, C, and D, and task A, task B, and task C are transmission tasks for transmitting a message to reception task D, respectively. Further, assuming that the unit time is t, each task operates with a quantum of 3t, and the task priorities have a relationship of A = B = C> D. Further, it is assumed that the task D processes all the processes for the message from each transmission task within t or less, including the task dispatch overhead t / 2. In addition, the state variable referred to by the determination unit 45 is stat
Let e be the send task state when state = clinet, state = se
When it is rver, it is assumed that the task is in the receiving task. That is, the state variable state = client of task A, task B, and task C, and the state variable state = server of task D are assumed.

【0009】(21)先ずタスクAがディスパッチさ
れ、時刻0から時刻3tの間に送信先であるタスクDと
メッセージとを渡して送信部44を呼び出す。 (22)これにより送信部44は、タスクAの要求を受
けてタスクDにメッセージを送信し、待ち部41を起動
する。 (23)これにより待ち部41は、タスクAの受信部4
3をタスク再開ポイントとしてタスク待ち状態へ移行す
る。
(21) First, the task A is dispatched, and between the time 0 and the time 3t, the task D, which is the destination, and the message are passed, and the transmitter 44 is called. (22) As a result, the transmission unit 44 receives the request from the task A, transmits a message to the task D, and activates the waiting unit 41. (23) As a result, the waiting section 41 becomes the receiving section 4 of the task A.
3 is set as the task restart point, and the task wait state is entered.

【0010】(24)タスクB,タスクCについても上
記(21)〜(23)と同様の動作を行なう。 (25)次にタスクDがディスパッチされ、受信部43
を呼び出す。 (26)次に判定部45は、state=serverであるため実
行部42を起動する。 (27)これにより実行部42は、受信タスクを実行す
る。
(24) For tasks B and C, the same operations as (21) to (23) are performed. (25) Next, the task D is dispatched, and the receiving unit 43
Call. (26) Next, the determination unit 45 activates the execution unit 42 because state = server. (27) As a result, the execution unit 42 executes the reception task.

【0011】(28)次に判定部45は、送信部44を
起動する。 (29)これにより送信部44は、タスクAへ返信メッ
セージを送った後、待ち部41を起動する。 (30)これにより待ち部41は、受信部43をタスク
再開ポイントとしてタスクDをタスク待ち状態へ移行す
る。上記(25)からこの(30)までの動作は時刻9
tから10tまでの間に行われる。
(28) Next, the determination section 45 activates the transmission section 44. (29) As a result, the transmission unit 44 activates the waiting unit 41 after transmitting the reply message to the task A. (30) As a result, the waiting unit 41 shifts the task D to the task waiting state with the receiving unit 43 as the task restart point. The operation from (25) to (30) above is time 9
It is performed from t to 10t.

【0012】(31)次にタスクAがディスパッチさ
れ、受信部43が起動される。 (32)これにより受信部43は、メッセージを受信し
た後、判定部45を起動する。 (33)これにより判定部45は、state=clientである
ため同期型メッセージ通信装置の実行を終了する。この
後もタスクAは10tから13tの間動作を続ける。
(31) Next, the task A is dispatched and the receiver 43 is activated. (32) As a result, the receiving unit 43 activates the determining unit 45 after receiving the message. (33) As a result, the determination unit 45 ends the execution of the synchronous message communication device because state = client. After this, the task A continues to operate for 10t to 13t.

【0013】(34)タスクB,タスクCについても上
記(25)〜(33)と同様の動作を行なう。このと
き、図5からも明らかなように、タスクDは合計3回
(送信タスク数だけ)ディスパッチされ、タスクA,タ
スクB,タスクCからの同期型メッセージ通信の送受信
完了までにタスクDのディスパッチオーバヘッドは合計
3t/2となる。
(34) For tasks B and C, the same operations as the above (25) to (33) are performed. At this time, as is clear from FIG. 5, task D is dispatched three times in total (as many as the number of transmission tasks), and task D is dispatched by the completion of transmission / reception of synchronous message communication from task A, task B, and task C. The total overhead is 3t / 2.

【0014】[0014]

【発明が解決しようとする課題】上記従来の同期型メッ
セージ通信装置では、1つの受信タスクに対して複数の
送信タスクが頻繁にメッセージ送信を行なう場合には、
受信タスクの処理時間が短いときでも送信タスク数だけ
ディスパッチが発生し、ディスパッチのオーバヘッドが
大きいという問題があった。
In the above conventional synchronous message communication device, when a plurality of transmission tasks frequently perform message transmission for one reception task,
Even if the processing time of the receiving task is short, the dispatch overhead occurs due to the number of the sending tasks, and the dispatch overhead is large.

【0015】本発明はかかる事情に鑑みて成されたもの
であり、受信タスクのディスパッチの回数を少なくし、
ディスパッチのオーバヘッドを減少することができる同
期型メッセージ通信装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and reduces the number of dispatches of a receiving task,
An object of the present invention is to provide a synchronous message communication device capable of reducing the dispatch overhead.

【0016】[0016]

【課題を解決するための手段】本発明は、受信タスクに
対して複数の送信メッセージが送信されていた場合、受
信タスクのディスパッチ時に全ての前記送信メッセージ
を同時に取り出し、かつ送信タスクへの返信を同時に行
なってタスク待ち状態を同時に解除する構成としたこと
を特徴としている。
According to the present invention, when a plurality of transmission messages are transmitted to a reception task, all the transmission messages are simultaneously taken out when the reception task is dispatched, and a reply to the transmission task is sent. The feature is that it is configured such that the task waiting states are released at the same time by performing them at the same time.

【0017】[0017]

【作用】受信タスクに対して複数の送信メッセージが送
信されていた場合、受信タスクのディスパッチ時に全て
の送信メッセージを同時に取り出し、かつ送信タスクへ
の返信を同時に行なってタスク待ち状態を同時に解除す
る。
When a plurality of send messages are sent to the receive task, all send messages are taken out at the same time when the receive task is dispatched, and a reply to the send task is made at the same time to release the task waiting state at the same time.

【0018】[0018]

【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。図1は本発明の一実施例における同期型メッ
セージ通信装置の構成図で、この同期型メッセージ通信
装置は、記憶部1と、待ち部2と、実行部3と、受信部
4と、送信部5と、解除部6と、全受信部7と、全実行
部8と、全送信部9と、判定部10とを備えている。記
憶部1は、受信タスク識別子と送信タスク識別子との組
である送受信情報を複数記憶する。待ち部2は、タスク
再開ポイントを指定して自タスクをタスク待ち状態へ移
行する。実行部3は、タスクの実行を行なう。受信部4
は、タスクを指定してメッセージの受信を行なう。送信
部5は、自タスクの識別子を送信タスク識別子とし、送
信先タスクの識別子を受信タスク識別子として作った送
受信情報を記憶部1に記憶させた後、メッセージを送信
する。解除部6は、記憶部1から自タスクの識別子を含
む送受信情報を全て削除する。全受信部7は、記憶部1
の中で受信タスク識別子が自タスクの識別子と等しい全
ての送受信情報から送信タスク識別子を全て取り出した
後、個々の送信タスク識別子に対応する分だけ受信部4
を呼び出す。全実行部8は、記憶部1の中で受信タスク
識別子が自タスクの識別子と等しい全ての送受信情報か
ら送信タスク識別子を全て取り出した後、個々の送信タ
スク識別子に対応する分だけ実行部3を呼び出す。全送
信部9は、記憶部1の中で受信タスク識別子が自タスク
の識別子と等しい全ての送受信情報から送信タスク識別
子を全て取り出した後、個々の送信タスク識別子に対応
する分だけ送信部5を呼び出した後、待ち部2を呼び出
す。判定部10は、自タスクが受信タスク状態であれ
ば、全実行部8を呼び出した後、全送信部9を呼び出
す。
Embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a block diagram of a synchronous message communication apparatus according to an embodiment of the present invention. This synchronous message communication apparatus includes a storage unit 1, a waiting unit 2, an executing unit 3, a receiving unit 4, and a transmitting unit. 5, a canceling unit 6, an all receiving unit 7, an all executing unit 8, an all transmitting unit 9, and a determining unit 10. The storage unit 1 stores a plurality of transmission / reception information that is a set of a reception task identifier and a transmission task identifier. The waiting unit 2 specifies the task restart point and shifts the own task to the task waiting state. The execution unit 3 executes a task. Receiver 4
Specifies a task and receives a message. The transmitting unit 5 stores the transmission / reception information in which the identifier of the own task is used as the transmitting task identifier and the identifier of the destination task is used as the receiving task identifier in the storage unit 1, and then the message is transmitted. The canceling unit 6 deletes all transmission / reception information including the identifier of the own task from the storage unit 1. The entire receiving unit 7 is the storage unit 1.
After all transmission task identifiers have been extracted from all transmission / reception information in which the reception task identifier is the same as the own task identifier, the reception unit 4 corresponding to each transmission task identifier
Call. The all execution unit 8 extracts all the transmission task identifiers from all the transmission / reception information whose reception task identifier is equal to the identifier of the own task in the storage unit 1, and then executes the execution units 3 by the amount corresponding to each transmission task identifier. call. After all transmission task identifiers are extracted from all transmission / reception information whose reception task identifier is equal to the identifier of the own task in the storage unit 1, all transmission units 9 operate the transmission units 5 by the amount corresponding to each transmission task identifier. After calling, the waiting unit 2 is called. If the invoking task is in the receiving task state, the determining unit 10 calls all the executing units 8 and then all the transmitting units 9.

【0019】次に動作を説明する。先ず、送信タスク側
としての動作について述べる。いま、判定部10の状態
変数は送信タスク状態となっている。 (41)先ず送信部5は、送信タスクの要求を受けて受
信タスクにメッセージを送信し、記憶部1へ受信タスク
識別子と自タスクの識別子との組である送受信情報を設
定する。
Next, the operation will be described. First, the operation on the transmission task side will be described. Now, the state variable of the determination unit 10 is the transmission task state. (41) First, the transmission unit 5 receives a request from the transmission task, transmits a message to the reception task, and sets transmission / reception information, which is a set of the reception task identifier and the own task identifier, in the storage unit 1.

【0020】(42)さらに送信部5は、タスク再開ポ
イントとして全受信部7を渡して待ち部2を起動する。 (43)これにより待ち部2は、全受信部7をタスク再
開ポイントとしてタスク待ち状態へ移行する。 (44)スケジューラによりディスパッチされて全受信
部7が起動される。
(42) Further, the transmission section 5 passes all the reception sections 7 as a task restart point and activates the waiting section 2. (43) As a result, the waiting unit 2 shifts to the task waiting state with all the receiving units 7 as task restart points. (44) All receivers 7 are activated by dispatching by the scheduler.

【0021】(45)これにより全受信部7は、メッセ
ージを受信した後、記憶部1を起動する。 (46)次に判定部10は、状態変数が送信タスク状態
であるため実行を終了する。以上で送信タスク側として
の動作が終了する。
(45) As a result, all the receiving units 7 activate the storage unit 1 after receiving the message. (46) Next, the determination unit 10 ends the execution because the state variable is the transmission task state. Thus, the operation on the sending task side is completed.

【0022】次に、受信タスク側としての動作について
述べる。いま、判定部10の状態変数は受信タスク状態
となっている。 (47)先ず全受信部7は、記憶部1の中で自タスクの
識別子と等しい受信タスク識別子を持つ送受信情報から
送信タスク識別子を全て取り出し、それらに対応する全
ての送信タスクに対して各送信タスク毎に受信部4を起
動する。
Next, the operation on the receiving task side will be described. Now, the state variable of the determination unit 10 is the receiving task state. (47) First, the entire receiving unit 7 extracts all transmission task identifiers from the transmission / reception information having the reception task identifier equal to the identifier of the own task in the storage unit 1 and transmits each transmission task to all corresponding transmission tasks. The receiving unit 4 is activated for each task.

【0023】(48)これにより受信部4は、指定され
た送信タスクからのメッセージを受信する。この動作
は、上記(47)で指定された回数だけ繰り返される。 (49)次に全受信部7は、判定部10を起動する。 (50)これにより判定部10は、状態変数が受信タス
ク状態であるため全実行部8を起動する。
(48) As a result, the receiving unit 4 receives the message from the designated transmission task. This operation is repeated the number of times specified in (47) above. (49) Next, the entire receiving unit 7 activates the determination unit 10. (50) As a result, the determination unit 10 activates all the execution units 8 because the state variable is the reception task state.

【0024】(51)これにより全実行部8は、記憶部
1の中で自タスクの識別子と等しい受信タスク識別子を
持つ送受信情報から送信タスク識別子を全て取り出し、
それらに対応する全ての送信タスクに対して各送信タス
ク毎に実行部3を起動する。 (52)これにより実行部3は、受信タスクを実行す
る。この動作は、上記(51)で指定された回数だけ繰
り返される。
(51) As a result, all the execution units 8 take out all the transmission task identifiers from the transmission / reception information having the reception task identifier equal to the identifier of the own task in the storage unit 1,
The execution unit 3 is activated for each transmission task for all the transmission tasks corresponding to them. (52) As a result, the execution unit 3 executes the reception task. This operation is repeated the number of times specified in (51) above.

【0025】(53)次に判定部10は、全送信部9を
起動する。 (54)これにより全送信部9は、記憶部1の中で自タ
スクの識別子と等しい受信タスク識別子を持つ送受信情
報から送信タスク識別子を全て取り出し、それらに対応
する全ての送信タスクに対して各送信タスク毎に送信部
5を起動する。 (55)これにより送信部5は、送信タスクへの返信を
行なう。この動作は、上記(54)で指定された回数だ
け繰り返される。
(53) Next, the determination section 10 activates all the transmission sections 9. (54) As a result, the entire transmission unit 9 extracts all the transmission task identifiers from the transmission / reception information having the reception task identifier equal to the identifier of the own task in the storage unit 1 and outputs the transmission task identifiers for all corresponding transmission tasks. The transmission unit 5 is activated for each transmission task. (55) As a result, the transmission unit 5 makes a reply to the transmission task. This operation is repeated the number of times specified in (54) above.

【0026】(56)次に全送信部9は、解除部6を起
動する。 (57)これにより解除部6は、自タスクの識別子を含
む送受信情報を記憶部1の中から全て削除する。 (58)次に全送信部9は、待ち部2を起動する。 (59)これにより待ち部2は、全受信部7をタスク再
開ポイントとしてタスク待ち状態へ移行する。
(56) Next, the entire transmitter 9 activates the canceller 6. (57) As a result, the canceling unit 6 deletes all transmission / reception information including the identifier of the own task from the storage unit 1. (58) Next, the entire transmission unit 9 activates the waiting unit 2. (59) As a result, the waiting unit 2 shifts to the task waiting state with all the receiving units 7 as task restart points.

【0027】以上で受信タスク側としての動作が終了す
る。次に上記同期型メッセージ通信装置の具体的な動作
の一例について、タスクのタイミングチャートである図
2および記憶部1のデータ構造の説明図である図3を参
照しながら説明する。いま、4つのタスクA,B,C,
Dがあり、各々の識別子をTa,Tb,Tc,Tdとする。ま
た、タスクA,タスクB,タスクCはそれぞれ受信タス
クDにメッセージを送信する送信タスクであるものとす
る。また、単位時間をtとすると、各タスクは3tのク
オンタムで動作し、タスク優先度はA=B=C>Dの関
係にあるものとする。また、タスクDはタスクのディス
パッチのオーバヘッドt/2を含め、各送信タスクから
のメッセージに対する全ての処理をt以下で処理するも
のとする。また、判定部10の参照する状態変数をstat
eとし、state=clinetのとき送信タスク状態、state=ser
verのとき受信タスク状態であるとする。つまり、タス
クA,タスクB,タスクCの状態変数state=clientであ
り、タスクDの状態変数state=serverであるとする。
With the above, the operation on the receiving task side is completed. Next, an example of a specific operation of the synchronous message communication device will be described with reference to FIG. 2 which is a timing chart of tasks and FIG. 3 which is an explanatory diagram of the data structure of the storage unit 1. Now, four tasks A, B, C,
There is D, and the respective identifiers are Ta, Tb, Tc, and Td. Further, it is assumed that task A, task B, and task C are transmission tasks for transmitting a message to reception task D, respectively. Further, assuming that the unit time is t, each task operates with a quantum of 3t, and the task priorities have a relationship of A = B = C> D. Further, it is assumed that the task D processes all the processes for the message from each transmission task within t or less, including the task dispatch overhead t / 2. In addition, the status variable referenced by the determination unit 10 is stat
When e = state = clinet, send task state, state = ser
When it is ver, it is in the receiving task state. That is, the state variable state = client of task A, task B, and task C, and the state variable state = server of task D are assumed.

【0028】(61)先ずタスクAがディスパッチさ
れ、時刻0から時刻3tの間に送信先であるタスクDと
メッセージとを渡して送信部5を呼び出す。 (62)これにより送信部5は、タスクAの要求を受け
てタスクDにメッセージを送信し、記憶部1に受信タス
クであるタスクDとタスクAとの識別子の組 (Td,Ta)
を設定する。
(61) First, the task A is dispatched, and between the time 0 and the time 3t, the task D, which is the destination, and the message are passed, and the transmitter 5 is called. (62) As a result, the transmission unit 5 transmits a message to the task D in response to the request from the task A, and the storage unit 1 stores a pair of identifiers (Td, Ta) of the task D and the task A, which are reception tasks.
To set.

【0029】(63)さらに送信部5は、待ち部2を起
動する。 (64)これにより待ち部2は、タスクAの全受信部7
をタスク再開ポイントとしてタスク待ち状態へ移行す
る。 (65)タスクB,タスクCについても上記(61)〜
(64)と同様の動作を行なう。
(63) Further, the transmitting section 5 activates the waiting section 2. (64) As a result, the waiting unit 2 receives all the receiving units 7 of the task A.
Is set as the task restart point, and the task wait state is entered. (65) For task B and task C, the above (61) to
The same operation as (64) is performed.

【0030】(66)次にタスクDがディスパッチさ
れ、全受信部7を呼び出す。 (67)これにより全受信部7は、記憶部1の中で自タ
スクである受信タスク識別子と送信タスク識別子との組
である送受信情報(Td,Ta),(Td,Tb),(Td,Tc)
を全て取り出し、各送信タスク毎に受信部4を起動す
る。 (68)これにより受信部4は、指定されたタスクから
のメッセージを受信する。この動作は、タスクAからタ
スクCまで繰り返される。
(66) Next, the task D is dispatched to call all the receiving units 7. (67) As a result, all the receiving units 7 transmit / receive information (Td, Ta), (Td, Tb), (Td, Td, which is a set of the receiving task identifier and the sending task identifier of the own task in the storage unit 1 Tc)
Are taken out, and the receiving unit 4 is activated for each transmission task. (68) As a result, the receiving unit 4 receives the message from the designated task. This operation is repeated from task A to task C.

【0031】(69)次に全受信部7は、判定部10を
起動する。 (70)これにより判定部10は、state=serverである
ため全実行部8を起動する。 (71)これにより全実行部8は、記憶部1の中で自タ
スクである受信タスク識別子と送信タスク識別子との組
である送受信情報(Td,Ta),(Td,Tb),(Td,Tc)
を全て取り出し、各送信タスク毎に実行部3を起動す
る。
(69) Next, the entire receiving section 7 activates the judging section 10. (70) As a result, the determination unit 10 activates all the execution units 8 because state = server. (71) As a result, all the execution units 8 send / receive information (Td, Ta), (Td, Tb), (Td, Td, which is a set of the receiving task identifier and the sending task identifier of the own task in the storage unit 1 Tc)
Are extracted, and the execution unit 3 is activated for each transmission task.

【0032】(72)これにより実行部3は、受信タス
クを実行する。この動作はタスクAからタスクCまで繰
り返される。 (73)次に判定部10は、全送信部9を起動する。 (74)これにより全送信部9は、記憶部1の中で自タ
スクである受信タスク識別子と送信タスク識別子との組
である送受信情報(Td,Ta),(Td,Tb),(Td,Tc)
を全て取り出し、各送信タスク毎に送信部5を起動す
る。
(72) As a result, the execution unit 3 executes the reception task. This operation is repeated from task A to task C. (73) Next, the determination unit 10 activates all the transmission units 9. (74) As a result, all the transmission units 9 transmit / receive information (Td, Ta), (Td, Tb), (Td, Td, Td, which is a set of the reception task identifier and the transmission task identifier of the own task in the storage unit 1. Tc)
Are taken out, and the transmission unit 5 is activated for each transmission task.

【0033】(75)これにより送信部5は、送信タス
クへの返信を行なう。この動作はタスクAからタスクC
まで繰り返される。 (76)次に全送信部9は、解除部6を起動する。 (77)これにより解除部6は、記憶部1の中から送受
信情報(Td,Ta),(Td,Tb),(Td,Tc)を削除す
る。
(75) As a result, the transmission section 5 makes a reply to the transmission task. This operation is from Task A to Task C
Is repeated until. (76) Next, the entire transmission unit 9 activates the cancellation unit 6. (77) As a result, the canceling unit 6 deletes the transmission / reception information (Td, Ta), (Td, Tb), (Td, Tc) from the storage unit 1.

【0034】(78)次に全送信部9は、待ち部2を起
動する。 (79)これにより待ち部2は、全受信部7をタスク再
開ポイントとしてタスク待ち状態へ移行する。上記(6
6)からこの(79)までの動作は、時刻9tから11
tの間に行われる。 (80)次にタスクAがディスパッチされ、全受信部7
が起動される。
(78) Next, all the transmission units 9 activate the waiting unit 2. (79) As a result, the waiting unit 2 shifts to the task waiting state with all the receiving units 7 as task restart points. Above (6
The operations from 6) to this (79) are from time 9t to 11
performed during t. (80) Next, task A is dispatched, and all receiving units 7
Is started.

【0035】(81)これにより全受信部7は、メッセ
ージを受信した後、判定部10を起動する。 (82)これにより判定部10は、state=clientである
ため同期型メッセージ通信装置の実行を終了する。この
後もタスクAは11tから14tの間動作を続ける。
(81) As a result, all the receiving sections 7 activate the judging section 10 after receiving the message. (82) As a result, the determination unit 10 ends the execution of the synchronous message communication device because state = client. After this, the task A continues to operate from 11t to 14t.

【0036】(83)次に、タスクB,タスクCについ
ても上記(80)〜(82)と同様の動作を行なう。図
2からも明らかなように、タスクDは1回だけディスパ
ッチされ、タスクA,タスクB,タスクCからの同期型
メッセージ通信の送受信完了までにタスクDのディスパ
ッチオーバヘッドはt/2となる。
(83) Next, for tasks B and C, the same operations as the above (80) to (82) are performed. As is apparent from FIG. 2, the task D is dispatched only once, and the dispatch overhead of the task D becomes t / 2 by the completion of transmission / reception of the synchronous message communication from the task A, the task B, and the task C.

【0037】[0037]

【発明の効果】以上説明したように本発明によれば、受
信タスクに対して複数の送信メッセージが送信されてい
た場合、受信タスクのディスパッチ時に全ての送信メッ
セージを同時に取り出し、かつ送信タスクへの返信を同
時に行なってタスク待ち状態を同時に解除する構成とし
たので、受信タスクのディスパッチの回数を少なくし、
ディスパッチのオーバヘッドを減少することができる。
As described above, according to the present invention, when a plurality of transmission messages are transmitted to the reception task, all the transmission messages are taken out at the same time when the reception task is dispatched and the transmission tasks are sent to the transmission task. Since it is configured to reply at the same time and release the task waiting state at the same time, the number of dispatches of the receiving task is reduced,
The dispatch overhead can be reduced.

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

【図1】本発明の一実施例における同期型メッセージ通
信装置の構成図である。
FIG. 1 is a configuration diagram of a synchronous message communication device according to an embodiment of the present invention.

【図2】本発明の一実施例における同期型メッセージ通
信装置のタスクのタイミングチャートである。
FIG. 2 is a timing chart of tasks of the synchronous message communication device according to the embodiment of the present invention.

【図3】記憶部のデータ構造の説明図である。FIG. 3 is an explanatory diagram of a data structure of a storage unit.

【図4】従来の同期型メッセージ通信装置の構成図であ
る。
FIG. 4 is a block diagram of a conventional synchronous message communication device.

【図5】従来の同期型メッセージ通信装置におけるタス
クのタイミングチャートである。
FIG. 5 is a timing chart of tasks in a conventional synchronous message communication device.

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

1 記憶部 2 待ち部 3 実行部 4 受信部 5 送信部 6 解除部 7 全受信部 8 全実行部 9 全送信部 10 判定部 1 Storage Section 2 Waiting Section 3 Execution Section 4 Reception Section 5 Transmission Section 6 Release Section 7 All Reception Section 8 All Execution Section 9 All Transmission Section 10 Judgment Section

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 受信タスクに対して複数の送信メッセー
ジが送信されていた場合、受信タスクのディスパッチ時
に全ての前記送信メッセージを同時に取り出し、かつ送
信タスクへの返信を同時に行なってタスク待ち状態を同
時に解除する構成としたことを特徴とする同期型メッセ
ージ通信装置。
1. When a plurality of send messages are sent to a receive task, all the send messages are taken out at the same time when the receive task is dispatched, and replies to the send tasks are sent at the same time so that the task wait states are executed at the same time. A synchronous message communication device characterized by being configured to cancel.
【請求項2】 受信タスク識別子と送信タスク識別子と
の組である送受信情報を記憶する記憶部と、 タスク再開ポイントを指定して自タスクをタスク待ち状
態へ移行する待ち部と、 タスクの実行を行なう実行部と、 タスクを指定してメッセージの受信を行なう受信部と、 自タスクの識別子を送信タスク識別子とし、かつ送信先
タスクの識別子を受信タスク識別子として作った送受信
情報を、前記記憶部に記憶させた後、メッセージを送信
する送信部と、 前記記憶部から自タスクの識別子を含む送受信情報を全
て削除する解除部と、 前記記憶部の中で受信タスク識別子が自タスクの識別子
と等しい全ての送受信情報から送信タスク識別子を全て
取り出し、個々の送信タスク識別子に対応する分だけ前
記受信部を呼び出す全受信部と、 前記記憶部の中で受信タスク識別子が自タスクの識別子
と等しい全ての送受信情報から送信タスク識別子を全て
取り出し、個々の送信タスク識別子に対応する分だけ前
記実行部を呼び出す全実行部と、 前記記憶部の中で受信タスク識別子が自タスクの識別子
と等しい全ての送受信情報から送信タスク識別子を全て
取り出し、個々の送信タスク識別子に対応する分だけ前
記送信部を呼び出した後、前記待ち部を呼び出す全送信
部と、 自タスクが受信タスク状態であれば、前記全実行部を呼
び出した後、前記全送信部を呼び出す判定部とを備えた
ことを特徴とする同期型メッセージ通信装置。
2. A storage unit for storing transmission / reception information, which is a set of a receiving task identifier and a transmitting task identifier, a waiting unit for designating a task restart point and shifting the invoking task to the task waiting state, and executing the task. Execution unit to perform, reception unit to receive a message by specifying a task, and send / receive information in which the identifier of the invoking task is the sending task identifier and the identifier of the destination task is the receiving task identifier is stored in the storage unit. After storing, a sending unit that sends the message, a releasing unit that deletes all transmission / reception information including the in-task identifier from the storage unit, and a receiving task identifier in the storage unit that is equal to the in-task identifier All the receiving task identifiers are extracted from the transmission / reception information of each of the sending task identifiers, and all the receiving task portions are called to correspond to each sending task identifier. All execution units that retrieve all transmission task identifiers from all transmission / reception information in which the reception task identifier is equal to the identifier of the own task and call the execution unit for each transmission task identifier, and the storage unit All the transmission task identifiers are extracted from all transmission / reception information in which the reception task identifier is equal to the own task identifier, and all the transmission units that call the waiting unit after calling the transmission units by the amount corresponding to each transmission task identifier And a determination unit that calls all the execution units and then calls all the transmission units if the invoking task is in the reception task state.
JP10996492A 1992-04-28 1992-04-28 Synchronous type message communication device Pending JPH05303503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10996492A JPH05303503A (en) 1992-04-28 1992-04-28 Synchronous type message communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10996492A JPH05303503A (en) 1992-04-28 1992-04-28 Synchronous type message communication device

Publications (1)

Publication Number Publication Date
JPH05303503A true JPH05303503A (en) 1993-11-16

Family

ID=14523617

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10996492A Pending JPH05303503A (en) 1992-04-28 1992-04-28 Synchronous type message communication device

Country Status (1)

Country Link
JP (1) JPH05303503A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461380B2 (en) 2003-02-18 2008-12-02 Denso Corporation Inter-task communications method, program, recording medium, and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461380B2 (en) 2003-02-18 2008-12-02 Denso Corporation Inter-task communications method, program, recording medium, and electronic device

Similar Documents

Publication Publication Date Title
US5386512A (en) System for deriving and testing mutual capability set after receiving updated capability from other processors and before requesting service information
JPS5836049A (en) Station in communication network
JPH07509827A (en) How to establish communication between tasks of a limited number of repeaters in a communication system
JP3490473B2 (en) Communication system between processors
JPH05303503A (en) Synchronous type message communication device
JPH06301618A (en) Remote procedure accessing method
US5754856A (en) MVS/ESA message transport system using the XCF coupling facility
EP0578496B1 (en) Job execution method in multi-CPU system
JPH05342020A (en) Inter-task communicating system
JP2919057B2 (en) Non-response monitoring method in multi-job system
JPH07177197A (en) Communication task management system
JP3706738B2 (en) Agent cooperative processing device
JPS63169149A (en) Dynamic transmission schedule system
JP3033656B2 (en) Outgoing and incoming call control method
JPH02217039A (en) Poling/selecting control procedure system
JPH05189390A (en) Transaction scheduling system
JPH0628287A (en) Method and device for synchronization message communication
JPH04337946A (en) Data transmission method
JPH04172032A (en) Polling control system
JPH06250910A (en) Management system for message queue incoming call
JPS62212762A (en) Processing system for function decentralized information
JPS62185435A (en) Transmission control system for network
JPH04264853A (en) Data communication system
JPH0787049A (en) Tdma communication system
JP2001022666A (en) Network managing method taking evasion of congestion into account