JP2000200198A - Inter-process communication system and method - Google Patents

Inter-process communication system and method

Info

Publication number
JP2000200198A
JP2000200198A JP11000742A JP74299A JP2000200198A JP 2000200198 A JP2000200198 A JP 2000200198A JP 11000742 A JP11000742 A JP 11000742A JP 74299 A JP74299 A JP 74299A JP 2000200198 A JP2000200198 A JP 2000200198A
Authority
JP
Japan
Prior art keywords
message
transmission
inter
destination
processing
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
JP11000742A
Other languages
Japanese (ja)
Inventor
Koutarou Satou
皇太郎 佐藤
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.)
Namco Ltd
Original Assignee
Namco 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 Namco Ltd filed Critical Namco Ltd
Priority to JP11000742A priority Critical patent/JP2000200198A/en
Publication of JP2000200198A publication Critical patent/JP2000200198A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide inter-process communication capable of making a message itself perform intellectual behavior. SOLUTION: The message is sent from a process A210 which is a transmission origin to a process B230 which is a transmission destination. In this case, the process A210 selects a transmission process provided with a desired function from the transmission processes 242, 244 and 246, etc., provided with various functions prepared by an OS. Then, to a selected transmission process C220, a message main body 222 is sent by using a function (send message) provided by the OS. The process C220 which receives it performs a specified processing stipulated in the process C220 to communication contents. The process B230 which is the transmission destination receives the communication contents after receiving the processing intrinsic to the process C220 from the process C220 by using the function (receive message) provided by the OS. Also, the transmission processes 242, 244 and 246 are prepared not only by the OS but also by a user originally.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マルチプロセス・
システムにおけるプロセス間通信に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention
It relates to inter-process communication in a system.

【0002】[0002]

【背景技術】コンピュータ・システム上のマルチプロセ
ス・システム、例えばUNIXにおいては、プロセスA
とプロセスBとの間で、情報を共用しようとする場合、
共有メモリを介したプロセス間通信を行っている。これ
を図1および図2を用いて説明する。
2. Description of the Related Art In a multi-process system on a computer system, for example, UNIX, a process A
When trying to share information between the process B and
Communication between processes via shared memory. This will be described with reference to FIGS.

【0003】図1は、マルチプロセス・システムが構築
されるコンピュータ・システムのハードウェア構成を示
している。この図において、CPU10は、メモリ30
内に格納されているマルチプロセス制御等を行うOS等
のプログラムを実行する。これにより、コンピュータ・
システム全体の制御を行っている。コンピュータ・シス
テムには、ハードディスク、モニタ、キーボード等の周
辺機器40も付属している。
FIG. 1 shows a hardware configuration of a computer system on which a multi-process system is constructed. In this figure, a CPU 10 has a memory 30
And executes a program such as an OS for performing multi-process control and the like stored therein. This allows computers and
Controls the entire system. The computer system also includes peripheral devices 40 such as a hard disk, a monitor, and a keyboard.

【0004】図2は、送信元であるプロセスA110か
ら送信先であるプロセスB130へメッセージを送る場
合について説明するための図である。この場合、プロセ
スAは、図1のメモリ30内の領域である共有メモリ1
20に、通信内容122を書き込む。送信先であるプロ
セスB130は、共有メモリ120から書き込まれた通
信内容122を読み出す。このようにして、プロセスA
からプロセスBに対して、プロセス間通信を行ってい
る。
FIG. 2 is a diagram for explaining a case where a message is transmitted from a process A 110 as a transmission source to a process B 130 as a transmission destination. In this case, the process A is executed in the shared memory 1 which is an area in the memory 30 in FIG.
20, the communication content 122 is written. The process B 130 that is the transmission destination reads the communication content 122 written from the shared memory 120. Thus, process A
Performs inter-process communication with process B.

【0005】このような共有メモリを介してプロセス間
通信を行う場合、プロセスA110からプロセスB13
0には、プロセスAが共有メモリに書き込んだ通信内容
122をそのまま受け取っているので、「情報を伝達す
る」ことしかできない。このため機能が非常に限定され
ている。UNIXにおけるプロセス間通信には,共有メ
モリの他にも、メッセージ・キューやソケットを用いた
通信方法もあるが、共有メモリによる方法と同様に、
「情報を伝達する」ことしかできない点では同列であ
る。
[0005] When inter-process communication is performed via such a shared memory, a process A 110 to a process B 13
Since the communication content 122 written to the shared memory by the process A is received as it is, only the information can be transmitted. For this reason, the functions are very limited. In the inter-process communication in UNIX, there is a communication method using a message queue or a socket in addition to the shared memory.
They are the same in that they can only "transmit information".

【0006】[0006]

