JP5446666B2 - Process management program and process management method - Google Patents

Process management program and process management method Download PDF

Info

Publication number
JP5446666B2
JP5446666B2 JP2009222305A JP2009222305A JP5446666B2 JP 5446666 B2 JP5446666 B2 JP 5446666B2 JP 2009222305 A JP2009222305 A JP 2009222305A JP 2009222305 A JP2009222305 A JP 2009222305A JP 5446666 B2 JP5446666 B2 JP 5446666B2
Authority
JP
Japan
Prior art keywords
parent
child
control table
parent process
proxy
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.)
Active
Application number
JP2009222305A
Other languages
Japanese (ja)
Other versions
JP2011070504A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009222305A priority Critical patent/JP5446666B2/en
Publication of JP2011070504A publication Critical patent/JP2011070504A/en
Application granted granted Critical
Publication of JP5446666B2 publication Critical patent/JP5446666B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、プロセスを管理する技術に関する。   The present invention relates to a technique for managing a process.

UNIX(登録商標)などのオペレーティングシステムでは、アプリケーションの実行主体である子プロセスが何らかの原因で異常終了したときに、親プロセスが子プロセスを再起動することで、アプリケーションの運用を継続させる機構が備えられている。また、子プロセスよりも先に親プロセスが終了したときに、子プロセスが使用していたリソースを解放できなくなってしまうことから、「initプロセス」と呼ばれるシステムプロセスが子プロセスの里親に設定される。   In an operating system such as UNIX (registered trademark), when a child process that is an execution subject of an application terminates abnormally for some reason, the parent process restarts the child process so that the operation of the application is continued. It has been. Also, when the parent process terminates before the child process, the resources used by the child process cannot be released, so a system process called "init process" is set as the child process's foster parent. .

特開平01−224846号公報Japanese Patent Laid-Open No. 01-224846

しかしながら、システムプロセスは特定のアプリケーションに対応していないため、システムプロセスを里親とする子プロセスが異常終了したときには、その子プロセスを再起動させることができなくなってしまう。このため、システムプロセスを里親とする子プロセスが異常終了すると、アプリケーションの運用を継続させることができなくなってしまうおそれがあった。   However, since the system process does not correspond to a specific application, when a child process having the system process as a foster parent terminates abnormally, the child process cannot be restarted. For this reason, if a child process whose foster parent is a system process is abnormally terminated, there is a possibility that the operation of the application cannot be continued.

そこで、従来技術の問題点に鑑み、アプリケーションに対応した代理親プロセスを里親とすることで、親プロセスが異常終了した後で子プロセスが異常終了しても、アプリケーションの運用を継続できるプロセス管理技術を提供することを目的とする。   Therefore, in view of the problems of the prior art, a process management technology that can continue application operation even if the child process terminates abnormally after the parent process terminates abnormally by adopting the proxy parent process corresponding to the application as the foster parent The purpose is to provide.

このため、本提案技術では、親プロセス及び子プロセスの親子関係を定義するメモリ上の制御テーブルに基づいてプロセスを管理するコンピュータが、親プロセスの異常終了を検出したとき、代理親プロセスが子プロセスの親プロセスになるように、制御テーブルの親子関係を更新するようにする。ここで、代理親プロセスとは、親プロセスによる子プロセスの監視及び管理を代行する里親となるプロセスのことをいう。   For this reason, in the proposed technique, when the computer that manages the process based on the control table on the memory that defines the parent-child relationship between the parent process and the child process detects the abnormal termination of the parent process, the proxy parent process The parent-child relationship of the control table is updated so that it becomes the parent process. Here, the surrogate parent process refers to a process that becomes a foster parent acting on behalf of monitoring and management of a child process by the parent process.

本提案技術によれば、親プロセスが異常終了したときには、代理親プロセスが子プロセスの監視及び管理を行うこととなるため、その後、異常終了した子プロセスを再起動させることができるようになる。このため、子プロセスが異常終了しても、アプリケーションの運用を継続させることが可能となり、高信頼性を有する情報システムを構築することができる。   According to the proposed technique, when the parent process terminates abnormally, the proxy parent process monitors and manages the child process, so that the child process terminated abnormally can be restarted. For this reason, even if the child process is abnormally terminated, the operation of the application can be continued, and a highly reliable information system can be constructed.

初期状態におけるプロセス親子関係の説明図である。It is explanatory drawing of the process parent-child relationship in an initial state. 親プロセス異常終了後のプロセス親子関係の説明図である。It is explanatory drawing of the process parent-child relationship after a parent process abnormal end. コンピュータが具現化する各種機能のブロック図である。It is a block diagram of the various functions which a computer embodies. 制御テーブルの説明図である。It is explanatory drawing of a control table. 親プロセスと子プロセスとの親子関係の説明図である。It is explanatory drawing of the parent-child relationship between a parent process and a child process. プロセス終了検出処理を示すフローチャートである。It is a flowchart which shows a process end detection process. 制御テーブル更新処理を示すフローチャートである。It is a flowchart which shows a control table update process. 親プロセスが異常終了したときに更新される親子関係の説明図である。It is explanatory drawing of the parent-child relationship updated when a parent process is abnormally terminated. 代理親プロセスの第1変形例の説明図である。It is explanatory drawing of the 1st modification of a proxy parent process. 代理親プロセスの第2変形例の説明図である。It is explanatory drawing of the 2nd modification of a proxy parent process. 具体的事例を考察するための前提条件の説明図である。It is explanatory drawing of the precondition for considering a specific example. 親プロセスが子プロセスより先に終了した場合のシーケンス図である。FIG. 11 is a sequence diagram when a parent process ends before a child process. 代理親プロセスが親プロセスより先に終了した場合のシーケンス図である。FIG. 11 is a sequence diagram when a proxy parent process ends before a parent process.

