JP2990286B2 - Computer system in multi-thread environment - Google Patents

Computer system in multi-thread environment

Info

Publication number
JP2990286B2
JP2990286B2 JP2057079A JP5707990A JP2990286B2 JP 2990286 B2 JP2990286 B2 JP 2990286B2 JP 2057079 A JP2057079 A JP 2057079A JP 5707990 A JP5707990 A JP 5707990A JP 2990286 B2 JP2990286 B2 JP 2990286B2
Authority
JP
Japan
Prior art keywords
group
thread
threads
message
belonging
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
JP2057079A
Other languages
Japanese (ja)
Other versions
JPH03257633A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2057079A priority Critical patent/JP2990286B2/en
Publication of JPH03257633A publication Critical patent/JPH03257633A/en
Application granted granted Critical
Publication of JP2990286B2 publication Critical patent/JP2990286B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、マルチプログラミングを行う計算機システ
ムのユーザインタフェースに係り、特に、相互に関連す
るプロセスまたはスレッドをまとめて制御するのに好適
なマルチスレッド計算機システムおよびマルチスレッド
実行環境の制御方法に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a user interface of a computer system that performs multiprogramming, and more particularly, to a multithread suitable for collectively controlling mutually related processes or threads. The present invention relates to a computer system and a method for controlling a multi-thread execution environment.

〔従来の技術〕[Conventional technology]

マルチプロセス環境を実現するオペレーティングシス
テムの代表例として、米国AT&T社が開発したUNIXがあ
る。UNIXにおいては、以下に示すようなプロセスグルー
プという概念を設けている。
A representative example of an operating system that realizes a multi-process environment is UNIX developed by AT & T Corporation in the United States. In UNIX, the concept of a process group is provided as shown below.

a.プロセスグループにはプロセスグループリーダと呼ば
れるプロセスが存在する。
a. A process called a process group leader exists in the process group.

b.親プロセスが子プロセスを生成したとき、子プロセス
は自動的に親プロセスと同じプロセスグループに入る。
b. When the parent process creates a child process, the child process automatically enters the same process group as the parent process.

c.全てのプロセスは、自プロセスをプロセスグループリ
ーダとしたプロセスグループを生成し、元のプロセスグ
ループから抜けることができる。
c. All processes can create a process group with their own process as the process group leader and exit from the original process group.

d.プロセスグループは、プロセスグループリーダが終了
したときに、プロセスグループに属する全てのプロセス
を終了させるために使用する。
d. The process group is used to terminate all processes belonging to the process group when the process group leader terminates.

そこで、UNIXでは、各プロセスを管理するためのプロ
セス管理テーブル内に、自プロセスがどのプロセスグル
ープに属するかを示す変数を設けている。各プロセスの
変数としてはプロセスグループリーダのプロセスIDが設
定され、当該プロセスグループに属することが示され
る。プロセスグループリーダとは、前記変数の値の自プ
ロセスIDとが一致するプロセスである。
Therefore, in UNIX, a variable indicating which process group the own process belongs to is provided in a process management table for managing each process. The process ID of the process group leader is set as a variable of each process, and indicates that the process belongs to the process group. The process group leader is a process in which the own process ID of the value of the variable matches.

プロセスグループリーダが終了したとき、システム内
に存在する全てのプロセス管理テーブルを調べ、前記変
数の値がプロセスグループリーダのプロセスIDに一致す
るならば、対応するプロセスを終了させることにより、
上記d.を実現している。
When the process group leader is terminated, all process management tables existing in the system are checked, and if the value of the variable matches the process ID of the process group leader, the corresponding process is terminated.
The above d. Is realized.

また、プロセス内で並行に実行されるスレッドを導入
したマルチスレッド環境を実現するオペレーティングシ
ステムの代表例として、米国カーネギメロン大学のMach
と米国サンマイクロシステムズ社のSunOSとがある。
Mach at Carnegie Mellon University in the United States is a representative example of an operating system that implements a multi-thread environment that introduces threads that execute in parallel in a process.
And Sun Microsystems SunOS.

いずれも、プロセスという単位でスレッドをまとめて
制御可能であるが、プロセスをグループ化し当該プロセ
スグループに対してそのグループに属しているプロセス
を停止させたり再開させたりする機能,プロセス内部で
スレッドをグループに分類する機能,プロセス間にまた
がってスレッドをまとめる機能は存在しない。
In each case, threads can be controlled collectively in units called processes. However, functions for grouping processes and stopping or restarting processes belonging to the group for the relevant process group, and grouping threads inside processes There is no function to classify threads and a function to group threads across processes.

なお、この種の従来技術を示す例としては、 (1)M.J.BACH:The Design of the UNIX Operating Sy
stem (PHI出版pp.210−213) (2)M.Accetta他:Mach:A New kernel Foundatin for
UNIX Development (Proceedings of USENIX 1986 Summer Conference pp.
93−112) (3)山下智明:Sun Lightweight Process プログラミ
ング (UNIX MAGAZINE 昭和63年7月号pp.90−115) 等がある。
Examples of this kind of conventional technology include: (1) MJBACH: The Design of the UNIX Operating System
stem (PHI Publishing pp.210-213) (2) M.Accetta and others: Mach: A New kernel Foundatin for
UNIX Development (Proceedings of USENIX 1986 Summer Conference pp.
93-112) (3) Tomoaki Yamashita: Sun Lightweight Process Programming (UNIX MAGAZINE July 1988, pp. 90-115).

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上記UNIXの実現しているプロセスグループは、各プロ
セスの管理テーブルに、当該プロセスがどのプロセスグ
ループに属するかを示す変数を用意することにより実現
されている。そこで、プロセスグループに対して処理を
行うには、プロセス管理テーブル全体を検索し、それぞ
れのプロセスが当該プロセスグループに属するか否かを
調べ、属している場合にのみ処理を行う必要がある。
The process groups realized by the UNIX are realized by preparing variables indicating which process group the process belongs to in a management table of each process. Therefore, in order to perform the process on the process group, it is necessary to search the entire process management table, check whether each process belongs to the process group, and perform the process only when the process belongs.

また、UNIXでは、プロセスグループの存在意義自体
が、プロセスグループリーダが終了したときに、当該プ
ロセスグループ内の他のプロセスを終了させるためのも
のでしかない。
Further, in UNIX, the existence significance of a process group is only for terminating other processes in the process group when the process group leader ends.

本発明の目的は、プロセスをグループ化し、すべての
プロセス管理テーブルを検索しなくても、前記プロセス
に対して、グループに属しているプロセスの停止/再開
などの各種処理を高速に実行できるようにするととも
に、プロセス内で実行環境を共有して動作するスレッド
に対しても、スレッドのグループ化を実現し、プロセス
とは、独立に、複数個のスレッドを制御できるようにす
る手段を備えたマルチスレッド環境の計算機システムお
よびマルチスレッド実行環境の制御方法を提供すること
である。
An object of the present invention is to enable various processes such as stopping / restarting a process belonging to a group to be executed at high speed without grouping processes and searching all process management tables. In addition, a thread that shares an execution environment within a process and implements thread grouping, and is a multi-processor with means for controlling a plurality of threads independently of the process. An object of the present invention is to provide a computer system in a thread environment and a method for controlling a multi-thread execution environment.

〔課題を解決するための手段〕[Means for solving the problem]

本発明は、上記目的を達成するために、プロセス内で
実行環境を共有するスレッドが前記プロセス内で複数個
並行して動作するマルチスレッド環境の計算機システム
において、相互に関連するスレッドの各々の管理テーブ
ルを接続してスレッド群をプロセスとは独立にグループ
化し、当該グループ内の複数個のスレッドをまとめて制
御する手段が、1つのグループを指定し、当該グループ
に属している全てのスレッドを待ち状態とする手段と、
1つのグループを指定し、当該グループに属している全
てのスレッドを実行可能状態とする手段と、1つのグル
ープを指定し、当該グループに属している全てのスレッ
ドを終了させる手段とを備えたマルチスレッド環境の計
算機システムを提案する。
In order to achieve the above object, the present invention provides a computer system in a multi-thread environment where a plurality of threads sharing an execution environment in a process operate in parallel in the process. A means for connecting a table to group a thread group independently of a process and for controlling a plurality of threads in the group collectively designates one group and waits for all threads belonging to the group. Means for making a state,
A multi-unit comprising: means for designating one group and making all threads belonging to the group executable, and means for designating one group and terminating all threads belonging to the group. We propose a threaded computer system.

前記複数個のスレッドをまとめて制御する手段は、新
たなグループを作成する手段と、1つのグループを指定
し、当該グループに属している全てのスレッドを当該グ
ループから除去し、当該グループを削除する手段と、1
つのグループと1つのスレッドを指定し、当該グループ
に当該スレッドを登録する手段と、1つのグループと1
つのスレッドを指定し、当該グループから当該スレッド
を除去する手段と、1つのグループと1つのスレッドを
指定し、当該グループに当該スレッドが存在するか否か
を調査する手段とを備えることができる。
The means for controlling the plurality of threads collectively includes means for creating a new group, designating one group, removing all threads belonging to the group from the group, and deleting the group. Means and 1
Means for designating one group and one thread and registering the thread in the group;
There may be provided means for designating one thread and removing the thread from the group, and means for designating one group and one thread and examining whether the thread exists in the group.

