Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2517852B2 - How to change process status - Google Patents
[go: Go Back, main page]

JP2517852B2 - How to change process status - Google Patents

How to change process status

Info

Publication number
JP2517852B2
JP2517852B2 JP3119556A JP11955691A JP2517852B2 JP 2517852 B2 JP2517852 B2 JP 2517852B2 JP 3119556 A JP3119556 A JP 3119556A JP 11955691 A JP11955691 A JP 11955691A JP 2517852 B2 JP2517852 B2 JP 2517852B2
Authority
JP
Japan
Prior art keywords
message
state
change
processor
subpool
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.)
Expired - Lifetime
Application number
JP3119556A
Other languages
Japanese (ja)
Other versions
JPH04291445A (en
Inventor
一昭 六澤
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP3119556A priority Critical patent/JP2517852B2/en
Publication of JPH04291445A publication Critical patent/JPH04291445A/en
Application granted granted Critical
Publication of JP2517852B2 publication Critical patent/JP2517852B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、非同期メッセージ通信
によってプロセッサ間処理を行なうマルチプロセッサシ
ステムにおいて、特定のID(一意名)を有する全ての
プロセスの状態を変更させるプロセス状態変更方式に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a process state changing system for changing the state of all processes having a specific ID (unique name) in a multiprocessor system which performs interprocessor processing by asynchronous message communication.

【0002】[0002]

【従来の技術】マルチプロセッサシステムにおいては、
処理の高速化等を期して、特定のIDを有する複数のプ
ロセスを複数のプロセッサに分配して実行することが多
い。このような場合において、コンソールからの外部指
令やハードウェアの物理的な制約等によって、同一ID
を有する全てのプロセスの状態を変更させることも生じ
る。
2. Description of the Related Art In a multiprocessor system,
In order to speed up processing, a plurality of processes having a specific ID are often distributed to a plurality of processors and executed. In such a case, the same ID may be generated due to external commands from the console or physical restrictions of hardware.
It also causes the state of all processes having

【0003】従来のプロセス状態変更方式として下記の
文献Aに記載のものがある。従来のプロセス状態変更方
式の説明の準備としてまず、「計算モデル」と従来のプ
ロセス状態変更方式が利用している「終了の検出方式
(WTC方式)」とをこの順に説明し、その後、従来の
「状態変更方式」を説明する。
As a conventional process state changing method, there is one described in the following document A. To prepare for the description of the conventional process state changing method, first, the “calculation model” and the “end detection method (WTC method)” used by the conventional process state changing method will be described in this order, and then the conventional process state changing method will be described. The "state change method" will be described.

【0004】文献A;川合英夫、仲瀬明彦、今井明、後
藤厚宏、六沢一昭、“並列推論マシンにおけるKL1の
実行制御方式−分散ゴール管理の課題と対策−”、情報
処理学会第74回計算機アーキテクチャ研究会82-2,199
0.4.20。
Reference A; Hideo Kawai, Akihiko Nakase, Akira Imai, Atsuhiro Goto, Kazuaki Muzawa, "Execution control method of KL1 in parallel inference machine-problems and countermeasures of distributed goal management", IPSJ 74 Technical Committee on Computer Architecture 82-2,199
0.4.20.

【0005】(1)「計算モデル」 (1-1) 仮定するプロセスモデルは以下の通りである。な
お、図2は、仮定するプロセスモデルの説明図である。
図2及び後述する各図において、制御プロセスをプロセ
スプールID(以下、単にIDと略す)を内部に有する
矩形の2重実線で示し、子プロセスをプロセスIDを内
部に有する円形の実線で示し、プロセッサをプロセスを
内部に有する実線で示している。
(1) "Computational model" (1-1) The assumed process model is as follows. Note that FIG. 2 is an explanatory diagram of an assumed process model.
In FIG. 2 and each drawing described later, a control process is shown by a rectangular double solid line having a process pool ID (hereinafter, simply abbreviated as ID) inside, and a child process is shown by a circular solid line having a process ID inside. The processor is shown as a solid line with the process inside.

【0006】(1-1-1) 1個のプロセスプールは、1個の
制御プロセスと少なくとも1個以上の子プロセスとから
なる。 (1-1-2) システムには複数のプロセスプールが存在し
得、各プロセスプールはシステムで固有のIDを有す
る。 (1-1-3) 子プロセスは状態を持つ。 (1-1-4) 子プロセスはいつでも終了し得る。 (1-1-5) 子プロセスは、同じIDを有する子プロセスを
いつでも生成することができる。また、新しいIDを有
するプロセスプールをいつでも生成することができる。 (1-1-6) あるIDを有する全ての子プロセスが終了する
と、そのIDのプロセスプールは終了する。 (1-1-7) あるIDのプロセスプールの状態変更とは、そ
のIDを有する全ての子プロセスの状態を制御プロセス
が変更させることである。
(1-1-1) One process pool consists of one control process and at least one child process. (1-1-2) There can be a plurality of process pools in the system, and each process pool has a unique ID in the system. (1-1-3) Child process has state. (1-1-4) The child process can terminate at any time. (1-1-5) A child process can always create a child process having the same ID. Also, a process pool with a new ID can be created at any time. (1-1-6) When all the child processes having a certain ID end, the process pool of that ID ends. (1-1-7) Changing the state of the process pool with a certain ID means that the control process changes the state of all child processes having that ID.

【0007】(1-2) 上述したプロセスプールは、以下の
形式によってマルチプロセッサシステムで実行される。
なお、図3は、プロセッサとプロセスプールとの関係の
説明図であって、3個のプロセッサPEi、PEj、P
Ekと、IDがA及びBの2個のプロセスプールとを示
している。ここで、プロセッサはハードウェア的にはC
PU、メモリ及び他のプロセッサとの通信構成とを基本
構成としているものである。
(1-2) The above process pool is executed in the multiprocessor system in the following format.
Note that FIG. 3 is an explanatory diagram of the relationship between the processors and the process pools, and includes three processors PEi, PEj, and P.
Ek and two process pools with IDs A and B are shown. Here, the processor is C in terms of hardware.
The basic configuration is a PU, a memory, and a communication configuration with another processor.

【0008】(1-2-1) 1個のプロセッサ中に存在するプ
ロセスの内、同じIDを有するものを「サブプール」と
呼ぶ。 (1-2-2) サブプールは、それを構成する全ての子プロセ
スが終了すると終了する。 (1-2-3) プロセッサは、自プロセッサ中のサブプールの
終了を検出することができる。また、自プロセッサ中の
特定のIDを有するサブプールに属する全ての子プロセ
スの状態を変更することができる。このような状態変更
処理を、ソフトウェアやハードウェアやファームウェア
のいずれで実現しても良い。 (1-2-4) プロセッサは、自プロセッサ中に存在する子プ
ロセスを他のプロセッサに送信することができる。子プ
ロセスの送信は、具体的には子プロセスを運ぶメッセー
ジを送信することである。 (1-2-5) 制御プロセスと各プロセッサ(本明細書におい
ては、サブプールの終了処理部やサブプールの状態変更
部も単にプロセッサと呼んでいる)は非同期メッセージ
によって互いに通信することができる。例えば、サブプ
ールの終了を検出したプロセッサは、その旨を伝えるメ
ッセージを制御プロセスに送ることができる。また、制
御プロセスは「特定のIDのサブプールに属する全ての
子プロセスの状態を指定した状態に変更させるメッセー
ジ」をプロセッサに送ることができる。 (1-2-6) メッセージは送信されてから受信されるまでに
任意の時間がかかる。このため、任意の時刻において、
「送信はされたがまだ受信されていないメッセージ」
(以下、通信中のメッセージと呼ぶ)が存在し得る。
(1-2-1) Among processes existing in one processor, those having the same ID are called "subpool". (1-2-2) The subpool ends when all the child processes that compose it have finished. (1-2-3) The processor can detect the end of the subpool in its own processor. In addition, it is possible to change the states of all child processes belonging to the subpool having the specific ID in the own processor. Such state change processing may be realized by any of software, hardware, and firmware. (1-2-4) A processor can send a child process existing in its own processor to another processor. Sending a child process is specifically sending a message that carries the child process. (1-2-5) The control process and each processor (in this specification, the end processing unit of the sub-pool and the state changing unit of the sub-pool are also simply called processors) can communicate with each other by asynchronous messages. For example, a processor that detects the end of a subpool can send a message to that effect to the control process. Further, the control process can send a "message for changing the states of all the child processes belonging to the subpool of the specific ID to the designated state" to the processor. (1-2-6) A message takes an arbitrary time from being sent to being received. Therefore, at any time,
"Message sent but not yet received"
(Hereinafter referred to as a message being communicated) may exist.

【0009】(2)「終了の検出方式(WTC方式)」 全ての子プロセスが終了したことを検出することは上述
した計算モデルでは非常に基本的で重要な機能である。
文献Aが述べている状態変更方式では、WTC方式とい
うプロセス終了検出方式を使用している。このWTC方
式を以下に述べる。なお、WTC方式は以下に示す文献
Bに書かれている。
(2) "End detection method (WTC method)" Detecting the end of all child processes is a very basic and important function in the above-mentioned calculation model.
The state change method described in Document A uses a process end detection method called WTC method. This WTC method will be described below. The WTC method is described in Document B shown below.

【0010】文献B;K.Rokusawa, N.Ichiyoshi et al.
“An Efficient Termination Detection and Abortio
n Algorithm for Distributed Processing Systems”,
InProceedings of the 1988 InternationalConference
on Parallel Processing,Vol.1 ,pp.18-22,August 1
988 。
Reference B; K. Rokusawa, N. Ichiyoshi et al.
“An Efficient Termination Detection and Abortio
n Algorithm for Distributed Processing Systems ”,
InProceedings of the 1988 International Conference
on Parallel Processing, Vol.1, pp.18-22, August 1
988.

【0011】この方式は、制御プロセス、サブプール及
び通信中のメッセージにそれぞれ「重み」を持たせる方
式である。制御プロセスに持たせる重み(負)と、サブ
プール及びメッセージにもたせる重み(正)とは正負が
逆の整数である。そして、「重みの合計が0」になるよ
うに制御するものである。また、全ての子プロセスが終
了したときのみ制御プロセスの重みが0になるように制
御する。図4は、全て(3個)のサブプールのそれぞれ
に180、250、400の重みが付与され、通信中の
子プロセスに20の重みが付与され、制御プロセスに−
850の重みが付与されている例である。
This system is a system in which a "weight" is given to each of a control process, a subpool, and a message during communication. The weight given to the control process (negative) and the weight given to the subpool and the message (positive) are positive and negative integers. Then, the control is performed so that “the total weight is 0”. The weight of the control process is controlled to be 0 only when all the child processes are completed. In FIG. 4, the weights of 180, 250, and 400 are assigned to all (3) subpools, the weight of 20 is assigned to the communicating child process, and the weight of the control process is −.
In this example, a weight of 850 is added.

【0012】このような重みを管理するため、各プロセ
ッサは、制御プロセス用重みテーブルとサブプール用重
みテーブルとを備えている。制御プロセス用重みテーブ
ルには、プロセッサが有する全制御プロセスのIDと制
御プロセスの重みとが対応付けられて格納されている。
図5は、IDが0、1、35、40の制御プロセスが存
在し、それぞれ−250、−450、−5014、−4
002の重みを有するテーブルを示している。サブプー
ル用重みテーブルには、プロセッサが有する全サブプー
ルのIDとサブプールの重みとが対応付けられて格納さ
れている。図6は、IDが21、22、50の制御プロ
セスが存在し、それぞれ800、132、95の重みを
有するテーブルを示している。サブプール用重みテーブ
ルには、サブプールのIDが格納されているので、当該
プロセッサに存在するサブプールの検索や、あるサブプ
ールが当該プロセッサに存在するか否かの確認に用いら
れる。
In order to manage such weights, each processor is provided with a control process weight table and a sub-pool weight table. In the control process weight table, the IDs of all control processes of the processor and the weights of the control processes are stored in association with each other.
In FIG. 5, there are control processes with IDs 0, 1, 35, and 40, which are -250, -450, -5014, and -4, respectively.
9 shows a table with a weight of 002. In the sub-pool weight table, the IDs of all the sub-pools that the processor has and the weights of the sub-pools are stored in association with each other. FIG. 6 shows a table in which control processes with IDs 21, 22, and 50 exist, and have weights of 800, 132, and 95, respectively. Since the subpool ID is stored in the subpool weight table, it is used to search for a subpool existing in the processor and to check whether a certain subpool exists in the processor.

【0013】次に、プロセッサ間で子プロセスを授受す
る際の重みの変化について説明する。プロセッサは子プ
ロセス(を運ぶメッセージ)に重みを付けて送信する。
その際、子プロセスに付けた分だけサブプールの重みを
減らす。他方、プロセッサは子プロセスを受信すると、
サブプール用重みテーブルに基づいてそのIDのサブプ
ールが存在していたか否かを判断する。存在している
と、付いていた重みを受信した子プロセスと同じIDの
サブプールに追加する。存在していないと、そのIDの
サブプールを新しく生成し、受信した子プロセスに付い
ていた重みをそのサブプールの重みとする。
Next, a change in weight when transferring a child process between processors will be described. The processor weights and sends the child process (the message that carries it).
At that time, the weight of the subpool is reduced by the amount added to the child process. On the other hand, when the processor receives a child process,
Based on the sub-pool weight table, it is determined whether or not the sub-pool with that ID exists. If it exists, the attached weight is added to the subpool having the same ID as the child process which received the weight. If it does not exist, a new subpool with that ID is newly created, and the weight attached to the received child process is used as the weight of that subpool.

【0014】図7は、送信プロセッサPEiが、IDが
Aのある子プロセスに重み40を付与して送信すること
でそのサブプールの重みが420から380に変化し、
他方、この子プロセスを受信したプロセッサPEjにお
いては、IDがAの既存のサブプールの重みがこの受信
によって220から260に変化したことを示してい
る。図8は、送信プロセッサPEiが、IDがAのある
子プロセスに重み40を付与して送信することでそのサ
ブプールの重みが420から380に変化し、他方、こ
の子プロセスを受信したプロセッサPEjにおいては、
IDがAのサブプールが存在せず、そのため、重み40
を有するIDがAのサブプールを生成したことを示して
いる。
FIG. 7 shows that the sending processor PEi assigns a weight of 40 to a child process having an ID of A and sends the child process, thereby changing the weight of the subpool from 420 to 380.
On the other hand, in the processor PEj that has received this child process, this indicates that the weight of the existing subpool with ID A has changed from 220 to 260 by this reception. In FIG. 8, the sending processor PEi changes the weight of the subpool from 420 to 380 by sending the child process with ID A with weight 40, and on the other hand, in the processor PEj that receives this child process, Is
There is no subpool with ID A, so the weight 40
Indicates that an ID with has generated a subpool of A.

【0015】次に、サブプールから制御プロセスに終了
メッセージを通信する際の重みの変化について説明す
る。サブプールが終了すると終了メッセージを制御プロ
セスに送信する。終了メッセージには終了したサブプー
ルが有していた重みを全て付ける。また、終了したサブ
プールをサブプール用重みテーブルから削除する。制御
プロセスは、終了メッセージを受信すると、付与されて
いた重みを自己の重みに加える。加えた結果の重みが0
になると、プロセスプールの終了(全ての子プロセスが
終了したこと)を検出する。
Next, a change in weight when communicating a termination message from the subpool to the control process will be described. When the subpool is finished, send a termination message to the control process. All the weights of the finished subpools are attached to the finish message. Also, the completed subpool is deleted from the subpool weight table. When the control process receives the end message, the control process adds the given weight to its own weight. The weight of the added result is 0
When, the end of the process pool (all child processes have ended) is detected.

【0016】図9は、IDがAのサブプールが終了し、
自己の重み340を付与した終了メッセージを制御プロ
セスに送信し、これにより制御プロセスの重みが−14
00から−1060に変化した例を示している。図10
は、当初において重み−2500が付与されている制御
プロセスに、全てのサブプールのそれぞれから順次その
サブプールが有していた重み1000、800、700
が付与されている終了メッセージが与えられ、制御プロ
セスの重みが0になってプロセスプールの終了を検出し
た場合を示している。
In FIG. 9, the subpool with ID A is completed,
An end message with its own weight 340 is sent to the control process, so that the weight of the control process is -14.
An example in which the value is changed from 00 to -1060 is shown. FIG.
Is the weight 1000, 800, 700 that the sub-pool has in sequence from each of all the sub-pools to the control process to which the weight -2500 is initially assigned.
The end message to which is added is given, the weight of the control process becomes 0, and the end of the process pool is detected.

【0017】(3)「状態変更方式」 プロセスプールの全子プロセスの状態を変更するために
は、制御プロセスが「特定のIDを持つサブプールに属
する全ての子プロセスの状態を変更するメッセージ」
(以下、状態変更メッセージと呼ぶ)を全てのプロセッ
サへ送信することを要する。しかし、この状態変更メッ
セージの送信だけでは、子プロセスの完全な状態変更は
できない。すなわち、非同期メッセージ通信を利用して
子プロセスを通信するようにしているので、図11に示
すように、全てのサブプールに状態変更メッセージが与
えられたときにいずれのサブプールにも属さない通信中
の子プロセスが存在し得、この通信中の子プロセスの状
態は変更できない。なお、図11において、制御プロセ
ス及び子プロセスに係る「a」及び「b」の文字は状態
を表している。
(3) "State change method" In order to change the state of all child processes in the process pool, the control process "message to change the state of all child processes belonging to the subpool having a specific ID".
(Hereinafter referred to as a state change message) needs to be transmitted to all the processors. However, sending this state change message alone cannot completely change the state of the child process. That is, since the child processes are communicated by using the asynchronous message communication, as shown in FIG. 11, when the state change message is given to all the subpools, the communication is not performed in any subpool. There can be child processes and the state of this communicating child process cannot be changed. Note that, in FIG. 11, the letters “a” and “b” relating to the control process and the child process represent states.

【0018】上述した文献Aは、プロセッサがサブプー
ルを生成したときにその旨を制御プロセスへ伝えること
によって、通信中のプロセスの存在を制御プロセスが認
識してその通信中にあった子プロセスの状態をも変更で
きる方式を記載している。以下、状態変更メッセージの
送信時に通信中の子プロセスが存在していても、その子
プロセスの状態をも変更できる従来の状態変更方式を、
メッセージの追い越しがないシステムの場合と、メッセ
ージの追い越しがあるシステムの場合とに分けて説明す
る。
According to the above-mentioned document A, when a processor creates a subpool, the fact is notified to the control process so that the control process recognizes the existence of the communicating process and the state of the child process in the communicating process. The method that can be changed is also described. Below, the conventional state change method that can change the state of the child process even if there is a child process in communication when the state change message is sent,
An explanation will be given separately for a system without message passing and a system with message passing.

【0019】(3-1) メッセージの追い越しがない場合 プロセッサは、サブプールを生成するとその生成を伝え
るメッセージ(以下、生成メッセージと呼ぶ)を制御プ
ロセスへ送信する。制御プロセスは、生成メッセージを
受信するとその送信元プロセッサを記憶し、終了メッセ
ージを受信すると削除する。制御プロセスに記憶されて
いるプロセッサには必ずサブプールが存在する。生成メ
ッセージの送信元プロセッサを記憶するために各プロセ
ッサはサブプールテーブルを有する。サブプールテーブ
ルは、図12に示すように、サブプールのIDと、生成
メッセージの送信元プロセッサとからなる。
(3-1) When there is no message overtaking When a subpool is created, the processor sends a message (hereinafter referred to as a creation message) that conveys the creation of the subpool to the control process. The control process remembers the originating processor when it receives the create message and deletes it when it receives the end message. There is always a subpool in the processor stored in the control process. Each processor has a subpool table for storing the processor that sent the generated message. As shown in FIG. 12, the sub-pool table is made up of the ID of the sub-pool and the sender processor of the generated message.

【0020】(3ー1ー1) 制御プロセスの処理 このサブプールテーブルを用いた状態変更の際の制御プ
ロセスの処理は、以下の通りである。サブプールテーブ
ルに登録されているプロセッサのみに状態変更メッセー
ジを送信する。かかる処理の後に、生成メッセージを受
信したならば、その送信元プロセッサを記憶し、状態変
更メッセージを送信する。なお、状態変更メッセージに
も重みを付け、制御プロセスの重みはその分だけ減ら
す。
(3-1-1) Processing of control process The processing of the control process at the time of state change using this subpool table is as follows. Send the status change message only to the processors registered in the subpool table. When the generation message is received after such processing, the transmission source processor is stored and the state change message is transmitted. The state change message is also weighted, and the weight of the control process is reduced accordingly.

【0021】(3-1-2) プロセッサの処理 状態変更メッセージを受信したプロセッサは、まず、状
態変更メッセージが示すIDと同じIDのサブプールが
存在するか否かをサブプール用重みテーブルを検索する
ことで調べる。
(3-1-2) Processing of Processor The processor that receives the status change message first searches the weight table for subpools to determine whether or not there is a subpool with the same ID as the ID indicated by the status change message. Check in.

【0022】サブプールが存在した場合には、そのサブ
プールに属する全ての子プロセスの状態を状態変更メッ
セージが指定した状態に変更する。また、状態変更メッ
セージが持っていた重みをサブプールの重みに加える。
If the subpool exists, the state of all child processes belonging to the subpool is changed to the state designated by the state change message. In addition, the weight held by the status change message is added to the weight of the subpool.

【0023】他方、サブプールが存在しなかった場合に
は、状態変更メッセージが有していた重みを送返すメッ
セージ(以下、重み返却メッセージと呼ぶ)を制御プロ
セスへ送ることで、状態変更メッセージが持っていた重
みを制御プロセスへ返す。
On the other hand, when the sub-pool does not exist, the status change message has a message by sending back the weight of the status change message (hereinafter referred to as a weight return message) to the control process. The weight that was used is returned to the control process.

【0024】(3-1-3) 状態変更 状態変更開始時点で制御プロセスが認識していた(サブ
プールテーブルに登録されていた)サブプール内に存在
した子プロセスは、上述した最初の状態変更メッセージ
の送信によって状態が変更される。一方、開始時点で通
信中であった子プロセスは、生成メッセージの受信後に
再送信された状態変更メッセージによって状態が変更さ
れる。これは、通信中の子プロセスは有限時間内にどこ
かのプロセッサに到着し、サブプールが生成され、生成
メッセージが制御プロセスに送られるからである。
(3-1-3) State Change The child process existing in the subpool (registered in the subpool table) recognized by the control process at the start of the state change is the first state change message described above. The state is changed by sending. On the other hand, the state of the child process that was in communication at the start time is changed by the state change message retransmitted after receiving the generation message. This is because the communicating child process arrives at some processor within a finite time, a subpool is created, and a create message is sent to the control process.

【0025】図13ないし図16は、サブプールテーブ
ルに登録されていたプロセッサPEi及びPEj内のサ
ブプールに属する子プロセスは当初の状態変更メッセー
ジによって状態が変更(aからbへ)され、最初の状態
変更メッセージの送出時点で通信中の子プロセスは、サ
ブプールテーブルに登録されていないその送信先のプロ
セッサPEkが制御プロセスに生成メッセージを送信し
た後に、制御プロセスが再度送信した状態変更メッセー
ジによって、その状態が変更されることを示したもので
ある。
13 to 16 show that the child processes belonging to the subpools in the processors PEi and PEj registered in the subpool table have their states changed (from a to b) by the initial state change message, and the first state change. The child process in communication at the time of sending the message changes its state by the state change message sent again by the control process after the destination processor PEk that is not registered in the subpool table sends the create message to the control process. It is meant to be changed.

【0026】(3-2) メッセージの追い越しがある場合 メッセージの追い越しがある(システムの)場合におい
ては、ある状態への変更を指示する状態変更メッセージ
が、後から送信された別の状態への変更を指示する状態
変更メッセージに追い越されてしまう可能性がある。そ
のため、受信した状態変更メッセージに従って単純に状
態を変更したのでは状態が正しく変更されない恐れがあ
る。例えば、制御プロセスが、まず、状態aへ変更する
状態変更メッセージ(以下、状態変更メッセージ(a)
と書くことにする)を送信し、次に、状態bへ変更する
状態変更メッセージ(b)を送信した場合には、子プロ
セスの状態は最終的には状態bに設定されるべきである
が、状態変更メッセージ(b)が状態変更メッセージ
(a)を追い越してしまうと最終的には状態aに設定さ
れてしまう。
(3-2) When message is overtaken When message is overtaken (system), a state change message instructing change to a certain state is sent to another state later. There is a possibility that you will be overtaken by the state change message that instructs you to change. Therefore, if the state is simply changed according to the received state change message, the state may not be changed correctly. For example, the control process first changes the state to a state change message (hereinafter, state change message (a)
, But then send a state change message (b) to change to state b, the state of the child process should eventually be set to state b. When the status change message (b) overtakes the status change message (a), the status is finally set to the status a.

【0027】そのため、メッセージの追い越しがある場
合に特有な処理が必要である。上述した文献Aには、扱
う状態が2状態に限定されているが、メッセージの追い
越しがある場合にも問題が生じないようにした方式を記
載している。この方式は、扱う状態をstopとstart の2
状態に限定し、受信した状態変更メッセージ数をカウン
トすることによって状態を正しく設定する方式である。
Therefore, special processing is required when a message is overtaken. The above-mentioned document A describes a method in which the state to be handled is limited to two states, but a problem does not occur even when a message is overtaken. This method handles two states, stop and start.
This is a method of setting the state correctly by limiting the number of states and counting the number of received state change messages.

【0028】以下、具体的に説明する。プロセッサは、
サブプール毎にカウンタを設け、以下のように操作す
る。例えば、サブプール用重みテーブル(図6)にカウ
ンタフィールドを設けて、カウンタの値を以下のように
操作する。サブプールを生成したときには0をセットす
る。状態変更メッセージ(stop)を受信したときには+
1する。状態変更メッセージ(start )を受信したとき
は−1する。
A detailed description will be given below. The processor is
A counter is provided for each sub-pool and operated as follows. For example, a counter field is provided in the sub-pool weight table (FIG. 6), and the counter value is operated as follows. It is set to 0 when the subpool is created. + When a status change message (stop) is received
Do 1 When the status change message (start) is received, -1 is set.

【0029】状態変更メッセージ(stop)又は状態変更
メッセージ(start )を受信したときには、上述のよう
にカウンタを操作した後、以下のように状態を設定す
る。カウンタの値が正ならば状態をstopに設定する。カ
ウンタの値が0以下ならば状態をstart に設定する。
When the state change message (stop) or the state change message (start) is received, the state is set as follows after the counter is operated as described above. If the counter value is positive, set the state to stop. If the counter value is 0 or less, set the state to start.

【0030】このようにして、状態変更メッセージ(st
op)と状態変更メッセージ(start)の到着順序が入れ
代わっても、以上の操作により状態は正しく設定され
る。
In this way, the status change message (st
Even if the order of arrival of op) and the state change message (start) is exchanged, the state is correctly set by the above operation.

【0031】図17は、サブプールが状態start 、カウ
ンタの値0にあるときに、制御プロセスがそのサブプー
ルの状態を状態stopに変更させる状態変更メッセージ
(stop)と、状態start に変更させる状態変更メッセー
ジ(start )とをこの順に送信し、後で送信された状態
変更メッセージ(start )が先にプロセッサに到着して
も最終的な状態が正しく状態start に設定される様子を
示したものである。
FIG. 17 shows a status change message (stop) that causes the control process to change the status of the subpool to the status stop and a status change message that causes the status to start when the subpool is in the state start and the counter value is 0. (Start) is transmitted in this order, and the final state is correctly set to the state start even if the state change message (start) transmitted later arrives at the processor first.

【0032】[0032]

【発明が解決しようとする課題】(1)追い越しがある
場合及びない場合に共通の課題 しかしながら、従来のプロセス状態変更方式によれば、
メッセージの追い越しがあるシステム及び追い越しがな
いシステムのいずれに適用しても、以下のような問題が
あった。
(1) Problems common to cases where there is overtaking and no overtaking, however, according to the conventional process state changing method,
There are the following problems when applied to both a system with overtaking messages and a system without overtaking messages.

【0033】各プロセッサが、状態変更のために、サブ
プールを生成したときには制御プロセスへ生成メッセー
ジを送信するという準備処理が必要であった。実際上、
各プロセッサの均一な稼動率を得るように、又は、プロ
セスの並行処理や高速処理を期して子プロセスが通信さ
れることも多く、生成メッセージの送信回数も多くな
る。最悪の場合、送信される子プロセスと同数の生成メ
ッセージが送信されてしまう。しかしながら、結果とし
て状態の変更が指示されないプロセスプールもあり、こ
のようなプロセスプールについての生成メッセージの通
信は無駄であり、この回数が多いことは問題である。
It was necessary for each processor to perform a preparation process of transmitting a generation message to the control process when the subpool was generated due to the state change. In practice,
The child processes are often communicated in order to obtain a uniform operation rate of each processor, or in parallel with the process, or in consideration of high-speed processing, and the number of times the generated message is transmitted increases. In the worst case, it will send as many spawned messages as there are child processes. However, as a result, some process pools are not instructed to change the state, communication of generated messages for such process pools is wasteful, and the large number of times is a problem.

【0034】制御プロセスが、生成メッセージを受信し
たときに、その送信元プロセッサを記憶する必要があ
る。1個のサブプールについて記憶するだけでも全ての
プロセッサ数分の容量が必要であり、複数になるとその
数に応じた容量が必要でこのテーブルがメモリ容量を圧
迫していた。
When the controlling process receives the create message, it needs to remember its originating processor. Even if only one subpool is stored, a capacity for the number of all processors is required, and when there are a plurality of processors, a capacity corresponding to the number is required, and this table has pressed the memory capacity.

【0035】また、従来の方式によれば、制御プロセス
が状態の変更が完了したことを確認することができな
い。すなわち、ある状態変更メッセージを送信した場
合、有限時間内に全ての子プロセスの状態変更が完了す
ることは保証できるが、変更の完了を検出することはで
きない。そのため、制御プロセスによる状態制御が適切
に実行されない恐れも生じる。
Further, according to the conventional method, the control process cannot confirm that the state change has been completed. That is, when a certain state change message is transmitted, it can be guaranteed that the state changes of all child processes are completed within a finite time, but the completion of the change cannot be detected. Therefore, the state control by the control process may not be properly performed.

【0036】(2)追い越しがある場合に特有な課題 メッセージの追い越しがあるシステムの場合には、上述
の問題に加えて、さらに以下のような問題もある。
(2) Special Issue When There is Overtaking In the case of a system that has an overtaking message, in addition to the above problems, there are the following problems.

【0037】状態変更メッセージの受信を管理するカウ
ンタをサブプール毎に用意しなければならず、このカウ
ンタの操作が非常に複雑であり、また、この情報もメモ
リ容量の圧迫を引き起こす原因となっていた。
A counter for managing the reception of the status change message must be prepared for each subpool, and the operation of this counter is extremely complicated, and this information also causes a pressure on the memory capacity. .

【0038】また、取り扱う状態が2状態に限定されて
おり、これより多い状態を取り扱うシステムに適用する
ことができない。
Moreover, the number of states to be handled is limited to two, and it cannot be applied to a system handling more states.

【0039】(3)目的 本発明は、以上の点を考慮してなされたものであり、状
態変更処理期間以外に行なう状態変更のための準備処理
が不要な、状態変更処理のために必要なメモリ容量が少
ない、しかも、制御プロセスが状態変更の完了を検出す
ることができる、取り扱うことができる状態数が制限さ
れないプロセス状態変更方式を提供しようとするもので
ある。
(3) Purpose The present invention has been made in consideration of the above points, and is necessary for the state change processing, which does not require the preparation processing for the state change performed outside the state change processing period. It is an object of the present invention to provide a process state change method which has a small memory capacity and which can detect the completion of the state change by the control process and has an unlimited number of states that can be handled.

【0040】[0040]

【課題を解決するための手段】かかる課題を解決するた
め、本発明においては、非同期メッセージ通信によって
プロセッサ間処理を行なうマルチプロセッサシステムの
プロセス状態変更方式であって、1個の制御プロセスと
1個以上の子プロセスからなるプロセスプールの、各プ
ロセッサに存在するサブプールの状態を、制御プロセス
が、各プロセッサの状態変更部を制御して変更させるプ
ロセス状態変更方式を、以下の第1ないし第6の処理に
よって実現した。
In order to solve such a problem, according to the present invention, there is provided a process state changing method for a multiprocessor system which performs inter-processor processing by asynchronous message communication. The process state changing method in which the control process changes the state of the subpool existing in each processor of the process pool including the above child processes by controlling the state changing unit of each processor is described below. Realized by processing.

【0041】第1の処理:全てのプロセッサに状態変更
メッセージを送信する制御プロセスが行なう処理。
First processing: processing performed by a control process that sends a state change message to all processors.

【0042】第2の処理:各プロセッサの状態変更部が
状態変更メッセージを受信したときに行なう処理であっ
て、当該プロセッサに状態変更が求められたサブプール
が存在する場合にそのサブプールの状態を変更させて変
更済みメッセージを制御プロセスに送信すると共に状態
変更中情報を記憶し、当該プロセッサに状態変更が求め
られたサブプールが存在しない場合に状態変更中情報を
記憶する処理。
Second process: This process is performed when the state change unit of each processor receives a state change message, and changes the state of the subpool if the subpool for which the state change is requested exists in the processor. And sending a changed message to the control process and storing the state-changing information, and storing the state-changing information when the subpool for which the state change is requested does not exist in the processor.

【0043】第3の処理:状態変更中情報を記憶してい
る状態で他のプロセッサから子プロセスが与えられた場
合に、受信した子プロセスの状態を変更し、変更済みメ
ッセージを制御プロセスに送信する、各プロセッサの状
態変更部が行なう処理。
Third processing: When a child process is given from another processor in a state where the state-changing information is stored, the state of the received child process is changed and a changed message is sent to the control process. The process performed by the state change unit of each processor.

【0044】第4の処理:受信した全ての変更済みメッ
セージに基づいてプロセスプールの状態の変更の完了を
監視し、完了を検出したときに、全てのプロセッサに完
了メッセージを送信する、制御プロセスが行なう処理。
Fourth processing: A control process, which monitors completion of the change of the state of the process pool based on all the changed messages received and sends a completion message to all the processors when the completion is detected. The process to perform.

【0045】第5の処理:各プロセッサの状態変更部
が、完了メッセージを受信した場合に行なう処理であっ
て、状態変更中情報を削除すると共に、完了メッセージ
に対する到着確認メッセージを制御プロセスに送信する
処理。
Fifth process: This is a process performed by the state changing unit of each processor when a completion message is received. The state changing information is deleted and an arrival confirmation message for the completion message is sent to the control process. processing.

【0046】第6の処理:全てのプロセッサから到着確
認メッセージを受信したとき、プロセスプールの状態変
更処理を終了させる制御プロセスが行なう処理。
Sixth processing: Processing performed by the control process which terminates the state change processing of the process pool when the arrival confirmation message is received from all the processors.

【0047】[0047]

【作用】本発明において、あるプロセスプールの状態の
変更が必要になると、制御プロセスは、全てのプロセッ
サに状態変更メッセージを送信する(第1の処理)。
In the present invention, when it is necessary to change the state of a certain process pool, the control process sends a state change message to all processors (first process).

【0048】このとき、各プロセッサの状態変更部は、
当該プロセッサに状態変更が求められたサブプールが存
在する場合にはそのサブプールの状態を変更させて変更
済みメッセージを制御プロセスに送信すると共に状態変
更中情報を記憶し、当該プロセッサに状態の変更が求め
られたサブプールが存在しない場合には状態変更中情報
を記憶する(第2の処理)。
At this time, the state changing unit of each processor
If there is a subpool for which the state change is required for the processor, the state of the subpool is changed, the changed message is sent to the control process, the state change information is stored, and the state change is requested by the processor. When the created sub-pool does not exist, the status change information is stored (second process).

【0049】なお、各プロセッサの状態変更部は、状態
変更中情報を記憶している状態で、他のプロセッサから
子プロセスが与えられた場合にはその子プロセスの状態
を変更し、変更済みメッセージを制御プロセスに送信す
る(第3の処理)。
The state changing section of each processor changes the state of the child process when another process gives a child process in a state where the state change information is stored, and the changed message is displayed. Send to the control process (third processing).

【0050】制御プロセスは、状態変更メッセージの送
信後、変更済みメッセージの受信を待ち受けており、受
信すると、受信した全ての変更済みメッセージに基づい
てプロセスプールの状態変更の完了を監視し、完了を検
出したときに全てのプロセッサに完了メッセージを送信
する(第4の処理)。
After transmitting the state change message, the control process waits for the reception of the changed message. When the control process receives the change message, the control process monitors the completion of the state change of the process pool based on all the received changed messages and confirms the completion. When detected, a completion message is sent to all the processors (fourth processing).

【0051】各プロセッサの状態変更部は、完了メッセ
ージを受信すると、状態変更中情報を削除すると共に、
完了メッセージに対する到着確認メッセージを制御プロ
セスに送信する(第5の処理)。
Upon receipt of the completion message, the state change section of each processor deletes the state-changing information and
An arrival confirmation message for the completion message is sent to the control process (fifth processing).

【0052】制御プロセスは、全てのプロセッサから到
着確認メッセージを受信することによって、プロセスプ
ールの状態の変更処理を終了する(第6の処理)。
The control process ends the process for changing the state of the process pool by receiving the arrival confirmation message from all the processors (sixth process).

【0053】[0053]

【実施例】以下、本発明の一実施例を図面を参照しなが
ら詳述する。なお、計算モデルは「従来の技術」の項で
説明した通りである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings. The calculation model is as described in the section “Prior Art”.

【0054】(1)テーブル この実施例において、各プロセッサは、テーブルとし
て、制御プロセス用重テーブル及びサブプール用重みテ
ーブルを有する。すなわち、従来とは異なり、サブプー
ルテーブルは設けられていない。
(1) Table In this embodiment, each processor has a control process weight table and a sub-pool weight table as tables. That is, unlike the conventional case, the sub-pool table is not provided.

【0055】(1-1) 制御プロセス用重みテーブル この実施例の制御プロセス用重みテーブルは、図18に
示すように、3個のフィールドからなっている。第1フ
ィールドには当該プロセッサに存在する制御プロセスに
係るプロセスプールのIDが格納されている。第2フィ
ールドには、制御プロセスに付与された重みが格納され
ている。第3フィールドは、状態変更処理時の作業エリ
アとして用いられるものであり、状態変更処理時の状態
変更が完了した分の子プロセスの重みや後述する到着確
認メッセージの受信していない数などを格納する。
(1-1) Control Process Weight Table The control process weight table of this embodiment is composed of three fields, as shown in FIG. The ID of the process pool related to the control process existing in the processor is stored in the first field. The weight assigned to the control process is stored in the second field. The third field is used as a work area at the time of the status change processing, and stores the weight of the child process for the status change completed at the time of the status change processing, the number of arrival confirmation messages to be described later not received, and the like. To do.

【0056】図18は、IDが0、12、3250及び
4000の制御プロセスについて、それぞれ重み−30
0、−8200、−5900及び−75が格納され、I
Dが3250のプロセスプールについては子プロセスの
状態の変更処理中であって重みが−3700分の子プロ
セスについて状態の変更が完了していることを示してい
る。
FIG. 18 shows that the control processes with IDs 0, 12, 3250 and 4000 respectively have a weight of -30.
0, -8200, -5900 and -75 are stored, and I
For the process pool with D of 3250, the state change of the child process is in process, and the state change has been completed for the child process with a weight of -3700.

【0057】(1-2) サブプール用重みテーブル この実施例のサブプール用重みテーブルは、図19に示
すように、3個のフィールドからなっている。第1フィ
ールドには当該プロセッサに存在するサブプールに係る
プロセスプールのIDが格納されている。第2フィール
ドには、サブプールに付与された重みが格納されてい
る。第3フィールドは新状態フィールドであって状態変
更中の新しい状態を格納している。新状態フィールドに
状態が書かれているときは、そのサブプールが状態変更
中であることを意味する。なお、後述するように、メッ
セージの追い越しがある場合には、新状態フィールドに
状態変更メッセージの受信待ちにあることが格納される
ことがある。
(1-2) Sub-pool weight table The sub-pool weight table of this embodiment is made up of three fields as shown in FIG. The ID of the process pool related to the subpool existing in the processor is stored in the first field. The weight given to the sub-pool is stored in the second field. The third field is a new state field and stores a new state which is being changed. When a state is written in the new state field, it means that the subpool is undergoing a state change. As will be described later, when a message is overtaken, it may be stored in the new state field indicating that it is waiting to receive a state change message.

【0058】図19は、IDが3、55、2300及び
7214のサブプールについてそれぞれ重み3100、
55、209、20340が格納され、IDが2300
のサブプールについては状態bへの変更中であることを
示している。
FIG. 19 shows that weights 3100 and 3100 are assigned to the subpools with IDs 3, 55, 2300 and 7214, respectively.
55, 209 and 20340 are stored and the ID is 2300
It is indicated that the sub-pool of is being changed to the state b.

【0059】この実施例のサブプール用重みテーブルに
も、上述したようにサブプールのIDが格納されている
ので、当該プロセッサに存在するサブプールの検索や、
あるサブプールが当該プロセッサに存在するか否かの確
認に用いられる。
Since the subpool ID is also stored in the subpool weight table of this embodiment as described above, it is possible to search for a subpool existing in the processor,
It is used to check whether a certain subpool exists in the processor.

【0060】(2)子プロセスの送受信処理 (2-1) 子プロセスの送信処理 子プロセスを送信しようとするときには、サブプール用
重みテーブルを検索し、そのIDの子プロセスの状態の
変更処理中であるか否かを判別する。すなわち、新状態
フィールドに状態が記憶されているか否かを判別する。
状態変更中でない場合には、上述したWTC方式に従
い、子プロセスに重みを付けて送信する。この際には、
サブプールの重みをその分だけ減じる。すなわち、サブ
プール用重みテーブルの重みフィールドの値を更新す
る。なお、この減算によって重みが0になると、サブプ
ール用重みテーブルからそのサブプールを削除する。他
方、サブプール用重みテーブルの検索の結果、状態変更
中であると、状態変更が完了して通常状態(状態変更中
でない状態)になるのを待ち、通常状態になったときに
上述したWTC方式に従った送信を行なう。
(2) Transmission / reception processing of child process (2-1) Transmission processing of child process When a child process is to be transmitted, the weight table for the sub-pool is searched and the state change processing of the child process of that ID is being performed. It is determined whether or not there is. That is, it is determined whether or not the state is stored in the new state field.
If the state is not being changed, the child process is weighted and transmitted according to the above-mentioned WTC method. In this case,
The weight of the subpool is reduced accordingly. That is, the value of the weight field of the sub-pool weight table is updated. When the weight becomes 0 by this subtraction, the sub pool is deleted from the sub pool weight table. On the other hand, as a result of the search of the weight table for the sub-pool, if the state is being changed, the state change is completed and the normal state (state not being changed) is waited for, and when the normal state is reached, the above-mentioned WTC method is used. Send according to.

【0061】(2-2) 子プロセスを受信したときの処理 子プロセスを受信すると、正確には、子プロセスを運ぶ
メッセージを受信すると、まず、サブプール用重みテー
ブルを検索する。すなわち、受信した子プロセスと同じ
IDのサブプールが既に存在しているか又は存在してい
ないかを調べ、存在している場合にはさらに、そのサブ
プールが通常状態にあるのか又は状態変更中であるのか
を調べる。
(2-2) Processing when a child process is received When a child process is received, to be precise, when a message carrying the child process is received, first, the sub-pool weight table is searched. That is, it is checked whether or not a subpool having the same ID as the received child process already exists, and if it exists, whether the subpool is in the normal state or the state is being changed. Find out.

【0062】(2-2-1) 受信した子プロセスと同じIDの
サブプールが存在しない場合には、そのIDを有するサ
ブプールを生成して、サブプール用重みテーブルに登録
する。このとき、受信した子プロセスの重みを生成した
サブプールの重みの初期値とする。
(2-2-1) If the sub-pool having the same ID as the received child process does not exist, a sub-pool having the ID is generated and registered in the sub-pool weight table. At this time, the received weight of the child process is used as the initial value of the weight of the generated sub-pool.

【0063】(2-2-2) 受信した子プロセスと同じIDの
サブプールが存在していて、そのサブプールが通常状態
にある場合には、受信した子プロセスの重みをそのサブ
プールの重みに加える。すなわち、サブプール用重みテ
ーブルの重みフィールドの値をその加算値に更新する。
(2-2-2) When a subpool having the same ID as the received child process exists and the subpool is in the normal state, the weight of the received child process is added to the weight of the subpool. That is, the value of the weight field of the sub-pool weight table is updated to the added value.

【0064】(2-2-3) 受信した子プロセスと同じIDの
サブプールが存在していて、そのサブプールが状態変更
中である場合には、子プロセスの状態をサブプール用重
みテーブルの新状態フィールドに書かれている新しい状
態に変える。また、子プロセスが持っていた重みをサブ
プールの重みに加える。さらに、子プロセスが持ってい
た重みを、変更済みメッセージによって制御プロセスへ
送る。この変更済みメッセージは、「この重み分だけ子
プロセスに対して状態の変更を行なった」ということを
伝えるものである。なお、この場合には、状態変更中で
あることの情報を継続してサブプール用重みテーブルに
格納しておく。
(2-2-3) If a subpool having the same ID as the received child process exists and the state of the subpool is being changed, the state of the child process is set to the new state field of the subpool weight table. Change to the new state described in. In addition, the weight of the child process is added to the weight of the subpool. Further, the weight held by the child process is sent to the control process by the changed message. This changed message conveys that "the state has been changed for the child process by this weight". In this case, the information that the status is being changed is continuously stored in the sub-pool weight table.

【0065】図20は、IDが8、重みが350であっ
て状態bへの変更処理中にあるサブプールを有するプロ
セッサが、他のプロセッサから送信された重みが50、
IDが8、状態がaの子プロセスを受信したため、サブ
プール用重みテーブルの重みを400に更新すると共
に、制御プロセスに重みが50の変更済みメッセージを
送信した場合を示している。
FIG. 20 shows that a processor having an ID of 8 and a weight of 350, which has a subpool in the process of changing to the state b, has a weight of 50 transmitted from another processor.
Since the child process whose ID is 8 and whose status is a is received, the weight of the sub-pool weight table is updated to 400, and a changed message with a weight of 50 is sent to the control process.

【0066】なお、制御プロセスは、変更済みメッセー
ジを受信した場合には、制御プロセス用重みテーブルの
作業エリアの重みを更新する。
When the control process receives the changed message, it updates the weight of the work area in the control process weight table.

【0067】(3)状態変更処理 次に、プロセスプールの全ての子プロセスの状態を変更
する処理について説明する。メッセージの追い越しがな
いシステムの場合及びメッセージの追い越しがあり得る
システムの場合共に、状態変更処理の特徴部分は同じで
あるが、以下では場合を分けて説明する。
(3) State Change Process Next, a process for changing the state of all child processes in the process pool will be described. The characteristic part of the state change processing is the same in both the system in which there is no message overtaking and the system in which there is message overtaking, but the case will be described separately below.

【0068】(3-1) メッセージの追い越しがない場合 (3-1-1) 一般的な処理の流れ メッセージの追い越しがないシステムの状態変更処理
を、図1のフローチャーを参照しながら詳述する。な
お、図1(A)は制御プロセスの処理を示しており、図
1(B)はプロセッサ(ソフトウェア、ハードウェア、
ファームウェアのいずれで実現されていようがプロセッ
サの状態変更部と呼ぶべきであるかも知れないが、以下
でもプロセッサと呼ぶ)の処理を示している。また、図
1では「メッセージ」を略して「MS」で表している。
(3-1) When there is no message overtaking (3-1-1) General processing flow Detailed description will be given of the system state change processing without message overtaking with reference to the flowchart of FIG. To do. Note that FIG. 1A shows the processing of the control process, and FIG. 1B shows the processor (software, hardware,
It may be realized by any of the firmware and should be called a state change unit of the processor, but it is also called a processor hereinafter). Further, in FIG. 1, “message” is abbreviated and represented by “MS”.

【0069】あるプロセスプールについて状態変更の必
要が生じると、制御プロセスは図1(A)に示す処理を
開始する。そして、まず、全てのプロセッサに対して新
しい状態を運ぶ状態変更メッセージを送信すると共に
(ステップ100)、制御プロセス用重みテーブルのそ
のサブプールの重みフィールドの値(重み)を作業エリ
アフィールドに複写する(ステップ101)。作業エリ
アの重みは、状態変更が未だなされていない子プロセス
の重みの合計を示すものである。その後、制御プロセス
は、変更済みメッセージの受信待ち状態に進む(ステッ
プ102)。なお、全てのプロセッサが送信先である点
は従来とは異なる。また、状態変更メッセージに重みを
付与する必要がない。
When it becomes necessary to change the state of a process pool, the control process starts the process shown in FIG. Then, first, a state change message carrying a new state is transmitted to all the processors (step 100), and the value (weight) of the weight field of the sub-pool in the control process weight table is copied to the work area field ( Step 101). The work area weight indicates the sum of the weights of the child processes whose state has not been changed yet. The control process then proceeds to wait for the modified message (step 102). Note that all the processors are destinations, which is different from the conventional case. Further, it is not necessary to give a weight to the state change message.

【0070】状態変更メッセージを受信した各プロセッ
サは、図1(B)に示す処理を開始する。そしてまず、
状態変更が指示されたサブプールが存在するか否かを、
サブプール用重みテーブルを用いて調べる(ステップ2
00)。
Each processor that has received the status change message starts the processing shown in FIG. And first,
Whether there is a subpool for which status change is instructed,
Check using the subpool weight table (step 2
00).

【0071】サブプールが存在した場合には、そのサブ
プールに属する全ての子プロセスの状態を状態変更メッ
セージが示す新しい状態に変更し(ステップ201)、
サブプール用重みテーブルの新状態フィールドにその新
しい状態を書き込む(ステップ202)。その後、サブ
プールが持っていた重みを全て付けた変更済みメッセー
ジを制御プロセスへ返信する(ステップ203)。上述
したように、サブプールが持っていた重みを全て付けた
変更済みメッセージは、「この重みの子プロセス分だけ
状態の変更を行なった」ことを意味している。なお、サ
ブプール用重みテーブルの重みをこの送信後にも保持し
ておく。
If the subpool exists, the state of all child processes belonging to the subpool is changed to a new state indicated by the state change message (step 201),
The new state is written in the new state field of the weight table for sub-pool (step 202). After that, the changed message with all the weights held by the subpool is returned to the control process (step 203). As described above, the changed message with all the weights held by the subpool means that "the state has been changed for the child processes of this weight". The weights in the sub-pool weight table are retained even after this transmission.

【0072】他方、サブプールが存在しなかった場合に
は、そのサブプールをサブプール用重みテーブルに登録
した後(ステップ204)、状態変更メッセージが示す
プロセスプールが状態変更中であることをサブプール用
重みテーブルに書込む(ステップ205)。すなわち、
プロセッサは、重みフィールドには0を、新状態フィー
ルドには新しい状態を書込む。その後、メッセージの受
信待ち状態に進む(ステップ206)。
On the other hand, if the sub-pool does not exist, after registering the sub-pool in the weight table for sub-pool (step 204), it is confirmed that the process pool indicated by the status change message is undergoing status change. (Step 205). That is,
The processor writes a 0 in the weight field and a new state in the new state field. After that, the process proceeds to a message reception waiting state (step 206).

【0073】制御プロセスは、上述したように、状態変
更メッセージを送信した後は変更済みメッセージの受信
待ち状態に進み、いづれかのプロセスからの変更済みメ
ッセージを受信すると、その変更済みメッセージに付与
されている重みを制御プロセス用重みテーブルの作業エ
リアに格納されている重みに加算した後(ステップ10
3)、加算後の重みが全ての子プロセスの状態変更が完
了したことを表す0であるか否かを判別スル(ステップ
104)。0でない場合には、変更済みメッセージの受
信待ち状態に戻る変更済みメッセージの受信が進に従っ
て、作業エリアの重みは0に近づいていき、やがて0と
なってステップ104で肯定結果が得られる。
As described above, the control process proceeds to the waiting state for receiving the changed message after transmitting the state change message, and when the changed message from any process is received, it is added to the changed message. After adding the existing weight to the weight stored in the work area of the control process weight table (step 10
3) It is determined whether or not the weight after addition is 0, which indicates that the state changes of all the child processes are completed (step 104). If it is not 0, the weight of the work area approaches 0 as the reception of the changed message returns to the waiting state for the changed message, and eventually becomes 0, and a positive result is obtained in step 104.

【0074】このときには、制御プロセスは、全てのプ
ロセッサに対して完了メッセージを送信する(ステップ
105)。ここで、完了メッセージとは、「そのIDの
全ての子プロセスの状態変更が完了したことを伝えるメ
ッセージ」である。その後、送信した完了メッセージ数
(プロセッサ数に等しい:図1ではTで表している)
を、制御プロセス用重みテーブルの作業エリアに書込む
(ステップ106)。そして、到着確認メッセージの受
信待ち状態に進む(ステップ107)。
At this time, the control process sends a completion message to all the processors (step 105). Here, the completion message is a "message which notifies that the state changes of all child processes of that ID have been completed". After that, the number of completed messages sent (equal to the number of processors: represented by T in FIG. 1)
Is written in the work area of the control process weight table (step 106). Then, the process goes to the waiting state for the arrival confirmation message (step 107).

【0075】プロセッサが、新しい状態を格納すること
で状態変更中であることをサブプール用重みテーブルに
設定した後のメッセージ受信待ち状態(ステップ20
6)において、メッセージを受信すると受信したメッセ
ージの種別を判別する(ステップ207)。この状態変
更中のサブプールに対して送信されてくるメッセージ
は、子プロセスを運搬するメッセージ又は完了メッセー
ジである。
The processor waits for message reception after setting the status change in the sub-pool weight table by storing a new status (step 20).
In 6), when the message is received, the type of the received message is determined (step 207). The message sent to the subpool whose state is changing is a message for carrying a child process or a completion message.

【0076】子プロセスを運搬するメッセージである
と、上述した子プロセスの受信処理で説明した処理を行
なう(ステップ208)。すなわち、子プロセスの状態
を新しい状態に変え、子プロセスが持っていた重みをサ
ブプールの重みに加え、子プロセスが持っていた重み
を、変更済みメッセージによって制御プロセスへ送る。
その後、メッセージの受信待ち状態に戻る。
If the message conveys a child process, the processing described in the above-mentioned child process reception processing is performed (step 208). That is, the state of the child process is changed to a new state, the weight held by the child process is added to the weight of the subpool, and the weight held by the child process is sent to the control process by the changed message.
After that, the process returns to the message reception waiting state.

【0077】子プロセスを運搬するメッセージを状態変
更中に受信したか否かに拘らず、完了メッセージは必ず
受信する。このときには、プロセッサは、サブプール用
重みテーブルの重みフィールドの重みが0であるか否か
を判断する(ステップ209)。すなわち、状態変更メ
ッセージの受信時において当該プロセッサにサブプール
が存在せず、新状態を記憶するためにサブプール用重み
テーブルに追加登録されたサブプール(ステップ204
参照)であるか否かを確認する。
The completion message is always received, regardless of whether the message carrying the child process was received during the state change. At this time, the processor determines whether the weight of the weight field of the sub-pool weight table is 0 (step 209). That is, when the state change message is received, the sub-pool does not exist in the processor, and the sub-pool additionally registered in the weight table for the sub-pool to store the new state (step 204
See).

【0078】重みが0でない場合には、すなわち、状態
変更メッセージの受信時において当該プロセッサに存在
していたサブプールについては、サブプール用重みテー
ブルの新状態フィールドに格納されている状態を削除す
ることでそのサブプールを状態変更中から通常状態に復
帰させた後(ステップ210)、完了メッセージに対す
る到着確認メッセージを制御プロセスに返信して一連の
処理を終了する(ステップ211)。
If the weight is not 0, that is, for the subpool existing in the processor at the time of receiving the state change message, the state stored in the new state field of the subpool weight table is deleted. After the subpool is returned from the state change to the normal state (step 210), an arrival confirmation message for the completion message is returned to the control process and a series of processing is ended (step 211).

【0079】他方、重みが0か否かの判断で重みが0で
あるという結果を得ると、サブプール用重みテーブルか
らそのサブプールを削除した後(ステップ212)、完
了メッセージに対する到着確認メッセージを制御プロセ
スに返信して一連の処理を終了する(ステップ21
1)。
On the other hand, if it is determined whether or not the weight is 0, that the weight is 0, the sub pool is deleted from the sub pool weight table (step 212), and then the arrival confirmation message for the completion message is processed by the control process. To end the series of processing (step 21).
1).

