JP2014010585A - Data transmission method and data transmission apparatus - Google Patents

Data transmission method and data transmission apparatus Download PDF

Info

Publication number
JP2014010585A
JP2014010585A JP2012146262A JP2012146262A JP2014010585A JP 2014010585 A JP2014010585 A JP 2014010585A JP 2012146262 A JP2012146262 A JP 2012146262A JP 2012146262 A JP2012146262 A JP 2012146262A JP 2014010585 A JP2014010585 A JP 2014010585A
Authority
JP
Japan
Prior art keywords
state information
lock
semaphore
management unit
processing process
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.)
Granted
Application number
JP2012146262A
Other languages
Japanese (ja)
Other versions
JP5966678B2 (en
Inventor
Kenji Nakayama
賢二 中山
Kenji Ikejiri
憲治 池尻
Keisuke Hayashi
敬祐 林
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 JP2012146262A priority Critical patent/JP5966678B2/en
Publication of JP2014010585A publication Critical patent/JP2014010585A/en
Application granted granted Critical
Publication of JP5966678B2 publication Critical patent/JP5966678B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a data transmission method capable of preventing delay of communication processing.SOLUTION: According to one aspect, when an abnormality in a process having acquired a lock occurs, a processing process 5 requests a semaphore management unit 3 to obtain a lock of semaphore about itself which is to be unlocked by the semaphore management unit 3 and obtains the lock of the semaphore about itself from the semaphore management unit 3. When a processing process 5 of a transmission source transmits data to a processing process 5 of a transmission destination, the semaphore management unit 3 is requested to obtain a lock of semaphore about the processing process 5 of a transmission destination and then, if the lock can be obtained from the semaphore management unit 3, the processing process 5 of a transmission destination is reactivated and the data is transmitted thereto.

Description

本発明は、データ送信方法、データ送信装置に関する。   The present invention relates to a data transmission method and a data transmission apparatus.

コンピュータにおいては、通信の種々の機能毎に分割された複数のプロセスを組み合わせることによって、種々の通信を実現している。これらの通信を行う複数のプロセスのいずれかで何らかの異常が発生した場合、通信が不可能となる。そこで、通信を行う複数のプロセス、換言すれば、複数の被監視プロセスを監視して、被監視プロセスが異常終了したことやハングアップしたことが検出された場合に、被監視プロセスを再起動して、通信を再開する。   In a computer, various communications are realized by combining a plurality of processes divided for various communications functions. If any abnormality occurs in any of a plurality of processes that perform these communications, communication is impossible. Therefore, multiple processes that communicate with each other, in other words, multiple monitored processes are monitored, and if the monitored process is detected to have terminated abnormally or hanged up, the monitored process is restarted. To resume communication.

例えば、親プロセスが常駐の複数の子プロセスP1〜Pnを順次起動すると、子プロセスP1〜Pnはプロセス起動通知手段により共通のセマフォをロックした後に稼働を開始し、すべての子プロセスが稼働するとセマフォのセマフォ値は0になり、親プロセスは最後にプロセス監視手段を起動し、セマフォのロック待ち状態として監視を行い、子プロセスに異常終了が発生するとセマフォのロックが解除され、プロセス監視手段が直ちに認識し、異常終了した子プロセスを検出し、再起動させることが提案されている。   For example, when the parent process sequentially starts a plurality of resident child processes P1 to Pn, the child processes P1 to Pn start operation after locking a common semaphore by the process activation notification means, and when all child processes are operated, The semaphore value of the semaphore becomes 0, the parent process finally activates the process monitoring means, monitors as the semaphore lock wait state, and when the child process is abnormally terminated, the semaphore lock is released and the process monitoring means immediately It has been proposed to detect and restart a child process that has been recognized and terminated abnormally.

また、管理プロセスと被管理プロセスとをソケットインタフェースにより接続して、被管理プロセスが動作中は管理プロセスによるソケットインタフェースの読み込みをブロックし、一方、被管理プロセスが動作を終了すると、ソケットインタフェースはクローズされ、管理プロセスはソケットインタフェースの読み込みが可能になり、読み込みができたとき、被管理プロセスが動作を終了したと判断することが提案されている。   In addition, the management process and the managed process are connected by the socket interface, and when the managed process is running, the socket interface is blocked from being read by the management process. On the other hand, when the managed process is finished, the socket interface is closed. It has been proposed that the management process can read the socket interface, and when it is read, the managed process determines that the operation has ended.

特開平9−44376号公報Japanese Patent Laid-Open No. 9-44376 特開平10−21096号公報Japanese Patent Laid-Open No. 10-211096

例えば、プロセス監視手段により各処理プロセスの状態を監視し、異常終了した子プロセスを検出し、再起動させる場合、異常の発生からプロセス監視手段による異常の検出までにある程度の時間を要する。この結果、通信処理の遅延を生じる可能性がある。   For example, when the status of each processing process is monitored by the process monitoring unit, a child process that has ended abnormally is detected and restarted, a certain amount of time is required from the occurrence of the abnormality to the detection of the abnormality by the process monitoring unit. As a result, communication processing may be delayed.

一側面では、本発明は、通信処理の遅延を防止することが可能なデータ送信方法を提供することを目的とする。   In one aspect, an object of the present invention is to provide a data transmission method capable of preventing a delay in communication processing.

一態様のデータ送信方法は、第1のプロセスが、ロックを獲得したプロセスに異常が発生した場合にプロセス状態情報管理部によりアンロックされるプロセス状態情報であって、第1のプロセスについてのプロセス状態情報のロックの獲得をプロセス状態情報管理部に要求し、プロセス状態情報管理部から第1のプロセスについてのプロセス状態情報のロックを獲得する。第2のプロセスが、第1のプロセスにデータを送信する場合に、第1のプロセスについてのプロセス状態情報のロックの獲得をプロセス状態情報管理部に要求し、プロセス状態情報管理部から第1のプロセスについてのプロセス状態情報のロックを獲得することができた場合、第1のプロセスを再起動した後に、データを第1のプロセスに送信する。   The data transmission method according to one aspect includes process state information that is unlocked by a process state information management unit when an abnormality occurs in a process in which a first process acquires a lock, and the process for the first process The process state information management unit is requested to acquire the state information lock, and the process state information lock for the first process is acquired from the process state information management unit. When the second process transmits data to the first process, the process state information management unit requests the process state information management unit to acquire the lock of the process state information for the first process. If the process state information lock for the process can be acquired, the data is sent to the first process after restarting the first process.

一側面によれば、通信処理の遅延を防止することができる。   According to one aspect, communication processing delays can be prevented.

コンピュータの一例を示す図である。It is a figure which shows an example of a computer. セマフォ及び異常情報の説明図である。It is explanatory drawing of semaphore and abnormality information. コンピュータのハードウェアの構成の一例を示す図である。It is a figure which shows an example of a structure of the hardware of a computer. データ送信及びプロセス監視の説明図である。It is explanatory drawing of data transmission and process monitoring. データ送信及びプロセス監視の説明図である。It is explanatory drawing of data transmission and process monitoring. セマフォの処理フローチャートである。It is a process flowchart of a semaphore. データ送信及びプロセス監視の処理フローチャートである。It is a processing flowchart of data transmission and process monitoring. 本発明者が検討したプロセス監視処理の説明図である。It is explanatory drawing of the process monitoring process which this inventor examined. 本発明者が検討したプロセス監視処理の説明図である。It is explanatory drawing of the process monitoring process which this inventor examined.

図8及び図9は、本発明者が検討したプロセス監視処理の説明図である。   8 and 9 are explanatory diagrams of the process monitoring process studied by the present inventors.

例えば、図8に示すように、複数の処理プロセス505は、各々、通信制御を実行するプロセスである。複数の処理プロセス505は、通信キュー格納部507を介して、プロセス間で通信を行う。例えば、送信元である処理プロセスBは、データ#501を通信キュー格納部507に格納し、送信先である処理プロセスAは、通信キュー格納部507に格納されたデータ#501を取得する。   For example, as shown in FIG. 8, the plurality of processing processes 505 are processes that execute communication control. The plurality of processing processes 505 communicate with each other via the communication queue storage unit 507. For example, the processing process B as the transmission source stores the data # 501 in the communication queue storage unit 507, and the processing process A as the transmission destination acquires the data # 501 stored in the communication queue storage unit 507.

プロセス管理部510は、複数の処理プロセス505を監視する。具体的には、プロセス管理部510は、予め定められた時間間隔Tで定期的に、処理プロセス505の各々を監視する。プロセス管理部510は、処理プロセス505の異常終了やハングアップ等を検出した場合、異常終了した、換言すれば、ダウンした処理プロセス505を再起動する。これにより、通信処理が再開され、コンピュータ全体としてのダウンタイムの最小化が図られる。   The process management unit 510 monitors a plurality of processing processes 505. Specifically, the process management unit 510 periodically monitors each processing process 505 at a predetermined time interval T. If the process management unit 510 detects an abnormal end or hang-up of the processing process 505, the process management unit 510 restarts the processing process 505 that has ended abnormally, in other words, has gone down. As a result, the communication process is resumed and the downtime of the entire computer is minimized.

ここで、図9に示すように、最初のデータ#501が送受信され、かつ、プロセス管理部510による処理プロセスAの状態監視が正常に終了した直後に、処理プロセスAで異常が発生したとする。この場合、処理プロセスBは、処理プロセスAの異常を検出することはできないので、2番目のデータ#502を送信する。これにより、データ#502は、通信キュー格納部507に格納される。   Here, as shown in FIG. 9, it is assumed that an abnormality has occurred in the processing process A immediately after the first data # 501 is transmitted / received and the status monitoring of the processing process A by the process management unit 510 ends normally. . In this case, the processing process B cannot detect the abnormality of the processing process A, and therefore transmits the second data # 502. Thereby, data # 502 is stored in the communication queue storage unit 507.

この後、先の処理プロセスAの状態監視から監視時間間隔Tが経過すると、プロセス管理部510は、再度処理プロセスAの状態を監視する。この時点までに、処理プロセスAにおいて異常が発生してから、時間t501が経過している。例えば、プロセス管理部510は、処理プロセスAに応答を求めるが、処理プロセスAからの応答を得ることができないので、処理プロセスAの異常を検出する。   Thereafter, when the monitoring time interval T elapses from the status monitoring of the previous processing process A, the process management unit 510 monitors the status of the processing process A again. Up to this point, time t501 has elapsed since an abnormality occurred in the process A. For example, the process management unit 510 obtains a response from the processing process A, but cannot obtain a response from the processing process A, and thus detects an abnormality in the processing process A.

そこで、プロセス管理部510は、処理プロセスAにおける異常の発生を検出すると、処理プロセスAを再起動する。再起動された処理プロセスAは、通信キュー格納部507に格納されたデータ#502を取得する。これにより、処理プロセスAと処理プロセスBとの間における通信処理が再開される。この時点までに、処理プロセスBがデータ#502を送信してから、時間t502が経過している。   Therefore, when the process management unit 510 detects the occurrence of an abnormality in the processing process A, the process management unit 510 restarts the processing process A. The restarted process A acquires data # 502 stored in the communication queue storage unit 507. Thereby, the communication process between the process A and the process B is resumed. Up to this point, time t502 has elapsed since processing process B transmitted data # 502.

以上のように、異常の発生から検出までには、タイムラグt501が存在する。このタイムラグt501は、最長で、監視時間間隔Tよりやや短い時間となる。また、通信の開始から完了までの時間t502は、最長で、監視時間間隔Tに処理プロセス505の再起動の時間を加算した時間となる。この結果、通信処理が遅延してしまう。また、通信処理の遅延の結果、データが長い時間通信キュー格納部507に滞留するため、通信キュー格納部507がオーバーフローする可能性があり、オーバーフローによるデータの欠損が発生してしまう。   As described above, the time lag t501 exists from the occurrence of abnormality to the detection. This time lag t501 is the longest and is slightly shorter than the monitoring time interval T. In addition, the time t502 from the start to the completion of communication is the longest, which is a time obtained by adding the restart time of the processing process 505 to the monitoring time interval T. As a result, communication processing is delayed. Further, as a result of the delay of the communication process, the data stays in the communication queue storage unit 507 for a long time, so that the communication queue storage unit 507 may overflow, and data loss due to overflow occurs.

なお、監視時間間隔Tをより短く設定することにより、通信処理が遅延する時間を短縮することは可能である。しかし、複数の処理プロセス505について監視時間間隔Tをより短く設定すると、監視のためのCPU使用時間が増大し、例えば、本来の通信処理のためのCPU使用時間が低下する。従って、通信の開始から完了までの時間t502を、異常が無い場合における通信の開始から完了までの時間とほぼ等しい程度までに、監視時間間隔Tを短くすることはできない。   In addition, it is possible to shorten the time for which the communication processing is delayed by setting the monitoring time interval T to be shorter. However, if the monitoring time interval T is set shorter for a plurality of processing processes 505, the CPU usage time for monitoring increases, for example, the CPU usage time for the original communication processing decreases. Therefore, the monitoring time interval T cannot be shortened so that the time t502 from the start to the completion of communication is approximately equal to the time from the start to the completion of communication when there is no abnormality.

以下のデータ送信方法は、通信処理の遅延を防止し、通信キューのオーバーフローによるデータの欠損の発生を防止する。   The following data transmission method prevents communication processing delays and prevents data loss due to communication queue overflow.

図1は、データ送信装置であるコンピュータの一例を示す図である。   FIG. 1 is a diagram illustrating an example of a computer that is a data transmission apparatus.

コンピュータ1は、データ送信装置であると共に、プロセスを実行するプロセス実行装置であり、プロセスを監視するプロセス実行監視装置である。コンピュータ1は、オペレーティングシステム(OS)2と、セマフォ管理部3と、セマフォ格納部4と、処理プロセス5と、異常情報格納部6と、通信キュー格納部7とを含む。   The computer 1 is a data transmission device, a process execution device that executes processes, and a process execution monitoring device that monitors processes. The computer 1 includes an operating system (OS) 2, a semaphore management unit 3, a semaphore storage unit 4, a processing process 5, an abnormality information storage unit 6, and a communication queue storage unit 7.

OS2は、コンピュータ1の主メモリ上に常駐し、OS実行部、例えばCPUにおいて実行される。セマフォ管理部3は、実際には、OS2に含まれる。セマフォ管理部3は、セマフォを管理する。セマフォは、セマフォ格納部4に格納される。セマフォ格納部4は、セマフォ管理部3が使用する例えばメモリ上の記憶領域である。   The OS 2 resides on the main memory of the computer 1 and is executed by an OS execution unit, for example, a CPU. The semaphore management unit 3 is actually included in the OS 2. The semaphore management unit 3 manages semaphores. The semaphore is stored in the semaphore storage unit 4. The semaphore storage unit 4 is a storage area on the memory, for example, used by the semaphore management unit 3.

セマフォ管理部3は、プロセス状態情報管理部の一例である。セマフォ管理部3は、処理プロセス5の間におけるプロセス間通信に用いられるセマフォを管理する。セマフォは、処理プロセス5の現在の状態を示すプロセス状態情報の一例である。セマフォは、処理プロセス5に対応して設けられ、対応する処理プロセス5に異常が発生しているか又は発生していないかを示す情報である。セマフォは、ロック及びアンロックのいずれかの状態を取る。   The semaphore management unit 3 is an example of a process state information management unit. The semaphore management unit 3 manages semaphores used for interprocess communication between the processing processes 5. The semaphore is an example of process state information indicating the current state of the processing process 5. The semaphore is information corresponding to the processing process 5 and indicating whether or not an abnormality has occurred in the corresponding processing process 5. A semaphore takes either a locked or unlocked state.

セマフォ管理部3は、処理プロセス5の状態、換言すれば、処理プロセス5に異常が発生しているか又は発生していないかを管理する。処理プロセス5は、起動された場合、自己に対応するセマフォの生成及び自己に対応するセマフォのロックの獲得をセマフォ管理部3に要求する。また、処理プロセス5は、異常が発生した場合、異常が発生したことをセマフォ管理部3に通知する。これにより、セマフォ管理部3は、処理プロセス5の状態を管理することができ、異常が発生した処理プロセス5に対応するセマフォをアンロックすることができる。なお、処理プロセス5は、異常が発生したことの通知に代えて、自己のセマフォのロックの解放、換言すれば、アンロックをセマフォ管理部3に要求するようにしても良い。   The semaphore management unit 3 manages the state of the processing process 5, in other words, whether or not an abnormality has occurred in the processing process 5. When activated, the processing process 5 requests the semaphore management unit 3 to generate a semaphore corresponding to itself and acquire a lock of the semaphore corresponding to itself. Further, when an abnormality occurs, the processing process 5 notifies the semaphore management unit 3 that an abnormality has occurred. Accordingly, the semaphore management unit 3 can manage the state of the processing process 5 and can unlock the semaphore corresponding to the processing process 5 in which an abnormality has occurred. It should be noted that the processing process 5 may request the semaphore management unit 3 to release the lock of its own semaphore, in other words, unlock, instead of notifying that an abnormality has occurred.

セマフォ管理部3は、処理プロセス5からのロックの獲得の要求に応じて、要求した処理プロセス5に対応するセマフォをロックする。ロックされたセマフォの状態は排他的状態である。換言すれば、ロックされたセマフォについては、ロックを獲得している処理プロセス5以外の処理プロセス5による獲得が許されない。セマフォ管理部3は、セマフォをロックする処理を一体不可分に実行する。   The semaphore management unit 3 locks the semaphore corresponding to the requested processing process 5 in response to a lock acquisition request from the processing process 5. A locked semaphore is in an exclusive state. In other words, a locked semaphore cannot be acquired by a processing process 5 other than the processing process 5 that has acquired the lock. The semaphore management unit 3 inseparably executes a process of locking the semaphore.

また、セマフォ管理部3は、ロックを獲得した処理プロセス5に異常が発生した場合に、異常が発生した処理プロセス5に対応するセマフォをアンロックする。アンロックされたセマフォの状態は非排他的状態である。換言すれば、アンロックされたセマフォについては、そのセマフォが対応する処理プロセス5以外の処理プロセス5による獲得が許される。セマフォ管理部3は、セマフォをアンロックする処理を一体不可分に実行する。   In addition, when an abnormality occurs in the processing process 5 that has acquired the lock, the semaphore management unit 3 unlocks the semaphore corresponding to the processing process 5 in which the abnormality has occurred. The unlocked semaphore is in a non-exclusive state. In other words, an unlocked semaphore is allowed to be acquired by a processing process 5 other than the processing process 5 to which the semaphore corresponds. The semaphore management unit 3 inseparably executes the process of unlocking the semaphore.

なお、プロセス状態情報として、セマフォに代えて、例えば、OS2が備えるファイルのアドバイザリロック機能などを用いるようにしても良い。換言すれば、プロセス状態情報として、セマフォと同様の機能である、複数の処理プロセス5の間における処理同期の制御や割り込み処理の制御を行う機能により得られる情報を利用して、送信先である処理プロセス5の状態を検出するようにしても良い。   As the process status information, for example, a file advisory lock function of the OS 2 may be used instead of the semaphore. In other words, the process status information is a destination by using information obtained by the function of controlling the processing synchronization between the plurality of processing processes 5 and controlling the interrupt processing, which is the same function as the semaphore. The state of the processing process 5 may be detected.

また、セマフォ管理部3のようなプロセス状態情報管理部を、OS2の外部に設けるようにしても良い。この場合、複数の処理プロセス5の間における処理同期の制御や割り込み処理の制御についての情報をOS2から取得して、プロセス状態情報のロック及びアンロックの状態を示す情報を生成するようにしても良い。   Further, a process state information management unit such as the semaphore management unit 3 may be provided outside the OS 2. In this case, information about control of processing synchronization and control of interrupt processing among a plurality of processing processes 5 is acquired from the OS 2 to generate information indicating lock / unlock status of the process status information. good.

処理プロセス5は、例えば、OS2がコマンドを実行することにより起動される。複数の処理プロセス5がコンピュータにおける通信の種々の機能毎に分割して生成及び起動され、複数の処理プロセス5を組み合わせることによりコンピュータにおける種々の通信処理が実行される。処理プロセス5は、対応する処理プロセス実行部において実行される。異なる処理プロセス5は、同一又は異なる処理プロセス実行部において実行される。換言すれば、異なる処理プロセス5は、同一又は異なる物理CPU又は論理CPUにおいて実行される。   The processing process 5 is activated, for example, when the OS 2 executes a command. A plurality of processing processes 5 are generated and activated for each of various functions of communication in the computer, and by combining the plurality of processing processes 5, various communication processes in the computer are executed. The processing process 5 is executed in the corresponding processing process execution unit. Different processing processes 5 are executed in the same or different processing process execution units. In other words, different processing processes 5 are executed in the same or different physical CPU or logical CPU.

処理プロセス5は、コンピュータ1において、予め定められた処理、例えば予め定められた通信処理を実行する。コンピュータ1は、通信プロトコルの各階層やアプリケーションとのインタフェースの各階層等の各階層、換言すれば、各機能に分割した複数の処理プロセス5を生成して起動する。そして、コンピュータ1は、複数の処理プロセス5を組み合わせることによって、種々の通信を制御して、種々の接続先コンピュータとの間での通信に対応する。   The processing process 5 executes predetermined processing, for example, predetermined communication processing, in the computer 1. The computer 1 generates and starts a plurality of processing processes 5 divided into each layer such as each layer of communication protocols and each layer of an interface with an application, in other words, each function. Then, the computer 1 controls various communications by combining a plurality of processing processes 5 to correspond to communications with various connection destination computers.

処理プロセス5は、プロセス実行部、例えばCPUにおいて実行される。処理プロセス5は、自己の実行したプロセス間通信についての異常情報を、異常情報格納部6に保持する。異常情報格納部6は、処理プロセス5が使用する例えばメモリ上の記憶領域であり、処理プロセス5に対応して設けられる。異常情報格納部6は、例えば処理プロセス5の起動時に処理プロセス5により獲得される。   The processing process 5 is executed by a process execution unit, for example, a CPU. The processing process 5 holds the abnormality information about the interprocess communication performed by itself in the abnormality information storage unit 6. The abnormality information storage unit 6 is, for example, a storage area on a memory used by the processing process 5, and is provided corresponding to the processing process 5. The abnormality information storage unit 6 is acquired by the processing process 5 when the processing process 5 is activated, for example.

処理プロセス5は、前述したように、種々の接続先コンピュータとの間での種々の通信のために、他の処理プロセス5との間において、通信キュー格納部7を用いた通信を実行する。通信キュー格納部7は、複数の処理プロセス5により共有される共有メモリであり、プロセス間通信の通信キューを格納する。   As described above, the processing process 5 performs communication using the communication queue storage unit 7 with other processing processes 5 for various communication with various connection destination computers. The communication queue storage unit 7 is a shared memory shared by a plurality of processing processes 5 and stores a communication queue for interprocess communication.

例えば、送信元である処理プロセス5は、送信対象のデータを、複数の処理プロセス5により共有される通信キュー格納部7に、通信キューとして格納する。データが送信されるのは、換言すれば、送信対象のデータが通信キュー格納部7に通信キューとして格納されるのは、後述するように、送信先である処理プロセス5についてのセマフォのロックを獲得できない場合である。通信キューは、実際には、送信対象のデータの他に、宛先情報を含む。宛先情報は、例えば送信先の処理プロセス5の識別情報である。処理プロセス5は、通信キュー格納部7にアクセスして、宛先情報として自己の識別情報を含む通信キューを取得する。これにより、送信元である処理プロセス5から送信先である処理プロセス5に、データが送信される。   For example, the processing process 5 that is the transmission source stores the transmission target data as a communication queue in the communication queue storage unit 7 shared by the plurality of processing processes 5. In other words, data is transmitted because the data to be transmitted is stored in the communication queue storage unit 7 as a communication queue, as described later, by locking the semaphore for the processing process 5 that is the transmission destination. This is the case when it cannot be acquired. The communication queue actually includes destination information in addition to data to be transmitted. The destination information is, for example, identification information of the destination process 5. The processing process 5 accesses the communication queue storage unit 7 and acquires a communication queue including its own identification information as destination information. As a result, data is transmitted from the processing process 5 as the transmission source to the processing process 5 as the transmission destination.

具体的には、処理プロセス5は、自己が起動された場合に、自己についてのセマフォの生成をセマフォ管理部3に要求する。セマフォの生成は、処理プロセス5の起動をトリガとして要求される。セマフォ管理部3は、処理プロセス5からの要求に基づいて、処理プロセス5についてのセマフォを生成する。これにより、処理プロセス5が起動されると、起動された処理プロセス5に対応するセマフォが生成される。   Specifically, the processing process 5 requests the semaphore management unit 3 to generate a semaphore for itself when the processing process 5 is activated. The generation of the semaphore is requested with the activation of the processing process 5 as a trigger. The semaphore management unit 3 generates a semaphore for the processing process 5 based on a request from the processing process 5. Thereby, when the processing process 5 is activated, a semaphore corresponding to the activated processing process 5 is generated.

また、処理プロセス5は、自己が起動された場合に、例えば自己についてのセマフォの生成に続いて、自己についてのセマフォのロックの獲得をセマフォ管理部3に要求する。セマフォのロックの獲得は、処理プロセス5の起動をトリガとして、セマフォの生成の要求の後に要求される。セマフォ管理部3は、処理プロセス5からの要求に基づいて、処理プロセス5についてのセマフォのロックを、処理プロセス5に与える。これにより、処理プロセス5は、自己についてのセマフォのロックを獲得する。従って、起動後に処理プロセス5がデータの受信側、換言すれば、データの送信先となった場合、送信先である処理プロセス5は、異常発生によりロックが解除されない限り、自己についてのセマフォのロックを獲得した状態にある。   In addition, when the processing process 5 is activated, the processing process 5 requests the semaphore management unit 3 to acquire the lock of the semaphore for the self, for example, following the generation of the semaphore for the self. The acquisition of the semaphore lock is requested after the request for generating the semaphore, triggered by the activation of the processing process 5. The semaphore management unit 3 gives the processing process 5 a semaphore lock for the processing process 5 based on a request from the processing process 5. Thereby, the processing process 5 acquires the lock of the semaphore about itself. Therefore, when the processing process 5 becomes the data receiving side after the activation, in other words, the data transmission destination, the processing process 5 as the transmission destination locks the semaphore about itself unless the lock is released due to an abnormality. It is in a state that has won.

なお、セマフォ管理部3に代わって、OS2がセマフォの生成及びセマフォのロックの獲得又は解除を実行するようにしても良い。   Instead of the semaphore management unit 3, the OS 2 may execute semaphore generation and semaphore lock acquisition or release.

図2(A)は、セマフォの説明図であり、セマフォの一例を示す。   FIG. 2A is an explanatory diagram of a semaphore and shows an example of a semaphore.

セマフォ格納部4は複数のセマフォを格納する。セマフォは、各々、セマフォID、プロセス、ロック獲得/解除を含む。セマフォIDは、セマフォを一意に特定する識別情報である。プロセスは、セマフォに対応する処理プロセス5の名前である。処理プロセス5の名前は、処理プロセス5を一意に特定する識別情報である。ロック獲得/解除は、セマフォの状態を示す。ロック獲得/解除が例えば「1」である場合、セマフォがロックされていること、換言すれば、獲得されていることを示す。ロック獲得/解除が例えば「0」である場合、セマフォがアンロックされていること、換言すれば、解除されていることを示す。   The semaphore storage unit 4 stores a plurality of semaphores. Each semaphore includes a semaphore ID, a process, and lock acquisition / release. The semaphore ID is identification information that uniquely identifies the semaphore. The process is the name of the processing process 5 corresponding to the semaphore. The name of the processing process 5 is identification information that uniquely identifies the processing process 5. Lock acquisition / release indicates the state of the semaphore. For example, when the lock acquisition / release is “1”, it indicates that the semaphore is locked, in other words, acquired. For example, when the lock acquisition / release is “0”, it indicates that the semaphore is unlocked, in other words, released.

セマフォ管理部3は、処理プロセス5からのセマフォの生成の要求に応じて、セマフォ格納部4に、セマフォID、プロセス、ロック獲得/解除を格納することにより、セマフォを生成し保持する。セマフォIDは、例えばセマフォの生成の要求の順に与えられる。プロセスとしては、セマフォのロックの獲得を要求した処理プロセス5の名前が格納される。ロック獲得/解除は、生成時には「0」とされる。   The semaphore management unit 3 generates and holds the semaphore by storing the semaphore ID, the process, and the lock acquisition / release in the semaphore storage unit 4 in response to the semaphore generation request from the processing process 5. The semaphore ID is given in the order of the request for generating the semaphore, for example. As the process, the name of the processing process 5 that requested acquisition of the semaphore lock is stored. The lock acquisition / release is set to “0” at the time of generation.

前述したように、処理プロセス5は、自己が起動された場合に、自己についてのセマフォのロックを獲得する。一方、セマフォ管理部3は、ロックを獲得した処理プロセス5に異常が発生した場合に、異常が発生した処理プロセス5に対応するセマフォをアンロックする。従って、処理プロセス5に異常が発生しない限り、自己のセマフォのロックを獲得した状態が続くはずである。換言すれば、ロック獲得/解除の「1」は、セマフォがOS2によりアンロックされていないので、セマフォに対応する処理プロセス5に異常が発生していないことを示す。また、ロック獲得/解除の「0」は、セマフォがOS2によりアンロックされているので、セマフォに対応する処理プロセス5に異常が発生していることを示す。   As described above, the process 5 acquires a semaphore lock for itself when it is activated. On the other hand, when an abnormality occurs in the processing process 5 that has acquired the lock, the semaphore management unit 3 unlocks the semaphore corresponding to the processing process 5 in which the abnormality has occurred. Therefore, as long as no abnormality occurs in the processing process 5, the state where the lock of the semaphore is acquired should continue. In other words, “1” for lock acquisition / release indicates that no abnormality has occurred in the processing process 5 corresponding to the semaphore because the semaphore is not unlocked by the OS 2. The lock acquisition / release “0” indicates that an abnormality has occurred in the processing process 5 corresponding to the semaphore because the semaphore is unlocked by the OS 2.

送信元である処理プロセス5は、アプリケーションからのデータの送信の要求を受けると、データの送信を行う。送信元である処理プロセス5は、送信先である処理プロセス5にデータを送信する場合に、送信先である処理プロセス5についてのセマフォのロックの獲得をセマフォ管理部3に要求する。セマフォのロックの獲得は、処理プロセス5の起動時の他に、アプリケーションからのデータの送信要求、又は、データの送信をトリガとして要求される。データの送信をトリガとするセマフォのロックの獲得の要求は、処理プロセス5が送信元となる場合に実行される。データの送信をトリガとするセマフォのロックの獲得の要求は、セマフォが処理プロセス5に異常が発生しているか又は発生していないかを示すので、送信先である処理プロセス5の生存を確認する処理である。   When receiving the data transmission request from the application, the processing process 5 as the transmission source transmits the data. When transmitting data to the processing process 5 that is the transmission destination, the processing process 5 that is the transmission source requests the semaphore management unit 3 to acquire a semaphore lock for the processing process 5 that is the transmission destination. The acquisition of the semaphore lock is requested not only when the processing process 5 is started but also when a data transmission request from the application or data transmission is triggered. A request for acquiring a semaphore lock triggered by data transmission is executed when the processing process 5 is a transmission source. The request for acquiring the lock of the semaphore triggered by the data transmission indicates whether the semaphore is abnormal in the processing process 5 or has not occurred, so the existence of the processing process 5 as the transmission destination is confirmed. It is processing.

送信元である処理プロセス5は、送信先である処理プロセス5についてのセマフォのロックを獲得できない場合に、データを送信先である処理プロセス5に送信する。送信元である処理プロセス5が送信先である処理プロセス5についてのセマフォのロックを獲得できないということは、送信先である処理プロセス5がセマフォのロックを獲得した状態にあること、換言すれば、送信先である処理プロセス5に異常が発生していないことを示す。従って、送信元である処理プロセス5は、データの送信を実行する。これにより、送信元である処理プロセス5は、送信先である処理プロセス5が正常であることを確認した上で、データを送信することができる。   When the processing process 5 that is the transmission source cannot acquire the semaphore lock for the processing process 5 that is the transmission destination, the processing process 5 transmits the data to the processing process 5 that is the transmission destination. The fact that the processing process 5 which is the transmission source cannot acquire the semaphore lock for the processing process 5 which is the transmission destination means that the processing process 5 which is the transmission destination has acquired the semaphore lock, in other words, This indicates that no abnormality has occurred in the processing process 5 which is a transmission destination. Therefore, the processing process 5 which is a transmission source executes data transmission. As a result, the processing process 5 as a transmission source can transmit data after confirming that the processing process 5 as a transmission destination is normal.

一方、送信元である処理プロセス5は、送信先である処理プロセス5についてのセマフォのロックを獲得することができた場合に、送信先である処理プロセス5を再起動する。送信元である処理プロセス5が送信先である処理プロセス5についてのセマフォのロックを獲得することができたということは、送信先である処理プロセス5がセマフォのロックを解放した状態にあること、換言すれば、送信先である処理プロセス5に異常が発生したことを示す。従って、送信元である処理プロセス5は、この時点ではデータの送信を実行せずに、送信先である処理プロセス5を再起動する。処理プロセス5は、他の処理プロセス5を再起動する機能を有する。   On the other hand, the processing process 5 as the transmission source restarts the processing process 5 as the transmission destination when the semaphore lock for the processing process 5 as the transmission destination can be acquired. The fact that the processing process 5 as the transmission source has acquired the semaphore lock for the processing process 5 as the transmission destination means that the processing process 5 as the transmission destination has released the lock of the semaphore. In other words, it indicates that an abnormality has occurred in the processing process 5 that is the transmission destination. Therefore, the processing process 5 that is the transmission source restarts the processing process 5 that is the transmission destination without executing data transmission at this point. The processing process 5 has a function of restarting another processing process 5.

なお、送信元である処理プロセス5は、送信先である処理プロセス5の再起動に先立って、送信先である処理プロセス5について獲得したセマフォのロックの解放を、セマフォ管理部3に要求する。セマフォ管理部3は、送信先である処理プロセス5についてのセマフォのロックの解放の要求を受けると、送信先である処理プロセス5を解放、換言すれば、アンロックする。これにより、送信先である処理プロセス5は、再起動後に自己についてのセマフォのロックを獲得することができる。   Note that the processing process 5 that is the transmission source requests the semaphore management unit 3 to release the semaphore lock acquired for the processing process 5 that is the transmission destination prior to the restart of the processing process 5 that is the transmission destination. When the semaphore management unit 3 receives a request for releasing the semaphore lock for the processing process 5 that is the transmission destination, the semaphore management unit 3 releases the processing process 5 that is the transmission destination, that is, unlocks it. Thereby, the processing process 5 which is a transmission destination can acquire the lock of the semaphore about itself after restarting.

送信先である処理プロセス5を再起動した後、送信元である処理プロセス5は、データの送信を実行する。これにより、データの送信をトリガとして、送信先の処理プロセス5の生存状態をチェックすることにより、処理プロセス5における異常の発生を速やかに検出することができる。また、異常が発生した処理プロセス5を速やかに再起動することができる。この結果、定期的なプロセス監視を行う場合よりも、処理プロセス5における異常の発生を速やかに検出することができ、通信処理の遅延を最小化することができる。   After restarting the processing process 5 which is the transmission destination, the processing process 5 which is the transmission source executes data transmission. As a result, the occurrence of an abnormality in the processing process 5 can be quickly detected by checking the survival state of the processing process 5 at the transmission destination using data transmission as a trigger. In addition, the processing process 5 in which an abnormality has occurred can be restarted promptly. As a result, the occurrence of abnormality in the processing process 5 can be detected more quickly than in the case where periodic process monitoring is performed, and the delay in communication processing can be minimized.

ここで、送信先である処理プロセス5を再起動した場合、送信元である処理プロセス5は、再起動した送信先である処理プロセス5についてのセマフォのロックの獲得をセマフォ管理部3に要求することなく、送信先である処理プロセス5の再起動の処理に続けてデータの送信を実行する。これは、再起動から殆ど時間が経過していないので、再起動後の処理プロセス5には異常が発生していないと考えられるからである。これにより、速やかにデータの送信を実行することができる。一方、再起動された送信先である処理プロセス5は、自己のセマフォのロックの獲得する処理を実行する。   Here, when the processing process 5 that is the transmission destination is restarted, the processing process 5 that is the transmission source requests the semaphore management unit 3 to acquire the semaphore lock for the processing process 5 that is the restarted transmission destination. Instead, the data transmission is executed following the restart process of the processing process 5 as the transmission destination. This is because since almost no time has elapsed since the restart, it is considered that no abnormality has occurred in the process 5 after the restart. Thereby, data transmission can be executed promptly. On the other hand, the processing process 5, which is the restarted transmission destination, executes processing for acquiring the lock of its own semaphore.

なお、送信先である処理プロセス5を再起動した後、送信元である処理プロセス5が、送信先である処理プロセス5についてのセマフォのロックの獲得をセマフォ管理部3に要求するようにしても良い。   After restarting the processing process 5 that is the transmission destination, the processing process 5 that is the transmission source requests the semaphore management unit 3 to acquire the semaphore lock for the processing process 5 that is the transmission destination. good.

ここで、送信先である処理プロセス5が再起動されるまでには、ある程度、時間が経過してしまう。このため、送信先の処理プロセス5の異常検出から再起動までの間に、再度、データの送信のためにセマフォのロックの獲得を要求すると、必ずロックを獲得することができ、再起動の処理が重ねて実行されてしまう。そこで、送信元である処理プロセス5は、送信先である処理プロセス5についての異常検出履歴に基づいて、送信先の処理プロセス5の異常検出から再起動までの間における、セマフォのロックの獲得処理を抑止する。これにより、送信先である処理プロセス5の再起動の処理が重ねて実行されてしまうことを防止することができる。   Here, a certain amount of time elapses before the processing process 5 as the transmission destination is restarted. For this reason, if the acquisition of the semaphore lock is requested again for data transmission between the abnormality detection of the processing process 5 at the transmission destination and the restart, the lock can always be acquired, and the restart process Will be executed repeatedly. Therefore, the processing process 5 that is the transmission source acquires the semaphore lock from the abnormality detection to the restart of the processing process 5 of the transmission destination based on the abnormality detection history for the processing process 5 that is the transmission destination. Is suppressed. Thereby, it is possible to prevent the restart process of the processing process 5 as the transmission destination from being repeatedly executed.

なお、処理プロセス5の異常検出から再起動までの時間がより短くなるように、処理プロセス5の起動のためのパラメタを設定するようにしても良い。   It should be noted that the parameters for starting up the processing process 5 may be set so that the time from the detection of the abnormality in the processing process 5 to the restart becomes shorter.

処理プロセス5は、他の処理プロセス5についての異常検出履歴を保持する。これにより、送信元である処理プロセス5は、送信先である処理プロセス5についての異常検出履歴を保持することができる。異常検出履歴は、異常情報の一例であって、異常検出の時刻を含む。   The processing process 5 holds an abnormality detection history for other processing processes 5. As a result, the processing process 5 that is the transmission source can hold the abnormality detection history for the processing process 5 that is the transmission destination. The abnormality detection history is an example of abnormality information, and includes the time of abnormality detection.

図2(B)は、異常情報の説明図であり、異常情報の一例を含む。   FIG. 2B is an explanatory diagram of abnormality information and includes an example of abnormality information.

異常情報格納部6は、複数の異常情報を格納する。異常情報は、各々、プロセス、異常検出履歴、異常検出時刻を含む。プロセスは、通信処理において、通信の相手となった、換言すれば、送信先となった処理プロセス5の名前である。異常検出履歴は、送信先となった処理プロセス5において、異常を検出したことを示す情報である。異常検出時刻は、送信先となった処理プロセス5における異常を検出した時刻である。   The abnormality information storage unit 6 stores a plurality of abnormality information. The abnormality information includes a process, an abnormality detection history, and an abnormality detection time, respectively. The process is the name of the processing process 5 that has become a communication partner in the communication processing, in other words, the transmission destination. The abnormality detection history is information indicating that an abnormality has been detected in the processing process 5 that is the transmission destination. The abnormality detection time is a time at which an abnormality is detected in the processing process 5 that is the transmission destination.

送信元である処理プロセス5は、送信先である処理プロセス5のセマフォのロックを獲得した場合に、異常情報格納部6に、プロセス、異常検出履歴、異常検出時刻を格納することにより、異常情報を生成し保持する。異常情報は、送信先である処理プロセス5毎に生成され、異常の検出の都度に更新される。送信先である処理プロセス5のセマフォのロックを獲得した場合とは、送信先である処理プロセス5の異常を検出した場合であり、結果としてデータが送信されないので、データの送信に失敗した場合である。   When the processing process 5 that is the transmission source acquires the lock of the semaphore of the processing process 5 that is the transmission destination, the abnormality information storage unit 6 stores the process, abnormality detection history, and abnormality detection time, thereby obtaining abnormality information. Generate and hold The abnormality information is generated for each processing process 5 that is a transmission destination, and is updated each time an abnormality is detected. The case where the lock of the semaphore of the processing process 5 that is the transmission destination is acquired is when the abnormality of the processing process 5 that is the transmission destination is detected. As a result, the data is not transmitted, and thus the data transmission fails. is there.

実際には、送信元である処理プロセス5は、送信先である処理プロセス5についてのセマフォのロックを獲得する都度に、プロセス、異常検出履歴、異常検出時刻を更新する。例えば、プロセスとしては、セマフォのロックを獲得した送信先の処理プロセス5の名前が格納される。異常検出履歴としては、例えば「異常発生」を示す情報が格納される。異常検出時刻としては、送信先である処理プロセス5についてのセマフォのロックを獲得した時刻が格納される。   Actually, the processing process 5 as the transmission source updates the process, the abnormality detection history, and the abnormality detection time each time the semaphore lock for the processing process 5 as the transmission destination is acquired. For example, as the process, the name of the processing process 5 of the transmission destination that has acquired the semaphore lock is stored. As the abnormality detection history, for example, information indicating “abnormality occurrence” is stored. As the abnormality detection time, the time at which the semaphore lock for the processing process 5 as the transmission destination is acquired is stored.

送信元である処理プロセス5は、送信先である処理プロセス5にデータを送信する場合に、異常情報格納部6に格納された異常情報を参照して、送信先である処理プロセス5についての異常検出履歴があるか否かを判断する。異常検出履歴の有無の判断は、送信先である処理プロセス5についてのセマフォのロックの獲得のセマフォ管理部3への要求に先立って、実行される。   When the processing process 5 that is the transmission source transmits data to the processing process 5 that is the transmission destination, the processing process 5 that is the transmission destination refers to the abnormality information stored in the abnormality information storage unit 6 and the abnormality It is determined whether there is a detection history. The determination of the presence or absence of an abnormality detection history is executed prior to a request to the semaphore management unit 3 to acquire a semaphore lock for the processing process 5 that is a transmission destination.

送信元である処理プロセス5は、送信先である処理プロセス5についての異常検出履歴がない場合に、送信先である処理プロセス5についてのセマフォのロックの獲得を、セマフォ管理部3へ要求する。これにより、送信先である処理プロセス5についての異常検出履歴がない場合は、送信先である処理プロセス5における異常の発生の有無が全く判らないので、セマフォにより送信先である処理プロセス5の状態が判断される。   When there is no abnormality detection history for the processing process 5 that is the transmission destination, the processing process 5 that is the transmission source requests the semaphore management unit 3 to acquire a semaphore lock for the processing process 5 that is the transmission destination. As a result, if there is no abnormality detection history for the processing process 5 that is the transmission destination, the presence or absence of an abnormality in the processing process 5 that is the transmission destination is not known at all, so the state of the processing process 5 that is the transmission destination is determined by the semaphore. Is judged.

一方、送信元である処理プロセス5は、送信先である処理プロセス5についての異常検出履歴がある場合に、異常検出の時刻からの経過時間が規定値以下であるか否かを判断する。規定値は、例えば、処理プロセス5の再起動に要する時間である。   On the other hand, when there is an abnormality detection history for the processing process 5 that is the transmission destination, the processing process 5 that is the transmission source determines whether or not an elapsed time from the time of abnormality detection is equal to or less than a specified value. The specified value is, for example, the time required for restarting the processing process 5.

そして、送信元である処理プロセス5は、経過時間が規定値以下である場合に、データを送信先である処理プロセス5に送信する。経過時間が規定値以下である場合には、処理プロセス5の再起動が終了しておらず、かつ、再起動の実行である。従って、送信先である処理プロセス5が再起動されると、異常が発生していない状態で、データを受信することができる。そこで、送信元である処理プロセス5は、送信先である処理プロセス5についてのセマフォのロックの獲得を要求することなく、データを送信する。これにより、送信先の処理プロセス5の異常検出から再起動までの間における、セマフォのロックの獲得処理を抑止することができ、また、速やかにデータを送信することができる。   Then, when the elapsed time is equal to or less than the specified value, the processing process 5 that is the transmission source transmits data to the processing process 5 that is the transmission destination. When the elapsed time is equal to or less than the specified value, the restart of the processing process 5 is not completed and the restart is executed. Therefore, when the processing process 5 as a transmission destination is restarted, data can be received in a state where no abnormality has occurred. Therefore, the processing process 5 as a transmission source transmits data without requesting acquisition of a semaphore lock for the processing process 5 as a transmission destination. As a result, it is possible to suppress semaphore lock acquisition processing between detection of an abnormality in the processing process 5 at the transmission destination and restart, and data can be transmitted promptly.

一方、送信元である処理プロセス5は、経過時間が規定値以下でない場合に、換言すれば、規定値より長い時間が経過している場合に、送信先である処理プロセス5についてのセマフォのロックの獲得をセマフォ管理部3に要求する。経過時間が規定値以下でない場合には、処理プロセス5の再起動が終了している。従って、送信元である処理プロセス5は、送信先である処理プロセス5についてのセマフォのロックの獲得を要求した後に、データを送信する。   On the other hand, the processing process 5 that is the transmission source locks the semaphore for the processing process 5 that is the transmission destination when the elapsed time is not less than the predetermined value, in other words, when the time longer than the predetermined value has elapsed. Is obtained from the semaphore management unit 3. If the elapsed time is not less than or equal to the specified value, the restart of the processing process 5 is finished. Therefore, the processing process 5 as the transmission source transmits data after requesting the acquisition of the semaphore lock for the processing process 5 as the transmission destination.

図3は、コンピュータのハードウェアの構成の一例を示す図である。   FIG. 3 is a diagram illustrating an example of a hardware configuration of a computer.

CPU101は、メモリ102に含まれる主メモリ上に常駐するOS2に従って、コンピュータ1を制御する。CPU101は、メモリ102に含まれる主メモリ上に存在する、OS2に含まれるセマフォ管理プログラムや、複数の処理プロセス5を含む通信制御プログラムを実行する。これにより、セマフォ管理部3、複数の処理プロセス5が実現される。セマフォ管理プログラムや通信制御プログラムは、例えば、CD(Compact Disc)やDVD(Digital Versatile Disk)等の可搬型記憶媒体107に格納され、可搬型記憶媒体107からCD−ROMドライブやDVDドライブ等の駆動装置108を介して記憶装置106に入力され、記憶装置106からメモリ102にロードされる。   The CPU 101 controls the computer 1 according to the OS 2 that resides on the main memory included in the memory 102. The CPU 101 executes a semaphore management program included in the OS 2 and a communication control program including a plurality of processing processes 5 existing on the main memory included in the memory 102. Thereby, the semaphore management unit 3 and the plurality of processing processes 5 are realized. The semaphore management program and the communication control program are stored in a portable storage medium 107 such as a CD (Compact Disc) or a DVD (Digital Versatile Disk), and the CD-ROM drive or DVD drive is driven from the portable storage medium 107. The data is input to the storage device 106 via the device 108 and loaded from the storage device 106 to the memory 102.

セマフォ格納部4、異常情報格納部6、通信キュー格納部7は、例えばメモリ102に設けられる。セマフォ格納部4、異常情報格納部6、通信キュー格納部7を記憶装置106に設けるようにしても良い。   The semaphore storage unit 4, the abnormality information storage unit 6, and the communication queue storage unit 7 are provided in the memory 102, for example. The semaphore storage unit 4, the abnormality information storage unit 6, and the communication queue storage unit 7 may be provided in the storage device 106.

入力装置104は、例えばキーボードであり、マウス等を含んでも良い。出力装置105は、例えばディスプレイであり、プリンタ等の出力装置を含んでも良い。CPU101、メモリ102、通信インタフェース103、入力装置104、出力装置105、記憶装置106、駆動装置108は、バス109を介して、相互に接続される。   The input device 104 is a keyboard, for example, and may include a mouse or the like. The output device 105 is a display, for example, and may include an output device such as a printer. The CPU 101, the memory 102, the communication interface 103, the input device 104, the output device 105, the storage device 106, and the drive device 108 are connected to each other via a bus 109.

通信インタフェース103は、例えば、送受信装置であり、ネットワークに接続され、ネットワークを介して他のコンピュータに接続される。これにより、コンピュータ1は、他のコンピュータとの間で通信を行う。   The communication interface 103 is, for example, a transmission / reception device, is connected to a network, and is connected to another computer via the network. Thereby, the computer 1 communicates with other computers.

セマフォ管理プログラムや通信制御プログラムは、LAN(Local Area Network)またはインターネットなどのネットワークを介して、入力されて記憶装置106に記憶され、CPU101によって実行されるようにしても良い。また、セマフォ管理プログラムや通信制御プログラムを格納した可搬型記憶媒体107から駆動装置108を介して、入力されて記憶装置106に記憶され、CPU101によって実行されるようにしても良い。   The semaphore management program and the communication control program may be input via a network such as a LAN (Local Area Network) or the Internet, stored in the storage device 106, and executed by the CPU 101. Alternatively, the data may be input from the portable storage medium 107 storing the semaphore management program and the communication control program via the drive device 108, stored in the storage device 106, and executed by the CPU 101.

図4及び図5は、データ送信及びプロセス監視の説明図である。図4及び図5において、送信先である処理プロセス5を処理プロセスAといい、送信元である処理プロセス5を処理プロセスBという。   4 and 5 are explanatory diagrams of data transmission and process monitoring. 4 and 5, the processing process 5 that is the transmission destination is referred to as processing process A, and the processing process 5 that is the transmission source is referred to as processing process B.

例えば、送信元である処理プロセスBは、アプリケーションからのデータの送信要求に応じて、データ#1、#2を通信キュー格納部7に格納する。送信先である処理プロセスAは、通信キュー格納部7に格納されたデータ#1、#2を取得して、取得したデータ#1、#2を他のアプリケーションに送信する。また、処理プロセスA及び処理プロセスBの間でデータ#1が送受信された後に、処理プロセスAで異常が発生するとする。   For example, the processing process B as the transmission source stores the data # 1 and # 2 in the communication queue storage unit 7 in response to a data transmission request from the application. The processing process A that is a transmission destination acquires the data # 1 and # 2 stored in the communication queue storage unit 7, and transmits the acquired data # 1 and # 2 to another application. Further, it is assumed that an abnormality occurs in the processing process A after the data # 1 is transmitted and received between the processing process A and the processing process B.

例えば、処理プロセスA及び処理プロセスBは、各々、自己が起動されると、自己についてのセマフォの生成をセマフォ管理部3に要求し、続いて、自己についてのセマフォのロックの獲得をセマフォ管理部3に要求する。セマフォ管理部3は、処理プロセスA及び処理プロセスBからの要求に基づいて、処理プロセスA及び処理プロセスBについてのセマフォを生成し、処理プロセスA及び処理プロセスBについてのセマフォのロックを、処理プロセスA及び処理プロセスBに与える。これにより、処理プロセスA及び処理プロセスBは、自己についてのセマフォのロックを獲得する。   For example, when the processing process A and the processing process B are each started, the processing process A and the processing process B request the semaphore management unit 3 to generate a semaphore for themselves, and then acquire a semaphore lock for the self. 3 is requested. The semaphore management unit 3 generates semaphores for the processing processes A and B based on requests from the processing processes A and B, and locks the semaphores for the processing processes A and B. A and processing process B are given. As a result, the processing process A and the processing process B acquire the lock of the semaphore about itself.

この状態で、送信元である処理プロセスBは、アプリケーションからの送信先である処理プロセスAへのデータ#1の送信要求に応じて、データ#1の送信処理を開始する。   In this state, the processing process B that is the transmission source starts the transmission process of the data # 1 in response to a transmission request for the data # 1 from the application to the processing process A that is the transmission destination.

まず、処理プロセスBは、データ#1の送信をトリガとして、処理プロセスAについてのセマフォのロックの獲得をセマフォ管理部3に要求する。   First, the processing process B requests the semaphore management unit 3 to acquire a semaphore lock for the processing process A with the transmission of data # 1 as a trigger.

しかし、この時点では、処理プロセスAにおいて異常は発生していないので、処理プロセスAが自己についてのセマフォのロックを獲得したままである。従って、処理プロセスBは、処理プロセスAについてのセマフォのロックを獲得できない。そこで、処理プロセスBは、データ#1を処理プロセスAに送信する。具体的には、処理プロセスBは、データ#1を通信キュー格納部7に格納する。   However, since no abnormality has occurred in the processing process A at this point, the processing process A still has acquired the semaphore lock for itself. Therefore, the processing process B cannot acquire the semaphore lock for the processing process A. Therefore, the processing process B transmits data # 1 to the processing process A. Specifically, the processing process B stores data # 1 in the communication queue storage unit 7.

処理プロセスAは、通信キュー格納部7に格納されたデータ#1を取得する。これにより、処理プロセスBと処理プロセスAとの間におけるプロセス間通信が完了する。処理プロセスAは、取得したデータ#1を、他のアプリケーションに送信する。   The processing process A acquires data # 1 stored in the communication queue storage unit 7. Thereby, the inter-process communication between the process B and the process A is completed. The processing process A transmits the acquired data # 1 to another application.

この後、最初のデータ#1が送受信された直後に、処理プロセスAで異常が発生する。処理プロセスAは、異常が発生したことをセマフォ管理部3に通知する。これに応じて、セマフォ管理部3は、セマフォのロックを獲得した処理プロセスAに異常が発生したので、異常が発生した処理プロセスAに対応するセマフォをアンロックする。この時点では、処理プロセスBは、処理プロセスAの異常を検出していない。   Thereafter, an abnormality occurs in the process A immediately after the first data # 1 is transmitted / received. The processing process A notifies the semaphore management unit 3 that an abnormality has occurred. In response to this, the semaphore management unit 3 unlocks the semaphore corresponding to the processing process A in which the abnormality has occurred because an abnormality has occurred in the processing process A that has acquired the semaphore lock. At this point, the processing process B has not detected an abnormality in the processing process A.

この状態で、送信元である処理プロセスBは、アプリケーションからの処理プロセスAへのデータ#2の送信要求に応じて、データ#2の送信処理を開始する。   In this state, the processing process B, which is the transmission source, starts transmission processing for data # 2 in response to a transmission request for data # 2 from the application to processing process A.

まず、処理プロセスBは、データ#2の送信をトリガとして、処理プロセスAについてのセマフォのロックの獲得をセマフォ管理部3に要求する。なお、この時、処理プロセスAについての異常検出履歴はないものとする。   First, the processing process B requests the semaphore management unit 3 to acquire a semaphore lock for the processing process A with the transmission of data # 2 as a trigger. At this time, it is assumed that there is no abnormality detection history for the process A.

しかし、この時点では、処理プロセスAにおいて異常が発生しているので、処理プロセスAについてのセマフォはアンロックされている。従って、処理プロセスBは、処理プロセスAについてのセマフォのロックを獲得することができる。   However, since an abnormality has occurred in the processing process A at this point, the semaphore for the processing process A is unlocked. Accordingly, the processing process B can acquire the semaphore lock for the processing process A.

そこで、処理プロセスBは、処理プロセスAについてのセマフォのロックを獲得することができたので、処理プロセスAの異常を検出したと判断する。そして、処理プロセスBは、異常を検出した処理プロセスAを再起動する。   Therefore, the processing process B is able to acquire the semaphore lock for the processing process A, and therefore determines that the abnormality of the processing process A has been detected. Then, the processing process B restarts the processing process A that has detected the abnormality.

この後、処理プロセスBは、処理プロセスAの異常の検出から予め定められた時間が経過した後に、データ#2を処理プロセスAに送信する。具体的には、処理プロセスBは、データ#2を通信キュー格納部7に格納する。   Thereafter, the processing process B transmits data # 2 to the processing process A after a predetermined time has elapsed since the detection of the abnormality of the processing process A. Specifically, the processing process B stores data # 2 in the communication queue storage unit 7.

処理プロセスAは、通信キュー格納部7に格納されたデータ#2を取得する。これにより、処理プロセスBと処理プロセスAとの間におけるプロセス間通信が完了する。処理プロセスAは、取得したデータ#2を、他のアプリケーションに送信する。   The processing process A acquires data # 2 stored in the communication queue storage unit 7. Thereby, the inter-process communication between the process B and the process A is completed. The processing process A transmits the acquired data # 2 to another application.

以上によれば、図5において、異常の発生から検出までには、タイムラグが存在する。このタイムラグは、図9におけるタイムラグt501と同等である。しかし、図9においては、処理プロセスBが処理プロセスAの異常を知らずにデータ#2を通信キュー格納部7に格納してしまうので、タイムラグt501は、ほぼ通信の開始から完了までの時間t502の長さに反映されてしまう。   According to the above, in FIG. 5, there is a time lag between occurrence of abnormality and detection. This time lag is equivalent to the time lag t501 in FIG. However, in FIG. 9, since the process B stores the data # 2 in the communication queue storage unit 7 without knowing the abnormality of the process A, the time lag t501 is substantially equal to the time t502 from the start to completion of communication. It will be reflected in the length.

一方、図5においては、処理プロセスBが処理プロセスAの異常を検出して、処理プロセスAを再起動した後に、データ#2を通信キュー格納部7に格納する。従って、処理プロセスBからみた場合に、タイムラグの開始は、例えば、処理プロセスAの異常の検出の時点であると考えられる。従って、図5における異常の発生から検出までのタイムラグは、通信の開始から完了までの時間に含まれず、問題にならない。   On the other hand, in FIG. 5, after the process B detects an abnormality in the process A and restarts the process A, the data # 2 is stored in the communication queue storage unit 7. Accordingly, when viewed from the processing process B, the start of the time lag is considered to be, for example, the time when the abnormality of the processing process A is detected. Therefore, the time lag from the occurrence of the abnormality to the detection in FIG. 5 is not included in the time from the start to the completion of communication, and does not cause a problem.

これにより、処理プロセスBは、処理プロセスAにおける異常の発生を検出してから、データ#2の送信を完了するまでに、時間t1しか要さない。時間t1は、処理プロセスAの再起動の時間を含む。この結果、通信処理の遅延をより短い時間に抑えることができる。また、通信処理の遅延を抑えることができるので、データが長い時間通信キュー格納部7に滞留することを防止して、通信キュー格納部7のオーバーフローによるデータの欠損が発生することを防止することができる。   As a result, the processing process B only takes time t1 from detecting the occurrence of an abnormality in the processing process A to completing the transmission of data # 2. The time t1 includes the restart time of the processing process A. As a result, communication processing delay can be suppressed to a shorter time. In addition, since a delay in communication processing can be suppressed, data is prevented from staying in the communication queue storage unit 7 for a long time, and data loss due to overflow of the communication queue storage unit 7 is prevented. Can do.

なお、図4及び図5においては、処理プロセスBは、データ#2の送信に先立って、処理プロセスAについてのセマフォのロックを獲得したので、この時点で、処理プロセスAについての異常情報、特に、異常検出時刻を更新する。   4 and 5, processing process B has acquired semaphore lock for processing process A prior to transmission of data # 2, so at this point in time, abnormality information about processing process A, particularly Update the abnormality detection time.

また、この後、処理プロセスBが、処理プロセスAへのデータ#3の送信の要求を受けた場合には、処理プロセスAについてのセマフォのロックの獲得の要求に先立って、前述したように、異常検出履歴の有無や、異常検出の時刻からの経過時間が判断され、判断結果に基づいて、データ#3が送信されるか、又は、処理プロセスAについてのセマフォのロックの獲得が実行される。   Thereafter, when the processing process B receives a request for transmission of data # 3 to the processing process A, as described above, prior to the request for acquiring the semaphore lock for the processing process A, The presence / absence of an abnormality detection history and the elapsed time from the time of abnormality detection are determined, and based on the determination result, data # 3 is transmitted or semaphore lock acquisition for processing process A is executed. .

図6は、セマフォの処理フローチャートである。   FIG. 6 is a process flowchart of the semaphore.

OS2が、起動コマンドを実行することにより、処理プロセス5を起動する(ステップS11)。なお、データの送信先である処理プロセス5についてのセマフォが、主として、説明の対象であるので、以下の説明において、処理プロセス5を送信先プロセス5ということとする。   The OS 2 starts the processing process 5 by executing the start command (step S11). Note that the semaphore for the processing process 5 that is the data transmission destination is mainly the object of the description, and therefore, in the following description, the processing process 5 is referred to as the transmission destination process 5.

送信先プロセス5は、起動されると、セマフォ管理部3に、自己についてのセマフォの生成を要求する(ステップS12)。セマフォ管理部3は、送信先プロセス5からセマフォの生成の要求を受けると、セマフォの生成を要求した送信先プロセス5についてのセマフォを生成する(ステップS13)。   When the transmission destination process 5 is activated, it requests the semaphore management unit 3 to generate a semaphore for itself (step S12). When receiving a request for generating a semaphore from the transmission destination process 5, the semaphore management unit 3 generates a semaphore for the transmission destination process 5 that has requested the generation of the semaphore (step S13).

送信先プロセス5は、セマフォの生成の要求に続けて、セマフォ管理部3に、自己についてのセマフォのロックの獲得を要求する(ステップS14)。セマフォ管理部3は、送信先プロセス5からセマフォのロックの獲得の要求を受けると、セマフォのロックの獲得を要求した送信先プロセス5にセマフォのロックを獲得させる(ステップS15)。これにより、起動された送信先プロセス5は、起動後に自己についてのセマフォのロックを獲得する。ステップS12〜S15は一体不可分に実行される。以上により、起動された送信先プロセス5はセマフォのロックを獲得し、送信先プロセス5において異常が発生するまでは、この状態が維持される。   The destination process 5 requests the semaphore management unit 3 to acquire the semaphore lock for itself following the request for generating the semaphore (step S14). When the semaphore management unit 3 receives a request for acquiring the semaphore lock from the transmission destination process 5, the semaphore management unit 3 causes the transmission destination process 5 that has requested acquisition of the semaphore lock to acquire the semaphore lock (step S15). As a result, the activated transmission destination process 5 acquires the semaphore lock for itself after activation. Steps S12 to S15 are performed inseparably. As described above, the started transmission destination process 5 acquires the semaphore lock, and this state is maintained until an abnormality occurs in the transmission destination process 5.

図7は、データ送信及びプロセス監視の処理フローチャートである。   FIG. 7 is a processing flowchart of data transmission and process monitoring.

データの送信元である処理プロセス5は、異常情報格納部6を参照して、送信先プロセス5に異常検出履歴があるか否かを判断する(ステップS21)。なお、以下の説明において、データの送信元である処理プロセス5を送信元プロセス5ということとする。   The processing process 5 that is the data transmission source refers to the abnormality information storage unit 6 and determines whether or not the transmission destination process 5 has an abnormality detection history (step S21). In the following description, the processing process 5 that is a data transmission source is referred to as a transmission source process 5.

送信元プロセス5は、送信先プロセス5に異常検出履歴がある場合(ステップS21 YES)、更に、送信先プロセス5に異常検出履歴における異常検出時刻、換言すれば、前回の異常検出からの経過時間が規定値以下であるか否かを判断する(ステップS22)。   When the transmission destination process 5 has an abnormality detection history (YES in step S21), the transmission source process 5 further has an abnormality detection time in the abnormality detection history in the transmission destination process 5, in other words, an elapsed time since the previous abnormality detection. Is less than or equal to a specified value (step S22).

ステップS21において送信先プロセス5に異常検出履歴がない場合(ステップS21 NO)、及び、ステップS22において経過時間が規定値以下でない場合(ステップS22 NO)、送信元プロセス5は、送信先プロセス5についてのセマフォのロックの獲得をセマフォ管理部3に要求する。   If there is no abnormality detection history in the transmission destination process 5 in step S21 (step S21 NO), and if the elapsed time is not less than the specified value in step S22 (NO in step S22), the transmission source process 5 is related to the transmission destination process 5. The semaphore management unit 3 is requested to acquire the semaphore lock.

この後、送信元プロセス5は、セマフォのロックの獲得の要求から予め定められた時間が経過した後に、送信先プロセス5についてのセマフォのロックの獲得ができなかったか否かを判断する(ステップS23)。   Thereafter, the transmission source process 5 determines whether or not the semaphore lock for the transmission destination process 5 could not be acquired after a predetermined time has elapsed from the request for acquisition of the semaphore lock (step S23). ).