本発明は、また、プロセス内で実行環境を共有するス
レッドが前記プロセス内で複数個並行して動作し、スレ
ッドのグループ化と同期型メッセージ通信とを可能とす
るマルチスレッド環境の計算機システムにおいて、相互
に関連するスレッドの各々の管理テーブルを接続してス
レッド群をプロセスとは独立にグループ化し、当該グル
ープ内の複数個のスレッドをまとめて制御する手段が、
1つのグループを指定し、当該グループに属している全
てのスレッドが自スレッドからのメッセージ受信待ち状
態であれば、該グループ内の全てのスレッドにメッセー
ジを通知し、当該グループに属しているいずれかのスレ
ッドが自スレッドからのメッセージ受信待ち状態でなけ
れば、当該グループ内の全てのスレッドが自スレッドか
らのメッセージ受信の要求を出すまで、自スレッドを待
ち状態とし、その後、当該グループ内の全てのスレッド
にメッセージを通知する手段を備えたマルチスレッド環
境の計算機システムを提案する。
The present invention also provides a computer system in a multi-thread environment in which a plurality of threads sharing an execution environment in a process operate in parallel in the process to enable thread grouping and synchronous message communication. Means for connecting the management tables of the mutually related threads to group the thread group independently of the process, and for controlling a plurality of threads in the group collectively,
If one group is specified and all the threads belonging to the group are waiting for a message to be received from the own thread, the message is notified to all the threads in the group and any of the threads belonging to the group is If the thread is not in a state of waiting for a message from its own thread, the thread is put into a waiting state until all threads in the group issue a request for receiving a message from the own thread. We propose a multi-threaded computer system with a means for notifying a thread of a message.

本発明は、さらに、プロセス内で実行環境を共有する
スレッドが前記プロセス内で複数個並行して動作し、ス
レッドのグループ化と同期型メッセージ通信とを可能と
するするマルチスレッド環境の計算機システムにおい
て、相互に関連するスレッドの各々の管理テーブルを接
続してスレッド群をプロセスとは独立にグループ化し、
当該グループ内の複数個のスレッドをまとめて制御する
手段が、1つのグループを指定し、当該グループに属し
ている全てのスレッドが自スレッドからのメッセージ受
信待ち状態であれば、当該グループ内の全てのスレッド
にメッセージを通知し、当該グループに属しているいず
れかのスレッドが自スレッドからのメッセージ受信待ち
状態でなければ、当該グループ内の全てのスレッドが自
スレッドからのメッセージ受信の要求を出すまで、自ス
レッドを待ち状態とし、その後、当該グループ内の全て
のスレッドにメッセージを通知する手段と、1つのグル
ープを指定し、当該グループに属しているいずれかのス
レッドが自スレッドからのメッセージ受信待ち状態であ
れば、当該スレッドにメッセージを通知し、当該グルー
プに属しているいずれのスレッドも自スレッドからのメ
ッセージ受信待ち状態でなければ、当該グループ内のい
ずれかのスレッドが自スレッドからのメッセージ受信の
要求を出すまで、自スレッドを待ち状態とし、その後、
メッセージ受信要求を出したスレッドにメッセージを通
知する手段と、1つのグループを指定し、当該グループ
に属しているいずれかのスレッドが自スレッドへのメッ
セージ受信待ち状態であれば、当該スレッドからメッセ
ージを受理し、当該グループに属しているいずれのスレ
ッドも自スレッドへのメッセージ送信待ち状態でなけれ
ば、当該グループ内のいずれかのスレッドが自スレッド
へのメッセージ送信の要求を出すまで、自スレッドを待
ち状態とし、その後、メッセージ送信要求を出したスレ
ッドからメッセージを受信する手段とを備えたマルチス
レッド環境の計算機システムを提案する。
The present invention further provides a multi-threaded computer system in which a plurality of threads sharing an execution environment in a process operate in parallel in the process to enable grouping of threads and synchronous message communication. Connecting the management tables of each of the interrelated threads to group the threads independently of the process,
The means for collectively controlling a plurality of threads in the group designates one group, and if all threads belonging to the group are in a state of waiting for a message to be received from the own thread, all the threads in the group are Message to the other thread, and if any thread belonging to the group is not in a state of waiting for a message from its own thread, until all threads in the group issue a request to receive a message from its own thread A means for notifying a thread to the own thread, and then notifying a message to all threads in the group; and specifying one group and allowing any thread belonging to the group to receive a message from the own thread. If so, send a message to the thread and wish to belong to the group If message reception waiting state for a record thread may own threads until one thread in the group issues a request message received from the own thread, a state waiting for its own thread, then,
A means for notifying a message to a thread that has issued a message reception request, and a group is designated, and if any thread belonging to the group is in a state of waiting for a message to be received by its own thread, a message is transmitted from the thread. If the thread is received and none of the threads belonging to the group are in a state of waiting for a message to be sent to the own thread, the thread waits until the thread in the group issues a request to send a message to the own thread. And a means for receiving a message from the thread that has issued the message transmission request, and then a multi-thread environment computer system is proposed.

本発明は、上記目的を達成するために、プロセス内で
実行環境を共有するスレッドが前記プロセス内で複数個
並行して動作するマルチスレッド環境の計算機システム
において、相互に関連するスレッドの各々の管理テーブ
ルを接続してスレッド群をプロセスとは独立にグループ
化し、当該グループ内の複数個のスレッドをまとめて制
御するマルチスレッド実行環境の制御方法であって、1
つのグループを指定し、当該グループに属している全て
のスレッドを待ち状態とする工程と、1つのグループを
指定し、当該グループに属している全てのスレッドを実
行可能状態とする工程と、1つのグループを指定し、当
該グループに属している全てのスレッドを終了させる工
程とを有するマルチスレッド実行環境の制御方法を提案
する。
In order to achieve the above object, the present invention provides a computer system in a multi-thread environment where a plurality of threads sharing an execution environment in a process operate in parallel in the process. A method of controlling a multi-thread execution environment in which a table is connected to group a thread group independently of a process, and a plurality of threads in the group are collectively controlled.
Specifying one group and placing all the threads belonging to the group in a waiting state; specifying one group and placing all the threads belonging to the group in an executable state; Specifying a group and terminating all threads belonging to the group.

〔作用〕[Action]

グループリンク領域にはグループ内の次のプロセス/
スレッドの管理テーブルのアドレスを設定する。グルー
プ管理を行うプログラムはそのグループリンク領域を辿
ることにより、グループに属する全てのプロセス/スレ
ッドを検索できる。
The next process / group in the group is displayed in the group link area.
Set the address of the thread management table. The program that performs group management can search all processes / threads belonging to the group by tracing the group link area.

グループテーブルにはグループに属する全てのプロセ
ス/スレッドの管理テーブルのアドレスを要素として登
録する。グループ管理を行うプログラムは前記グループ
テーブルの要素を調べることにより、グループに属する
全てのプロセス/スレッドを検索できる。
In the group table, the addresses of the management tables of all processes / threads belonging to the group are registered as elements. The group management program can search all the processes / threads belonging to the group by checking the elements of the group table.

グループ管理テーブルはシステム内に存在するグルー
プ自体を管理する。すなわち、システム内にいかなるグ
ループが存在するかを管理するテーブルである。各グル
ープごとにグループ管理テーブルのエントリを対応させ
る。グループ管理テーブルの各エントリは以下の役割を
持つ。
The group management table manages the group itself existing in the system. That is, it is a table for managing what groups exist in the system. An entry in the group management table is associated with each group. Each entry of the group management table has the following role.

e.前記グループリンク領域を用いる場合は、グループに
属するプロセス/スレッドの管理テーブルの内、先頭の
管理テーブルのアドレスを指し、グループに属する全て
のプロセス/スレッドを辿れるように設定される。
e. When the group link area is used, the address is set to the address of the leading management table in the management tables of the processes / threads belonging to the group, so that all the processes / threads belonging to the group can be traced.

f.前記グループテーブルを使用する場合は、対応するグ
ループテーブルのアドレスを指し、グループに属する全
てのプロセス/スレッドを検索できるように設定され
る。
f. When the group table is used, the address is set to the address of the corresponding group table, so that all the processes / threads belonging to the group can be searched.

〔実施例〕〔Example〕

次に、図面を参照して、本発明の実施例を説明する。
以下、実施例では、プロセスのグループ化についてのみ
言及するが、スレッドのグループ化についてもプロセス
をスレッドに置き換えるだけで、同様の構成となる。
Next, an embodiment of the present invention will be described with reference to the drawings.
Hereinafter, in the embodiment, only the grouping of processes will be referred to, but the grouping of threads will have a similar configuration only by replacing processes with threads.