【0080】制御プロセスは、いずれかのプロセッサか
らの到着確認メッセージを受信すると、制御プロセス用
重みテーブルの作業エリアフィールドに格納されている
完了メッセージ送信数Tを1デクリメントした後(ステ
ップ108)、その値Tが0か否かを確認する(ステッ
プ109)。0でない場合には、到着確認メッセージの
受信待ち状態に戻る。このような処理を繰返すうちに全
てのプロセッサからの到着確認メッセージを受信して完
了メッセージ送信数(到着確認メッセージ数)Tが0と
なり、このときには制御プロセス用重みテーブルの作業
エリアフィールドをリセットして一連の処理を終了する
(ステップ110)。
When the control process receives the arrival confirmation message from any of the processors, after decrementing the completion message transmission number T stored in the work area field of the control process weight table by 1 (step 108), It is confirmed whether or not the value T is 0 (step 109). If it is not 0, the process returns to the waiting state for receiving the arrival confirmation message. While repeating such processing, arrival confirmation messages from all processors are received and the number of completed message transmissions (arrival confirmation message number) T becomes 0. At this time, the work area field of the control process weight table is reset. A series of processing is ended (step 110).

【0081】(3-1-2) 状態変更処理とサブプールの終了 以上、プロセスプールに属する全ての子プロセスの状態
を変更する基本的な処理の流れを説明したが、このよう
な状態変更の処理中にサブプール(子プロセス)が終了
することがある。以下では、サブプールの終了と状態変
更処理との関係を説明する。
(3-1-2) State Change Processing and Termination of Subpool The basic processing flow for changing the states of all child processes belonging to the process pool has been described above. A subpool (child process) may end during the process. Below, the relationship between the end of the sub-pool and the state change processing will be explained.

