JPH04241633A - Process managing system - Google Patents

Process managing system

Info

Publication number
JPH04241633A
JPH04241633A JP297391A JP297391A JPH04241633A JP H04241633 A JPH04241633 A JP H04241633A JP 297391 A JP297391 A JP 297391A JP 297391 A JP297391 A JP 297391A JP H04241633 A JPH04241633 A JP H04241633A
Authority
JP
Japan
Prior art keywords
processes
received
semaphore
generated
notification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP297391A
Other languages
Japanese (ja)
Inventor
Akira Tsuji
辻亮
Tadashi Kuwabara
桑原正
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.)
NEC Corp
NEC Solution Innovators Ltd
Original Assignee
NEC Corp
NEC Solution Innovators 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 NEC Corp, NEC Solution Innovators Ltd filed Critical NEC Corp
Priority to JP297391A priority Critical patent/JPH04241633A/en
Publication of JPH04241633A publication Critical patent/JPH04241633A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily control processes synchronously to each other at the time of start-up and to easily collect information in a system fault. CONSTITUTION:A process managing process 1 manages the operating states of processes with a process management table 2. In the case of receiving a process generating request, the process 1 generates the requested process. In addition, when a process start-up request is received from a host program, the process 1 generates all processes to be generated next by setting the value adding '1' to the number of processes to be generated to a variable semaphore and, when the semaphore value goes to '1' by subtracting the number of generated processes from the set value, the processing of each waiting process is allowed to start by returning the semaphore value to '1'. In the case of receiving a system termination notice or fault notice, the process 1 transmits a preclosing notice to all processes during execution and, when a termination notice is received from each process against the preclosing notice, the process 1 forcibly terminates the process which does not transmit the termination notice after fixed waiting time has elapsed.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はオペレーティングシステ
ムであるUNIX上で、複数プロセスを用いマルチタス
キングで動作するシステムを構築する際のプロセス管理
方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a process management method for building a multitasking system using a plurality of processes on the UNIX operating system.

【0002】0002

【従来の技術】従来のUNIX上でのプロセス管理方式
は、複数プロセスの生成から終了までを一元管理する概
念はなく、以下のようになっていた。
2. Description of the Related Art Conventional process management systems on UNIX do not have the concept of centrally managing multiple processes from generation to termination, and are as follows.

【0003】(A)全プロセスの情報を一元的に管理す
るものがいない。
(A) There is no one who centrally manages information on all processes.

【0004】(B)プロセス生成は必要になったプロセ
スが行う。
(B) Process generation is performed by the process that becomes necessary.

【0005】(C)プロセススタートアップ時の各プロ
セスの同期制御は、プロセス生成順序を各プロセス間で
工夫することにより行っていた。
(C) Synchronous control of each process at the time of process startup has been performed by devising the process creation order among the processes.

【0006】(D)システム障害時又は終了時の全プロ
セス終了処理は、強制的に行っていた。
(D) Processing to terminate all processes at the time of system failure or termination was forcibly performed.

【0007】[0007]

【発明が解決しようとする課題】上述した従来のプロセ
ス管理方式では以下のようにな問題があった。
SUMMARY OF THE INVENTION The conventional process management system described above has the following problems.

【0008】(A)全プロセスの情報を一元的に管理し
ていない為、プログラム論理に無駄が生じる。又、シス
テム障害時等の情報収集が困難になる。
(A) Since information on all processes is not managed centrally, program logic is wasted. Furthermore, it becomes difficult to collect information when a system failure occurs.

【0009】(B)プロセス生成は必要になったプロセ
スが行い管理する為、プロセス管理情報が分散化する。
(B) Since process generation is performed and managed by the process that becomes necessary, process management information is distributed.

【0010】(C)プロセススタートアップ時の各プロ
セスの同期制御を、各プロセス間での工夫に頼っている
ため、プロセスが増え処理が複雑化すると対応できなる
なる。
(C) Synchronous control of each process at the time of process startup relies on ingenuity between each process, which makes it difficult to cope with the increase in the number of processes and the complexity of processing.