第1図はプロセス管理テーブル内に管理テーブル自身
を指すための記憶場所(グループリンク領域)を設け
て、プロセスのグループ化を行う例を示している。図に
おいて、10はグループ管理テーブルであり、各エントリ
11がシステム内に存在する各グループに対応している。
グループ管理テーブルのエントリはグループに属するプ
ロセス管理テーブルの内、先頭の管理テーブルを指して
いる。12a,12b,12cは、それぞれ、プロセス管理テーブ
ルである。プロセス管理テーブルの内容は、以下に述べ
るグループリンク領域を除いて、全て従来と同様である
と考えてよい。具体的には、プロセスID,CPU使用時間な
どが記憶されている。
FIG. 1 shows an example in which a storage location (group link area) for pointing to the management table itself is provided in the process management table, and processes are grouped. In the figure, reference numeral 10 denotes a group management table, each entry
11 corresponds to each group existing in the system.
The entry in the group management table points to the first management table in the process management tables belonging to the group. 12a, 12b and 12c are process management tables, respectively. Except for the group link area described below, the contents of the process management table can be considered to be all the same as in the related art. Specifically, a process ID, a CPU usage time, and the like are stored.

プロセス管理テーブル12a,12b,12c内には、それぞ
れ、グループリンク領域13を新設する。グループリンク
領域はグループ内のプロセスを互いに接続する。具体的
には、グループ内に存在するプロセス管理テーブルの
内、次の管理テーブルのアドレスを設定することにな
る。グループ管理テーブルの各エントリからグループリ
ンク領域を辿っていくと、グループに存在する全てのプ
ロセスを検索できる。第1図の例では、グループリンク
領域の設定により、12aで示されるプロセスが第1のグ
ループを、12bで示されるプロセスが第2のグループを
形成している。また、12cはグループ管理テーブルのい
ずれのエントリからも指されておらず、グループに属さ
ないプロセスである。
A group link area 13 is newly established in each of the process management tables 12a, 12b, and 12c. The group link area connects the processes in the group to each other. Specifically, the address of the next management table among the process management tables existing in the group is set. By tracing the group link area from each entry of the group management table, all the processes existing in the group can be searched. In the example of FIG. 1, the process indicated by 12a forms the first group, and the process indicated by 12b forms the second group by setting the group link area. Reference numeral 12c denotes a process that is not pointed to by any entry in the group management table and does not belong to the group.

第2図は、第1図においてプロセス管理テーブル12c
が示すプロセスを新たに第2のプロセスグループに入れ
る方法を示した例である。プロセス管理テーブル12bの
グループリンク領域を繋ぎ換えることにより、対応する
プロセスを第2のグループに入れることが可能となる。
この例では、グループの最終位置に置いているが、グル
ープリンク領域の接続を変えると、グループの先頭位置
または中央に置くことも可能である。
FIG. 2 shows the process management table 12c in FIG.
5 is an example showing a method for newly adding the process indicated by the process group into the second process group. By reconnecting the group link areas of the process management table 12b, it becomes possible to put the corresponding process into the second group.
In this example, it is placed at the last position of the group. However, if the connection of the group link area is changed, it can be placed at the head position or the center of the group.

本発明の第1の実施例では、第1図と第2図におい
て、あたかも、グループリンク領域が一重リンク(一方
向接続)のみであるかのように示したが、これを、二重
リンク(逆方向接続を追加した方式)、循環リンク(最
終位置のプロセス管理テーブルのグループリンク領域が
先頭位置のプロセス管理テーブルを指すようにした方
式)、および二重リンクと循環リンクの組合せ等に変更
することは容易である。これらいずれの方式において
も、グループリンク領域はプロセス管理テーブルのアド
レスを値とする変数を1個または2個(二重リンクの場
合)用意するだけでよい。
In the first embodiment of the present invention, FIGS. 1 and 2 show the group link area as if it were only a single link (one-way connection). The method is changed to a method in which a reverse connection is added), a cyclic link (a method in which the group link area of the process management table at the last position points to the process management table at the first position), a combination of a double link and a cyclic link, and the like. It is easy. In any of these methods, the group link area only needs to prepare one or two variables (in the case of a double link) whose value is the address of the process management table.

次に、グループ管理テーブル10のエントリ11の内容を
第3図に示しておく。各エントリには、グループの先頭
位置のプロセス管理テーブルのアドレスを示すグループ
リンク領域50が存在する。その他に、グループ内に存在
するプロセス数を示すフィールド(グループカウンタ)
51、グループの最終位置のプロセス管理テーブルのアド
レスを示すフィールド(グループリンクテール)52等の
グループの情報を設定するフィールドを設けてもよい。
51および52のフィールドは省略可能である。
Next, the contents of the entry 11 of the group management table 10 are shown in FIG. Each entry has a group link area 50 indicating the address of the process management table at the head of the group. In addition, a field indicating the number of processes in the group (group counter)
51, a field for setting group information such as a field (group link tail) 52 indicating the address of the process management table at the last position of the group may be provided.
Fields 51 and 52 are optional.

第4図はプロセスグループごとに配列を設け、グルー
プに属するプロセスの管理テーブルを指す値を当該配列
の要素として設定することにより、グループ化を実現す
る例を示している。20は第1図と同様にグループ管理テ
ーブルであるが、この各エントリ21は対応するグループ
テーブルのアドレスを指す。22a,22bがグループテーブ
ルである。グループテーブル22a,22bの各エントリは、
プロセス管理テーブルのアドレスを示す変数となってい
る。このエントリにおいては、プロセス管理テーブルの
アドレス以外に設定する情報はない。
FIG. 4 shows an example in which an array is provided for each process group, and a value indicating a management table of processes belonging to the group is set as an element of the array, thereby realizing grouping. Reference numeral 20 denotes a group management table as in FIG. 1. Each entry 21 indicates the address of the corresponding group table. 22a and 22b are group tables. Each entry of the group tables 22a and 22b is
It is a variable that indicates the address of the process management table. In this entry, there is no information to be set other than the address of the process management table.

各グループテーブルのエントリからプロセス管理テー
ブルのアドレスを指すことにより、プロセスのグループ
化が可能である。第4図では、グループテーブル22aと2
2bとによって、プロセス管理テーブルが第1のグループ
12aおよび第2のグループ12bに分類されている。プロセ
ス管理テーブル12cはグループテーブルから指されてい
ないため、いずれのグループにも属さないプロセスを管
理するテーブルとなる。
By pointing the address of the process management table from the entry of each group table, it is possible to group processes. In FIG. 4, the group tables 22a and 22a
2b makes the process management table the first group
12a and a second group 12b. Since the process management table 12c is not pointed to from the group table, it is a table for managing processes that do not belong to any group.

第5図に前記いずれのグループにも属していないプロ
セス12cを第2のグループに入れる方式を示した。グル
ープテーブルのエントリを新たに用意し、当該エントリ
が新たなプロセス管理テーブルのアドレスを指すように
設定すると、プロセスをグループに入ることが可能であ
る。
FIG. 5 shows a method in which a process 12c that does not belong to any of the groups is put into a second group. When a new entry in the group table is prepared and the entry is set to point to the address of the new process management table, the process can be put into the group.

本発明の第2の実施例では、2つ以上のグループテー
ブルのエントリが同一のプロセス管理テーブルを指すよ
うに設定することによって、1つのプロセスが同時に2
つ以上のグループに入れることが可能である。
In the second embodiment of the present invention, two or more group table entries are set so as to point to the same process management table.
It can be in more than one group.

第6図にグループ管理テーブル20のエントリの内容を
示しておく。エントリ内には、各グループに対応するグ
ループテーブルを指すためのグループテーブルポインタ
60が存在する。その他に第3図と同様、グループカウン
タ51を設けてもよい。
FIG. 6 shows the contents of the entries in the group management table 20. In the entry, a group table pointer to point to the group table corresponding to each group
There are 60. In addition, similarly to FIG. 3, a group counter 51 may be provided.

上記グループ化手段を用いて構築するユーザインタフ
ェースについて述べる。グループ化の概念を用いて複数
個のプロセスを同時に処理するグループ管理方法を実現
する関数(サブルーチン)の処理手順例について、以
下、順に記述する。なお、以下の例では、グループリン
ク領域(第1図)を用いて実現したグループについて説
明するが、グループテーブル(第4図)を用いてグルー
プを実現した場合も、リンク接続が配列接続に変更され
る以外は、同様の手順である。
A user interface constructed using the grouping means will be described. An example of a processing procedure of a function (subroutine) for realizing a group management method for simultaneously processing a plurality of processes using the concept of grouping will be described in order. In the following example, a group realized using the group link area (FIG. 1) will be described. However, when the group is realized using the group table (FIG. 4), the link connection is changed to the array connection. Other than that, the procedure is the same.