【0082】状態変更中であるサブプールが終了した場
合には、プロセッサは、変更済みメッセージの送信を、
状態の変更が完了するのを待って行なう。完了メッセー
ジを受信し、到着確認メッセージを送信した後に終了メ
ッセージを送信する。終了メッセージを先に送信した場
合には、サブプール用重みテーブルからサブプールが削
除されて、上述した完了メッセージを受信した際の処理
を実行し得ないからである。
When the subpool whose state is being changed ends, the processor sends the changed message to
Wait for the state change to complete. The completion message is received, the arrival confirmation message is transmitted, and then the termination message is transmitted. This is because when the end message is transmitted first, the subpool is deleted from the subpool weight table, and the processing when the completion message is received cannot be executed.

【0083】状態変更中ではないサブプールが終了した
場合には、プロセッサは通常の終了処理を行なう。すな
わち、制御プロセスに終了メッセージを送信し、終了し
たサブプールをサブプール用重みテーブルから削除す
る。
When the subpool whose status is not being changed is terminated, the processor performs a normal termination process. That is, a termination message is sent to the control process, and the terminated subpool is deleted from the subpool weight table.

【0084】状態変更中に終了メッセージを制御プロセ
スが受信した場合は、制御プロセス用重みテーブルの重
みフィールド及び作業エリアフィールドの両者の重み
を、終了メッセージに付与されていた重み分更新する。
この結果、作業エリアフィールドの重みが0になった場
合にも、全ての子プロセスの状態変更が完了したとして
完了メッセージの送信処理に進む。
When the control process receives the termination message during the state change, the weights of both the weight field and the work area field of the control process weight table are updated by the weight assigned to the termination message.
As a result, even when the weight of the work area field becomes 0, it is determined that the state changes of all the child processes have been completed, and the process proceeds to the completion message transmission process.