【発明が解決しようとする課題】本発明の目的は、例え
ば、「情報の受け手のプロセスの型に応じて、自動的に
自分自身の情報を書き換える」などのメッセージ自体に
知的な振る舞いをさせることできるプロセス間通信を提
供することである。
SUMMARY OF THE INVENTION An object of the present invention is to make an intellectual behavior of a message itself such as, for example, "automatically rewrite own information according to the type of process of an information receiver". Is to provide interprocess communication.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、複数のプロセスにより処理を行うマルチ
プロセス・システムにおけるプロセス間通信システムに
おいて、特定の伝達プロセスを起動し、送信先プロセス
を指定してメッセージを渡す送信手段と、前記起動され
た伝達プロセスにおいて、渡されたメッセージを処理す
る処理手段と、伝達プロセスをチェックして、自分宛て
のメッセージがあるかを調べる伝達プロセス・チェック
手段と、自分宛てのメッセージがあった場合、メッセー
ジを受ける受信手段とを備えることを特徴とする。
In order to achieve the above object, the present invention provides an inter-process communication system in a multi-process system in which processing is performed by a plurality of processes. And a processing unit for processing the passed message in the activated transmission process, and a transmission process check for checking whether there is a message addressed to itself by checking the transmission process. Means and a receiving means for receiving a message when there is a message addressed to the user.

【0008】このように、本発明の処理能力を有する伝
達プロセスを用いることにより、「情報の受け手のプロ
セスの型に応じて、自動的に自分自身の情報を書き換え
る」などのメッセージ自体に知的な振る舞いをさせるこ
とできる。また、色々な機能を有する伝達プロセスを複
数用いることにより、すでに作成したプログラムを変更
することなく、フレキシビリティを有するシステムを構
築することができる。
As described above, by using the transmission process having the processing capability of the present invention, the message itself such as "automatically rewrite own information according to the type of the process of the information receiver" is provided. Behavior. In addition, by using a plurality of transmission processes having various functions, a system having flexibility can be constructed without changing a program that has already been created.

【0009】前記伝達プロセスは、送信元プロセスの子
プロセスとして起動され、メッセージを受領した後は、
送信先プロセスの子プロセスとして作動するようにする
ことで、送信先のプロセスでは、自分宛てのメッセージ
があることが簡単に分かる。また、前記伝達プロセスに
メッセージを渡すときに、指定された送信先プロセスの
現在時間を設定することで、送信先のプロセスとの同期
を取ることが可能となる。なお、本発明のシステムで行
っている方法や、本発明のシステムを構築することがで
きるプログラムを格納した記録媒体も本発明に含まれ
る。
The transmission process is started as a child process of the transmission source process, and after receiving the message,
By operating as a child process of the destination process, the destination process can easily recognize that there is a message addressed to itself. Also, when a message is passed to the transmission process, by setting the current time of the designated transmission destination process, it is possible to synchronize with the transmission destination process. Note that the present invention also includes a method performed by the system of the present invention and a recording medium storing a program capable of constructing the system of the present invention.

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

【0010】本発明の実施形態を、図面を参照して詳細
に説明する。図3を用いて、本発明の概要を説明する。
なお、ハードウェア構成は、上述の図1で説明したもの
と同様の構成を用いることができる。図3(a)におい
て、送信元であるプロセスA210から送信先であるプ
ロセスBに対して、メッセージを送ることを示してい
る。この場合、プロセスAは、図3(b)に示している
ように、OSが用意している色々な機能を有する伝達プ
ロセス242,244,246等の中から、所望の機能
を有する伝達プロセスを選択する。そして、選択した伝
達プロセス(プロセスC)220に対して、通信内容
(メッセージ本体)222を、OSの提供する関数(sen
dMessage)を用いて送る。受け取ったプロセスC220
は、通信内容に対してプロセスCに規定されている特定
の処理を行う。送信先で有るプロセスB230は、OS
の提供する関数(receiveMessage)を用いて、プロセスC
220からプロセスC固有の処理を受けた後の通信内容
222を受け取る。なお、伝達プロセスは、OSに用意
されたプロセスばかりではなく、ユーザが独自で作成す
ることもできる。
An embodiment of the present invention will be described in detail with reference to the drawings. The outline of the present invention will be described with reference to FIG.
The hardware configuration may be the same as that described with reference to FIG. FIG. 3A shows that a message is sent from a process A 210 as a transmission source to a process B as a transmission destination. In this case, as shown in FIG. 3B, the process A is a transmission process having a desired function from among the transmission processes 242, 244, 246 having various functions prepared by the OS. select. Then, for the selected transmission process (process C) 220, the communication content (message body) 222 is converted into a function (sen) provided by the OS.
dMessage). Process C220 received
Performs a specific process defined in the process C on the communication contents. The process B230 that is the transmission destination is the OS
Process (receiveMessage) provided by
The communication content 222 after receiving the process unique to the process C is received from 220. Note that the transmission process is not limited to the process prepared in the OS, and may be created by the user.