送信先プロセス5についてのセマフォのロックの獲得が不可ではなかった、換言すれば、獲得できた場合(ステップS23 NO)、送信元プロセス5は、本来獲得できないはずのセマフォのロックを獲得することができたので、送信先プロセス5についての異常を検出したと判断する。   Acquisition of the semaphore lock for the transmission destination process 5 was not impossible. In other words, if acquisition was possible (NO in step S23), the transmission source process 5 may acquire the lock of the semaphore that should not be acquired originally. As a result, it is determined that an abnormality in the destination process 5 has been detected.

そこで、送信元プロセス5は、送信先プロセス5に異常検出履歴における異常検出時刻を更新し(ステップS24)、獲得した送信先プロセス5についてのセマフォのロックを開放し、換言すれば、セマフォのロックを解除し(ステップS25)、送信先プロセス5を再起動する(ステップS26)。   Therefore, the transmission source process 5 updates the abnormality detection time in the abnormality detection history to the transmission destination process 5 (step S24), releases the semaphore lock for the acquired transmission destination process 5, in other words, locks the semaphore. Is canceled (step S25), and the transmission destination process 5 is restarted (step S26).

この後、送信元プロセス5は、通信キュー格納部7へ送信対象のデータを複写することにより、データを送信する(ステップS27)。   Thereafter, the transmission source process 5 transmits the data by copying the transmission target data to the communication queue storage unit 7 (step S27).