【0085】(3-1-3) 具体例での説明 次に、図21ないし図25を参照しながら、プロセス状
態変更処理を具体例を用いて説明する。
(3-1-3) Description of Specific Example Next, the process state changing process will be described using a specific example with reference to FIGS. 21 to 25.

【0086】図21は、状態をaからbへ変更させる状
態変更メッセージが送信された時点において、状態変更
の対象のサブプールが存在するプロセッサがPEi及び
PEjの2個であって、プロセッサPEjからプロセッ
サPEiに向かう子プロセス(運搬メッセージ)と、プ
ロセッサPEjからプロセッサPEkに向かう子プロセ
スとが存在している例を示している。
FIG. 21 shows that when the state change message for changing the state from a to b is sent, the number of processors in which the sub-pool of the state change exists is PEi and PEj. An example in which a child process (carrying message) directed to PEi and a child process directed from processor PEj to processor PEk exist is shown.

【0087】サブプールが存在するプロセッサPEi及
びPEjはそれぞれ状態変更メッセージを受信すると、
図22に示すように、サブプールの状態をaからbに変
更した後、サブプールの重み2000、1650を付与
した変更済みメッセージを制御プロセスに返信すると共
に、状態変更中であることをサブプール用重みテーブル
に格納する。一方、サブプールが存在しないプロセッサ
PEkは、図示しない他のプロセッサと同様に、状態変
更メッセージを受信すると、図22に示すように、その
サブプールをサブプール用重みテーブルに登録して状態
変更中であることをサブプール用重みテーブルに格納す
る。この段階で送信された変更済みメッセージを制御プ
ロセスが受信しても、通信中の子プロセスが存在するた
め、制御プロセス用重みテーブルの作業エリアの重みは
0にはならない。
When the processors PEi and PEj in which the sub-pool exists receive the state change message,
As shown in FIG. 22, after changing the state of the sub-pool from a to b, the changed message with the sub-pool weights 2000 and 1650 is returned to the control process, and the state change is in progress. To store. On the other hand, when the processor PEk that does not have a sub-pool receives the state change message as in the case of other processors not shown, it is registered in the weight table for sub-pool and is in the state change as shown in FIG. Is stored in the sub-pool weight table. Even if the control process receives the changed message transmitted at this stage, the weight of the work area in the control process weight table does not become 0 because there is a child process in communication.