【0011】(D)システム障害時又は終了時の全プロ
セス終了処理は、予閉塞なしに強制的に行ってため、各
プロセスは処理の途中であっても打ち切られ、後処理を
行うことが出来なく、次の再スタート時に処理矛盾が生
じる恐れがある。
(D) At the time of system failure or termination, all process termination processing is forcibly performed without pre-blocking, so each process is terminated even in the middle of processing, and post-processing cannot be performed. Otherwise, there is a risk of processing inconsistency occurring at the next restart.

【0012】0012

【課題を解決するための手段】第1の発明は、UNIX
上で複数プロセスを用いマルチタスキングで動作するシ
ステムにおけるプロセス管理方式において、システム立
上げ時にディスクからメモリへロードされ前記プロセス
の動作情報を一元的に管理するプロセス管理テーブルを
備え、前記プロセスよりプロセス生成要求を受けると要
求された前記プロセスを生成するとともに前記プロセス
管理テーブルにおける前記プロセスの動作状態を生成中
にし、上位プログラムよりプロセススタートアップ要求
を受けると予じめ備えた変数であるセマフォに前記プロ
セス管理テーブルにおける生成すべき前記プロセスのプ
ロセス数に1を加えた値を設定し次に生成すべき前記プ
ロセスを全て生成し前記セマフォ値が前記生成された各
プロセスにより前記各プロセス数だけ−1されて1にな
ると前記セマフォ値を0に戻し前記セマフォ値が0にな
るまでウエイトしていた前記各プロセスの処理を一斉に
開始させ、システム終了通知又は障害通知を受信すると
全ての実行中の前記プロセスに対して予閉塞通知を送信
し前記予閉塞通知を受けとった前記各プロセスから次の
再スタートに備えた後処理の終了通知を受信すると一定
時間のウエイトの後前記終了通知を送信しない前記プロ
セスを強制終了させるプロセス管理プロセスを有するこ
とを特徴とする。
[Means for solving the problem] The first invention is based on UNIX
The above process management method for a system that uses multiple processes and operates in multitasking is equipped with a process management table that is loaded from the disk to memory at system startup and centrally manages the operation information of the processes. When a generation request is received, the requested process is generated and the operating status of the process in the process management table is set to ``generating.'' When a process startup request is received from the upper program, the process is set in a semaphore, which is a variable prepared in advance. Set a value that adds 1 to the number of processes to be generated in the management table, then generate all the processes to be generated, and the semaphore value is decremented by 1 by the number of processes for each of the generated processes. When the semaphore value becomes 1, the semaphore value is reset to 0, and the processes of the processes that were waiting until the semaphore value becomes 0 are started all at once, and when a system termination notification or failure notification is received, all the processes that are running are restarted. When a post-processing completion notification in preparation for the next restart is received from each process that has received the pre-blockage notification, the process that does not send the termination notification after waiting for a certain period of time is It is characterized by having a process management process that is forcibly terminated.

【0013】[0013]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments Next, embodiments of the present invention will be described with reference to the drawings.

【0014】図1は本発明のプロセス管理方式の一実施
例を示す構成図である。図1に示すように、プロセス管
理テーブル2はディスク上に存在し、システム立上げ時
にメモリへロードされる。従って、プロセス情報の登録
、変更等はエディタで容易に行える。プロセス管理プロ
セス1はこのプロセス管理テーブル2を使用して全プロ
セスの一元管理を行う。
FIG. 1 is a block diagram showing an embodiment of the process management system of the present invention. As shown in FIG. 1, the process management table 2 exists on a disk and is loaded into memory at system startup. Therefore, process information can be easily registered, changed, etc. using an editor. The process management process 1 uses this process management table 2 to centrally manage all processes.

【0015】図2はプロセス生成方式の一実施例を示す
動作説明図である。図2に示すように、プロセスA(3
)がプロセスB(4)を生成する場合は、プロセス管理
プロセス1に生成依頼し、プロセス管理プロセス1がプ
ロセスB(4)を生成するとともに、全プロセスの状態
を管理する。
FIG. 2 is an operational explanatory diagram showing one embodiment of the process generation method. As shown in Figure 2, process A (3
) generates process B(4), requests process management process 1 to generate process B(4), and process management process 1 generates process B(4) and manages the status of all processes.