以下、添付された図面を参照して本提案技術を詳述する。
UNIX(登録商標)などのオペレーティングシステムでは、実行状態にあるプログラムを「プロセス」と呼び、任意のプロセスから新しいプロセスを生成することができる。この場合、新しいプロセスを生成したプロセスを「親プロセス」と呼ぶ一方、親プロセスから生成されたプロセスを「子プロセス」と呼ぶ。
Hereinafter, the proposed technique will be described in detail with reference to the accompanying drawings.
In an operating system such as UNIX (registered trademark), a program in an execution state is called a “process”, and a new process can be generated from an arbitrary process. In this case, a process that generates a new process is called a “parent process”, while a process generated from the parent process is called a “child process”.

本提案技術では、図1に示すように、親プロセスPPを代理する代理親プロセスを子プロセスCP1〜CPn+1の1つに設定する。そして、親プロセスPPが異常終了したときに、図2に示すように、代理親プロセスとしての子プロセスCPn+1を子プロセスCP1〜CPnの里親とすることで、孤児プロセスが存在することを回避し、アプリケーションの運用を継続できるようにする。 In the proposed technique, as shown in FIG. 1, the proxy parent process that substitutes the parent process PP is set to one of the child processes CP 1 to CP n + 1 . When the parent process PP abnormally terminated, as shown in FIG. 2, by a foster child CP n + 1 the child CP 1 ~ CP n as a surrogate parent process, there are orphan process So that the application can continue to operate.

具体的には、図3に示すように、プロセス管理装置として機能するコンピュータ10は、ストレージにインストールされたプロセス管理プログラムを実行することで、プロセス終了検出部20と、制御テーブル更新部30と、を夫々具現化する。ここで、プロセス管理プログラムは、オペレーティングシステムに組み込まれ、CD−ROMなどのコンピュータ読取可能な記録媒体からコンピュータのストレージにインストールされる。また、プロセル終了検出部20及び制御テーブル更新部30は、夫々、プロセス終了検出手段及び制御テーブル更新手段の一例として挙げられる。   Specifically, as illustrated in FIG. 3, the computer 10 functioning as a process management apparatus executes a process management program installed in the storage, thereby executing a process end detection unit 20, a control table update unit 30, Are each embodied. Here, the process management program is installed in an operating system and installed in a computer storage from a computer-readable recording medium such as a CD-ROM. The process end detection unit 20 and the control table update unit 30 are examples of a process end detection unit and a control table update unit, respectively.

プロセス終了検出部20は、1つの親プロセス及び複数の子プロセスを有するアプリケーションにおいて、例えば、ハードウエア障害又はソフトウエア障害で親プロセスが異常終了したことを検出する。制御テーブル更新部30は、プロセス終了検出部20により親プロセスの異常終了が検出されたことを契機として、メモリに展開された制御テーブル40を更新する。   In the application having one parent process and a plurality of child processes, the process end detection unit 20 detects that the parent process has ended abnormally due to, for example, a hardware failure or a software failure. The control table update unit 30 updates the control table 40 expanded in the memory when the process end detection unit 20 detects the abnormal end of the parent process.

制御テーブル40は、プロセスを管理するために、親プロセスと子プロセスとの関係付け(親子関係)を定義するものであって、各プロセスごと、即ち、親プロセス及び各子プロセスごとに独立して設けられる。制御テーブル40は、図4に示すように、子プロセスへのポインタ,兄弟プロセス(同じ親プロセスが生成した他の子プロセス)へのポインタ,親プロセスへのポインタ及び代理親プロセスへのポインタを有する。ここで、「代理親プロセス」とは、後述するように、親プロセスが何らかの原因で異常終了したとき、その親プロセスの代わりに、子プロセスの終了監視,リソース解放及び課金情報収集などを行う代替プロセスである。なお、制御テーブル40において、子プロセス,兄弟プロセス,親プロセス又は代理親プロセスへのポインタが設定されていないとき、即ち、他のプロセスとの関係付けがなされていないときには、例えば、なにもないことを示す「NULL」などが設定される。   The control table 40 defines the relationship between the parent process and the child process (parent-child relationship) in order to manage the process, and is independent for each process, that is, for each parent process and each child process. Provided. As shown in FIG. 4, the control table 40 has a pointer to a child process, a pointer to a sibling process (another child process generated by the same parent process), a pointer to the parent process, and a pointer to the proxy parent process. . Here, as will be described later, the “proxy parent process” is an alternative that, when the parent process ends abnormally for some reason, monitors the end of the child process, releases resources, collects charging information, etc., instead of the parent process. Is a process. In the control table 40, when a pointer to a child process, sibling process, parent process, or proxy parent process is not set, that is, when there is no relationship with another process, for example, there is nothing. “NULL” or the like indicating this is set.