【0088】状態変更中であることをサブプール用重み
テーブルに格納した後、子プロセスを受信したプロセッ
サPEi及びPEkはそれぞれ、図23に示すように、
受信した子プロセスの状態を新しい状態bに変更すると
共に、受信した子プロセスの重みを付与した変更済みメ
ッセージを制御プロセスに送信する。この送信後も状態
変更中であることを維持する。勿論、プロセッサPEi
及びPEkはそれぞれ、子プロセスを受信すると、サブ
プール用重みテーブルの重みフィールドの値を更新す
る。
After storing the fact that the state is being changed in the sub-pool weight table, each of the processors PEi and PEk which has received the child process, as shown in FIG.
The state of the received child process is changed to the new state b, and the changed message with the weight of the received child process is sent to the control process. Even after this transmission, the state is being changed. Of course, processor PEi
And PEk respectively update the value of the weight field of the sub-pool weight table when receiving the child process.

【0089】これらの状態変更メッセージを受信して作
業エリアの重みの更新処理を行なうと、その重みは0に
なる。このとき、制御プロセスは、図24に示すよう
に、これらプロセッサPEi及びPEkだけでなく全て
のプロセッサに対して完了メッセージを送信する。ま
た、制御プロセスは完了メッセージの送信数Tを作業エ
リアに格納する。
When these status change messages are received and the work area weight is updated, the weight becomes zero. At this time, the control process sends a completion message to not only these processors PEi and PEk but also all the processors, as shown in FIG. The control process also stores the number T of completion message transmissions in the work area.