(1)複数プロセスの生成 複数プロセスを生成し、グループに登録する関数であ
る。例えば、同一または同様の処理を行うプロセスを同
時に複数個発生させ、これらのプロセス群に対する処理
は全てグループとして扱う場合に使用する。複数プロセ
ス生成処理のアルゴリズムの例を第7図に示す。
(1) Generation of a plurality of processes This is a function for generating a plurality of processes and registering them in a group. For example, a plurality of processes that perform the same or similar processing are generated at the same time, and the processing for these process groups is used as a group. FIG. 7 shows an example of the algorithm of the multiple process generation process.

関数内では、指定グループが存在しない場合、グルー
プ自体を生成する。その後、指定個のプロセスを生成
し、各プロセスをグループに登録する。プロセスのグル
ープへの登録は第2図または第5図と同様である。ま
た、プロセスの生成処理は従来の方式と同様であると考
えてよい。
Within the function, if the specified group does not exist, create the group itself. Thereafter, a specified number of processes are generated, and each process is registered in a group. The registration of the process in the group is the same as in FIG. 2 or FIG. Also, the process generation process may be considered to be the same as the conventional method.

(2)グループ内プロセスの終了 グループ内プロセスの終了処理を行う関数のアルゴリ
ズムの例を第8図に示す。この関数では呼び出したプロ
セスを除いて、グループ内の全プロセスを終了させる。
(2) Termination of Intra-Group Process FIG. 8 shows an example of an algorithm of a function for terminating the in-group process. This function terminates all processes in the group except the calling process.

指定グループに対応するグループ管理テーブルのグル
ープリンク領域50からグループ内のプロセス管理テーブ
ルを全て辿り、当該プロセス管理テーブルが自プロセス
のものでなければ、該当プロセスを終了させる。グルー
プに属するプロセスを全て辿れば、関数の処理は終了で
ある。第8図のフローチャート中、80はグループリンク
領域を辿り、グループの最終位置のプロセスを辿り終え
れば、ループを終了する処理を示している。なお、プロ
セスの終了処理は従来の処理と同様であるが、以下の
(3),(4)に示す終了待ち処理のため、終了待ち状
態のプロセスを再開する処理を付加しておく必要があ
る。
All the process management tables in the group are traced from the group link area 50 of the group management table corresponding to the specified group, and if the process management table is not for the own process, the process is terminated. If all the processes belonging to the group are traced, the processing of the function is completed. In the flowchart of FIG. 8, reference numeral 80 denotes processing for tracing the group link area and terminating the loop when the process at the final position of the group is completed. The process termination process is the same as the conventional process. However, because of the termination waiting process shown in the following (3) and (4), it is necessary to add a process for restarting the process in the termination waiting state. .

(3)グループ内プロセスの終了待ち 第9図はグループ内のいずれか1つのプロセスの終了
待ちを行う関数のアルゴリズムの例である。
(3) Waiting for end of process in group FIG. 9 is an example of an algorithm of a function for waiting for the end of any one process in the group.

本関数の処理では、グループ内プロセスの終了待ちで
あることを示して待ち状態となる処理以外は、全てチェ
ック処理である。通常のオペレーティングシステムで待
ち状態となるための基本動作は、「1つの仮想アドレス
を指定して、そのアドレスについて待ち状態となる処
理」である。このアドレスの例としては、グループ管理
テーブルの該当グループのエントリのアドレス等を選択
すればよい。待ち状態となったプロセスはシステムの待
ち行列に登録される。なお、プロセスの終了処理では、
(2)において示したように、終了待ち状態のプロセス
を再開する処理が付加されている。
In the processing of this function, all processing is a check processing except for the processing in the waiting state indicating that the process in the group is waiting for completion. The basic operation for entering a wait state in a normal operating system is “processing of designating one virtual address and entering a wait state for that address”. As an example of this address, the address of the entry of the corresponding group in the group management table may be selected. The waiting process is registered in the system queue. In the process termination process,
As shown in (2), the process for restarting the process in the end waiting state is added.

(4)グループ内全プロセスの終了待ち 第10図はグループに属する全てのプロセスの終了待ち
を行う関数のアルゴリズムの例である。
(4) Waiting for the end of all processes in the group FIG. 10 is an example of an algorithm of a function for waiting for the end of all processes belonging to the group.

基本的には第9図の動作と同様である。この処理は、
グループ内プロセスが存在しなくなるか、グループに自
プロセスしか存在しなくなるまで繰り返す。なお、グル
ープにプロセスが存在するか否かは、グループ管理テー
ブルのグループリンク領域50がいずれのプロセス管理テ
ーブルも指していないか、グループカウンタ51の値が0
であるかを調べることにより調査できる。
The operation is basically the same as that of FIG. This process
This process is repeated until there are no more processes in the group or only the own process exists in the group. Whether a process exists in a group depends on whether the group link area 50 of the group management table does not point to any process management table or whether the value of the group counter 51 is 0.
Can be investigated by checking whether

(5)グループ内プロセスの停止 グループ内プロセスの停止処理を行う関数のアルゴリ
ズム例を第11図に示す。この関数では呼び出したプロセ
スを除いて、グループ内の全プロセスを停止させる。
(5) Stopping the process in the group FIG. 11 shows an example of the algorithm of the function for stopping the process in the group. This function stops all processes in the group except the calling process.

指定グループに対応するグループ管理テーブルのグル
ープリンク領域50からグループ内のプロセス管理テーブ
ルを全て辿り、当該プロセス管理テーブルが自プロセス
のものでなく、かつ、プロセスが実行可能状態であれ
ば、該当プロセスを停止させる。グループに属するプロ
セスを全て辿れば、関数の処理は終了する。プロセスの
停止処理は従来のプロセスの停止処理(「1つの仮想ア
ドレスを指定して、そのアドレスについてプロセスを待
ち状態となる処理」)と同様である。
By tracing all the process management tables in the group from the group link area 50 of the group management table corresponding to the specified group, if the process management table is not the process of the own process and the process is executable, the process is Stop. When all the processes belonging to the group are traced, the processing of the function ends. The process of stopping a process is the same as the conventional process of stopping a process (“designating one virtual address and putting the process in a wait state for that address”).

(6)グループ内プロセスの再開 グループ内プロセスの再開処理を行う関数のアルゴリ
ズム例を第12図に示す。
(6) Resumption of Intra-Group Process FIG. 12 shows an example of an algorithm of a function for resuming the in-group process.

指定グループに対応するグループ管理テーブルのグル
ープリンク領域50からグループ内のプロセス管理テーブ
ルを全て辿り、当該プロセスが待ち状態であれば、該当
プロセスを再開する。グループに属するプロセスを全て
辿れば、関数の処理は終了する。なお、本関数におい
て、グループ内のプロセスが自プロセスと一致するか否
かをチェックしていないのは、関数を実行する自プロセ
スが待ち状態であることがないためである。プロセスの
再開処理は、「指定された仮想アドレスについて待ち状
態となっているプロセスを待ち行列から取り出し、実行
可能状態とする処理」である。
All the process management tables in the group are traced from the group link area 50 of the group management table corresponding to the specified group, and if the process is in a waiting state, the process is restarted. When all the processes belonging to the group are traced, the processing of the function ends. In this function, it is not checked whether the processes in the group match the own process, because the own process executing the function is not in a waiting state. The process of resuming a process is a process of taking out a process that is in a waiting state for a specified virtual address from a queue and making it executable.

(7)グループの作成 グループの作成は、グループ管理テーブルに新たなエ
ントリを登録し、当該エントリの初期化(グループリン
ク領域がいずれのプロセス管理テーブルも指さないよう
に設定すること、グループカウンタ等を0にリセットす
ること)を行うだけでよい。グループ作成のアルゴリズ
ム例を第13図に示す。
(7) Creation of group To create a group, register a new entry in the group management table and initialize the entry (setting so that the group link area does not point to any process management table, group counter, etc.). Resetting to 0). FIG. 13 shows an example of an algorithm for creating a group.

(8)グループの削除 グループの削除では、グループ管理テーブルのエント
リを削除する前に、当該グループに属するプロセスを、
いずれのグループにも属さないように設定し直す必要が
ある。この処理のアルゴリズム例を第14図に示す。
(8) Deletion of a group In the deletion of a group, before deleting an entry in the group management table, a process belonging to the group is deleted.
It is necessary to set again so that it does not belong to any group. FIG. 14 shows an example of the algorithm of this processing.

グループ管理テーブルのグループリンク領域50からグ
ループに属するプロセスの管理テーブルを辿り、各管理
テーブルのグループリンク領域をリセットする。
The management table of the process belonging to the group is traced from the group link area 50 of the group management table, and the group link area of each management table is reset.

(9)プロセスのグループへの登録 1つのプロセスをグループへ登録する方式を第15図に
示す。
(9) Registering a process in a group FIG. 15 shows a method of registering one process in a group.