【0011】伝達プロセスは、通常のプロセスと同様の
構成であり、作成する場合には、例えば、起動されたと
きの処理、メッセージに対する処理、終了時に行う処理
等を記述することが必要である。
The transmission process has the same configuration as a normal process, and when it is created, it is necessary to describe, for example, a process when activated, a process for a message, a process to be performed at the time of termination, and the like.

【0012】図3に示した本発明のプロセス間通信を、
図4〜7を用いて詳細に説明する。図4は、送信元プロ
セス(プロセスA)210、伝達プロセス(プロセス
C)220、送信先プロセス(プロセスB)230、O
S260との相互の関係を説明するための図である。図
5は、送信元プロセス(プロセスA)210およびOS
で行われている伝達のための処理を説明するフローチャ
ートである。図6は、伝達プロセス(プロセスC)22
0で作成されるメッセージの構成を詳細に示した図であ
る。図7は、送信先プロセス(プロセスB)230やO
Sで行われている伝達のための処理を説明するフローチ
ャートである。
The inter-process communication of the present invention shown in FIG.
This will be described in detail with reference to FIGS. FIG. 4 shows a transmission source process (process A) 210, a transmission process (process C) 220, a transmission destination process (process B) 230,
It is a figure for explaining mutual relation with S260. FIG. 5 shows a transmission source process (process A) 210 and an OS
5 is a flowchart for explaining a process for transmission performed in step (a). FIG. 6 shows a transmission process (process C) 22.
FIG. 7 is a diagram showing in detail a configuration of a message created by the process No. 0; FIG. 7 shows the transmission destination process (process B) 230 and O
It is a flowchart explaining the process for transmission performed in S.

【0013】図4において、送信先であるプロセスB2
30に対してメッセージを送るプロセスA210は、送
るためのメッセージ212を用意して、OS260のse
ndMessage関数を呼び出す(図4)。呼び出されたsen
dMessage関数は、選択された伝達プロセスであるプロセ
スCを起動し(図4)、起動したプロセスCに対して
メッセージをコピーする(図4)。このときの詳細な
処理フローを図5で、プロセスCで作成されるメッセー
ジの構成例を図6で、説明する。
In FIG. 4, a process B2 as a transmission destination
The process A 210 that sends a message to the OS 30 prepares a message 212 to be sent, and
Call the ndMessage function (Fig. 4). Called sen
The dMessage function activates the selected transmission process, Process C (FIG. 4), and copies a message to the activated process C (FIG. 4). A detailed processing flow at this time will be described with reference to FIG. 5, and a configuration example of a message created in the process C will be described with reference to FIG.

【0014】図5において、送信元であるプロセスAは
メッセージを送信する場合、「メッセージ本体の先頭ア
ドレス」、「メッセージ本体のサイズ」、「送信先のプ
ロセスID」、伝達をするプロセスを特定するための
「メッセージ伝達プロセスのプログラム名」等を引数と
して、OSのsendMessage関数を呼び出す(S50
2)。
In FIG. 5, when transmitting a message, a process A which is a transmission source specifies a "head address of a message body", a "size of a message body", a "process ID of a transmission destination", and a process to be transmitted. The sendMessage function of the OS is called using the "program name of the message transmission process" for the argument as an argument (S50).
2).

【0015】呼ばれたsendMessage関数は、まず、送信
元のプロセスAからの引数の内容をチェックして(S5
52)、誤りである場合には、呼び出された関数は異常
終了し、呼び出しを行ったプロセスAに対して返り値と
してエラーコードを返す(S564)。プロセスAで
は、返り値を調べて(S504)、エラーコードである
と、エラーコードに応じたエラー処理を行う(S50
8)。
The called sendMessage function first checks the contents of the argument from the process A of the transmission source (S5).
52) If it is an error, the called function ends abnormally and returns an error code to the calling process A as a return value (S564). In the process A, the return value is checked (S504), and if it is an error code, an error process corresponding to the error code is performed (S50).
8).

【0016】呼び出しが正常に行われていた場合(S5
52でGood)には、送信元プロセスで指定されたメ
ッセージ伝達プロセスを、送信元プロセス(プロセス
A)を親とする子プロセスとして起動する(S55
4)。このとき、起動された伝達プロセスが必要とする
メモリ・サイズは、引数で指定されたメッセージ本体の
サイズに自身が起動に必要としているメモリ・サイズを
合計したものである。
If the call has been made normally (S5
In Good at 52, the message transmission process specified by the transmission source process is started as a child process having the transmission source process (process A) as a parent (S55).
4). At this time, the memory size required by the activated transmission process is the sum of the size of the message body specified by the argument and the memory size required for activation.

【0017】次に、起動したプロセスが「メッセージ伝
達プロセス」であることを示すフラグを、OSのプロセ
ス管理情報中のこの伝達プロセスに対応する所定位置に
立てる(S556)。これにより、OSのプロセス管理
において、起動されたプロセスを伝達プロセスとして識
別することができる。
Next, a flag indicating that the started process is the "message transfer process" is set at a predetermined position corresponding to this transfer process in the process management information of the OS (S556). Thereby, in the process management of the OS, the started process can be identified as the transmission process.