ここで、具体的な事例を用いて、制御テーブル40による親プロセスと子プロセスとの関係付けがどのように行われるかを説明する。前提条件として、図5に示すように、親プロセスPPにより子プロセスCP1〜CP3が順次生成されるアプリケーションにおいて、子プロセスCP3が代理親プロセスとして機能するものを想定する。 Here, how the relationship between the parent process and the child process by the control table 40 is performed will be described using specific examples. As a precondition, as shown in FIG. 5, in an application in which the child processes CP 1 to CP 3 are sequentially generated by the parent process PP, it is assumed that the child process CP 3 functions as a proxy parent process.

親プロセスPPが子プロセスCP1を生成すると、オペレーティングシステムが、親プロセスPPの制御テーブル40の子プロセスに子プロセスCP1へのポインタを設定すると共に、子プロセスCP1の制御テーブル40の親プロセスに親プロセスPPへのポインタを設定する。また、親プロセスPPが子プロセスCP2を生成すると、オペレーティングシステムが、子プロセスCP1の制御テーブル40の兄弟プロセスに子プロセスCP2へのポインタを設定すると共に、子プロセスCP2の制御テーブル40の親プロセスに親プロセスPPへのポインタを設定する。さらに、親プロセスPPが子プロセスCP3を生成すると、オペレーティングシステムが、子プロセスCP2の制御テーブル40の兄弟プロセスに子プロセスCP3へのポインタを設定すると共に、子プロセスCP3の制御テーブル40の親プロセスに親プロセスPPへのポインタを設定する。親プロセスPPが子プロセスCP3を生成するときに「代理親プロセス設定手続き」を呼び出すことで、親プロセスPPの制御テーブル40の代理親プロセスに子プロセスCP3へのポインタが設定される。そして、親プロセスPPの制御テーブル40の子プロセスにより特定される子プロセスCP1から、その制御テーブル40の兄弟プロセスを順次辿ることで、親プロセスPPに関係付けられた子プロセスCP1〜CP3を特定することができる。 When the parent process PP creates the child process CP 1 , the operating system sets a pointer to the child process CP 1 in the child process of the control table 40 of the parent process PP and the parent process of the control table 40 of the child process CP 1. Is set to a pointer to the parent process PP. When the parent process PP creates the child process CP 2 , the operating system sets a pointer to the child process CP 2 in the sibling process of the control table 40 of the child process CP 1 and also controls the control table 40 of the child process CP 2. A pointer to the parent process PP is set in the parent process. Further, when the parent process PP creates the child process CP 3 , the operating system sets a pointer to the child process CP 3 in the sibling process of the control table 40 of the child process CP 2 , and the control table 40 of the child process CP 3. A pointer to the parent process PP is set in the parent process. By calling "surrogate parent process setup procedure" when generating the parent process PP child process CP 3, pointers to child CP 3 surrogate parent process control table 40 of the parent process PP is set. Then, the child process CP 1 specified by the child process of the control table 40 of the parent process PP, by tracing the sibling process of the control table 40 sequentially child CP 1 ~ CP 3 that are related to the parent process PP Can be specified.

なお、親プロセスPPが「代理親プロセス設定手続き」を呼び出す処理は、代理親登録手段の一例として挙げられる。
図6は、プロセス終了検出部20が、プロセス管理プログラムの実行が開始されたことを契機として所定時間ごとに繰り返し実行するプロセス終了検出処理を示す。
The process in which the parent process PP calls the “proxy parent process setting procedure” is an example of a proxy parent registration unit.
FIG. 6 shows a process end detection process that the process end detection unit 20 repeatedly executes at predetermined time intervals when the execution of the process management program is started.

ステップ1(図では「S1」と略記する。以下同様。)では、プロセス終了検出部20が、親プロセスが異常終了したか否かを判定する。そして、プロセス終了検出部20は、親プロセスが異常終了したと判定すれば処理をステップ2へと進める一方(Yes)、親プロセスが異常終了していないと判定すれば処理を終了させる(No)。   In step 1 (abbreviated as “S1” in the figure, the same applies hereinafter), the process end detection unit 20 determines whether or not the parent process has ended abnormally. Then, the process end detection unit 20 advances the process to Step 2 if it is determined that the parent process has ended abnormally (Yes), and ends the process if it determines that the parent process has not ended abnormally (No). .

ステップ2では、プロセス終了検出部20が、親プロセスが異常終了したことを示すプロセス異常終了通知を制御テーブル更新部30に送信する。
図7は、制御テーブル更新部30が、プロセス終了検出部20からのプロセス異常終了通知を受信したことを契機として実行する制御テーブル更新処理を示す。
In step 2, the process end detection unit 20 transmits a process abnormal end notification indicating that the parent process has ended abnormally to the control table update unit 30.
FIG. 7 shows a control table update process that is executed when the control table update unit 30 receives a process abnormal end notification from the process end detection unit 20.