ステップS22において経過時間が規定値以下である場合(ステップS22 YES)、送信元プロセス5は、ステップS23〜S26を省略して、ステップS27を実行する。また、ステップS23において送信先プロセス5についてのセマフォのロックの獲得が不可であった、換言すれば、獲得できなかった場合(ステップS23 YES)、送信元プロセス5は、ステップS24〜S26を省略して、ステップS27を実行する。   If the elapsed time is equal to or less than the specified value in step S22 (step S22 YES), the transmission source process 5 omits steps S23 to S26 and executes step S27. Further, if the semaphore lock cannot be acquired for the transmission destination process 5 in step S23, in other words, if it cannot be acquired (YES in step S23), the transmission source process 5 omits steps S24 to S26. Step S27 is then executed.

例えば、送信元プロセス5が、送信先プロセス5への第1のデータの送信要求に基づいてステップS21〜27の処理を実行後に、同一の送信先プロセス5への第2のデータの送信要求を受ける。この場合、第1のデータについてのステップS24において異常検出時刻が更新されるので、送信元プロセス5は、第2のデータについての処理において、送信先プロセス5に異常検出履歴があることを知って、前回の異常検出からの経過時間が規定値以下である場合にはデータを送信し、経過時間が規定値以下でない場合には送信先プロセス5のセマフォのロックの獲得の可否に基づいて処理を実行する。   For example, the transmission source process 5 sends the second data transmission request to the same transmission destination process 5 after executing the processing of steps S21 to S27 based on the transmission request of the first data to the transmission destination process 5. receive. In this case, since the abnormality detection time is updated in step S24 for the first data, the transmission source process 5 knows that the transmission destination process 5 has an abnormality detection history in the processing for the second data. If the elapsed time from the previous abnormality detection is less than the specified value, data is transmitted. If the elapsed time is not less than the specified value, processing is performed based on whether the transmission destination process 5 can acquire the semaphore lock. Run.