【0018】プロセスAで指定された引数等を用いて伝
達プロセス中の領域に、メッセージのヘッダ部を作成す
るとともに、メッセージ本体をコピーする(S55
8)。この伝達プロセス内で作成されるメッセージのデ
ータ構造を図6を用いて詳しく説明する。図6において
示されているように、図4で示した伝達プロセスである
プロセスCで作成されるメッセージ222は、大きくヘ
ッダ部310とメッセージ本体340とで構成されてい
る。ヘッダ部は、例えば、「ヘッダのサイズ」312、
複数のメッセージ種類に対して処理を行う場合には「メ
ッセージの種類」314、選択した伝達プロセスを特定
するためのメッセージ伝達プロセスID316、送信し
たプロセスAを示す「送信元プロセスID」318、送
信先であるプロセスBを示す「送信先プロセスID」3
20、処理の同期を行うための「送信した瞬間の送信先
プロセスの時間」322、「メッセージのサイズ」32
4等で構成されている。メッセージ本体340は、ユー
ザ(プロセス)が自由に設定することができる。
A message header is created and the message body is copied in an area in the transmission process using the arguments and the like specified in the process A (S55).
8). The data structure of the message created in this transmission process will be described in detail with reference to FIG. As shown in FIG. 6, the message 222 created in the process C, which is the transmission process shown in FIG. 4, is mainly composed of a header section 310 and a message body 340. The header section includes, for example, “header size” 312,
When processing is performed on a plurality of message types, a “message type” 314, a message transmission process ID 316 for specifying the selected transmission process, a “source process ID” 318 indicating the transmitted process A, a transmission destination "Destination process ID" 3 indicating the process B that is
20, “time of destination process at the moment of transmission” 322 for synchronizing processing, “message size” 32
4 and so on. The message body 340 can be freely set by the user (process).

【0019】ここで、「送信した瞬間の送信先プロセス
の時間」322について、さらに説明する。これは、プ
ロセスAからの引数によりヘッダ部を作成する際に、送
信先であるプロセスBの現在時間を読み取り、その時間
を設定している。これにより、送信先であるプロセスB
は、自分の現在時間と比較することにより、同期をとる
ことが可能となる。たとえば、コンピュータ・ゲームに
この処理を適用した場合、ゲームの処理は、画面の1フ
レームを作成することと同期して作動しており、1フレ
ーム内は、同じシステム時間として認識している。した
がって、プロセスAがプロセスBにメッセージを送る場
合、プロセスAとプロセスBの処理の順番(明示的に指
定しない限り、一般的に不定)によって、同じフレーム
内にプロセスBがメッセージを受け取れるのか、それと
も1フレーム遅れになるのかが分からず、処理の同期が
取れなくなる可能性がある。よって、基本的には必ず1
フレーム遅れで届くように、つまりプロセスAがメッセ
ージを送った次のフレーム内のプロセスBの処理開始時
に、確実に、プロセスBがメッセージを受け取るための
仕組みが必要になる。この同期処理のために、この「送
信した瞬間の送信先のプロセスの時間」を用いることが
できる。
Here, the "time of the destination process at the moment of transmission" 322 will be further described. This is to read the current time of the process B, which is the transmission destination, and set the time when the header part is created by the argument from the process A. Thereby, the process B which is the transmission destination
Can be synchronized by comparing it with their current time. For example, when this processing is applied to a computer game, the processing of the game operates in synchronization with creation of one frame of the screen, and one frame is recognized as having the same system time. Therefore, when process A sends a message to process B, whether process B can receive the message in the same frame depends on the order of processing of process A and process B (generally undefined unless explicitly specified), or There is a possibility that the process cannot be synchronized because it is not known whether it is one frame late. Therefore, basically 1
A mechanism for ensuring that the process B receives the message is required so that the message arrives with a frame delay, that is, at the start of the process of the process B in the next frame to which the process A has sent the message. For this synchronization processing, the “time of the process at the transmission destination at the moment of transmission” can be used.

【0020】図5のフローチャートに戻り、プロセスA
の子プロセスである伝達プロセスを送信先であるプロセ
スBを親とする子プロセスに変更する(S560)。こ
れにより、プロセスBは、自分の子プロセスであるプロ
セスCに対して直接的にアクセスすることができるよう
になる。これでOSのsendMessage関数は正常終了する
(S562)。sendMessage関数が正常終了すると、sen
dMessage関数を呼び出したプロセスAへの返り値は当然
エラーコードではない(S504でNo)ので、メッセ
ージのプロセスAでの処理は正常に終了する(S50
6)。
Returning to the flowchart of FIG.
Is changed to a child process having process B, which is the transmission destination, as a parent (S560). As a result, the process B can directly access the process C, which is its own child process. With this, the sendMessage function of the OS ends normally (S562). When the sendMessage function ends normally, sen
Since the return value to the process A that called the dMessage function is not an error code (No in S504), the processing of the message in the process A ends normally (S50).
6).