ステップ11では、制御テーブル更新部30が、親プロセスの制御テーブル40を参照し、その子プロセスにポインタが設定されているか否かを介して、子プロセスが存在するか否かを判定する。そして、制御テーブル更新部30は、子プロセスが存在していると判定すれば処理をステップ12へと進める一方(Yes)、子プロセスが存在していない(親プロセスのみが存在する)と判定すれば処理を終了させる(No)。   In step 11, the control table update unit 30 refers to the control table 40 of the parent process and determines whether or not a child process exists through whether or not a pointer is set for the child process. If the control table update unit 30 determines that the child process exists, the control table update unit 30 proceeds to step 12 (Yes), but determines that the child process does not exist (only the parent process exists). If not, the process is terminated (No).

ステップ12では、制御テーブル更新部30が、親プロセスの制御テーブル40を参照し、その代理親プロセスにポインタが設定されているか否かを介して、代理親プロセスが登録済みであるか否かを判定する。そして、制御テーブル更新部30は、代理親プロセスが登録済みであると判定すれば処理をステップ13へと進める一方(Yes)、代理親プロセスが登録済みでない(登録されていない)と判定すれば処理をステップ14へと進める(No)。   In step 12, the control table update unit 30 refers to the control table 40 of the parent process, and determines whether or not the proxy parent process has been registered through whether or not a pointer is set for the proxy parent process. judge. Then, if the control table update unit 30 determines that the proxy parent process has been registered, the process proceeds to step 13 (Yes), while if it determines that the proxy parent process has not been registered (not registered). The process proceeds to step 14 (No).

ステップ13では、制御テーブル更新部30が、親プロセスの制御テーブル40に登録されていた代理親プロセスを新たな親プロセスに選定した後、処理をステップ15へと進める。   In step 13, the control table update unit 30 selects the proxy parent process registered in the parent process control table 40 as a new parent process, and then advances the process to step 15.

ステップ14では、制御テーブル更新部30が、システムプロセスを新たな親プロセスに選定した後、処理をステップ15へと進める。
ステップ15では、制御テーブル更新部30が、親プロセスの制御テーブル40を参照し、親プロセスに関係付けられた最初の子プロセスを選定する。
In step 14, after the control table update unit 30 selects the system process as a new parent process, the process proceeds to step 15.
In step 15, the control table update unit 30 refers to the control table 40 of the parent process, and selects the first child process related to the parent process.

ステップ16では、制御テーブル更新部30が、新たな親プロセスのポインタが選定した子プロセスを指しているか否かを介して、子プロセスは新たな親プロセスであるか否かを判定する。そして、制御テーブル更新部30は、子プロセスは新たな親プロセスでないと判定すれば処理をステップ17へと進める一方(Yes)、子プロセスは新たな親プロセスであると判定すれば処理をステップ18へと進める(No)。   In step 16, the control table update unit 30 determines whether the child process is a new parent process through whether the pointer of the new parent process points to the selected child process. If the control table update unit 30 determines that the child process is not a new parent process, the process proceeds to step 17 (Yes), while if the child process is determined to be a new parent process, the process proceeds to step 18. Proceed to No (No).

ステップ17では、制御テーブル更新部30が、選定した子プロセスについて、その制御テーブル40の親プロセスに新たな親プロセスを設定した後、処理をステップ19へと進める。   In step 17, the control table update unit 30 sets a new parent process in the parent process of the control table 40 for the selected child process, and then proceeds to step 19.

ステップ18では、制御テーブル更新部30が、選定した子プロセス(代理親プロセス)について、その制御テーブルの親プロセスにシステムプロセスを設定した後、処理をステップ19へと進める。   In step 18, the control table update unit 30 sets a system process for the selected child process (proxy parent process) in the parent process of the control table, and then advances the process to step 19.

ステップ19では、制御テーブル更新部30が、選定した子プロセスの制御テーブル40を参照し、兄弟プロセスにポインタが設定されているか否かを介して、兄弟プロセスがあるか否かを判定する。そして、制御テーブル更新部30は、兄弟プロセスがない(最後の子プロセスまで処理した)と判定すれば処理を終了させる一方(Yes)、兄弟プロセスがあると判定すれば処理をステップ20へと進める(No)。   In step 19, the control table update unit 30 refers to the control table 40 of the selected child process, and determines whether there is a sibling process through whether a pointer is set for the sibling process. If the control table update unit 30 determines that there is no sibling process (has processed up to the last child process), the control table updating unit 30 terminates the processing (Yes), while if it determines that there is a sibling process, the process proceeds to step 20. (No).

ステップ20では、制御テーブル更新部30が、選定した子プロセスの制御テーブル40に設定されている兄弟プロセスを子プロセスとして選定した後、処理をステップ16へと戻す。   In step 20, the control table update unit 30 selects the sibling process set in the control table 40 of the selected child process as a child process, and then returns the process to step 16.