なお、送信元プロセス5が、第1のデータの送信要求に基づいてステップS21〜27の処理を実行中に、第2のデータの送信要求を受ける場合がある。この場合、例えば、送信元プロセス5は、第1のデータについてのステップS21〜27の処理の後に、第2のデータについてのステップS21〜27の処理を実行する。   The transmission source process 5 may receive a second data transmission request while executing the processes of steps S21 to S27 based on the first data transmission request. In this case, for example, the transmission source process 5 executes the processing of steps S21 to 27 for the second data after the processing of steps S21 to 27 for the first data.

以上により、送信先プロセス5において異常が発生しない限り、他の処理プロセス5は送信先プロセス5についてのセマフォのロックを獲得することができないので、送信先プロセス5に異常が発生していないことを確認してデータを送信することができる。また、送信先プロセス5において異常が発生した場合、他の処理プロセス5は送信先プロセス5についてのセマフォのロックを獲得することができるので、送信先プロセス5を再起動し、その後、データを送信することができる。   As described above, since no other process 5 can acquire the semaphore lock for the destination process 5 unless an abnormality occurs in the destination process 5, it is confirmed that no abnormality has occurred in the destination process 5. You can confirm and send data. Further, when an abnormality occurs in the destination process 5, the other processing process 5 can acquire the semaphore lock for the destination process 5, so the destination process 5 is restarted and then the data is transmitted. can do.