図示の方式はグループリンク領域を使用してグループ
化を行う場合に、登録するプロセスをグループの最終位
置に置く方式である。本方式ではグループリンク領域を
辿って、グループの最終位置のプロセス管理テーブルに
達し、最終位置のプロセス管理テーブルのグループリン
ク領域が新たに登録するプロセスの管理テーブルのアド
レスを指すように設定する。なお、これは、第1図の状
態から第3図の状態へと変更を行う方式である。
The illustrated method is a method in which, when grouping is performed using a group link area, a process to be registered is placed at the last position of the group. In this method, the process is set so that the process management table at the final position of the group is reached by tracing the group link area, and the group link area of the process management table at the final position indicates the address of the management table of the newly registered process. Note that this is a method of changing from the state of FIG. 1 to the state of FIG.

(10)プロセスのグループからの除去 1つのプロセスをグループから除去する方式のアルゴ
リズムを第16図に示す。
(10) Removal of a process from a group FIG. 16 shows an algorithm for removing one process from a group.

グループ管理テーブルのグループリンク領域50からグ
ループに属しているプロセスを辿り、指定プロセスが見
つかったら、その前後に位置するプロセス管理テーブル
を接続することにより、指定プロセスの管理テーブルを
グループから除去する。この後、グループから除去した
プロセスのグループリンク領域はリセットしておく必要
がある。
The processes belonging to the group are traced from the group link area 50 of the group management table, and when the specified process is found, the process management tables located before and after the specified process are connected to remove the management table of the specified process from the group. Thereafter, the group link area of the process removed from the group needs to be reset.

(11)プロセスの存在チェック 第17図はプロセスが指定されたグループに属している
か否かをチェックする方式を示している。
(11) Process existence check FIG. 17 shows a method for checking whether or not a process belongs to a specified group.

これは、グループリンク領域を利用してグループに属
するプロセス管理テーブルを辿り、指定プロセスの管理
テーブルがあれば、YESを示す値を返すだけでよい。
This means that the process management table belonging to the group is traced using the group link area, and if there is a management table of the designated process, a value indicating YES only needs to be returned.

(12)グループへのメッセージ放送 第18図はグループ内の全てのプロセスに対してメッセ
ージを通知する関数のアルゴリズムを示している。例え
ば、同様の処理を行うプロセスをグループ化してまとめ
ておき、「グループに対して一斉にメッセージを通知
し、グループに属するプロセスを同時に起動する」とい
った形で使用する。
(12) Message Broadcast to Group FIG. 18 shows an algorithm of a function for notifying a message to all processes in the group. For example, processes that perform the same processing are grouped and put together, and used in a form such as "Simultaneously notify a message to a group and simultaneously start processes belonging to the group".

第18図の処理は、ループ180で、グループの全てのプ
ロセス(自プロセスもグループに属する場合は自分以外
のプロセス)が自プロセスからのメッセージ受信待ち状
態になるまで待つ処理を行っている。グループ内の全て
のプロセスがメッセージ受信待ち状態となれば、ループ
181に制御が移行し、グループ内の各プロセスに対する
メッセージの転記と受信待ち状態であるプロセスの再開
とを行う。
In the process of FIG. 18, in a loop 180, a process of waiting until all processes of the group (other processes than the own process belong to the group) waits for a message to be received from the own process. When all processes in the group are waiting to receive a message, a loop
The control shifts to 181 to transfer a message to each process in the group and restart the process waiting for reception.

(13)グループへのメッセージ送信 第19図はグループ内のいずれかのプロセスに対してメ
ッセージを通知する関数のアルゴリズムを示している。
例えば、同一の処理を行うプロセスをグループ化してま
とめておき、「グループに対してメッセージを通知し、
グループに属するプロセスの内、現在仕事がないプロセ
スを起動する」といった形で使用する。
(13) Message transmission to group FIG. 19 shows an algorithm of a function for notifying any process in the group of a message.
For example, processes that perform the same processing are grouped and put together, and "Message is notified to the group,
Start processes that currently have no work among the processes belonging to the group. "

第19図の処理では、グループのいずれかのプロセスが
自プロセスからのメッセージ受信待ち状態になっている
かを調べ、メッセージ受信待ち状態のプロセスがあれ
ば、該当プロセスを実行可能状態として、メッセージを
通知する。グループ内の全てのプロセスがメッセージ受
信待ち状態でなければ、自らメッセージ送信待ち状態と
なる。この場合、グループのいずれかのプロセスがメッ
セージ受信を行うときに、送信待ち状態から実行可能状
態に変更される。
In the process shown in Fig. 19, it checks whether any of the processes in the group is waiting to receive a message from its own process. I do. If all the processes in the group are not in the message waiting state, they themselves enter the message transmission waiting state. In this case, when any of the processes in the group receives a message, the state is changed from the transmission waiting state to the executable state.

(14)グループからのメッセージ受信 第20図はグループ内のいずれかのプロセスからメッセ
ージを受信する関数のアルゴリズムを示している。例え
ば、同一の処理を行うプロセスをグループ化してまとめ
ておき、「グループからのメッセージを待ち、グループ
に属するプロセスの内、最も早く仕事が終ったプロセス
のメッセージから処理を行う」といった形で使用する。
(14) Message reception from group FIG. 20 shows an algorithm of a function for receiving a message from any process in the group. For example, processes that perform the same processing are grouped together and used in a form such as "Wait for a message from a group, and start processing from the message of the process that has completed the earliest of the processes belonging to the group." .

第20図の処理では、グループのいずれかのプロセスが
自プロセスへのメッセージ送信待ち状態になっているか
を調べ、メッセージ送信待ち状態のプロセスがあれば、
該当プロセスを実行可能状態として、メッセージの通知
を待つ。この間、受信側プロセスは受信待ち状態とな
り、メッセージ転記の終了を待つことになる。グループ
内の全てのプロセスがメッセージ送信待ち状態でなけれ
ば、自らメッセージ受信待ち状態となる。いずれの場合
も、グループのいずれかのプロセスがメッセージ転記を
終了したときに、受信待ち状態から実行可能状態に変更
される。
In the process of FIG. 20, it is checked whether any of the processes in the group is waiting for a message to be sent to the own process.
Put the process in an executable state and wait for a message notification. During this time, the receiving process is in a reception waiting state, and waits for the end of the message transfer. If all the processes in the group are not in the message transmission waiting state, they themselves enter the message reception waiting state. In any case, when any of the processes in the group has finished transferring the message, the state is changed from the waiting state to the executable state.

以上に示したプロセスグループ化処理を支援する関数
(サブルーチン)を使用することにより、ユーザは同一
処理/類似処理を行うプロセス、同一制御対象を扱うプ
ロセス等をグループとしてまとめることが可能である。
個々のプロセスを制御することなく、グループ単位で制
御すると、プロセス制御を容易に実現できることにな
る。
By using the function (subroutine) that supports the process grouping process described above, the user can group processes that perform the same process / similar process, processes that handle the same control target, and the like as a group.
If control is performed on a group basis without controlling individual processes, process control can be easily realized.

以下、上記グループ化の基本制御関数をいかに用いる
かを、グラフィックシステムの構成を例として説明す
る。
Hereinafter, how to use the basic control function of the grouping will be described with reference to the configuration of the graphic system as an example.

第21図は通常のグラフィックシステムの構成の一例を
示している。なお、本例では、システムのプログラムを
実行する単位として、プロセスを選択しているが、これ
をスレッドに置き換えて高速化することも可能である。
スレッドは一つのプロセス内部で実行環境を共有して並
列に動作するため、実行環境の切り換えの必要がなく、
スレッド切り換え時間がプロセス切り換え時間にくらべ
て短縮されるからである。
FIG. 21 shows an example of the configuration of an ordinary graphic system. In this example, a process is selected as a unit for executing a system program. However, it is also possible to replace the process with a thread to increase the speed.
Threads share the execution environment inside one process and operate in parallel, so there is no need to switch the execution environment,
This is because the thread switching time is shorter than the process switching time.

ユーザによって、キーボード210等の入力装置から描
画コマンドが与えられた場合、コマンド処理プロセス21
1がコマンドを解釈し、グラフィックシステムを起動す
る。グラフィックシステムでは、まず、図形データ変換
プロセス212a,212b,212cが起動される。各図形データ変
換プロセスは、描画に必要なデータを図形データベース
213から取り出し、計算機で処理し易いデータである描
画プリミティブ214へと変換する。第21図の構成例で
は、各図形データ変換プロセスが、球,立方体,円錐な
どの図形データと結び付いている。描画プリミティブと
は、例えば、線データ(始点/終点の位置)、面データ
(三角形近似,四角形近似であれば、各頂点の位置)等
である。これは描画アルゴリズムの種類によって各種存
在する。
When a user gives a drawing command from an input device such as the keyboard 210, the command processing process 21
1 interprets the command and activates the graphics system. In the graphic system, first, the graphic data conversion processes 212a, 212b, 212c are started. Each graphic data conversion process converts the data required for drawing into a graphic database.
213 and converted into a rendering primitive 214 which is data that can be easily processed by a computer. In the configuration example of FIG. 21, each graphic data conversion process is associated with graphic data such as a sphere, a cube, and a cone. The drawing primitives are, for example, line data (positions of start point / end point), plane data (positions of vertices in the case of triangle approximation or quadrangle approximation), and the like. This exists in various ways depending on the type of drawing algorithm.