ここで、かかるプロセス管理技術の理解を容易ならしめることを目的として、図5に示す親プロセスと子プロセスとの関係付けがどのように変化するかを説明する。
プロセス終了検出部20が親プロセスPPの異常終了を検出すると、その親プロセスPPの制御テーブル40の子プロセスが参照され、子プロセスが存在するか否かが判定される。親プロセスPPの制御テーブル40には、その子プロセスとして子プロセスCP1が関係付けられているので、子プロセスが存在すると判定される。また、親プロセスPPの制御テーブル40の代理親プロセスが参照され、代理親プロセスが登録済みであるか否かが判定される。親プロセスPPの制御テーブル40には、その代理親プロセスとして子プロセスCP3が設定されているので、代理親プロセスが登録されていると判定される。そして、新たな親プロセスとして、代理親プロセスたる子プロセスCP3が選定される。
Here, for the purpose of facilitating the understanding of the process management technique, how the relationship between the parent process and the child process shown in FIG. 5 changes will be described.
When the process end detection unit 20 detects the abnormal end of the parent process PP, the child process in the control table 40 of the parent process PP is referred to and it is determined whether or not the child process exists. Since the child process CP 1 is related to the control table 40 of the parent process PP, it is determined that there is a child process. Further, the proxy parent process in the control table 40 of the parent process PP is referred to, and it is determined whether or not the proxy parent process has been registered. Since the child process CP 3 is set as the proxy parent process in the control table 40 of the parent process PP, it is determined that the proxy parent process is registered. Then, a child process CP 3 that is a proxy parent process is selected as a new parent process.

また、親プロセスPPから順次辿った子プロセスCP1〜CP3について、新たな親プロセスであるか否かが判定される。子プロセスCP1及びCP2は新たな親プロセスではないため、その制御テーブル40の親プロセスに子プロセスCP3が夫々設定される。一方、子プロセスCP3は新たな親プロセスであるため、その制御テーブル40の親プロセスにシステムプロセスSPが設定される。 Further, it is determined whether or not the child processes CP 1 to CP 3 sequentially traced from the parent process PP are new parent processes. Since the child processes CP 1 and CP 2 are not new parent processes, the child process CP 3 is set in the parent process of the control table 40. On the other hand, since the child process CP 3 is a new parent process, the system process SP is set as the parent process of the control table 40.

このような過程を経て、子プロセスCP1〜CP3の制御テーブル40は、図8に示すように更新される。この場合、代理親プロセスとしての子プロセスCP3が、子プロセスCP1及びCP2の終了監視などを行うと共に、子プロセスCP3が異常終了したことに備えて、その親プロセスとしてシステムプロセスSPが設定される。 Through this process, the control table 40 of the child processes CP 1 to CP 3 is updated as shown in FIG. In this case, the child process CP 3 as the proxy parent process monitors the end of the child processes CP 1 and CP 2 and the system process SP as the parent process prepares for the abnormal end of the child process CP 3. Is set.

このため、親プロセスが異常終了したときには、代理親プロセスが子プロセスの終了監視,リソース解放及び課金情報収集などを行うことができる。また、代理親プロセスは親プロセスから生成されるため、代理親プロセスはアプリケーションに対応したものとなり、異常終了した子プロセスを再起動させることができる。   For this reason, when the parent process is abnormally terminated, the proxy parent process can perform child process termination monitoring, resource release, charging information collection, and the like. Further, since the proxy parent process is generated from the parent process, the proxy parent process corresponds to the application, and the abnormally terminated child process can be restarted.

従って、子プロセスが異常終了しても、アプリケーションの運用を継続させることが可能となり、高信頼性を有する情報システムを構築することができる。このとき、親プロセスとは異なる代理親プロセスが異常終了したときには、その親プロセスとしてシステムプロセスが設定されているため、代理親プロセスが使用していたリソース解放などが行われなくなることを回避することができる。   Therefore, even if the child process is abnormally terminated, the operation of the application can be continued, and a highly reliable information system can be constructed. At this time, if a proxy parent process different from the parent process terminates abnormally, the system process is set as the parent process, so that the resource used by the proxy parent process is not released, etc. Can do.

代理親プロセスは親プロセスの子プロセスとして登録されているため、代理親プロセスが異常終了したときには、他の子プロセスと同様に、親プロセスにより代理親プロセスが再起動される。   Since the surrogate parent process is registered as a child process of the parent process, when the surrogate parent process ends abnormally, the surrogate parent process is restarted by the parent process in the same manner as other child processes.

なお、親プロセスPPが異常終了したとき、代理親プロセスの代理親プロセスとして、図9に示すように、システムプロセスSPが再起動した親プロセスPPを用いるようにしてもよい。また、親プロセスPPが異常終了したとき、代理親プロセスの代理親プロセスとして、図10に示すように、代理親プロセスに対して親プロセスPPが異常終了したことを通知する仕組みを組み込み、この通知を受けた代理親プロセスが生成したプロセスAPを用いるようにしてもよい。 When the parent process PP is abnormally terminated, the parent process PP restarted by the system process SP may be used as the proxy parent process of the proxy parent process, as shown in FIG. Further, when the parent process PP ends abnormally, a mechanism for notifying the proxy parent process that the parent process PP has ended abnormally is incorporated as a proxy parent process of the proxy parent process, as shown in FIG. The process AP generated by the proxy parent process that has received the request may be used.

次に、図11に示すように、親プロセスPPに子プロセスCP1〜CP3が関連付けられたアプリケーションを前提として、オペレーティングシステムで処理される具体的な事例について考察する。なお、子プロセスCP3が代理親プロセスとして機能するものとする。 Next, as shown in FIG. 11, a specific case processed by the operating system will be considered on the premise of an application in which the child processes CP 1 to CP 3 are associated with the parent process PP. In addition, it is assumed that a child process CP 3 to function as a surrogate parent process.