【0021】図4に戻り、この図において今、プロセス
C220が起動され、その中にメッセージ222がコピ
ーされている。伝達プロセスであるプロセスCは、コピ
ーされたメッセージに対して、このプロセスに定義され
ている処理を独立して行う(図4)。
Returning to FIG. 4, in this figure, process C220 has now been activated, into which message 222 has been copied. Process C, which is a transmission process, independently performs the process defined in this process on the copied message (FIG. 4).

【0022】送信先であるプロセスB230は、OS2
60のcheckMessage関数を用いて(図4)、自分に対
するメッセージが送られていないかをチェックする(図
4)。自分に対するメッセージがあれば、OS260
のreceiveMessage関数を用いて(図4)、そのメッセ
ージを自分の領域にコピーする(図4)。そして、プ
ロセスB230は送られたメッセージ232を処理する
ことができる。このときの処理を図7のフローチャート
により詳しく説明する。
The process B230, which is the transmission destination,
Using 60 checkMessage function (FIG. 4), it is checked whether a message for itself is sent (FIG. 4). If you have a message for yourself, OS260
The received message function is used to copy the message to its own area (FIG. 4). Then, the process B 230 can process the sent message 232. The processing at this time will be described in detail with reference to the flowchart of FIG.

【0023】図7において、送信先のプロセスであるプ
ロセスBは、まず、自分当てのメッセージがあるかを、
OSのcheckMessage関数を呼び出して調べる(S70
2)。呼び出されたcheckMessage関数(S750)にお
いて、checkMessage関数を呼び出したプロセスBを親と
する子プロセスから伝達プロセスを探し出して、プロセ
スBが受け取るべきメッセージをチェックする(S75
2)。このとき、通常は、伝達プロセスのみのリストを
用意しているので検索時間はかからない。伝達すべきメ
ッセージがあるかを返り値として、このルーティン(ch
eckMessage関数)を終了する(S754)。
In FIG. 7, process B, which is the destination process, first checks whether there is a message for itself.
Check by calling the checkMessage function of the OS (S70)
2). In the called checkMessage function (S750), a transfer process is searched for from the child process having the process B that called the checkMessage function as a parent, and a message to be received by the process B is checked (S75).
2). At this time, usually, a search time is not required because a list of only the transmission process is prepared. This routine (ch
The eckMessage function) ends (S754).

【0024】呼び出したプロセスBでは返り値を調べ
て、伝達すべきメッセージが無い場合は、正常終了(S
712)となり、メッセージ伝達処理を終了する。メッ
セージがある場合は、メッセージの型(種類)を調べ
て、内容のコピー先を定める(S704)。このとき
に、自分が読めないメッセージの場合は、異常終了(S
714)となり、エラー処理へと処理が移る。読める場
合は、定めたコピー先の先頭アドレス(ポインタ)を引
数として、OSのreceiveMessage関数を呼び出して(S
706)、メッセージを受け取る。
The calling process B checks the return value, and if there is no message to be transmitted, terminates normally (S
712), and the message transmission process ends. If there is a message, the type (type) of the message is checked to determine the copy destination of the content (S704). At this time, if the message cannot be read by the user, abnormal termination (S
714), and the process proceeds to an error process. If it can be read, the receiveMessage function of the OS is called with the start address (pointer) of the determined copy destination as an argument (S
706), receive the message.

【0025】呼び出されたreceiveMessage関数(S77
0)は、通信内容(メッセージ本体)を送信先プロセス
(プロセスB)の引数のポインタで指定された領域にコ
ピーする(S772)。receiveMessage関数を呼び出し
たプロセスBは、コピーされたメッセージを用いて処理
を行う(S708)。まだ処理すべきメッセージがある
場合(S710でNO)には、またメッセージを受け取
るための処理を行う(S704)。メッセージをすべて
読み込んだ場合(S710でYES)には、メッセージ
の伝達処理は、正常終了(S710)となる。
The called receiveMessage function (S77)
0) copies the communication content (message body) to the area specified by the pointer of the argument of the destination process (process B) (S772). The process B that has called the receiveMessage function performs processing using the copied message (S708). If there is still a message to be processed (NO in S710), a process for receiving the message is performed again (S704). If all the messages have been read (YES in S710), the message transmission processing ends normally (S710).

【0026】なお、呼び出されたreceiveMessage関数
は、各々のメッセージの伝達を完了する度に、伝達プロ
セス(プロセスC)を消滅(kill)する(S774)。
また、異常終了時(S714)のエラー処理としては、
例えば、送信元であるプロセスAに対して、メッセージ
を正しく読めなかった旨のメッセージを出す(返事を出
す)こととしてもよい。また、この自分の読めないメッ
セージを無視してしまうこともできる。
The called receiveMessage function kills the transmission process (process C) every time the transmission of each message is completed (S774).
The error processing at the time of abnormal termination (S714) includes:
For example, a message to the effect that the message could not be read correctly may be issued (answered) to the process A that is the transmission source. You can also ignore this unreadable message.