【0090】子プロセスが属しているサブプールが存在
する各プロセッサPEi、PEj、PEkは完了メッセ
ージを受信すると、図25に示すように、状態変更中を
通常状態に復帰させた後到着確認メッセージを制御プロ
セスに返信して一連の処理を終了する。子プロセスがな
いサブプール(重み0でテーブルに登録されている)が
存在する図示しない他の各プロセッサは完了メッセージ
を受信すると、テーブルからサブプールを削除した後、
到着確認メッセージを制御プロセスに返信して一連の処
理を終了する。制御プロセスは、完了メッセージを送信
した数Tだけ到着確認メッセージを受信して作業エリア
の値が0になると、作業エリアをクリアして一連の処理
を終了する。
When each processor PEi, PEj, PEk in which the sub-pool to which the child process belongs exists, receives the completion message, controls the arrival confirmation message after returning the state under change to the normal state, as shown in FIG. Reply to the process and end the series of processes. Each of the other processors (not shown) in which there is a subpool with no child process (registered in the table with a weight of 0) receives the completion message, and after deleting the subpool from the table,
The arrival confirmation message is returned to the control process, and the series of processing is terminated. The control process receives the arrival confirmation message by the number T of the completion messages transmitted, and when the value of the work area becomes 0, clears the work area and ends the series of processes.

【0091】(3-2) メッセージの追い越しがある場合 上述したメッセージの追い越しがない場合の強制終了方
式を、メッセージの追い越しがある場合にそのまま適用
することはできない。以下では、変更する処理部分につ
いて説明する。
(3-2) When there is a message overtaking The above-mentioned forced termination method when there is no message overtaking cannot be directly applied when there is a message overtaking. The processing part to be changed will be described below.

【0092】メッセージの追い越しが問題になるのは、
完了メッセージが状態変更メッセージを追い越してしま
う場合(サブプールが存在しないプロセッサについての
み生じる現象である)と、終了メッセージが到着確認メ
ッセージを追い越してしまう場合である。到着確認メッ
セージ同士の追い越しは同一のメッセージであるため、
問題となることはない。
The problem of message passing is that
There are cases where the completion message overtakes the state change message (a phenomenon that occurs only for processors without subpools) and cases where the end message overtakes the arrival confirmation message. Since the arrival confirmation messages are the same message overtaking each other,
There is no problem.

【0093】(3-2-1) 完了メッセージによる状態変更メ
ッセージの追い越し 追い越しした完了メッセージの受信時の処理を規定して
いない場合には、このような追い越した完了メッセージ
や追い越された状態変更メッセージの受信によってシス
テムが暴走する等の不都合を生じる。そのため、メッセ
ージの追い越しがある場合には、完了メッセージが状態
変更メッセージを追い越した際の処理を明確に規定して
おくことを要する。
(3-2-1) Overtaking of a status change message by a completion message When the processing at the time of receiving an overtaking completion message is not specified, such an overtaking completion message or an overtaken status change message is sent. The reception of the message causes inconvenience such as system runaway. Therefore, when there is an overtaking of a message, it is necessary to clearly specify the processing when the completion message overtakes the state change message.

【0094】まず、完了メッセージをプロセッサが受信
した場合の処理を説明する。完了メッセージを受信した
場合には、単純に到着確認メッセージを送信するのでは
なく、状態変更メッセージを受信しているか否かを調
べ、未受信であったならば状態変更メッセージの受信を
待って到着確認メッセージを送信する必要がある。状態
変更メッセージの受信済み/未受信は、サブプール用重
みテーブルを検索することによって調べることができ
る。該当するIDが登録されていて、新状態フィールド
に状態が格納されていれば(すなわち状態変更中であれ
ば)受信済みであり、これ以外の場合には未受信であ
る。
First, the processing when the processor receives the completion message will be described. When a completion message is received, instead of simply sending an arrival confirmation message, check whether or not the state change message is received, and if it is not received, wait for the state change message to arrive and arrive. You need to send a confirmation message. Whether or not the state change message has been received can be checked by searching the weight table for sub-pool. If the corresponding ID is registered and the state is stored in the new state field (that is, if the state is being changed), it has been received, and in other cases, it has not been received.

【0095】従って、プロセッサの処理は以下のように
なる。まず、状態変更メッセージの受信済み/未受信を
調べる。その結果、受信済みの場合(追い越しがなかっ
た場合)には追い越しがない場合と同様に処理する。未
受信の場合(追い越しがあった場合)には、完了メッセ
ージが示すIDのサブプールが存在するか否かを判断
し、存在する場合には直ちに、存在しない場合にはテー
ブルにそのサブプールを登録した後に、新状態フィール
ドに「状態変更メッセージ待ち」を書込む。なお、サブ
プールが登録されていない場合において登録する際には
重みフィールドに0を書く。
Therefore, the processing of the processor is as follows. First, it is checked whether or not the status change message has been received. As a result, when it has been received (when there is no overtaking), it is processed in the same manner as when there is no overtaking. When not received (when there is overtaking), it is determined whether or not the subpool with the ID indicated by the completion message exists. If it exists, the subpool is registered immediately in the table. Later, write "waiting for status change message" in the new status field. When the subpool is not registered, 0 is written in the weight field when registering it.