以上の説明から理解されるように、以下のような実施の態様が把握される。   As will be understood from the above description, the following embodiments are grasped.

(付記1) 第1のプロセスが、
ロックを獲得したプロセスに異常が発生した場合にプロセス状態情報管理部によりアンロックされるプロセス状態情報であって、前記第1のプロセスについてのプロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得し、
第2のプロセスが、
前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信する
ことを特徴とするデータ送信方法。
(Appendix 1) The first process is
Process state information that is unlocked by the process state information management unit when an abnormality occurs in the process that acquired the lock, and the process state information management unit acquires the lock of the process state information for the first process. To request and
Obtaining a lock of the process state information for the first process from the process state information management unit;
The second process is
When transmitting data to the first process, the process state information management unit is requested to acquire the lock of the process state information for the first process,
When the process state information management unit can acquire the lock of the process state information for the first process, the data is transmitted to the first process after the first process is restarted. A data transmission method characterized by:

(付記2) 前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックを獲得できない場合に、前記データを前記第1のプロセスに送信する
ことを特徴とする付記1に記載のデータ送信方法。
(Supplementary note 2) The supplementary note 1, wherein the data is transmitted to the first process when the second process cannot acquire the lock of the process state information for the first process. Data transmission method.

(付記3) 前記第1のプロセスが起動された場合に、前記第1のプロセスは、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求して、前記第1のプロセスについての前記プロセス状態情報のロックを獲得する
ことを特徴とする付記1に記載のデータ送信方法。
(Supplementary Note 3) When the first process is started, the first process requests the process state information management unit to acquire the lock of the process state information for the first process, and The data transmission method according to appendix 1, wherein the process state information lock for the first process is acquired.