【0027】さて、このような頭脳を有するメッセージ
伝達プロセスを用いることにより、メッセージに対して
処理を行うことができるので、いろいろな応用が考えら
れる。例えば、メッセージ伝達プロセスでは、メッセー
ジの送信元に関する情報やメッセージ本体の内容を用い
て、これらの情報を基に、送信先を決定・変更を行うこ
とが可能である。したがって、複数のプロセスにメッセ
ージを送る必要がある場合、メッセージ伝達プロセスが
自分のコピーを作り、そのコピーをそれぞれの送信先の
子プロセスとすることで、メッセージを伝達することが
できる。
By using such a message transmission process having a brain, a message can be processed, so that various applications can be considered. For example, in the message transmission process, it is possible to determine and change the transmission destination based on the information using the information on the transmission source of the message and the contents of the message body. Therefore, when it is necessary to send a message to a plurality of processes, the message transmission process can transmit the message by making its own copy and making the copy a child process of each transmission destination.

【0028】また、メッセージ伝達プロセスにおいてメ
ッセージの内容を書き換えることができるので、送信先
の受け取り方やフォーマットに応じて、メッセージを変
えることができる。これにより、送信元のプロセスは、
送信先のプロセスの型や種類を知らなくてもメッセージ
を送ることができる。
Further, since the content of the message can be rewritten in the message transmission process, the message can be changed according to the receiving method and format of the transmission destination. This allows the sending process to
A message can be sent without knowing the type or type of the process to which it is sent.

【0029】メッセージ伝達プロセスにおいて、メッセ
ージが届くまでの時間を調整することができる。これを
用いて、時限爆弾のような、メッセージの送信から一定
時間後に相手に届くような時間の概念を導入したメッセ
ージを実現することができる。
In the message transmission process, the time until the message arrives can be adjusted. Using this, it is possible to realize a message such as a time bomb that introduces the concept of time that reaches a partner after a certain period of time from the transmission of the message.

【0030】メッセージ伝達プロセスを用いて、メッセ
ージを届ける以外の役目を持ったアクティブなメッセー
ジを実現することができる。例えば、送信先に対しての
メッセージ伝達に時間の掛かると判断した場合に、送信
元でメッセージを送信したときからメッセージ本体が届
くまでの間、画面に絵や文字を表示したり、スピーカか
ら音を出したりすることが可能である。
An active message having a role other than delivering a message can be realized using the message transfer process. For example, if it is determined that it takes time to transmit a message to a destination, a picture or character is displayed on the screen, or a sound is output from the speaker from when the message is transmitted at the source until the message arrives. Can be issued.

【0031】いろいろな応用例のうちの1つの例を図8
を用いて詳しく説明する。図8において、プロセスB4
30は画面の明るさを管理するプロセスであり、プロセ
スA410は、プロセスB430に対して、明るさの制
御を依頼するプロセスである。この依頼を上述のメッセ
ージ伝達プロセスであるプロセスC420で行う。明る
さを管理するプロセスは、画面の明るさを規定するメッ
セージを受け取り、その明るさに画面を制御する機能を
有している。この場合、明るさの制御を伝達する伝達プ
ロセスには色々な種類があって、選択されたプロセス4
20は、フェードアウト(徐々に画面が暗くなる制御)
を実現することができる伝達プロセスである。
One example of various applications is shown in FIG.
This will be described in detail with reference to FIG. In FIG. 8, process B4
Reference numeral 30 denotes a process for managing the brightness of the screen, and process A410 is a process for requesting the process B430 to control the brightness. This request is made in process C420, which is the above-described message transmission process. The process of managing the brightness has a function of receiving a message defining the brightness of the screen and controlling the screen to the brightness. In this case, there are various types of transmission processes for transmitting the brightness control.
20 is fade-out (control to gradually darken the screen)
Is a communication process that can be realized.

【0032】プロセスA410において、フェードアウ
トを伝達するプロセス420に対しては、「最初の明る
さ」、「最後の明るさ」、およびフェードアウトを完了
するまでの「時間」をメッセージとして渡す。メッセー
ジを渡された伝達プロセス420においてメッセージを
読み取り、これにより、例えば5秒後にフェードアウト
を行うためのフレーム毎の明るさを計算する。そして、
画面の明るさを管理するプロセスB430に対して、フ
レーム毎の明るさをメッセージとして、フレーム毎に伝
達する。これによりフェードアウトを実現することがで
きる。本発明の伝達プロセスを用いることにより、画面
の明るさを管理するプロセスを変えることなく、伝達プ
ロセスを変化させることにより、いろいろな画面の明る
さの制御を行うことができる。
In the process A410, the "first brightness", the "last brightness", and the "time" until the fade-out is completed are passed to the process 420 for transmitting the fade-out as a message. The message is read in the passed process 420 where the message was passed, thereby calculating the frame-by-frame brightness to fade out, for example, after 5 seconds. And
The brightness of each frame is transmitted as a message to the process B430 for managing the brightness of the screen for each frame. Thereby, fade-out can be realized. By using the transmission process of the present invention, it is possible to control various screen brightnesses by changing the transmission process without changing the process of managing the screen brightness.