画像プリミティブは座標変換プロセス215a,215b,215c
によって、座標データ216に変換される。X座標,Y座標,
Z座標は独立に計算可能であるため、別個のプロセスに
よって計算させている。グラフィックスシステムを動作
させる計算機システムがマルチプロセッサ型計算機であ
り、複数個のプロセスを同時に実行可能である場合、高
速化が図れることになる。最後に、輝度計算プロセス21
7が、座標データに対して輝度計算等を行い、CRTディス
プレイ218に表示可能な表示データ219を生成する。
Image primitives are coordinate transformation processes 215a, 215b, 215c
Is converted into coordinate data 216. X coordinate, Y coordinate,
Since the Z coordinate can be calculated independently, it is calculated by a separate process. If the computer system that operates the graphics system is a multiprocessor computer and can execute a plurality of processes at the same time, the speed can be increased. Finally, the brightness calculation process 21
7 performs a brightness calculation or the like on the coordinate data, and generates display data 219 that can be displayed on the CRT display 218.

次に、上記のグラフィックシステムに対して、プロセ
スのグループ化制御がどのように使用されるかを示す。
第22図はグラフィックシステムに本発明のグループ化制
御を使用した場合の構成の一例を示している。
Next, how the process grouping control is used for the above graphic system will be described.
FIG. 22 shows an example of a configuration when the grouping control of the present invention is used in a graphic system.

本実施例では、3つのプロセスグループを導入してい
る。第1のプロセスグループは、図形データ変換グルー
プ220であり、各種のデータに対応している図形データ
変換プロセス212a,212b,212cをまとめて制御する。各図
形データ変換プロセスは個別に図形データと結び付いて
いるが、コマンド処理プロセス211からは、1つのグル
ープに対する依頼処理によって起動できる(グループへ
のメッセージ放送等による依頼を行えばよい)。
In this embodiment, three process groups are introduced. The first process group is a graphic data conversion group 220, which collectively controls graphic data conversion processes 212a, 212b, and 212c corresponding to various data. Each graphic data conversion process is individually associated with graphic data, but can be started from the command processing process 211 by a request process for one group (the request may be made by message broadcasting to the group).

第2のプロセスグループは、座標変換グループ221で
ある。各描画プリミティブに対しては、必ず、X座標,Y
座標,Z座標の3つの変換を行わなければならない。これ
らの座標変換を行うプロセスをグループとしてまとめる
ことにより、個々のプロセスの存在を意識することな
く、グループ全体が3次元の座標変換を行う処理単位で
あると見なすことができる。なお、描画プリミティブの
通知はグループに対するメッセージ放送等により、座標
データの受理はグループからのメッセージ受信等により
実現できる。
The second process group is a coordinate conversion group 221. For each drawing primitive, be sure to set the X coordinate, Y
Three transformations of coordinates and Z coordinates must be performed. By grouping the processes for performing these coordinate conversions as a group, the entire group can be regarded as a processing unit for performing three-dimensional coordinate conversion without being aware of the existence of individual processes. The drawing primitive can be notified by message broadcasting to the group, and the coordinate data can be received by message reception from the group.

第3のプロセスグループは、輝度計算グループ222で
ある。第21図の構成例では、輝度計算プロセスは1個の
みであった。しかし、輝度計算(境界線平滑化処理、付
影処理等を含む)は負荷が大きく、1つのプロセスで行
う場合には、この処理がシステムのネックとなる場合が
ある。このため、マルチプロセッサ型計算機でグラフィ
ックシステムを実現するに当たっては、輝度計算プロセ
スを複数個発生させ、複数個のプロセッサを使用して並
列に動作させる方式がとられることが多い。このとき、
輝度計算プロセスに処理を依頼する場合に、各プロセス
の状態を調べ、処理を実行中でないプロセスに新たな処
理を依頼するという手段をとる。グループ制御を用い
て、同一処理を行う輝度計算プロセスをまとめれば、こ
の手間を省くことができる。具体的には、グループに対
するメッセージ送信等を利用すれば、グループ制御を行
うライブラリ関数又はシステムコール側で忙しくないプ
ロセスを選択し、当該プロセスに処理依頼を通知してく
れる。
The third process group is a luminance calculation group 222. In the configuration example shown in FIG. 21, there is only one luminance calculation process. However, the brightness calculation (including the boundary line smoothing process, the shading process, and the like) has a large load, and when this process is performed by one process, this process may be a bottleneck in the system. For this reason, in implementing a graphic system with a multiprocessor computer, a method of generating a plurality of luminance calculation processes and operating in parallel using a plurality of processors is often adopted. At this time,
When a process is requested to the luminance calculation process, a means of checking the state of each process and requesting a process that is not executing the process to perform a new process is used. If the luminance calculation processes for performing the same processing are grouped by using the group control, this trouble can be omitted. More specifically, if a message transmission to a group is used, a library function for performing group control or a process that is not busy on the system call side is selected, and a process request is notified to the process.

このように、プロセスグループを使用することによ
り、空きプロセスを探すステップ等を記述することが不
要となるので、プログラム作成やデバッグなどの手間を
省くことが可能である。プロセスグループ化の手法は、
この他、各種の応用システムにおいて使用できる。
As described above, by using the process group, it is not necessary to describe a step for searching for an empty process, and the like, so that it is possible to save trouble such as program creation and debugging. The process grouping method is
In addition, it can be used in various application systems.

以上、プロセスのグループ化制御について実施例を詳
細に説明したが、スレッドのグループ化制御も同様であ
る。ただし、スレッドのグループ化制御を使用する場合
は、第23図に示すようなグループ化も可能である。すな
わち、プロセス間にまたがって、スレッドをグループ化
できる。これにより、プロセスとしてスレッドをまとめ
る方式と、グループによりスレッドをまとめる方式とを
共存させ、より細かな制御が可能となる。プロセス間に
またがってスレッドをグループ化する例として、プロセ
ス間で互いに通信するスレッドをグループ化すること、
または、エラーメッセージの出力を行うスレッド等同一
の制御対象を扱うスレッドをグループ化して、排他制御
を行うことが挙げられる。
Although the embodiment has been described in detail for the process grouping control, the same applies to the thread grouping control. However, when using thread grouping control, grouping as shown in FIG. 23 is also possible. That is, threads can be grouped across processes. As a result, a method of grouping threads as a process and a method of grouping threads by group coexist, and finer control becomes possible. Examples of grouping threads across processes include grouping threads that communicate with each other between processes,
Alternatively, there is a method of performing exclusive control by grouping threads that handle the same control target, such as a thread that outputs an error message.

〔発明の効果〕〔The invention's effect〕

本発明のグループ化手段によれば、同一処理や類似処
理を行うプロセス/スレッド、または、同一制御対象を
扱うプロセス/スレッドを、複数個まとめて制御するこ
とが可能となる。複数個のプロセス/スレッドを1つの
グループとして制御することにより、並列処理や排他制
御を容易に実現できる。したがって、本発明のグループ
化プロセス/スレッド管理方式により、ユーザインタフ
ェースが向上する。
According to the grouping means of the present invention, it is possible to control a plurality of processes / threads that perform the same processing or similar processing, or a plurality of processes / threads that handle the same control target. By controlling a plurality of processes / threads as one group, parallel processing and exclusive control can be easily realized. Therefore, the user interface is improved by the grouping process / thread management method of the present invention.

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