(付記4) 前記第1のプロセスが起動された場合に、前記第1のプロセスは、前記第1のプロセスについての前記プロセス状態情報の生成を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部が、前記第1のプロセスからの要求に基づいて、前記第1のプロセスについての前記プロセス状態情報を生成する
ことを特徴とする付記1に記載のデータ送信方法。
(Supplementary Note 4) When the first process is activated, the first process requests the process state information management unit to generate the process state information for the first process, and
The data transmission method according to appendix 1, wherein the process state information management unit generates the process state information for the first process based on a request from the first process.

(付記5) 前記第1のプロセスを再起動した場合、前記第2のプロセスは、再起動した前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求することなく、前記第1のプロセスの再起動の処理に続けて前記データの送信を実行する
ことを特徴とする付記1に記載のデータ送信方法。
(Supplementary Note 5) When the first process is restarted, the second process requests the process state information management unit to acquire the lock of the process state information for the restarted first process. The data transmission method according to appendix 1, wherein the data transmission is executed subsequent to the restart process of the first process.

(付記6) 前記第2のプロセスは、前記第1のプロセスの再起動に先立って、前記第1のプロセスについて獲得した前記プロセス状態情報のロックの解放を、前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部は、前記第1のプロセスについての前記プロセス状態情報のロックの解放の要求を受けると、前記第1のプロセスについての前記プロセス状態情報をアンロックする
ことを特徴とする付記1に記載のデータ送信方法。
(Supplementary Note 6) Prior to the restart of the first process, the second process requests the process state information management unit to release the lock of the process state information acquired for the first process. ,
The process state information management unit unlocks the process state information for the first process when receiving a request for releasing the lock of the process state information for the first process. 2. The data transmission method according to 1.