【0033】このように、本発明の頭脳を有するメッセ
ージ伝達プロセスを用いることにより、過去に作成した
プログラムを変更することなく、フレキシビリティを有
するシステムを構築することができる。
As described above, by using the message transmission process having the brain of the present invention, a flexible system can be constructed without changing a program created in the past.

【0034】本発明は、複数のプロセッサから構成され
る例えばマルチ・プロセッサ・システム等に適用しても
よい。本発明のプロセス間通信の処理に関するプログラ
ムを格納した記憶媒体から、プログラムをシステムで読
み出して実行することにより、本発明の構成を実現する
ことができる。この記録媒体には、フロッピー・ディス
ク、CD−ROM、磁気テープ、ROMカセット等があ
る。
The present invention may be applied to, for example, a multi-processor system comprising a plurality of processors. The configuration of the present invention can be realized by reading and executing the program from the storage medium storing the program related to the process of the inter-process communication of the present invention by the system. The recording medium includes a floppy disk, a CD-ROM, a magnetic tape, a ROM cassette, and the like.

【0035】[0035]

【発明の効果】上記の説明のように、本発明は、メッセ
ージ自体に知的な振る舞いをさせることできるプロセス
間通信を提供することができ、これを用いることによ
り、フレキシビリティのあるシステムを構築することが
できる。
As described above, according to the present invention, it is possible to provide an inter-process communication capable of causing an intellectual behavior of a message itself, and a flexible system can be constructed by using the inter-process communication. can do.

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

【図1】コンピュータ・システムのハードウェア構成を
示すブロック図である。
FIG. 1 is a block diagram illustrating a hardware configuration of a computer system.

【図2】従来のプロセス間通信の説明図である。FIG. 2 is an explanatory diagram of conventional inter-process communication.

【図3】本発明のプロセス間通信の概略説明図である。FIG. 3 is a schematic explanatory diagram of inter-process communication of the present invention.

【図4】本発明のプロセス間通信の説明図である。FIG. 4 is an explanatory diagram of inter-process communication of the present invention.

【図5】送信元プロセスと伝達プロセスとの間の処理を
示すフローチャートである。
FIG. 5 is a flowchart showing a process between a transmission source process and a transmission process.

【図6】伝達プロセスで作成されるメッセージのデータ
構造を示す図である。
FIG. 6 is a diagram showing a data structure of a message created in a transmission process.

【図7】伝達プロセスと送信先プロセスとの間の処理を
示すフローチャートである。
FIG. 7 is a flowchart showing a process between a transmission process and a transmission destination process.

【図8】伝達プロセスを用いた処理例を示す図である。FIG. 8 is a diagram illustrating a processing example using a transmission process.

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