第1図は本発明によるプロセスグループ化手段の第1実
施例の構成を示す図、第2図は第1実施例におけるプロ
セスのグループへの登録方法を示す図、第3図は第1実
施例におけるグループ管理テーブルの構成を示す図、第
4図は本発明のプロセスグループ化の第2実施例の構成
を示す図、第5図は第2実施例におけるプロセスのグル
ープへの登録方法を示す図、第6図は第2実施例におけ
るグループ管理テーブルの構成を示す図、第7図は複数
プロセスを生成してグループに登録するアルゴリズムを
示す図、第8図はグループ内プロセスを終了させるアル
ゴリズムを示す図、第9図はグループ内の1つのプロセ
スの終了待ちを行うアルゴリズムを示す図、第10図はグ
ループ内全プロセスの終了待ちを行うアルゴリズムを示
す図、第11図はグループ内プロセスの停止処理のアルゴ
リズムを示す図、第12図はグループ内プロセスの再開処
理のアルゴリズムを示す図、第13図は新規グループの生
成処理のアルゴリズムを示す図、第14図はグループの削
除を行うアルゴリズムを示す図、第15図はグループへプ
ロセスを追加する処理を行うアルゴリズムを示す図、第
16図はグループからプロセスを除去する処理を行うアル
ゴリズムを示す図、第17図はプロセスがグループに存在
するか否かをチェックするためのアルゴリズムを示す
図、第18図はグループ内全プロセスにメッセージを放送
するアルゴリズムを示す図、第19図はグループ内の1つ
のプロセスにメッセージを送信するアルゴリズムを示す
図、第20図はグループ内の1つのプロセスからメッセー
ジを受理するアルゴリズムを示す図、第21図は従来のグ
ラフィックシステムの構成の一例を示す図、第22図はグ
ラフィックシステムに本発明のプロセスグループ化手段
を導入した構成の一例を示す図、第23図はスレッドグル
ープ化の概念を示す図である。 10,20……グループ管理テーブル、 11,21……グループ管理テーブルの1エントリ、 12a,12b,12c……プロセス管理テーブル、 13,50……グループリンク領域、 22a,22b……グループテーブル、51……グループカウン
タ、 52……グループリンクテール、60……グループテーブル
ポインタ、 210……キーボード、211……コマンド処理、 212……図形データの変換、213……図形データベース、 214……描画プリミティブ、215……座標変換、216……
座標データ、 217……輝度計算、218……CRT、219……表示データ、 220……図形データ変換グループ、 221……座標変換グループ、222……輝度計算グループ。
FIG. 1 is a diagram showing a configuration of a first embodiment of a process grouping means according to the present invention, FIG. 2 is a diagram showing a method of registering a process in a group in the first embodiment, and FIG. 3 is a first embodiment. FIG. 4 is a diagram showing a configuration of a second embodiment of process grouping of the present invention, and FIG. 5 is a diagram showing a method of registering a process in a group in the second embodiment. FIG. 6 is a diagram showing the configuration of a group management table in the second embodiment, FIG. 7 is a diagram showing an algorithm for generating a plurality of processes and registering them in a group, and FIG. FIG. 9, FIG. 9 is a diagram showing an algorithm for waiting for the termination of one process in the group, FIG. 10 is a diagram showing an algorithm for waiting for termination of all processes in the group, and FIG. FIG. 12 is a diagram showing an algorithm of a process of stopping a process in a group, FIG. 12 is a diagram showing an algorithm of a process of restarting a process in a group, FIG. 13 is a diagram showing an algorithm of a process of generating a new group, and FIG. FIG. 15 is a diagram showing an algorithm for performing deletion, FIG. 15 is a diagram showing an algorithm for performing a process of adding a process to a group, FIG.
FIG. 16 is a diagram showing an algorithm for removing a process from a group, FIG. 17 is a diagram showing an algorithm for checking whether a process exists in a group, and FIG. 18 is a message to all processes in the group. FIG. 19 is a diagram showing an algorithm for transmitting a message to one process in a group, FIG. 20 is a diagram showing an algorithm for receiving a message from one process in a group, FIG. FIG. 1 is a diagram showing an example of a configuration of a conventional graphic system, FIG. 22 is a diagram showing an example of a configuration in which a process grouping unit of the present invention is introduced into a graphic system, and FIG. 23 is a diagram showing a concept of thread grouping. It is. 10, 20 ... group management table, 11, 21 ... one entry of group management table, 12a, 12b, 12c ... process management table, 13,50 ... group link area, 22a, 22b ... group table, 51 …… Group counter, 52 …… Group link tail, 60 …… Group table pointer, 210 …… Keyboard, 211 …… Command processing, 212 …… Graph data conversion, 213 …… Graph database, 214 …… Drawing primitive, 215 …… Coordinate transformation, 216 ……
Coordinate data, 217: luminance calculation, 218: CRT, 219: display data, 220: graphic data conversion group, 221: coordinate conversion group, 222: luminance calculation group.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小林 芳樹 茨城県日立市久慈町4026番地 株式会社 日立製作所日立研究所内 (72)発明者 中村 智明 茨城県日立市大みか町5丁目2番1号 株式会社日立製作所大みか工場内 (56)参考文献 特開 平1−316830(JP,A) 特開 昭58−78238(JP,A) 特開 昭63−298534(JP,A) 特開 昭62−11941(JP,A) 特開 平3−148730(JP,A) 特開 昭63−4339(JP,A) 特開 平1−236329(JP,A) 情報処理学会第39回全国大会講演論文 集(▲II▼),pp.1193〜1198(平 成元年) 情報処理学会論文誌,Vol.31,N o.2(1990年2月)pp.275〜287 bit 1988年11月号(共立出版株式 会社),pp.75〜82 bit 1988年12月号(共立出版株式 会社),pp.68〜79 (58)調査した分野(Int.Cl.6,DB名) G06F 9/46,15/16 JOIS(JICSTファイル) CSDB(日本国特許庁)──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Yoshiki Kobayashi 4026 Kuji-cho, Hitachi City, Ibaraki Prefecture Inside Hitachi, Ltd. Hitachi Research Laboratory Co., Ltd. (72) Inventor Tomoaki Nakamura 5-2-1 Omikacho, Hitachi City, Ibaraki Prefecture Co., Ltd. (56) References JP-A-1-316830 (JP, A) JP-A-58-78238 (JP, A) JP-A-63-298534 (JP, A) JP-A-62-11941 (JP) JP, A) JP-A-3-148730 (JP, A) JP-A-63-4339 (JP, A) JP-A-1-236329 (JP, A) Proc. Of the 39th Annual Conference of IPSJ (▲ II ▼), pp. 1193-1198 (Nagoya Hira) Transactions of Information Processing Society of Japan, Vol. 31, No. 2 (February 1990) pp. 275-287 bits November 1988 issue (Kyoritsu Shuppan Co., Ltd.), pp. 75-82 bit December 1988 issue (Kyoritsu Publishing Co., Ltd.), pp. 68-79 (58) Field surveyed (Int. Cl. 6 , DB name) G06F 9 / 46,15 / 16 JOIS (JICST file) CSDB (Japan Patent Office)

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】プロセス内で実行環境を共有するスレッド
が前記プロセス内で複数個並行して動作するマルチスレ
ッド環境の計算機システムにおいて、 相互に関連するスレッドの各々の管理テーブルを接続し
てスレッド群をプロセスとは独立にグループ化し、当該
グループ内の複数個のスレッドをまとめて制御する手段
が、 1つのグループを指定し、当該グループに属している全
てのスレッドを待ち状態とする手段と、 1つのグループを指定し、当該グループに属している全
てのスレッドを実行可能状態とする手段と、 1つのグループを指定し、当該グループに属している全
てのスレッドを終了させる手段とを備えた ことを特徴とするマルチスレッド環境の計算機システ
ム。
1. A multi-threaded computer system in which a plurality of threads sharing an execution environment in a process operate in parallel in the process, wherein a thread group is formed by connecting management tables of mutually related threads. Means for independently grouping a plurality of threads in the group, and means for controlling a plurality of threads in the group collectively; means for designating one group and setting all threads belonging to the group to a waiting state; Means for designating one group and making all threads belonging to the group executable, and means for designating one group and terminating all threads belonging to the group. Characteristic multi-threaded computer system.
【請求項2】請求項1に記載のマルチスレッド環境の計
算機システムにおいて、 前記複数個のスレッドをまとめて制御する手段が、 新たなグループを作成する手段と、 1つのグループを指定し、当該グループに属している全
てのスレッドを当該グループから除去し、当該グループ
を削除する手段と、 1つのグループと1つのスレッドを指定し、当該グルー
プに当該スレッドを登録する手段と、 1つのグループと1つのスレッドを指定し、当該グルー
プから当該スレッドを除去する手段と、 1つのグループと1つのスレッドを指定し、当該グルー
プに当該スレッドが存在するか否かを調査する手段とを
備えた ことを特徴とするマルチスレッド環境の計算機システ
ム。
2. The computer system according to claim 1, wherein said means for controlling said plurality of threads collectively includes means for creating a new group, and specifying one group, and Means for removing all threads belonging to the group from the group and deleting the group; means for specifying one group and one thread and registering the thread in the group; one group and one thread Means for designating a thread and removing the thread from the group; means for designating one group and one thread and examining whether the thread exists in the group. Multi-threaded computer system.
【請求項3】プロセス内で実行環境を共有するスレッド
が前記プロセス内で複数個並行して動作し、スレッドの
グループ化と同期型メッセージ通信とを可能とするマル
チスレッド環境の計算機システムにおいて、 相互に関連するスレッドの各々の管理テーブルを接続し
てスレッド群をプロセスとは独立にグループ化し、当該
グループ内の複数個のスレッドをまとめて制御する手段
が、 1つのグループを指定し、当該グループに属している全
てのスレッドが自スレッドからのメッセージ受信待ち状
態であれば、当該グループ内の全てのスレッドにメッセ
ージを通知し、当該グループに属しているいずれかのス
レッドが自スレッドからのメッセージ受信待ち状態でな
ければ、当該グループ内の全てのスレッドが自スレッド
からのメッセージ受信の要求を出すまで、自スレッドを
待ち状態とし、その後、当該グループ内の全てのスレッ
ドにメッセージを通知する手段を備えた ことを特徴とするマルチスレッド環境の計算機システ
ム。
3. A computer system in a multi-thread environment in which a plurality of threads sharing an execution environment in a process operate in parallel in the process to enable thread grouping and synchronous message communication. Means for connecting the management tables of the threads related to, grouping the thread group independently of the process, and controlling a plurality of threads in the group collectively, designates one group, and assigns the group to the group. If all the belonging threads are in a state of waiting for a message from the own thread, a message is notified to all the threads in the group, and any thread belonging to the group waits for a message from the own thread. If not, all threads in the group receive messages from their own thread Until issues a request, and a state waiting for its own thread, then computer system of a multi-threaded environment, characterized in that it comprises means for notifying a message to all threads in the group.
【請求項4】プロセス内で実行環境を共有するスレッド
が前記プロセス内で複数個並行して動作し、スレッドの
グループ化と同期型メッセージ通信とを可能とするする
マルチスレッド環境の計算機システムにおいて、 相互に関連するスレッドの各々の管理テーブルを接続し
てスレッド群をプロセスとは独立にグループ化し、当該
グループ内の複数個のスレッドをまとめて制御する手段
が、 1つのグループを指定し、当該グループに属している全
てのスレッドが自スレッドからのメッセージ受信待ち状
態であれば、当該グループ内の全てのスレッドにメッセ
ージを通知し、当該グループに属しているいずれかのス
レッドが自スレッドからのメッセージ受信待ち状態でな
ければ、当該グループ内の全つのスレッドが自スレッド
からのメッセージ受信の要求を出すまで、自スレッドを
待ち状態とし、その後、当該グループ内の全てのスレッ
ドにメッセージを通知する手段と、 1つのグループを指定し、当該グループに属しているい
ずれかのスレッドが自スレッドからのメッセージ受信待
ち状態であれば、当該スレッドにメッセージを通知し、
当該グループに属しているいずれのスレッドも自スレッ
ドからのメッセージ受信待ち状態でなければ、当該グル
ープ内のいずれかのスレッドが自スレッドからのメッセ
ージ受信の要求を出すまで、自スレッドを待ち状態と
し、その後、メッセージ受信要求を出したスレッドにメ
ッセージを通知する手段と、 1つのグループを指定し、当該グループに属しているい
ずれかのスレッドが自スレッドへのメッセージ受信待ち
状態であれば、当該スレッドからメッセージを受理し、
当該グループに属しているいずれのスレッドも自スレッ
ドへのメッセージ送信待ち状態でなければ、当該グルー
プ内のいずれかのスレッドが自スレッドへのメッセージ
送信の要求を出すまで、自スレッドを待ち状態とし、そ
の後、メッセージ送信要求を出したスレッドからメッセ
ージを受信する手段とを備えた ことを特徴とするマルチスレッド環境の計算機システ
ム。
4. A computer system in a multi-thread environment in which a plurality of threads sharing an execution environment in a process operate in parallel in the process to enable thread grouping and synchronous message communication. Means for connecting the management tables of the mutually related threads to group the thread group independently of the process, and for controlling a plurality of threads in the group collectively, designates one group, and specifies the group. If all the threads belonging to the group are in a state of waiting for a message from the own thread, the thread notifies all the threads in the group, and any thread belonging to the group receives a message from the own thread. If not waiting, all threads in the group will receive messages from their thread Until a request for communication is made, the own thread is kept in a waiting state, and then, a means for notifying a message to all threads in the group, and one group is designated, and any thread belonging to the group is assigned a self-thread. If the thread is waiting to receive a message from the thread, the thread is notified of the message,
If none of the threads belonging to the group are in a waiting state for receiving a message from the own thread, the thread is set to a waiting state until any thread in the group issues a request for receiving a message from the own thread, Then, a means for notifying the message to the thread that has issued the message reception request, and specifying one group, and if any thread belonging to the group is in a state of waiting for a message to be received by its own thread, the corresponding thread Accept the message,
If none of the threads belonging to the group are in a state of waiting for a message to be sent to the own thread, the thread is set to a waiting state until any thread in the group issues a request to send a message to the own thread, And a means for receiving a message from a thread that has issued a message transmission request.
【請求項5】プロセス内で実行環境を共有するスレッド
が前記プロセス内で複数個並行して動作するマルチスレ
ッド環境の計算機システムにおいて、相互に関連するス
レッドの各々の管理テーブルを接続してスレッド群をプ
ロセスとは独立にグループ化し、当該グループ内の複数
個のスレッドをまとめて制御するマルチスレッド実行環
境の制御方法であって、 1つのグループを指定し、当該グループに属している全
てのスレッドを待ち状態とする工程と、 1つのグループを指定し、当該グループに属している全
てのスレッドを実行可能状態とする工程と、 1つのグループを指定し、当該グループに属している全
てのスレッドを終了させる工程とを有するマルチスレッ
ド実行環境の制御方法。
5. In a multi-thread environment computer system in which a plurality of threads sharing an execution environment in a process operate in parallel in the process, a thread group is formed by connecting respective management tables of mutually related threads. Is a method for controlling a multi-thread execution environment in which a plurality of threads in a group are controlled independently of a process, and a plurality of threads in the group are collectively controlled. Waiting step, specifying one group, and setting all threads belonging to the group to an executable state, specifying one group, and terminating all threads belonging to the group And controlling the multi-thread execution environment.
JP2057079A 1990-03-08 1990-03-08 Computer system in multi-thread environment Expired - Lifetime JP2990286B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2057079A JP2990286B2 (en) 1990-03-08 1990-03-08 Computer system in multi-thread environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2057079A JP2990286B2 (en) 1990-03-08 1990-03-08 Computer system in multi-thread environment