(付記7) 前記第2のプロセスが、前記第1のプロセスについての異常検出履歴であって、異常検出の時刻を含む異常検出履歴を保持し、
前記第2のプロセスが、前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得の前記プロセス状態情報管理部への要求に先立って、前記第1のプロセスについての前記異常検出履歴があるか否かを判断し、前記異常検出履歴がある場合に、前記異常検出の時刻からの経過時間が規定値以下であるか否かを判断し、前記経過時間が規定値以下である場合に、前記データを前記第1のプロセスに送信する
ことを特徴とする付記1に記載のデータ送信方法。
(Supplementary note 7) The second process is an abnormality detection history for the first process, and holds an abnormality detection history including an abnormality detection time,
When the second process sends data to the first process, prior to the request to the process state information management unit to acquire the lock of the process state information for the first process, the process It is determined whether or not there is the abnormality detection history for the first process, and when there is the abnormality detection history, it is determined whether or not an elapsed time from the time of the abnormality detection is a specified value or less, The data transmission method according to appendix 1, wherein the data is transmitted to the first process when the elapsed time is equal to or less than a specified value.

(付記8) 前記第1のプロセスについての前記異常検出履歴がない場合に、前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求する
ことを特徴とする付記7に記載のデータ送信方法。
(Supplementary Note 8) When there is no abnormality detection history for the first process, the second process acquires the lock of the process state information for the first process to the process state information management unit. The data transmission method according to appendix 7, wherein the data transmission method is requested.

(付記9) 前記第2のプロセスが、前記経過時間が規定値以下でない場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合に、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信し、前記第1のプロセスについての前記プロセス状態情報のロックを獲得できない場合に、前記データを前記第1のプロセスに送信する
ことを特徴とする付記7に記載のデータ送信方法。
(Supplementary note 9) When the second process is not equal to or less than a predetermined value, the process state information management unit is requested to acquire the lock of the process state information for the first process,
If the second process is able to acquire a lock on the process state information for the first process, after restarting the first process, the data is passed to the first process. The data transmission method according to appendix 7, wherein the data is transmitted to the first process when the process state information lock for the first process cannot be acquired.

(付記10) 前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合に、前記異常検出の時刻を更新する
ことを特徴とする付記9に記載のデータ送信方法。
(Supplementary note 10) In the supplementary note 9, when the second process is able to acquire the lock of the process state information for the first process, the time of abnormality detection is updated. The data transmission method described.

(付記11) プロセス状態情報のロックを獲得したプロセスに異常が発生した場合に、前記プロセス状態情報をアンロックするプロセス状態情報管理部と、
第1のプロセスを実行し、第1のプロセスについてのプロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得する第1のプロセス実行部と、
第2のプロセスを実行し、前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信する第2のプロセス実行部とを含む
ことを特徴とするデータ送信装置。
(Appendix 11) A process state information management unit that unlocks the process state information when an abnormality occurs in the process that has acquired the lock of the process state information;
Execute the first process, request the process state information management unit to acquire the lock of the process state information for the first process, and send the process state information about the first process from the process state information management unit A first process execution unit for acquiring the lock of
When executing a second process and transmitting data to the first process, the process state information management unit is requested to acquire a lock of the process state information for the first process, and the process state When the process state information lock for the first process can be acquired from the information management unit, the second process transmits the data to the first process after restarting the first process. And a process execution unit.