【0016】図3はプロセススタートアップ時の同期処
理の動作説明図である。図3に示すように、プロセスス
タートアップ時は、まずプロセス管理プロセス1がセマ
フォ値を生成プロセス数+1に設定する。次にシステム
スタートアップ時に必要なプロセスを全て生成する。生
成された各プロセスは初期設定を行いセマフォ値を−1
し0になるまでウエイトする。全ての生成プロセスがセ
マフォ値を減ずると値は1になる。以上の処理が終了す
ると、プロセス管理プロセス1はセマフォ値を0に戻し
、ウエイトしていたプロセスは一斉に処理を開始する。
FIG. 3 is an explanatory diagram of the operation of synchronization processing at process startup. As shown in FIG. 3, at process startup, the process management process 1 first sets the semaphore value to the number of generated processes+1. Next, create all necessary processes at system startup. Each created process performs initial settings and sets the semaphore value to -1.
Wait until it becomes 0. If all production processes reduce the semaphore value, the value becomes 1. When the above processing is completed, the process management process 1 returns the semaphore value to 0, and the waiting processes start processing all at once.

【0017】図4は全プロセス終了処理の動作説明図で
ある。図4に示すように、プロセス管理プロセス1がシ
ステム終了通知又は障害通知を受信すると、全ての実行
中のプロセスに対して予閉塞通知を送信する。予閉塞通
知を受けとった各プロセスは、次の再スタートに備えた
後処理を行い、終了通知を送信する。プロセス管理プロ
セス1は一定時間のウエイトの後、終了通知を送信しな
いプロセスを強制終了させる。
FIG. 4 is an explanatory diagram of the operation of all process termination processing. As shown in FIG. 4, when the process management process 1 receives a system termination notification or a failure notification, it sends a pre-blockage notification to all running processes. Each process that receives the pre-blockage notification performs post-processing in preparation for the next restart, and sends an end notification. The process management process 1 forcibly terminates a process that does not send a termination notification after waiting for a certain period of time.

【0018】[0018]

【発明の効果】以上説明したように、本発明は複数プロ
セスを一元管理することにより、プロセススタートアッ
プ時の各プロセスの同期制御を容易に可能とし、又シス
テム障害時の情報収集を容易にし、かつシステム障害時
の各プロセスでの後処理を可能にすることで次の再スタ
ート時の処理矛盾の発生を防止できる効果がある。
[Effects of the Invention] As explained above, the present invention enables synchronized control of each process at process startup by centrally managing multiple processes, and facilitates information collection in the event of a system failure. By enabling post-processing in each process when a system failure occurs, it is possible to prevent processing inconsistencies from occurring at the next restart.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】図1は本発明のプロセス管理方式の一実施例を
示す構成図である。
FIG. 1 is a block diagram showing an embodiment of the process management method of the present invention.

【図2】本実施例のプロセス生成処理の一実施例を示す
動作説明図である。
FIG. 2 is an operation explanatory diagram showing an example of process generation processing according to the present embodiment.

【図3】本実施例のプロセススタートアップ時の同期処
理の動作説明図である。
FIG. 3 is an explanatory diagram of the operation of synchronization processing at process startup in this embodiment.

【図4】本実施例の全プロセス終了処理の動作説明図で
ある。
FIG. 4 is an explanatory diagram of the operation of all process termination processing in this embodiment.

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