(A)親プロセスPPが子プロセスCP1〜CP3より先に終了した場合(図12)
アプリケーションが起動されると、親プロセスPPが子プロセスCP1〜CP3を順次生成する。子プロセスCP1及びCP2は、アプリケーションの実行を開始する。次に、親プロセスPPは、その代理親プロセスとして子プロセスCP3を設定する。その後、親プロセスPPは、子プロセスCP1〜CP3の監視を開始する。そして、親プロセスPPが異常終了すると、システムプロセスSPは、親プロセスPPの異常終了を検出して、親プロセスPPを再起動させる。
(A) When the parent process PP ends before the child processes CP 1 to CP 3 (FIG. 12)
When the application is activated, the parent process PP sequentially generates child processes CP 1 to CP 3 . The child processes CP 1 and CP 2 start executing the application. Next, the parent process PP sets the child process CP 3 as its proxy parent process. Thereafter, the parent process PP starts monitoring the child processes CP 1 to CP 3 . When the parent process PP ends abnormally, the system process SP detects the abnormal end of the parent process PP and restarts the parent process PP.

一方、親プロセスPPが異常終了すると、前述した仕組みにより、子プロセスCP1及びCP2の制御テーブル40の親プロセスに、代理親プロセスである子プロセスCP3が設定される。そして、代理親プロセスである子プロセスCP3は、親プロセスPPの終了に伴い、子プロセスCP1及びCP2の監視を開始する。 On the other hand, when the parent process PP is abnormally terminated, the child process CP 3 that is the proxy parent process is set in the parent process of the control table 40 of the child processes CP 1 and CP 2 by the above-described mechanism. Then, the child process CP 3 that is the proxy parent process starts monitoring the child processes CP 1 and CP 2 when the parent process PP ends.

システムプロセスSPにより再起動された親プロセスPPは、代理親プロセスである子プロセスCP3に対して再起動された旨の通知を行う。この通知を受けた子プロセスCP3は、自分の代理親プロセスとして、再起動された親プロセスPPを設定する。 The parent process PP restarted by the system process SP notifies the child process CP 3 that is the proxy parent process that the restart has been performed. Receiving this notification, the child process CP 3 sets the restarted parent process PP as its proxy parent process.

その後、子プロセスCP1が終了すると、ソフトウエア割込みによるプロセス終了通知が子プロセスCP3に送られ、子プロセスCP3が、子プロセスCP1のリソース解放及び課金情報収集などを行う。 Then, when the child process CP 1 is completed, the process end notice by software interrupt is sent to the child process CP 3, the child process CP 3, performs such resource release and traffic collection of child CP 1.

(B)子プロセスCP3が親プロセスPPより先に終了した場合(図13)
アプリケーションが起動されると、親プロセスPPが子プロセスCP1〜CP3を順次生成する。子プロセスCP1及びCP2は、アプリケーションの実行を開始する。次に、親プロセスPPは、その代理親プロセスとして子プロセスCP3を設定する。その後、親プロセスPPは、子プロセスCP1〜CP3の監視を開始する。
(B) When the child process CP 3 ends before the parent process PP (FIG. 13)
When the application is activated, the parent process PP sequentially generates child processes CP 1 to CP 3 . The child processes CP 1 and CP 2 start executing the application. Next, the parent process PP sets the child process CP 3 as its proxy parent process. Thereafter, the parent process PP starts monitoring the child processes CP 1 to CP 3 .

代理親プロセスである子プロセスCP3が異常終了すると、ソフトウエア割込みによるプロセス終了通知が親プロセスPPに送られる。プロセス終了通知を受けた親プロセスPPは、代理親プロセスがなくなったことを踏まえ、ソフトウエア割込みハンドラで代理親プロセスである子プロセスCP3を再度生成し、代理親プロセスに再度設定する。 When the child process CP 3 is a surrogate parent process terminates abnormally, the process end notice by software interrupt is sent to the parent process PP. Parent process PP, which has received the process end notification, surrogate parent Given that the process is no longer, to create a child process CP 3 is a surrogate parent process in the software interrupt handler again, set again to surrogate parent process.

なお、制御テーブル40は、以上説明したデータ構造を採用しなくとも、親プロセスPPと子プロセスCPとの親子関係を定義できればよい。
以上の実施形態に関し、更に以下の付記を開示する。
The control table 40 only needs to be able to define the parent-child relationship between the parent process PP and the child process CP without adopting the data structure described above.
Regarding the above embodiment, the following additional notes are disclosed.

(付記1)親プロセス及び子プロセスの親子関係を定義するメモリ上の制御テーブルに基づいてプロセスを管理するプロセス管理プログラムにおいて、コンピュータを、前記親プロセスの代理親プロセスを登録する代理親登録手段、前記親プロセスの異常終了を検出するプロセス終了検出手段、前記プロセス終了検出手段により親プロセスの異常終了が検出されたとき、前記代理親プロセスが子プロセスの親プロセスになるように、前記制御テーブルの親子関係を更新する制御テーブル更新手段、として機能させることを特徴とするプロセス管理プログラム。   (Supplementary Note 1) In a process management program for managing a process based on a control table on a memory that defines a parent-child relationship between a parent process and a child process, a proxy parent registration means for registering a computer as a proxy parent process of the parent process, A process end detecting unit for detecting an abnormal end of the parent process; and when the abnormal end of the parent process is detected by the process end detecting unit, the surrogate parent process becomes a parent process of the child process. A process management program that functions as a control table update unit that updates a parent-child relationship.