(付記12) 第1のプロセスが、
ロックを獲得したプロセスに異常が発生した場合にプロセス状態情報管理部によりアンロックされるプロセス状態情報であって、前記第1のプロセスについてのプロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得し、
第2のプロセスが、
前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信する
ことを特徴とするプログラム。
(Appendix 12) The first process is
Process state information that is unlocked by the process state information management unit when an abnormality occurs in the process that acquired the lock, and the process state information management unit acquires the lock of the process state information for the first process. To request and
Obtaining a lock of the process state information for the first process from the process state information management unit;
The second process is
When transmitting data to the first process, the process state information management unit is requested to acquire the lock of the process state information for the first process,
When the process state information management unit can acquire the lock of the process state information for the first process, the data is transmitted to the first process after the first process is restarted. A program characterized by

(付記13) プロセス間通信を実行するプログラムを記録する記憶媒体であって、
前記プログラムは、
第1のプロセスが、
ロックを獲得したプロセスに異常が発生した場合にプロセス状態情報管理部によりアンロックされるプロセス状態情報であって、前記第1のプロセスについてのプロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得し、
第2のプロセスが、
前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信する
ことを特徴とする記憶媒体。
(Supplementary note 13) A storage medium for recording a program for executing inter-process communication,
The program is
The first process is
Process state information that is unlocked by the process state information management unit when an abnormality occurs in the process that acquired the lock, and the process state information management unit acquires the lock of the process state information for the first process. To request and
Obtaining a lock of the process state information for the first process from the process state information management unit;
The second process is
When transmitting data to the first process, the process state information management unit is requested to acquire the lock of the process state information for the first process,
When the process state information management unit can acquire the lock of the process state information for the first process, the data is transmitted to the first process after the first process is restarted. A storage medium characterized by:

1 コンピュータ
2 オペレーティングシステム(OS)
3 セマフォ管理部
4 セマフォ格納部
5 処理プロセス
6 異常情報格納部
7 通信キュー格納部
1 Computer 2 Operating System (OS)
3 Semaphore management unit 4 Semaphore storage unit 5 Processing process 6 Abnormal information storage unit 7 Communication queue storage unit

Claims (8)

第1のプロセスが、
ロックを獲得したプロセスに異常が発生した場合にプロセス状態情報管理部によりアンロックされるプロセス状態情報であって、前記第1のプロセスについてのプロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得し、
第2のプロセスが、
前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信する
ことを特徴とするデータ送信方法。
The first process is
Process state information that is unlocked by the process state information management unit when an abnormality occurs in the process that acquired the lock, and the process state information management unit acquires the lock of the process state information for the first process. To request and
Obtaining a lock of the process state information for the first process from the process state information management unit;
The second process is
When transmitting data to the first process, the process state information management unit is requested to acquire the lock of the process state information for the first process,
When the process state information management unit can acquire the lock of the process state information for the first process, the data is transmitted to the first process after the first process is restarted. A data transmission method characterized by:
前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックを獲得できない場合に、前記データを前記第1のプロセスに送信する
ことを特徴とする請求項1に記載のデータ送信方法。
The data transmission of claim 1, wherein the second process transmits the data to the first process when the process state information lock for the first process cannot be acquired. Method.
前記第1のプロセスが起動された場合に、前記第1のプロセスは、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求して、前記第1のプロセスについての前記プロセス状態情報のロックを獲得する
ことを特徴とする請求項1に記載のデータ送信方法。
When the first process is started, the first process requests the process state information management unit to acquire the lock of the process state information for the first process, and the first process The data transmission method according to claim 1, further comprising acquiring a lock of the process state information for a process.
前記第1のプロセスが起動された場合に、前記第1のプロセスは、前記第1のプロセスについての前記プロセス状態情報の生成を前記プロセス状態情報管理部に要求し、
前記プロセス状態情報管理部が、前記第1のプロセスからの要求に基づいて、前記第1のプロセスについての前記プロセス状態情報を生成する
ことを特徴とする請求項1に記載のデータ送信方法。
When the first process is activated, the first process requests the process state information management unit to generate the process state information for the first process;
The data transmission method according to claim 1, wherein the process state information management unit generates the process state information for the first process based on a request from the first process.
前記第2のプロセスが、前記第1のプロセスについての異常検出履歴であって、異常検出の時刻を含む異常検出履歴を保持し、
前記第2のプロセスが、前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得の前記プロセス状態情報管理部への要求に先立って、前記第1のプロセスについての前記異常検出履歴があるか否かを判断し、前記異常検出履歴がある場合に、前記異常検出の時刻からの経過時間が規定値以下であるか否かを判断し、前記経過時間が規定値以下である場合に、前記データを前記第1のプロセスに送信する
ことを特徴とする請求項1に記載のデータ送信方法。
The second process is an abnormality detection history for the first process, and holds an abnormality detection history including an abnormality detection time,
When the second process sends data to the first process, prior to the request to the process state information management unit to acquire the lock of the process state information for the first process, the process It is determined whether or not there is the abnormality detection history for the first process, and when there is the abnormality detection history, it is determined whether or not an elapsed time from the time of the abnormality detection is a specified value or less, The data transmission method according to claim 1, wherein the data is transmitted to the first process when the elapsed time is equal to or less than a specified value.
前記第2のプロセスが、前記経過時間が規定値以下でない場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、
前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合に、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信し、前記第1のプロセスについての前記プロセス状態情報のロックを獲得できない場合に、前記データを前記第1のプロセスに送信する
ことを特徴とする請求項5に記載のデータ送信方法。
The second process requests the process state information management unit to obtain a lock of the process state information for the first process when the elapsed time is not less than a specified value;
If the second process is able to acquire a lock on the process state information for the first process, after restarting the first process, the data is passed to the first process. The data transmission method according to claim 5, wherein the data is transmitted to the first process when the process state information lock for the first process cannot be acquired.
前記第2のプロセスが、前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合に、前記異常検出の時刻を更新する
ことを特徴とする請求項6に記載のデータ送信方法。
The data according to claim 6, wherein when the second process is able to acquire the lock of the process state information for the first process, the time of the abnormality detection is updated. Transmission method.
プロセス状態情報のロックを獲得したプロセスに異常が発生した場合に、前記プロセス状態情報をアンロックするプロセス状態情報管理部と、
第1のプロセスを実行し、第1のプロセスについてのプロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得する第1のプロセス実行部と、
第2のプロセスを実行し、前記第1のプロセスにデータを送信する場合に、前記第1のプロセスについての前記プロセス状態情報のロックの獲得を前記プロセス状態情報管理部に要求し、前記プロセス状態情報管理部から前記第1のプロセスについての前記プロセス状態情報のロックを獲得することができた場合、前記第1のプロセスを再起動した後に、前記データを前記第1のプロセスに送信する第2のプロセス実行部とを含む
ことを特徴とするデータ送信装置。
A process state information management unit that unlocks the process state information when an abnormality occurs in the process that has acquired the lock of the process state information;
Execute the first process, request the process state information management unit to acquire the lock of the process state information for the first process, and send the process state information about the first process from the process state information management unit A first process execution unit for acquiring the lock of
When executing a second process and transmitting data to the first process, the process state information management unit is requested to acquire a lock of the process state information for the first process, and the process state When the process state information lock for the first process can be acquired from the information management unit, the second process transmits the data to the first process after restarting the first process. And a process execution unit.
JP2012146262A 2012-06-29 2012-06-29 Data transmission method and data transmission apparatus Active JP5966678B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012146262A JP5966678B2 (en) 2012-06-29 2012-06-29 Data transmission method and data transmission apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012146262A JP5966678B2 (en) 2012-06-29 2012-06-29 Data transmission method and data transmission apparatus

Publications (2)

Publication Number Publication Date
JP2014010585A true JP2014010585A (en) 2014-01-20
JP5966678B2 JP5966678B2 (en) 2016-08-10

Family

ID=50107266

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012146262A Active JP5966678B2 (en) 2012-06-29 2012-06-29 Data transmission method and data transmission apparatus

Country Status (1)

Country Link
JP (1) JP5966678B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112015006609B4 (en) 2015-06-09 2021-10-21 Mitsubishi Electric Corporation Image forming apparatus, image forming method, and pattern light generating apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0944376A (en) * 1995-07-27 1997-02-14 Nec Software Ltd Process state management system
JP2009282581A (en) * 2008-05-19 2009-12-03 Hitachi Ltd Business process performing device and business process performing method
JP2010170285A (en) * 2009-01-22 2010-08-05 Fujitsu Ltd Service provider node, program for providing service, and software updating method
JP2012003673A (en) * 2010-06-21 2012-01-05 Mitsubishi Electric Corp Inter-cpu communication system and inter-cpu communication method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0944376A (en) * 1995-07-27 1997-02-14 Nec Software Ltd Process state management system
JP2009282581A (en) * 2008-05-19 2009-12-03 Hitachi Ltd Business process performing device and business process performing method
JP2010170285A (en) * 2009-01-22 2010-08-05 Fujitsu Ltd Service provider node, program for providing service, and software updating method
JP2012003673A (en) * 2010-06-21 2012-01-05 Mitsubishi Electric Corp Inter-cpu communication system and inter-cpu communication method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112015006609B4 (en) 2015-06-09 2021-10-21 Mitsubishi Electric Corporation Image forming apparatus, image forming method, and pattern light generating apparatus

Also Published As

Publication number Publication date
JP5966678B2 (en) 2016-08-10

Similar Documents

Publication Publication Date Title
US7062676B2 (en) Method and system for installing program in multiple system
JP4726416B2 (en) Method for operating a computer cluster
US6192391B1 (en) Process stop method and apparatus for a distributed memory multi-processor system
JP4060322B2 (en) Application management apparatus and storage medium storing software thereof
US20200351366A1 (en) Inter-process communication fault detection and recovery system
US8533525B2 (en) Data management apparatus, monitoring apparatus, replica apparatus, cluster system, control method and computer-readable medium
US8510755B2 (en) Automatically re-starting services
JP2012234336A (en) Method and system for executing monitoring-target process
JP2011159136A (en) Control device, failure detection and recovery method thereof, and electronic apparatus
WO2013190694A1 (en) Computer recovery method, computer system, and storage medium
CN110995481A (en) Configuration method, server and computer-readable storage medium
JP2015511421A (en) Remote network management system and operation method thereof
US8880552B2 (en) Database system and database control method
WO2013152584A1 (en) Method, device and single board for feeding dog in embedded system
US20060150002A1 (en) Starting control method, duplex platform system, and information processor
JP5966678B2 (en) Data transmission method and data transmission apparatus
US20110247012A1 (en) Communication processing apparatus, communication processing method, and storage medium
US20220055637A1 (en) Electronic control unit and computer readable medium
JP2009271858A (en) Computing system and program
JP2011018223A (en) System and method for communicating information
JP2010176345A (en) Multi-node system, node, memory dump processing method, and program
CN111209096B (en) Information processing apparatus and information processing method
JP2009282601A (en) Operation monitoring program, monitoring system, and monitoring method
US20150154025A1 (en) Information processing apparatus and method
JP5445177B2 (en) Deterministic clock determination program and method, and node device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150319

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151020

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151221

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: 20160607

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160620

R150 Certificate of patent or registration of utility model

Ref document number: 5966678

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150