【0096】次に、状態変更メッセージをプロセッサが
受信した場合の処理を説明する。状態変更メッセージを
受信した場合にも完了メッセージの受信済み/未受信に
よって異った処理を行なう。完了メッセージの受信済み
/未受信は、サブプール用重みテーブルを検索すること
によって調べることができる。すなわち、該当するID
の新状態フィールドに「状態変更メッセージ待ち」が書
き込まれていたならば受信済み、それ以外は未受信であ
る。
Next, the processing when the processor receives the status change message will be described. Even when the status change message is received, different processing is performed depending on whether the completion message has been received or not. Whether or not the completion message has been received can be checked by searching the weight table for the sub-pool. That is, the corresponding ID
If "waiting for status change message" is written in the new status field of, it has been received, otherwise it has not been received.

【0097】従って、プロセッサの処理は、以下のよう
になる。まず、完了メッセージの受信済み/未受信を調
べる。その結果、未受信の場合(追い越しがなかった場
合)には追い越しがない場合と同様に処理する。完了メ
ッセージが受信済みの場合(追い越しがあった場合)に
は、追い越しがない場合の完了メッセージを受信した際
の処理を行なう。すなわち、重みフィールドが0でなけ
れば新状態フィールドをクリアして通常状態に戻すと共
に、完了メッセージの到着確認メッセージを制御プロセ
スに送信し、重みフィールドが0の場合にはそのサブプ
ールの登録をテーブルから削除した後、完了メッセージ
の到着確認メッセージを制御プロセスに送信する。
Therefore, the processing of the processor is as follows. First, it is checked whether or not the completion message has been received. As a result, when not received (when there is no overtaking), the same process as when there is no overtaking is performed. When the completion message has been received (when there is overtaking), the processing when the completion message is received when there is no overtaking is performed. That is, if the weight field is not 0, the new state field is cleared to return to the normal state, and the arrival confirmation message of the completion message is sent to the control process. After the deletion, send the arrival confirmation message of the completion message to the control process.

【0098】(3-2-2) 終了メッセージによる到着確認メ
ッセージの追い越し 上述したように、状態変更中であるサブプールが終了し
た場合には、プロセッサは、到着確認メッセージを送信
した後に終了メッセージを送信する。しかし、メッセー
ジの追い越しがあるシステムの場合には、終了メッセー
ジが先に制御プロセスに届くことがある。この終了メッ
セージの受信によっては、制御プロセス用重みテーブル
からそのサブプールが削除されることもある。この後に
到着確認メッセージが制御プロセスで受信されても、制
御プロセスはどのような処理を実行すれば良いかが明確
ではなく、暴走の恐れがある。そのため、メッセージの
追い越しがある場合には、終了メッセージが到着確認メ
ッセージを追い越した際の処理を明確に規定しておくこ
とを要する。
(3-2-2) Overtaking Arrival Confirmation Message by End Message As described above, when the subpool whose state is being changed is terminated, the processor transmits the arrival confirmation message and then transmits the termination message. To do. However, in the case of a system in which a message is overtaken, the termination message may reach the control process first. Depending on the reception of this end message, the sub-pool may be deleted from the control process weight table. Even if the arrival confirmation message is received by the control process after this, it is not clear what process the control process should execute, and there is a risk of runaway. Therefore, when there is an overtaking of a message, it is necessary to clearly specify the processing when the end message overtakes the arrival confirmation message.

【0099】プロセスプールの終了を確認するには重み
が0になっただけでは不十分であり、全ての到着確認メ
ッセージの受信を確認する必要がある。制御プロセス用
重みテーブルの作業エリアには未受信の到着確認メッセ
ージの数が書かれているので、作業エリアを調べること
によって全ての到着確認メッセージの受信を確認するこ
とができる。
In order to confirm the end of the process pool, it is not enough that the weight becomes 0, and it is necessary to confirm reception of all arrival confirmation messages. Since the number of unacknowledged arrival confirmation messages is written in the work area of the control process weight table, reception of all arrival confirmation messages can be confirmed by checking the work area.

【0100】まず、終了メッセージの受信時の処理を説
明する。制御プロセスは終了メッセージを受信したこと
によってWTC方式に従って重みを更新し、その重みが
0になった場合には、制御プロセス用重みテーブルの作
業エリアを調べる。作業エリアが0の場合には、全ての
到着確認メッセージを受信済みであるので、プロセスプ
ールの終了を検出する。すなわち、プロセスプールのテ
ーブルからの削除を行なう。他方、0でない場合には、
受信していない到着確認メッセージが残っているので、
なんら処理することなく到着確認メッセージを待ち受け
る状態のままとし、重みが0であってもプロセスプール
の終了と検出することを留保しておく。すなわち、プロ
セスプールのテーブルからの削除を実行しない。
First, the processing when the end message is received will be described. The control process updates the weight according to the WTC method by receiving the end message, and when the weight becomes 0, the work area of the control process weight table is checked. When the work area is 0, all the arrival confirmation messages have been received, so the end of the process pool is detected. That is, the process pool is deleted from the table. On the other hand, if it is not 0,
Since there is an arrival confirmation message that has not been received,
The process waits for the arrival confirmation message without any processing, and reserves to detect the end of the process pool even if the weight is 0. That is, the process pool table is not deleted.

【0101】次に、到着確認メッセージの受信時の処理
を説明する。このときには、作業エリアの値を更新して
それが0か否かを判断する。0でない場合には、受信し
ていない到着確認メッセージがあるので、重みフィール
ドの値を調べることなく、次の到着確認メッセージを待
ち受ける状態のままとする。他方、作業エリアの値が更
新により0になると、全ての到着確認メッセージを受信
したので、さらに重みフィールドの値が0か否かを調べ
る。0であれば、そのプロセスプールの終了を検出した
としてテーブルから削除する。他方、重みが0の場合に
は、状態変更は完了したが、プロセスプールは終了して
いるわけではないので、作業エリアをクリアする処理の
みを行なう。
Next, the processing at the time of receiving the arrival confirmation message will be described. At this time, the value of the work area is updated to determine whether it is 0 or not. If it is not 0, there is an arrival confirmation message that has not been received, and therefore the state of waiting for the next arrival confirmation message is kept without checking the value of the weight field. On the other hand, when the value of the work area becomes 0 due to the update, all arrival confirmation messages have been received, so it is further checked whether the value of the weight field is 0 or not. If it is 0, the end of the process pool is detected and it is deleted from the table. On the other hand, when the weight is 0, the state change is completed, but the process pool is not completed, so only the work area is cleared.

【0102】(4)実施例の効果 上述の実施例によれば、以下の効果を得ることができ
る。
(4) Effects of the Embodiments According to the above embodiments, the following effects can be obtained.

【0103】状態変更処理期間以外に、状態変更のため
の処理を行なう必要がない。例えば、生成メッセージの
送信処理等が不要である。すなわち、状態変更がなされ
ないサブプールに対する生成メッセージの送信処理は結
局のところ無駄であるが、このような無駄な処理が生じ
ない。
There is no need to perform processing for changing the state except during the state change processing period. For example, transmission processing of the generated message is unnecessary. That is, although the process of transmitting the generated message to the subpool in which the state is not changed is useless after all, such useless process does not occur.

【0104】状態変更処理に必要なテーブルは、通常の
終了処理でも用いるテーブルだけであって、状態変更処
理だけに用いるテーブルは不要であり、メモリ資源の有
効利用を実現することができる。
The table required for the state change processing is only the table used also for the normal termination processing, and the table used only for the state change processing is unnecessary, and effective use of memory resources can be realized.

【0105】メッセージの追い越しがあるシステム及び
追い越しがないシステムの両方に適用可能であり、しか
も、両者での処理の異なる部分が極わずかであり、多く
の部分の設計や構成を共通化し得る。また、メッセージ
の追い越しがないシステムを、追い越しがあるシステム
に変更することが容易である。
The present invention can be applied to both a system in which a message is overtaken and a system in which no message is overtaken, and the difference in processing between the two is very small, and the design and configuration of many parts can be made common. In addition, it is easy to change a system that does not overtake a message to a system that overtakes.

【0106】また、上述の実施例によれば、取り扱うこ
とができる状態の種類数は制限されるものではない。こ
の点から、本発明を広範囲のマルチプロセッサシステム
に適用することができる。
Further, according to the above-mentioned embodiment, the number of kinds of states that can be handled is not limited. From this point, the present invention can be applied to a wide range of multiprocessor systems.

【0107】従来では、制御プロセスが全てのサブプー
ルの状態が変更されたことを検出できなかったが、この
実施例では検出することができる。そのため、制御プロ
セスが処理を適切なタイミングで行ない易くなる。
Conventionally, the control process could not detect that the states of all the subpools have been changed, but this embodiment can detect it. Therefore, it becomes easy for the control process to perform the processing at an appropriate timing.

【0108】(5)他の実施例 状態変更中や状態変更メッセージ受信待ちを専用のテー
ブル等によって管理するようにしても良い。
(5) Other Embodiments During the status change or waiting for the status change message to be received, a dedicated table or the like may be used for management.

【0109】制御プロセスが行なう状態変更メッセージ
や完了メッセージの送信を、マルチプロセッサシステム
の放送機能を利用して行なうようにしても良い。
The status change message and the completion message sent by the control process may be sent by using the broadcasting function of the multiprocessor system.

【0110】本発明のプロセス状態変更方法が適用され
るマルチプロセッサシステムの用途及びプロセッサ数は
限定されるものではない。
The application and the number of processors of the multiprocessor system to which the process state changing method of the present invention is applied are not limited.

【0111】[0111]

【発明の効果】以上のように、本発明によれば、状態変
更処理期間内のメッセージの授受だけで状態変更処理を
行なうようにしたので、また、到着確認メッセージの受
信数や変更済みメッセージの充分な受信を制御プロセス
が確認しながら処理を進めていくようにしたので、さら
に、状態変更中を記憶してその変更中に受信した子プロ
セスの状態をもプロセッサが変更して制御プロセスに報
告するようにしたので、状態変更処理期間以外に行なう
状態変更のための準備処理が不要な、必要なメモリ容量
が少ない、制御プロセスが状態変更の完了を検出するこ
とができる、取り扱うことができる状態数が制限されな
いプロセス状態変更方法を実現することができる。
As described above, according to the present invention, the state change processing is performed only by transmitting and receiving the messages within the state change processing period. Therefore, the number of arrival confirmation messages received and the changed message Since the control process confirms that sufficient reception is in progress, the processor also changes the state of the child process received during the change and reports it to the control process. As a result, the preparation process for the state change performed outside the state change process period is unnecessary, the required memory capacity is small, the control process can detect the completion of the state change, and the state can be handled. It is possible to realize a process state changing method whose number is not limited.

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

【図1】実施例の制御プロセス及びプロセッサ(の状態
変更部)の処理フローチャートである。
FIG. 1 is a processing flowchart of a control process and a processor (state changing unit thereof) according to an embodiment.

【図2】プロセスプールの構成図である。FIG. 2 is a configuration diagram of a process pool.

【図3】プロセスプールのマルチプロセッサシステムへ
の適用説明図である。
FIG. 3 is an explanatory diagram of application of a process pool to a multiprocessor system.

【図4】従来の終了検出方式であるWTC方式の説明図
である。
FIG. 4 is an explanatory diagram of a WTC method which is a conventional end detection method.

【図5】従来の制御プロセス用重みテーブルの構成図で
ある。
FIG. 5 is a configuration diagram of a conventional control process weight table.

【図6】従来のサブプール用重みテーブルの構成図であ
る。
FIG. 6 is a configuration diagram of a conventional sub-pool weight table.

【図7】従来の送信先にサブプールが存在する場合の子
プロセスの送受信処理の説明図である。
FIG. 7 is an explanatory diagram of transmission / reception processing of a child process when a subpool exists in a conventional transmission destination.