(付記2)前記代理親プロセスは、前記制御テーブルにおいて、前記子プロセスの1つとして登録されていることを特徴とする付記1記載のプロセス管理プログラム。   (Supplementary note 2) The process management program according to supplementary note 1, wherein the proxy parent process is registered as one of the child processes in the control table.

(付記3)前記制御テーブル更新手段は、前記制御テーブルの親子関係を更新するとき、システムプロセスにより再起動された親プロセスを、前記親プロセスとして機能する代理親プロセスの代理親プロセスとして登録することを特徴とする付記1又は付記2に記載のプロセス管理プログラム。   (Supplementary Note 3) When the parent-child relationship of the control table is updated, the control table update unit registers the parent process restarted by the system process as the proxy parent process of the proxy parent process functioning as the parent process. The process management program according to appendix 1 or appendix 2 characterized by the above.

(付記4)前記制御テーブル更新手段は、前記制御テーブルの親子関係を更新するとき、前記代理親プロセスにより生成された代理プロセスを、前記親プロセスとして機能する代理親プロセスの代理親プロセスとして登録することを特徴とする付記1又は付記2に記載のプロセス管理プログラム。   (Supplementary Note 4) When the parent-child relationship of the control table is updated, the control table update unit registers the proxy process generated by the proxy parent process as the proxy parent process of the proxy parent process that functions as the parent process. The process management program according to supplementary note 1 or supplementary note 2, wherein

(付記5)前記制御テーブル更新手段は、前記制御テーブルに代理親プロセスが登録されていないとき、システムプロセスを代理親プロセスとして選定することを特徴とする付記1〜付記4のいずれか1つに記載のプロセス管理プログラム。   (Supplementary Note 5) In any one of Supplementary Note 1 to Supplementary Note 4, wherein the control table update unit selects a system process as a proxy parent process when no proxy parent process is registered in the control table. The process management program described.

(付記6)親プロセス及び子プロセスの親子関係を定義するメモリ上の制御テーブルに基づいてプロセスを管理するプロセス管理方法において、コンピュータが、前記親プロセスの代理親プロセスを登録すると共に、前記親プロセスの異常終了を検出したとき、前記代理親プロセスが子プロセスの親プロセスになるように、前記制御テーブルの親子関係を更新することを特徴とするプロセス管理方法。   (Supplementary note 6) In a process management method for managing a process based on a control table on a memory that defines a parent-child relationship between a parent process and a child process, a computer registers a proxy parent process of the parent process and the parent process A process management method comprising: updating a parent-child relationship of the control table so that the proxy parent process becomes a parent process of a child process when an abnormal end of the process is detected.

(付記7)親プロセス及び子プロセスの親子関係を定義するメモリ上の制御テーブルに基づいてプロセスを管理するプロセス管理プログラムを記録したコンピュータ読取可能な記録媒体において、コンピュータを、前記親プロセスの代理親プロセスを登録する代理親登録手段、前記親プロセスの異常終了を検出するプロセス終了検出手段、前記プロセス終了検出手段により親プロセスの異常終了が検出されたとき、前記代理親プロセスが子プロセスの親プロセスになるように、前記制御テーブルの親子関係を更新する制御テーブル更新手段、として機能させることを特徴とするプロセス管理プログラムを記録したコンピュータ読取可能な記録媒体。   (Supplementary note 7) In a computer-readable recording medium recording a process management program for managing a process based on a control table on a memory that defines a parent-child relationship between a parent process and a child process, the computer is replaced with a proxy parent of the parent process. Proxy parent registration means for registering a process, process end detection means for detecting abnormal termination of the parent process, and when the parent process is detected abnormally by the process end detection means, the proxy parent process is a parent process of a child process. A computer-readable recording medium having a process management program recorded thereon, which functions as control table updating means for updating a parent-child relationship of the control table.

10 コンピュータ
20 プロセス終了検出部
30 制御テーブル更新部
40 制御テーブル
PP 親プロセス
CP 子プロセス
AP 代理プロセス
10 Computer 20 Process End Detection Unit 30 Control Table Update Unit 40 Control Table PP Parent Process CP Child Process AP Proxy Process

Claims (4)