10 CPU 20 バス 30 メモリ 40 周辺機器 110,130 プロセス 120 共有メモリ 122 通信内容 210 送信元プロセス 212 送るメッセージ 220 伝達プロセス 222 メッセージ 230 送信先プロセス 232 送られたメッセージ 242,244,246 伝達プロセス 310 ヘッダ部 340 メッセージ本体 410 明るさの制御を依頼するプロセス(送信元プロ
セス) 420 フェードアウト制御プロセス(伝達プロセス) 430 画面の明るさを制御するプロセス(送信先プロ
セス)
DESCRIPTION OF SYMBOLS 10 CPU 20 Bus 30 Memory 40 Peripheral device 110, 130 Process 120 Shared memory 122 Communication content 210 Source process 212 Message to be transmitted 220 Transmission process 222 Message 230 Destination process 232 Message sent 242, 244, 246 Transmission process 310 Header part 340 Message body 410 Process for requesting brightness control (transmission source process) 420 Fade-out control process (transmission process) 430 Process for controlling screen brightness (transmission destination process)

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数のプロセスにより処理を行うマルチ
プロセス・システムにおけるプロセス間通信システムに
おいて、 特定の伝達プロセスを起動し、送信先プロセスを指定し
てメッセージを渡す送信手段と、 前記起動された伝達プロセスにおいて、渡されたメッセ
ージを処理する処理手段と、 伝達プロセスをチェックして、自分宛てのメッセージが
あるかを調べる伝達プロセス・チェック手段と、 自分宛てのメッセージがあった場合、メッセージを受け
る受信手段とを備えることを特徴とするプロセス間通信
システム。
1. An inter-process communication system in a multi-process system in which a process is performed by a plurality of processes, a transmission means for starting a specific transmission process, passing a message by designating a destination process, and the activated transmission. In the process, a processing means for processing the passed message, a transmission process check means for checking the transmission process to see if there is a message addressed to itself, and a reception for receiving a message when there is a message addressed to itself And an inter-process communication system.
【請求項2】 請求項1記載のプロセス間通信システム
において、 前記伝達プロセスは、送信元プロセスの子プロセスとし
て起動され、メッセージを受領した後は、送信先プロセ
スの子プロセスとして作動することを特徴とするプロセ
ス間通信システム。
2. The inter-process communication system according to claim 1, wherein the transmission process is started as a child process of a transmission source process, and operates as a child process of a transmission destination process after receiving a message. Interprocess communication system.
【請求項3】 請求項1または2記載のプロセス間通信
システムにおいて、 前記伝達プロセスにメッセージを渡すときに、指定され
た送信先プロセスの現在時間を設定することを特徴とす
るプロセス間通信システム。
3. The inter-process communication system according to claim 1, wherein a current time of a designated transmission destination process is set when a message is passed to said transmission process.
【請求項4】 複数のプロセスにより処理を行うマルチ
プロセス・システムにおけるプロセス間通信方法におい
て、 特定の伝達プロセスを起動し、送信先プロセスを指定し
てメッセージを渡すステップと、 前記起動された伝達プロセスにおいて、渡されたメッセ
ージを処理するステップと、 伝達プロセスをチェックして、自分宛てのメッセージが
あるかを調べる伝達プロセス・チェック・ステップと、 自分宛てのメッセージがあった場合、メッセージを受け
るステップとを備えることを特徴とするプロセス間通信
方法。
4. An inter-process communication method in a multi-process system in which processing is performed by a plurality of processes, a step of activating a specific transmission process, passing a message by specifying a destination process, and the activated transmission process. , A step of processing the passed message, a step of checking the transmission process to check whether there is a message addressed to the user, and a step of receiving the message if there is a message addressed to the user. An inter-process communication method comprising:
【請求項5】 前記請求項1〜3いずれか記載のプロセ
ス間通信システムをコンピュータ・システムに対して構
築することができるプログラム格納した記録媒体。
5. A recording medium storing a program capable of constructing the inter-process communication system according to claim 1 for a computer system.
JP11000742A 1999-01-05 1999-01-05 Inter-process communication system and method Pending JP2000200198A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11000742A JP2000200198A (en) 1999-01-05 1999-01-05 Inter-process communication system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11000742A JP2000200198A (en) 1999-01-05 1999-01-05 Inter-process communication system and method

Publications (1)

Publication Number Publication Date
JP2000200198A true JP2000200198A (en) 2000-07-18

Family

ID=11482170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11000742A Pending JP2000200198A (en) 1999-01-05 1999-01-05 Inter-process communication system and method

Country Status (1)

Country Link
JP (1) JP2000200198A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100377095C (en) * 2004-06-28 2008-03-26 英特尔公司 Thread to thread communication

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100377095C (en) * 2004-06-28 2008-03-26 英特尔公司 Thread to thread communication

Similar Documents

Publication Publication Date Title
JP3484049B2 (en) Delay coded data transmission
US7490324B2 (en) System and method for transferring data between virtual machines or other computer entities
US8185674B2 (en) System having a plurality of buffers for providing audio for synchronized playback to multiple audio devices
JP3601955B2 (en) Data transfer method and computer system suitable for it
US20240111473A1 (en) Distributed display method and terminal for application interface
CN111274019B (en) Data processing method, device and computer readable storage medium
CN112148798A (en) Data processing method and device applied to distributed system
US20230405455A1 (en) Method and apparatus for processing cloud gaming resource data, computer device, and storage medium
KR19990042176A (en) How to Boot a Node on a High-Speed Parallel Computer
JP2000200198A (en) Inter-process communication system and method
JP2004295899A (en) System and method utilizing test notification
JPH06223008A (en) Method and system for more efficient control of response to distribution of signal at inside of data processing system
CN113709214A (en) Message processing method and device, electronic equipment and storage medium
WO2020025016A1 (en) Node initialization for multipage communication
JP2919057B2 (en) Non-response monitoring method in multi-job system
CN112311898B (en) Data processing method and device, server and computer readable storage medium
JP3494788B2 (en) Program execution management system and program execution management method
JPH0749844A (en) Multiplex executing method for different-version program and computer system
JPH09190359A (en) Application shared system and its control method and information processing method and device
JP2812274B2 (en) Transaction load balancing system for loosely coupled multi-computer systems
JP2024032113A (en) Information processing device and program
CN116795810A (en) Entry updating method, apparatus, device, storage medium and program product
CN117331710A (en) Communication method, system, device and medium for remote procedure call
JPH0740240B2 (en) Information processing apparatus and information processing system
CN117850851A (en) Highly reliable and thermally upgrade-friendly virtual switch software system