1    プロセス管理プロセス 2    プロセス管理テーブル 3    プロセスA 4    プロセスB 1 Process management process 2 Process management table 3 Process A 4 Process B

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  UNIX上で複数プロセスを用いマル
チタスキングで動作するシステムにおけるプロセス管理
方式において、システム立上げ時にディスクからメモリ
へロードされ前記プロセスの動作情報を一元的に管理す
るプロセス管理テーブルを備え、前記プロセスよりプロ
セス生成要求を受けると要求された前記プロセスを生成
するとともに前記プロセス管理テーブルにおける前記プ
ロセスの動作状態を生成中にし、上位プログラムよりプ
ロセススタートアップ要求を受けると予じめ備えた変数
であるセマフォに前記プロセス管理テーブルにおける生
成すべき前記プロセスのプロセス数に1を加えた値を設
定し次に生成すべき前記プロセスを全て生成し前記セマ
フォ値が前記生成された各プロセスにより前記各プロセ
ス数だけ−1されて1になると前記セマフォ値を0に戻
し前記セマフォ値が0になるまでウエイトしていた前記
各プロセスの処理を一斉に開始させ、システム終了通知
又は障害通知を受信すると全ての実行中の前記プロセス
に対して予閉塞通知を送信し前記予閉塞通知を受けとっ
た前記各プロセスから次の再スタートに備えた後処理の
終了通知を受信すると一定時間のウエイトの後前記終了
通知を送信しない前記プロセスを強制終了させるプロセ
ス管理プロセスを有することを特徴とするプロセス管理
方式。
1. In a process management method for a system that uses multiple processes and operates in multitasking on UNIX, a process management table that is loaded from a disk to memory at system startup and centrally manages operation information of the processes is provided. When a process creation request is received from the process, the requested process is created, and the operating state of the process in the process management table is set to "generating," and when a process startup request is received from the higher-level program, the previously prepared variable is created. Set a value equal to the number of processes to be generated in the process management table plus 1 to the semaphore, then generate all the processes to be generated, and set the semaphore value to each of the processes by each of the generated processes. When the number of processes is subtracted by 1 and becomes 1, the semaphore value is reset to 0, and the processing of each process that was waiting until the semaphore value becomes 0 is started all at once, and when a system termination notification or failure notification is received, all When a pre-blocking notification is sent to the process that is currently being executed, and a completion notification of post-processing in preparation for the next restart is received from each process that received the pre-blocking notification, the completion notification is sent after waiting for a certain period of time. 1. A process management method comprising: a process management process for forcibly terminating said process that does not send a message.
JP297391A 1991-01-16 1991-01-16 Process managing system Pending JPH04241633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP297391A JPH04241633A (en) 1991-01-16 1991-01-16 Process managing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP297391A JPH04241633A (en) 1991-01-16 1991-01-16 Process managing system

Publications (1)

Publication Number Publication Date
JPH04241633A true JPH04241633A (en) 1992-08-28

Family

ID=11544316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP297391A Pending JPH04241633A (en) 1991-01-16 1991-01-16 Process managing system

Country Status (1)

Country Link
JP (1) JPH04241633A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009104771A1 (en) * 2008-02-19 2009-08-27 日本電気株式会社 Information processing device, control method and program therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009104771A1 (en) * 2008-02-19 2009-08-27 日本電気株式会社 Information processing device, control method and program therefor
JP2009199166A (en) * 2008-02-19 2009-09-03 Nec Corp Information processing device, control method and program therefor

Similar Documents

Publication Publication Date Title
JP2002324047A (en) Method and system for automated session resources cleanup in distributed client/server environment
JP2000293497A (en) Generation system for cluster node relief signal
JPH06243070A (en) Inter-processor communication system
JPH04241633A (en) Process managing system
CN114598593A (en) Message processing method, system, computing device and computer storage medium
US20020013803A1 (en) Automated system and method for generating data to drive a manufacturing process
JPH02173816A (en) Starting/stopping system for server
JP3220238B2 (en) Remote procedure simple execution method
JP2814956B2 (en) Dispatcher control method
JPH07168704A (en) Job execution control system
CN116701049B (en) Method, device, equipment and storage medium for configuring home volume
JP2732688B2 (en) Management host switching control method
JPH11191764A (en) Method and device for controlling file transfer and recording medium therefor
JPH03255512A (en) Interval timer control system
JP2629415B2 (en) A business process switching method in a mutual standby system
JP3317756B2 (en) Interface method between service control layer and transmission control layer
JPH0390937A (en) Program control system
JPH0287855A (en) Fault information sending-out system
JP2555386B2 (en) Electronic computer system
CN112328388A (en) Parallel computing method and system fusing multithreading and distributed technology
JPH0778037A (en) Decentralized processing system
JPH07121007B2 (en) Centralized control method in communication processing network
JP2000029850A (en) Task controlling method using inter-processor communication of operating system
JPH02259933A (en) Job generating system
JPH02188866A (en) Event control system in coprocessor