親プロセス及び子プロセスの親子関係を定義するメモリ上の制御テーブルに基づいてプロセスを管理するプロセス管理プログラムにおいて、
コンピュータを、
前記親プロセスの代理親プロセスを、前記子プロセスの1つとして前記制御テーブルに登録する代理親登録手段、
前記親プロセスの異常終了を検出するプロセス終了検出手段、
前記プロセス終了検出手段により親プロセスの異常終了が検出されたとき、前記代理親プロセスが子プロセスの親プロセスになるように、前記制御テーブルの親子関係を更新する制御テーブル更新手段、
として機能させることを特徴とするプロセス管理プログラム。
In a process management program for managing a process based on a control table on a memory that defines a parent-child relationship between a parent process and a child process,
Computer
Proxy parent registration means for registering the proxy parent process of the parent process in the control table as one of the child processes;
Process end detection means for detecting abnormal end of the parent process;
Control table updating means for updating a parent-child relationship of the control table so that the proxy parent process becomes a parent process of a child process when an abnormal end of the parent process is detected by the process end detection means;
Process management program characterized by functioning as
前記制御テーブル更新手段は、前記制御テーブルの親子関係を更新するとき、システムプロセスにより再起動された親プロセスを、前記親プロセスとして機能する代理親プロセスの代理親プロセスとして登録することを特徴とする請求項1記載のプロセス管理プログラム。 The control table update unit registers a parent process restarted by a system process as a proxy parent process of a proxy parent process functioning as the parent process when updating the parent-child relationship of the control table. The process management program according to claim 1. 前記制御テーブル更新手段は、前記制御テーブルの親子関係を更新するとき、前記代理親プロセスにより生成されたプロセスを、前記親プロセスとして機能する代理親プロセスの代理親プロセスとして登録することを特徴とする請求項1記載のプロセス管理プログラム。 The control table update unit registers a process generated by the proxy parent process as a proxy parent process of the proxy parent process functioning as the parent process when updating the parent-child relationship of the control table. The process management program according to claim 1 . 親プロセス及び子プロセスの親子関係を定義するメモリ上の制御テーブルに基づいてプロセスを管理するプロセス管理方法において、
コンピュータが、
前記親プロセスの代理親プロセスを、前記子プロセスの1つとして前記制御テーブルに登録すると共に、
前記親プロセスの異常終了を検出したとき、前記代理親プロセスが子プロセスの親プロセスになるように、前記制御テーブルの親子関係を更新すること
を特徴とするプロセス管理方法
In a process management method for managing processes based on a control table on a memory that defines a parent-child relationship between a parent process and a child process,
Computer
Registering the parent process of the parent process as one of the child processes in the control table;
Updating the parent-child relationship of the control table so that the proxy parent process becomes a parent process of a child process when an abnormal termination of the parent process is detected
Process management method characterized by
JP2009222305A 2009-09-28 2009-09-28 Process management program and process management method Active JP5446666B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009222305A JP5446666B2 (en) 2009-09-28 2009-09-28 Process management program and process management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009222305A JP5446666B2 (en) 2009-09-28 2009-09-28 Process management program and process management method

Publications (2)

Publication Number Publication Date
JP2011070504A JP2011070504A (en) 2011-04-07
JP5446666B2 true JP5446666B2 (en) 2014-03-19

Family

ID=44015717

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009222305A Active JP5446666B2 (en) 2009-09-28 2009-09-28 Process management program and process management method

Country Status (1)

Country Link
JP (1) JP5446666B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5792055B2 (en) 2011-12-27 2015-10-07 株式会社三菱東京Ufj銀行 Information processing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3101353B2 (en) * 1991-08-09 2000-10-23 富士通株式会社 Process parent-child relationship handover unit
JPH09223035A (en) * 1996-02-19 1997-08-26 Toshiba Corp Computer system
JP3049010B2 (en) * 1998-06-23 2000-06-05 日本電気ソフトウェア株式会社 Parent-child relationship pseudo-continuation device and method

Also Published As

Publication number Publication date
JP2011070504A (en) 2011-04-07

Similar Documents

Publication Publication Date Title
CN106909411B (en) File updating method and device
KR102268355B1 (en) Cloud deployment infrastructure validation engine
US7493527B2 (en) Method for logging diagnostic information
US7802128B2 (en) Method to avoid continuous application failovers in a cluster
JP4060322B2 (en) Application management apparatus and storage medium storing software thereof
US7698391B2 (en) Performing a provisioning operation associated with a software application on a subset of the nodes on which the software application is to operate
WO2017118334A1 (en) Log collection client and updating method therefor
US7941703B2 (en) Capturing machine state of unstable java program
EP2864873B1 (en) Auto-update while running a client software application with update handshake between versions and runtime validation of the successor version
US9658917B2 (en) Server performance correction using remote server actions
US8453013B1 (en) System-hang recovery mechanisms for distributed systems
US20230070985A1 (en) Distributed package management using meta-scheduling
US20120166893A1 (en) Recording and Preventing Crash in an Appliance
US20110225463A1 (en) Detecting and recovering from process failures
JP5446666B2 (en) Process management program and process management method
JP2011070364A (en) Operation management server, roll back execution method, and roll back execution program
US20120272103A1 (en) Software operability service
TWI740886B (en) Log collection client terminal and its upgrading method
JP5429171B2 (en) Information processing apparatus and hangup cause investigation information acquisition method
US20120191645A1 (en) Information processing apparatus and database system
CA2679021A1 (en) System and method for transactional application lifecycle management for mobile devices
JP2009238011A (en) Method and program for controlling execution environment
JPH06243059A (en) Interruption/resumption system for film transfer
JP2022080615A (en) Information processing device, arrangement method, and program
WO2019180794A1 (en) Information processing device, middleware, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130924

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131112

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131203

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131216

R150 Certificate of patent or registration of utility model

Ref document number: 5446666

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150