【図8】従来の送信先にサブプールが存在しない場合の
子プロセスの送受信処理の説明図である。
FIG. 8 is an explanatory diagram of transmission / reception processing of a child process when a subpool does not exist in a conventional transmission destination.

【図9】従来のサブプールの終了処理の説明図である。FIG. 9 is an explanatory diagram of a conventional sub-pool end process.

【図10】従来のプロセスプールの終了検出処理の説明
図である。
FIG. 10 is an explanatory diagram of a conventional process pool end detection process.

【図11】従来の通信中の子プロセスが状態変更処理に
与える影響の説明図である。
FIG. 11 is an explanatory diagram of an influence of a conventional child process during communication on state change processing.

【図12】従来、用いられていたサブプールテーブルの
構成図である。
FIG. 12 is a configuration diagram of a sub-pool table that has been conventionally used.

【図13】従来の状態変更処理の説明図(その1)であ
る。
FIG. 13 is an explanatory diagram (part 1) of conventional state change processing.

【図14】従来の状態変更処理の説明図(その2)であ
る。
FIG. 14 is an explanatory diagram (part 2) of conventional state change processing.

【図15】従来の状態変更処理の説明図(その3)であ
る。
FIG. 15 is an explanatory diagram (part 3) of conventional state change processing.

【図16】従来の状態変更処理の説明図(その4)であ
る。
FIG. 16 is an explanatory diagram (part 4) of conventional state change processing.

【図17】メッセージの追い越しがある場合の従来の状
態変更処理の説明図である。
FIG. 17 is an explanatory diagram of conventional state change processing when a message is overtaken.

【図18】実施例の制御プロセス用重みテーブルの構成
図である。
FIG. 18 is a configuration diagram of a control process weight table of the embodiment.

【図19】実施例のサブプール用重みテーブルの構成図
である。
FIG. 19 is a configuration diagram of a sub-pool weight table according to the embodiment.

【図20】実施例の状態変更中に子プロセスを受信した
際の処理の説明図である。
FIG. 20 is an explanatory diagram of a process when a child process is received during the state change of the embodiment.

【図21】実施例の状態変更処理の説明図(その1)で
ある。
FIG. 21 is an explanatory diagram (part 1) of the state changing process of the embodiment.

【図22】実施例の状態変更処理の説明図(その2)で
ある。
FIG. 22 is an explanatory diagram (part 2) of the state changing process of the embodiment.

【図23】実施例の状態変更処理の説明図(その3)で
ある。
FIG. 23 is an explanatory diagram (part 3) of the state changing process of the embodiment.

【図24】実施例の状態変更処理の説明図(その4)で
ある。
FIG. 24 is an explanatory diagram (Part 4) of the state changing process of the embodiment.

【図25】実施例の状態変更処理の説明図(その5)で
ある。
FIG. 25 is an explanatory diagram (Part 5) of the state changing process of the embodiment.

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

100…状態変更メッセージの送信処理、101〜10
4…状態変更の完了の検出処理、105…完了メッセー
ジの送信処理、106〜109…到着確認メッセージの
受信完了の検出処理、110…一連の処理の終了処理、
201…状態変更処理、202、205…状態変更中の
格納処理、203、208…変更済みメッセージの送信
処理、204…サブプール用重みテーブルへのサブプー
ルの登録処理、210…通常状態への復帰処理、211
…到着確認メッセージの送信処理、212…サブプール
用重みテーブルからのサブプールの削除処理。
100 ... Transmission process of status change message, 101 to 10
4 ... Status change completion detection processing, 105 ... Completion message transmission processing, 106-109 ... Arrival confirmation message reception completion detection processing, 110 ... Series of processing termination processing,
201 ... Status change processing, 202, 205 ... Storage processing during status change, 203, 208 ... Changed message transmission processing, 204 ... Subpool registration processing in subpool weight table, 210 ... Return to normal status processing, 211
... process of transmitting arrival confirmation message, 212 ... process of deleting sub-pool from weight table for sub-pool.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 非同期メッセージ通信よってプロセッサ
間処理を行うマルチプロセッサシステムのプロセス状態
変更方法であって、1個の制御プロセスと1個以上の子
プロセスからなるプロセスプールの、各プロセッサに存
在するサブプールの状態を、上記制御プロセスが、上記
各プロセッサの状態変更部を制御して変更させるプロセ
ス状態変更方法において、 全ての上記プロセッサに状態変更メッセージを送信する
上記制御プロセスが行なう第1の処理と、 上記各プロセッサの状態変更部が状態変更メッセージを
受信したときに行なう処理であって、当該プロセッサに
状態変更が求められたサブプールが存在する場合にその
サブプールの状態を変更させて変更済みメッセージを上
記制御プロセスに送信すると共に状態変更中情報を記憶
し、当該プロセッサに状態変更が求められたサブプール
が存在しない場合に状態変更中情報を記憶する第2の処
理と、 状態変更中情報を記憶している状態で、他のプロセッサ
から子プロセスが与えられた場合に受信した子プロセス
の状態を変更すると共に変更済みメッセージを上記制御
プロセスに送信する、上記各プロセッサの状態変更部が
行なう第3の処理と、 受信した全ての変更済みメッセージに基づいて上記プロ
セスプール状態の変更の完了を監視し、完了を検出した
ときに、全ての上記プロセッサに完了メッセージを送信
する、上記制御プロセッサが行う第4の処理と、 上記各プロセッサの状態変更部が、完了メッセージを受
信した場合に行なう処理であって、上記状態変更中情報
を削除すると共に、完了メッセージに対する到着確認メ
ッセージを上記制御プロセスに送信する第5の処理と、 全ての上記プロセッサから到着確認メッセージを受信す
ることによって、上記プロセスプールの状態変更処理を
終了させる上記制御プロセスが行なう第6の処理とから
なることを特徴とするプロセス状態変更方法
1. A method for changing a process state of a multiprocessor system for performing interprocessor processing by asynchronous message communication, which is a subpool of a process pool consisting of one control process and one or more child processes and which exists in each processor. In the process state changing method in which the control process controls and changes the state changing unit of each processor, the first process performed by the control process for transmitting a state change message to all the processors; The process performed when the state change unit of each processor receives a state change message, and when the subpool for which the state change is requested exists in the processor, the state of the subpool is changed and the changed message is displayed. It sends to the control process and stores the status change information, A second process that stores the state-changing information when the subpool for which the state change is requested does not exist in the processor, and a child process is given from another processor in the state where the state-changing information is stored. A third process performed by the state changing unit of each processor for changing the state of the child process received and transmitting the changed message to the control process, and the process based on all the received changed messages A fourth process performed by the control processor, which monitors completion of the change of the pool state and sends a completion message to all the processors when the completion message is detected; Is a process to be performed when a message is received, the above status change information is deleted, and the arrival confirmation for the completion message is received. It comprises a fifth process of transmitting a message to the control process, and a sixth process of the control process that terminates the process pool state change process by receiving an arrival confirmation message from all the processors. A process state changing method characterized by the above.
【請求項2】 完了メッセージが状態変更メッセージよ
り先に上記プロセッサに到達することが有り得る、マル
チプロセッサシステムに適用される請求項1に記載のプ
ロセス状態変更方法において、 上記各プロセッサの状態変更部が完了メッセージを受信
した場合に上記第5の処理に代えて行なう処理であっ
て、上記状態変更中情報が記憶されている場合には、完
了メッセージを受信するよりも先に状態変更メッセージ
を受信しているとし、上記第5の処理を実行し、一方、
上記状態変更中情報が記憶されていない場合には状態変
更メッセージを受信するよりも先に完了メッセージを受
信しているとし、状態変更メッセージの受信待ち情報を
記憶する第7の処理と、 上記各プロセッサの状態変更部が状態変更メッセージを
受信したときに上記第2の処理に代えて行なう処理であ
って、状態変更メッセージの受信待ち情報が記憶されて
ない場合には完了メッセージを受信するよりも先に状
態変更メッセージを受信しているとして上記第2の処理
を実行し、一方、状態変更メッセージの受信待ち情報が
記憶されている場合には状態変更メッセージを受信する
よりも先に完了メッセージを受信しているとして、上記
状態変更中情報を削除し、完了メッセージに対する到着
確認メッセージを上記制御プロセスに送信する第8の処
理とを設けたことを特徴とするプロセス状態変更方法
2. The process state changing method according to claim 1, applied to a multiprocessor system, wherein a completion message may reach the processor before a state change message. This is a process to be executed instead of the fifth process when a completion message is received, and when the above-mentioned state-change information is stored , the process is completed.
Status change message before receiving the end message
Is received, the fifth process is executed , while
If the above status change information is not stored, the status change
Receive a completion message before receiving a change message
And have signal, there in a seventh process of storing reception waiting status information change message, the state changing unit of each processor is performed in place of the second process when it receives the state change message processing If the waiting information for the status change message is not stored, the status is sent before the completion message is received.
The second process is executed assuming that the state change message is received , while the waiting information of the state change message is
Receive status change message if stored
Eighth processing for deleting the status change information and transmitting an arrival confirmation message for the completion message to the control process on the assumption that the completion message is received before the process status. How to change.
JP3119556A 1991-03-19 1991-03-19 How to change process status Expired - Lifetime JP2517852B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3119556A JP2517852B2 (en) 1991-03-19 1991-03-19 How to change process status

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3119556A JP2517852B2 (en) 1991-03-19 1991-03-19 How to change process status

Publications (2)

Publication Number Publication Date
JPH04291445A JPH04291445A (en) 1992-10-15
JP2517852B2 true JP2517852B2 (en) 1996-07-24

Family

ID=14764243

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3119556A Expired - Lifetime JP2517852B2 (en) 1991-03-19 1991-03-19 How to change process status

Country Status (1)

Country Link
JP (1) JP2517852B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5617855B2 (en) * 2012-02-21 2014-11-05 日本電気株式会社 Information processing apparatus, information processing method, and information processing program
CN116402103B (en) * 2023-04-13 2026-03-31 苏州亿铸智能科技有限公司 A Static Control Configuration Method for In-Memory Computing

Also Published As

Publication number Publication date
JPH04291445A (en) 1992-10-15

Similar Documents

Publication Publication Date Title
US8270299B2 (en) Communicator-based token/buffer management for eager protocol support in collective communication operations
CA2124452C (en) Method and apparatus for processing data within stations of a communication network
US5396613A (en) Method and system for error recovery for cascaded servers
US6336147B1 (en) Method and apparatus for managing connections for communication among objects in a distributed object system
JPH03126158A (en) Method and apparatus for scheduling
JPH1049507A (en) Parallel computer
JPH06309252A (en) Interconnection interface
CN119883579B (en) Proxy method, electronic device and storage medium for high-frequency polling of operating system
JP2517852B2 (en) How to change process status
JP3462064B2 (en) Distributed simulation system
CN109617821A (en) A kind of transmission method of multicast message, master control borad and equipment
JPH02138656A (en) Merging of message packet for multi- processor system and transmission and multiplexing of message
CN113347238A (en) Message partitioning method, system, device and storage medium based on block chain
JPH04291444A (en) Forcible process end system
US5754856A (en) MVS/ESA message transport system using the XCF coupling facility
JPH03257633A (en) Process control method
JP3115801B2 (en) Parallel computer system
US7577712B1 (en) Efficient event completion in UDAPL
JPH10502758A (en) Ordered reliable signaling in a distributed multiprocessor.
US20040133642A1 (en) Server and application programming interface for distributed rendezvous
JPH04113442A (en) Inter-processor communication system
JPH0228747A (en) Method for controlling bus
JPH0340169A (en) Multiple processor system and method of controlling plurality of processor
JP2573332B2 (en) Data transfer control method
JP2961542B2 (en) Data processing system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term