Publications (2)

Publication Number Publication Date
JPH03257633A JPH03257633A (en) 1991-11-18
JP2990286B2 true JP2990286B2 (en) 1999-12-13

Family

ID=13045471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2057079A Expired - Lifetime JP2990286B2 (en) 1990-03-08 1990-03-08 Computer system in multi-thread environment

Country Status (1)

Country Link
JP (1) JP2990286B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04338836A (en) * 1991-05-16 1992-11-26 Ricoh Co Ltd Control system for image forming device
JP2541447B2 (en) * 1993-04-30 1996-10-09 日本電気株式会社 Data processing device
JP2856681B2 (en) * 1994-01-27 1999-02-10 インターナショナル・ビジネス・マシーンズ・コーポレイション Method and system for handling external events
JP2006185360A (en) * 2004-12-28 2006-07-13 Sony Computer Entertainment Inc Program debugging device, program debugging method, and program
JP5566832B2 (en) * 2010-09-28 2014-08-06 富士通テン株式会社 Information processing apparatus and information processing method
US11580199B2 (en) 2019-09-20 2023-02-14 International Business Machines Corporation Correspondence of external operations to containers and mutation events

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
bit 1988年11月号(共立出版株式会社),pp.75〜82
bit 1988年12月号(共立出版株式会社),pp.68〜79
情報処理学会第39回全国大会講演論文集(▲II▼),pp.1193〜1198(平成元年)
情報処理学会論文誌,Vol.31,No.2(1990年2月)pp.275〜287

Also Published As

Publication number Publication date
JPH03257633A (en) 1991-11-18

Similar Documents

Publication Publication Date Title
US7098921B2 (en) Method, system and computer program product for efficiently utilizing limited resources in a graphics device
WO2020108303A1 (en) Heterogeneous computing-based task processing method and software-hardware framework system
JP3659062B2 (en) Computer system
US9996401B2 (en) Task processing method and virtual machine
US8209690B2 (en) System and method for thread handling in multithreaded parallel computing of nested threads
US8117615B2 (en) Facilitating intra-node data transfer in collective communications, and methods therefor
US7984448B2 (en) Mechanism to support generic collective communication across a variety of programming models
CN102597950B (en) Hardware-based scheduling of GPU work
US8112559B2 (en) Increasing available FIFO space to prevent messaging queue deadlocks in a DMA environment
US20080109810A1 (en) Parallel engine support in display driver model
JPH0223894B2 (en)
JP2863428B2 (en) Conversational graphics system
JPH03139777A (en) Graphic display system and method
JPH0754471B2 (en) Data processing device
US8631086B2 (en) Preventing messaging queue deadlocks in a DMA environment
JP2990286B2 (en) Computer system in multi-thread environment
Webb et al. Process networks as a high-level notation for metacomputing
CN114281467A (en) System method, device and storage medium for realizing heat migration
CN112346835A (en) Scheduling processing method and system based on coroutine
CN115983047A (en) Cross-platform simulation system suitable for multiple graphical interfaces
CN116795524A (en) Task processing method, device, computer equipment, storage medium and program product
US10713085B2 (en) Asynchronous sequential processing execution
CN103631648A (en) Task processing method and system
CN111782482B (en) Interface pressure testing method and related equipment
CN109947561B (en) Virtual scene processing method and device and storage medium