JP2007188244A - Process-sharing memory management system, process- sharing memory management method and program - Google Patents

Process-sharing memory management system, process- sharing memory management method and program Download PDF

Info

Publication number
JP2007188244A
JP2007188244A JP2006005060A JP2006005060A JP2007188244A JP 2007188244 A JP2007188244 A JP 2007188244A JP 2006005060 A JP2006005060 A JP 2006005060A JP 2006005060 A JP2006005060 A JP 2006005060A JP 2007188244 A JP2007188244 A JP 2007188244A
Authority
JP
Japan
Prior art keywords
shared memory
status
acquisition
management
activation
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
JP2006005060A
Other languages
Japanese (ja)
Inventor
Hide Haruhara
秀 春原
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
Original Assignee
NEC Corp
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 filed Critical NEC Corp
Priority to JP2006005060A priority Critical patent/JP2007188244A/en
Publication of JP2007188244A publication Critical patent/JP2007188244A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent occurrence of problems due to omission in stopping of a process and omission in releasing of a shared memory in a computer system which controls the shared memory by the plurality of processes, and to improve fault tolerance of the system. <P>SOLUTION: A process-sharing memory situation confirming means 40 confirms whether or not any process in startup state remains in a process startup situation management means 20 and whether or not the shared memory in acquisition state remains in a shared memory acquisition situation management means 30 due to any fault at ending of the system and when the process in startup state or the shared memory in acquisition state remains, it is forcedly stopped or released. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、プロセス共有メモリ管理方式、プロセス共有メモリ管理方法及びプログラムに関し、特に複数プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、プロセスの停止漏れや共有メモリの解放漏れを引き起こす問題を未然に防止するための管理方式等に関するものである。   The present invention relates to a process shared memory management method, a process shared memory management method, and a program. In particular, in a computer system that performs a process for controlling a shared memory by a plurality of processes, problems that cause a process stop leak or a shared memory release leak have occurred. The present invention relates to a management method for preventing the problem.

一般に、コンピュータシステムは、複数のプログラム間で相互にデータを共有し合うために共有メモリが用意されている。そして、従来の共有メモリ管理方式において、共有メモリ中の各メモリ領域の確保、解放、参照及び更新に関する管理は、各プロセスで独立して行われている。   In general, in a computer system, a shared memory is prepared in order to share data among a plurality of programs. In the conventional shared memory management system, management relating to securing, releasing, referencing, and updating of each memory area in the shared memory is performed independently in each process.

しかし、上述した従来の共有メモリ管理方式では、確保後に不要となったメモリ領域がそのまま共有メモリに残存する事態が発生し、効率的な共有メモリの管理ができないといった問題があった。その理由は、共有メモリのメモリ領域が通常はプロセス単位で複数確保され、処理の終了時点で確保した全てのメモリ領域についての解放可否の判断が各プロセスに任されていたためである。   However, the conventional shared memory management method described above has a problem that a memory area that is no longer necessary after being secured remains in the shared memory as it is, and the shared memory cannot be efficiently managed. This is because a plurality of memory areas of the shared memory are normally secured in units of processes, and it is left to each process to determine whether or not all memory areas secured at the end of processing are available.

また、従来の共有メモリ管理方式では、メモリ領域の解放処理について、プロセスが明示的に解放を指示した場合に、あるいはプロセスの終了時に全てのメモリ領域を無条件に開放していた。   Further, in the conventional shared memory management method, regarding the memory area release processing, all the memory areas are unconditionally released when the process explicitly instructs the release or at the end of the process.

これに対して、例えば特許文献1では、メモリを使用するプロセスあるいはタスクの終了時にメモリの解放を明示的に指定しなくとも、必要に応じてメモリやバッファを保持し、あるいは開放するメモリ管理方式が開示されている。
特開平6−12314号公報
On the other hand, for example, in Patent Document 1, a memory management method for holding or releasing a memory or a buffer as needed without explicitly specifying the release of the memory at the end of a process or task that uses the memory Is disclosed.
JP-A-6-12314

図4に従来仕様の複数プロセス・共有メモリ制御システムの例を示す。従来仕様では、上述したとおり、共有メモリは各プロセスで個別に管理するため、システムが異常動作してプロセス・共有メモリ制御処理が正常に動作しなかった場合等に、プロセスや共有メモリが不要に残ってしまうことがあった。すなわち、起動プロセスにおいて、プロセス起動及び停止の処理に不具合があるとプロセスが不正に残ってしまう可能性があり、共有メモリにおいて、メモリ獲得及び解放の処理に不具合が生じると共有メモリが不正に残ってしまう可能性があった。   FIG. 4 shows an example of a conventional multi-process / shared memory control system. In the conventional specifications, as described above, the shared memory is managed individually by each process, so that the process and shared memory are not required when the system malfunctions and the process / shared memory control processing does not operate normally. Sometimes left behind. In other words, in the startup process, if there is a problem in the process start and stop processing, the process may remain illegally, and if there is a problem in the memory acquisition and release processing in the shared memory, the shared memory remains illegally There was a possibility.

また、特許文献1で開示されたメモリ管理方式は、プロセスによるメモリ解放についての明示的な指示なしに必要に応じたメモリ開放やメモリ保持を行うものであるが、上記動作はあくまでプロセスの終了が条件となっており、不具合によりプロセスが終了せずに残った場合にはメモリ解放は行われない。   In addition, the memory management method disclosed in Patent Document 1 performs memory release and memory holding as needed without an explicit instruction for memory release by a process. It is a condition, and memory is not released when the process remains without being terminated due to a malfunction.

各プロセスが共有メモリを獲得、解放する処理を行うコンピュータシステムにおいては、あるプロセスが共有メモリの解放漏れを起こし、その延長で共有メモリが枯渇すると、他のプロセスも共有メモリを使用することが不可能となるため、深刻なシステム障害を引き起こすことになる。   In a computer system in which each process acquires and releases shared memory, if one process leaks the release of shared memory and the shared memory is exhausted as a result of this, other processes cannot use the shared memory. This can cause serious system failure.

そこで、本発明は、複数プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、プロセスの停止漏れや共有メモリの解放漏れにより引き起こされる問題を未然に防止し、システムの耐障害性の向上させることを目的とする。   SUMMARY OF THE INVENTION Therefore, the present invention provides a computer system that performs processing for controlling a shared memory by a plurality of processes, thereby preventing problems caused by process stop leaks and shared memory release leaks and improving the fault tolerance of the system. With the goal.

かかる目的を達成するために、本発明は、複数のプロセスが実行され、前記プロセスにより共有メモリを制御する処理を行うコンピュータシステムのプロセス共有メモリ管理方式において、前記プロセスからの起動要求を受けてプロセス起動を行うプロセス起動手段と、前記プロセスからの停止要求を受けてプロセス停止を行うプロセス停止手段と、前記プロセス起動手段により起動されたプロセス起動状況を管理するプロセス起動状況管理手段と、前記プロセス起動手段により起動されたプロセスからの獲得要求を受けて対応する共有メモリの獲得を行う共有メモリ獲得手段と、前記共有メモリ獲得手段により獲得したプロセスからの解放要求を受けて前記共有メモリの解放を行う共有メモリ解放手段と、前記共有メモリ獲得手段により獲得された共有メモリ獲得状況を管理する共有メモリ獲得状況管理手段と、前記プロセス起動状況及び前記共有メモリ獲得状況を最終的に確認するプロセス共有メモリ状況確認手段とを有し、前記プロセス共有メモリ状況確認手段は、システム終了時に、前記プロセス起動状況管理手段及び前記共有メモリ獲得状況管理手段を確認し、起動状態にあるプロセスの停止及び獲得状態にある共有メモリの開放を強制的に行うことを特徴とする。   In order to achieve this object, the present invention provides a process shared memory management method for a computer system in which a plurality of processes are executed and a process for controlling a shared memory is performed by the process, in response to an activation request from the process. A process starting unit for starting, a process stopping unit for stopping a process in response to a stop request from the process, a process starting state managing unit for managing a process starting state started by the process starting unit, and the process starting A shared memory acquisition means for acquiring a corresponding shared memory in response to an acquisition request from a process started by the means, and a release request from the process acquired by the shared memory acquisition means for releasing the shared memory The shared memory releasing means and the shared memory acquiring means Shared memory acquisition status management means for managing the obtained shared memory acquisition status, and process shared memory status confirmation means for finally checking the process activation status and the shared memory acquisition status, and the process shared memory status confirmation Means confirms the process activation status management means and the shared memory acquisition status management means at the time of system termination, and forcibly stops the process in the activated state and releases the shared memory in the acquired state; To do.

本発明においては、プロセス起動状況管理手段にて、起動されたプロセスを登録し、停止されたプロセスを登録から削除することでプロセス起動状況を管理する。また、共有メモリ獲得状況管理手段にて、獲得された共有メモリを登録し、解放された共有メモリを登録から削除することで共有メモリ獲得状況を管理する。そして、要の構成であるプロセス共有メモリ状況確認手段が、プロセス起動状況管理手段に何らかの不具合等で未だ起動状態となっているプロセスがあるかどうか、また、共有メモリ獲得状況管理手段にプロセス処理異常等に起因した解放処理未了の共有メモリが残っていないかどうかについて、システムを終了する時点で確認し、起動状態プロセスや未解放共有メモリが残存する場合には、これらを強制的に停止あるいは解放する。   In the present invention, the process activation status is managed by registering the activated process and deleting the stopped process from the registration. Further, the shared memory acquisition status management means registers the acquired shared memory and manages the shared memory acquisition status by deleting the released shared memory from the registration. Then, the process shared memory status checking means, which is the main configuration, checks whether there is a process that is still in the active state due to some trouble etc. in the process startup status management means, and the process error in the shared memory acquisition status management means Check whether there is any unshared memory that has not yet been released due to, for example, when the system is shut down. release.

上記のように構成することで、プロセス異常等により正常にプロセス停止処理が実施されなかった場合には、システム終了時に残存する起動状態プロセスを強制終了させてプロセスが不要に残らないように対処でき、また、プロセス処理異常等により正常に共有メモリ解放処理が実施されなかった場合でも、獲得されたままの共有メモリを強制解放して共有メモリが不要に残らないように対処することができる。   By configuring as described above, if the process stop process is not performed normally due to a process error, etc., it is possible to forcibly terminate the active process remaining at the time of system termination so that the process does not remain unnecessary. In addition, even when the shared memory release process is not normally performed due to an abnormal process process or the like, it is possible to forcibly release the acquired shared memory so that the shared memory does not remain unnecessary.

また、本発明は、複数のプロセスが実行され、前記プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、前記プロセスからの起動要求を受けてプロセス起動を行うプロセス起動工程と、前記プロセスからの停止要求を受けてプロセス停止を行うプロセス停止工程と、前記プロセス起動工程により起動されたプロセス起動状況を管理するプロセス起動状況管理工程と、前記プロセス起動工程により起動されたプロセスからの獲得要求を受けて対応する共有メモリの獲得を行う共有メモリ獲得工程と、前記共有メモリ獲得工程により獲得したプロセスからの解放要求を受けて前記共有メモリの解放を行う共有メモリ解放工程と、前記共有メモリ獲得工程により獲得された共有メモリ獲得状況を管理する共有メモリ獲得状況管理工程と、前記プロセス起動状況及び前記共有メモリ獲得状況を最終的に確認するプロセス共有メモリ状況確認工程とを有し、前記プロセス共有メモリ状況確認工程は、システム終了時に前記プロセス起動状況管理工程によるプロセス起動状況及び前記共有メモリ獲得状況管理工程による共有メモリ獲得状況を確認し、起動状態にあるプロセス及び獲得状態にある共有メモリを強制終了することを特徴とするプロセス共有メモリ管理方法として、管理方法の態様で実現することも可能である。   The present invention also provides a process start step for starting a process in response to a start request from the process in a computer system in which a plurality of processes are executed and the process controls the shared memory. A process stop step for stopping a process in response to a stop request, a process start state management step for managing a process start state started by the process start step, and an acquisition request from a process started by the process start step A shared memory acquiring step for acquiring the corresponding shared memory, a shared memory releasing step for releasing the shared memory in response to a release request from the process acquired in the shared memory acquiring step, and the shared memory acquiring step. Shared memory acquisition that manages the acquired shared memory acquisition status Status management step, and a process shared memory status confirmation step for finally confirming the process activation status and the shared memory acquisition status, and the process shared memory status confirmation step is performed when the system is terminated. As a process shared memory management method, the process startup status and the shared memory acquisition status management step are confirmed, and the process in the startup state and the shared memory in the acquisition state are forcibly terminated. It can also be realized in a method aspect.

また、本発明は、複数のプロセスが実行され、前記プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、前記プロセスからの起動要求を受けてプロセス起動を行うプロセス起動機能と、前記プロセスからの停止要求を受けてプロセス停止を行うプロセス停止機能と、前記プロセス起動機能により起動されたプロセス起動状況を管理するプロセス起動状況管理機能と、前記プロセス起動機能により起動されたプロセスからの獲得要求を受けて対応する共有メモリの獲得を行う共有メモリ獲得機能と、前記共有メモリ獲得機能により獲得したプロセスからの解放要求を受けて前記共有メモリの解放を行う共有メモリ解放機能と、前記共有メモリ獲得機能により獲得された共有メモリ獲得状況を管理する共有メモリ獲得状況管理機能と、前記プロセス起動状況及び前記共有メモリ獲得状況を最終的に確認するプロセス共有メモリ状況確認機能とをコンピュータに実行させるプログラムであって、前記プロセス共有メモリ状況確認機能は、システム終了時に前記プロセス起動状況管理機能によるプロセス起動状況及び前記共有メモリ獲得状況管理機能による共有メモリ獲得状況を確認し、起動状態にあるプロセス及び獲得状態にある共有メモリを強制終了することを特徴とするプログラムとして、プログラムの態様で実現することも可能である。   In addition, the present invention provides a process start function for starting a process in response to a start request from the process, and a process start function from the process, in a computer system in which a plurality of processes are executed and the process controls the shared memory. A process stop function for stopping a process in response to a stop request, a process start state management function for managing a process start state started by the process start function, and an acquisition request from a process started by the process start function A shared memory acquisition function for acquiring a corresponding shared memory, a shared memory release function for releasing the shared memory in response to a release request from a process acquired by the shared memory acquisition function, and the shared memory acquisition function. Shared memory acquisition that manages the acquired shared memory acquisition status A program for causing a computer to execute a status management function and a process shared memory status confirmation function for finally confirming the process activation status and the shared memory acquisition status, wherein the process shared memory status confirmation function is As a program for confirming a process activation status by the process activation status management function and a shared memory acquisition status by the shared memory acquisition status management function, and forcibly terminating the process in the activated state and the shared memory in the acquired state It can also be realized in the form of a program.

本発明によれば、複数プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、プロセスの停止漏れや共有メモリの解放漏れにより引き起こされる問題を未然に防止し、システムの耐障害性の向上させることが可能となる。   According to the present invention, in a computer system that performs processing for controlling a shared memory by a plurality of processes, problems caused by a process stop leak or a shared memory release leak can be prevented, and the fault tolerance of the system can be improved. Is possible.

<実施形態1>
本発明の実施形態におけるプロセス共有メモリ管理方式について、図1を参照しながら説明する。図1は、本実施形態のプロセス共有メモリ管理方式の全体構成図である。
<Embodiment 1>
A process shared memory management system according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is an overall configuration diagram of the process shared memory management system of this embodiment.

本実施形態のプロセス共有メモリ管理方式は、プロセス起動手段11、プロセス停止手段12、共有メモリ獲得手段13、共有メモリ解放手段14、プロセス起動状況管理手段20、共有メモリ獲得状況管理手段30及びプロセス共有メモリ状況確認手段40から構成される。   The process shared memory management system of the present embodiment includes a process activation unit 11, a process stop unit 12, a shared memory acquisition unit 13, a shared memory release unit 14, a process activation state management unit 20, a shared memory acquisition state management unit 30, and a process sharing. The memory status confirmation unit 40 is configured.

プロセス起動手段11は、起動要求を受けてプロセス起動を行い、プロセス起動時にプロセス登録名をプロセス起動状況管理手段20へ登録する。また、プロセス停止手段12は、停止要求を受けてプロセス停止を行い、プロセス停止時にプロセス起動状況管理手段20に登録されたプロセス登録名を削除する。   The process activation unit 11 activates a process upon receiving an activation request, and registers a process registration name in the process activation state management unit 20 when the process is activated. In addition, the process stop unit 12 stops the process in response to the stop request, and deletes the process registration name registered in the process activation status management unit 20 when the process is stopped.

例えば、プロセスA1の起動時に、プロセス起動手段11を通じて、プロセス登録名a21がプロセス起動状況管理手段20へ登録される。同様に、プロセスB2についてはプロセス登録名b22が、プロセスC3についてはプロセス登録名c23が、それぞれプロセス起動状況管理手段20へ登録される。   For example, the process registration name a21 is registered in the process activation status management unit 20 through the process activation unit 11 when the process A1 is activated. Similarly, the process registration name b22 for the process B2 and the process registration name c23 for the process C3 are registered in the process activation status management unit 20, respectively.

一方、プロセスA1の停止時には、プロセス停止手段12を通じて、プロセス登録名a21がプロセス起動状況管理手段20から削除される。同様に、プロセスB2の停止時にはプロセス登録名b22が削除され、プロセスC3の停止時にはプロセス登録名c23が削除される。   On the other hand, when the process A1 is stopped, the process registration name a21 is deleted from the process activation status management means 20 through the process stop means 12. Similarly, the process registration name b22 is deleted when the process B2 is stopped, and the process registration name c23 is deleted when the process C3 is stopped.

なお、プロセス登録名は各プロセスにつき1つのみ登録可能であり、これは、システムの耐障害性の向上を考慮したとき、使用する登録名は一意である必要があることによる。   Note that only one process registration name can be registered for each process. This is because the registration name to be used must be unique when considering the improvement in fault tolerance of the system.

共有メモリ獲得手段13は、メモリ獲得要求を受けて共有メモリの獲得を行い、獲得時に共有メモリ登録名を共有メモリ獲得状況管理手段30へ登録する。また、共有メモリ解放手段13は、メモリ解放要求を受けて獲得した共有メモリの開放を行い、解放時に共有メモリ獲得状況管理手段30に登録された共有メモリ登録名を削除する。   The shared memory acquisition unit 13 acquires a shared memory in response to a memory acquisition request, and registers a shared memory registration name in the shared memory acquisition state management unit 30 at the time of acquisition. The shared memory releasing unit 13 releases the shared memory acquired in response to the memory release request, and deletes the shared memory registration name registered in the shared memory acquisition state management unit 30 at the time of releasing.

例えば、プロセスA1が使用する共有メモリの獲得時に、共有メモリ獲得手段13を通じて、共有メモリ登録名1a31が共有メモリ獲得状況管理手段30へ登録される。同様に、プロセスB2の共有メモリについてはプロセス登録名1b32が、プロセスC3の共有メモリについてはプロセス登録名1c33及び1d34が、それぞれ共有メモリ獲得状況管理手段30へ登録される。   For example, when the shared memory used by the process A1 is acquired, the shared memory registration name 1a31 is registered in the shared memory acquisition status management unit 30 through the shared memory acquisition unit 13. Similarly, the process registration name 1b32 for the shared memory of the process B2 and the process registration names 1c33 and 1d34 for the shared memory of the process C3 are registered in the shared memory acquisition status management unit 30, respectively.

一方、プロセスA1が獲得した共有メモリの解放時には、共有メモリ解放手段14を通じて、共有メモリ登録名1a31が共有メモリ獲得状況管理手段30から削除される。同様に、プロセスB2の共有メモリの解放時には共有メモリ登録名1b32が削除され、プロセスC3の共有メモリの解放時にはプロセス登録名1c33及び1d34が削除される。ただし、あるプロセスで使用する共有メモリが他のプロセスから参照中である場合等には解放できない可能性もありうる。   On the other hand, when the shared memory acquired by the process A1 is released, the shared memory registration name 1a31 is deleted from the shared memory acquisition status management unit 30 through the shared memory release unit 14. Similarly, the shared memory registration name 1b32 is deleted when the shared memory of the process B2 is released, and the process registration names 1c33 and 1d34 are deleted when the shared memory of the process C3 is released. However, there is a possibility that the shared memory used in a certain process cannot be released when it is being referenced from another process.

なお、共有メモリ登録名は各プロセスにつき複数登録可能で、例えば上述したように、プロセスC3について共有メモリ獲得時にプロセス登録名1c33及び1d34の登録が可能である。また、システムの耐障害性の向上を考慮した場合、使用する登録名は一意である必要がある。   A plurality of shared memory registration names can be registered for each process. For example, as described above, the process registration names 1c33 and 1d34 can be registered when the shared memory is acquired for the process C3. In addition, when considering the improvement of fault tolerance of the system, the registered name to be used must be unique.

そして、プロセス共有メモリ状況確認手段40は、システム終了時に、プロセス起動状況及び共有メモリ獲得状況を確認し、起動状態のプロセスや獲得状態の共有メモリを強制的に停止あるいは解放する。具体的には、プロセス起動状況管理手段20あるいは共有メモリ獲得状況管理手段30に削除されずに登録された状態にあるプロセス登録名あるいは共有メモリ登録名が残存しているか否かを確認し、残存している場合は登録名を削除し強制的にプロセス停止あるいは共有メモリ解放を実施する。   Then, the process shared memory status confirmation means 40 confirms the process activation status and the shared memory acquisition status when the system is terminated, and forcibly stops or releases the activated process and the acquired shared memory. Specifically, it is confirmed whether the process registration name or the shared memory registration name that has been registered without being deleted in the process activation status management means 20 or the shared memory acquisition status management means 30 remains. If so, delete the registered name and forcibly stop the process or release the shared memory.

例えば、プロセスC3について、プロセス異常等により正常にプロセス停止処理が行われなかった場合、プロセス登録名c23が削除されずにプロセス起動状況管理手段20に残るが、プロセス共有メモリ状況確認手段40は、システム終了時に、このプロセス登録名c23を削除し、プロセスC3を強制的に停止する。   For example, for the process C3, when the process stop process is not normally performed due to a process abnormality or the like, the process registration name c23 is not deleted and remains in the process activation status management unit 20, but the process shared memory status confirmation unit 40 When the system ends, this process registration name c23 is deleted, and the process C3 is forcibly stopped.

また、上記のようなプロセス処理異常が生じたとき、正常に共有メモリ解放処理が実施されずに共有メモリ登録名1c33及び1d34が削除されずに共有メモリ獲得状況管理手段30に残存するが、プロセス共有メモリ状況確認手段40は、システム終了時に、これら共有メモリ登録名1c33及び1d34を削除し、プロセスC3で使用された共有メモリを強制的に解放する。   In addition, when the above process processing abnormality occurs, the shared memory release name is not normally executed and the shared memory registration names 1c33 and 1d34 are not deleted but remain in the shared memory acquisition status management unit 30. The shared memory status confirmation unit 40 deletes the shared memory registration names 1c33 and 1d34 when the system ends, and forcibly releases the shared memory used in the process C3.

このように、プロセス異常等により正常にプロセス停止処理が実施されなかった場合、システム終了時に、プロセス起動状況を確認し、起動されたままのプロセスを強制終了することでプロセスが不要に残らないように対処できる。また、プロセス処理異常等により、正常に共有メモリ開放処理が実施されなかった場合、システム終了時に、共有メモリ獲得状況を確認し、獲得されたままの共有メモリを強制解放することで共有メモリが不要に残らないように対処できる。   In this way, if the process stop process is not performed normally due to a process error or the like, the process startup status is checked when the system is shut down, and the process that has been started is forcibly terminated so that the process does not remain unnecessary. Can be dealt with. Also, if shared memory release processing is not performed normally due to process processing error, etc., the shared memory is not required by checking the shared memory acquisition status and forcibly releasing the acquired shared memory at the time of system termination Can be dealt with so as not to remain.

<実施形態2>
次に、本発明の別の実施形態におけるプロセス共有メモリ管理方式について、図2を参照しながら説明する。図2は、本実施形態のプロセス共有メモリ管理方式の全体構成図である。本実施形態は、アプリケーションのためのメモリ領域とドライバのためのメモリ領域とが分かれているコンピュータシステムに対して、実施形態1の管理方式を適用したものである。
<Embodiment 2>
Next, a process shared memory management system according to another embodiment of the present invention will be described with reference to FIG. FIG. 2 is an overall configuration diagram of the process shared memory management system of this embodiment. In the present embodiment, the management method of the first embodiment is applied to a computer system in which a memory area for an application and a memory area for a driver are separated.

本実施形態では、プロセスは、例えばログ情報制御プロセス201、トレース情報制御プロセス202、コマンド排他制御プロセス203、ファイル転送制御プロセス204及びサーバ構成管理プロセス205としている。   In this embodiment, the processes are, for example, a log information control process 201, a trace information control process 202, a command exclusion control process 203, a file transfer control process 204, and a server configuration management process 205.

各プロセスに対応するプロセス登録名及び共有メモリ登録名を例えば以下のように設定する。
・ログ情報制御プロセス221及び第1ログ制御情報231
・トレース情報制御プロセス222及び第1トレース制御情報232
・コマンド排他制御プロセス223、第1コマンド排他情報233及び第2コマンド排他情報234
・ファイル転送制御プロセス224、第1ファイル転送情報235及び第2ファイル転送情報236
・サーバ構成管理プロセス225及び第1サーバ構成管理情報237
上記のプロセス登録名はプロセス起動状況管理手段220に登録されてプロセス起動状況が管理され、共有メモリ登録名は共有メモリ獲得状況管理手段230に登録されて共有メモリ獲得状況が管理される。
For example, the process registration name and the shared memory registration name corresponding to each process are set as follows.
Log information control process 221 and first log control information 231
Trace information control process 222 and first trace control information 232
Command exclusive control process 223, first command exclusive information 233, and second command exclusive information 234
File transfer control process 224, first file transfer information 235, and second file transfer information 236
Server configuration management process 225 and first server configuration management information 237
The process registration name is registered in the process activation status management unit 220 to manage the process activation status, and the shared memory registration name is registered in the shared memory acquisition status management unit 230 to manage the shared memory acquisition status.

プロセス起動手段211、プロセス停止手段212、共有メモリ獲得手段213、共有メモリ解放手段214及びプロセス共有メモリ状況確認手段240の動作は、実施形態1と同様である。   The operations of the process activation unit 211, the process stop unit 212, the shared memory acquisition unit 213, the shared memory release unit 214, and the process shared memory status confirmation unit 240 are the same as those in the first embodiment.

例えば、ログ情報制御プロセス201が不具合により停止処理が正常に行われなかった場合、プロセス起動状況管理手段220にログ情報制御プロセス221が削除されず登録されたまま起動状態として残る。プロセス共有メモリ状況確認手段240は、システム終了時に、プロセス起動状況を確認して残っていたログ情報制御プロセス221を発見し、登録名を削除してログ情報制御プロセス201を強制的に停止する。   For example, if the log information control process 201 is not normally stopped due to a problem, the log information control process 221 is not deleted but remains registered in the process activation status management unit 220. When the system is terminated, the process shared memory status confirmation unit 240 confirms the process activation status, finds the remaining log information control process 221, deletes the registered name, and forcibly stops the log information control process 201.

また、ログ情報制御プロセス201の処理異常により、共有メモリ獲得状況管理手段230に第1ログ制御情報231が削除されず登録されたまま残るが、プロセス共有メモリ状況確認手段240は、システム終了時に、共有メモリ獲得状況を確認して残っていた第1ログ制御情報231を発見し、登録名を削除してログ情報制御プロセス201で使用された共有メモリを強制的に解放する。   Also, due to the processing abnormality of the log information control process 201, the first log control information 231 remains registered without being deleted in the shared memory acquisition status management unit 230. However, the process shared memory status confirmation unit 240 The first log control information 231 remaining after confirming the shared memory acquisition status is found, the registered name is deleted, and the shared memory used in the log information control process 201 is forcibly released.

このように、プロセスの不具合でプロセスや共有メモリが停止、解放されずに残存してしまった場合でも、システム終了時に、プロセス起動状況や共有メモリ獲得状況を確認し、強制的に停止あるいは解放を行うことで、プロセスや共有メモリが不要に残らないように対処できる。   In this way, even if the process or shared memory remains without being stopped or released due to a process failure, check the process startup status and shared memory acquisition status at the time of system termination and forcibly stop or release it. By doing so, it is possible to deal with processes and shared memory so that they are not left unnecessarily.

<実施形態3>
次に、本発明の別の実施形態におけるプロセス共有メモリ管理方式について、図3を参照しながら説明する。図3は、本実施形態のプロセス共有メモリ管理方式の全体構成図である。実施形態2では、UNIX(登録商標)のユーザ空間のように複数プロセスで共有メモリを制御するシステムの場合について説明したが、アプリケーションやドライバが処理タスク単位で同じメモリ領域を使用するメモリ制御システムの場合でも同様に実施可能である。つまり、本実施形態は、アプリケーションのためのメモリ領域とドライバのためのメモリ領域とが同じメモリ領域で使用されるコンピュータシステムに対して、実施形態1の管理方式を適用したものである。
<Embodiment 3>
Next, a process shared memory management system according to another embodiment of the present invention will be described with reference to FIG. FIG. 3 is an overall configuration diagram of the process shared memory management method of the present embodiment. In the second embodiment, a case where a shared memory is controlled by a plurality of processes such as a UNIX (registered trademark) user space has been described. However, an application or driver uses a memory area in units of processing tasks. Even in the case, it can be similarly implemented. In other words, in the present embodiment, the management method of the first embodiment is applied to a computer system in which a memory area for an application and a memory area for a driver are used in the same memory area.

本実施形態では、タスクは、例えばディスク制御タスク301、ポート制御タスク302、コマンド排他制御タスク303、データ転送制御タスク304及びチップ制御タスク305としている。   In this embodiment, the tasks are, for example, a disk control task 301, a port control task 302, a command exclusive control task 303, a data transfer control task 304, and a chip control task 305.

各タスクに対応するタスク登録名及びメモリ登録名を例えば以下のように設定する。
・ディスク制御タスク321、第1ディスク制御情報331及び第2ディスク制御情報332
・ポート管理タスク322及び第1ポート管理情報333
・コマンド排他制御タスク323、第1コマンド排他情報334及び第2コマンド排他情報335
・データ転送制御タスク324、第1データ転送情報336及び第2データ転送情報337
・チップ制御タスク325及び第1チップ構成管理情報338
上記のタスク登録名はタスク起動状況管理手段320に登録されてタスク起動状況が管理され、メモリ登録名はメモリ獲得状況管理手段330に登録されてメモリ獲得状況が管理される。
For example, the task registration name and the memory registration name corresponding to each task are set as follows.
Disk control task 321, first disk control information 331, and second disk control information 332
Port management task 322 and first port management information 333
Command exclusive control task 323, first command exclusive information 334, and second command exclusive information 335
Data transfer control task 324, first data transfer information 336, and second data transfer information 337
Chip control task 325 and first chip configuration management information 338
The task registration name is registered in the task activation status management unit 320 to manage the task activation status, and the memory registration name is registered in the memory acquisition status management unit 330 to manage the memory acquisition status.

タスク起動手段311はプロセス起動手段に、タスク停止手段312はプロセス停止手段に、メモリ獲得手段313は共有メモリ獲得手段に、メモリ解放手段314は共有メモリ解放手段に、タスクメモリ状況確認手段340はプロセス共有メモリ状況確認手段にそれぞれ対応し、各構成の動作は実施形態1と同様である。   The task start means 311 is a process start means, the task stop means 312 is a process stop means, the memory acquisition means 313 is a shared memory acquisition means, the memory release means 314 is a shared memory release means, and the task memory status check means 340 is a process. Corresponding to the shared memory status confirmation unit, the operation of each component is the same as that of the first embodiment.

例えば、第1ディスク制御情報331及び第2ディスク制御情報332が複数のタスクから参照されており、メモリ解放処理の不具合により解放処理が正常に行われなかった場合、メモリ獲得状況管理手段330に両メモリ登録名が削除されず登録されたまま獲得状態として残る。タスクメモリ状況確認手段340は、システム終了時に、メモリ獲得状況を確認して残存していた第1ディスク制御情報331及び第2ディスク制御情報332を発見し、登録名を削除して獲得されたままのメモリを強制的に解放する。   For example, when the first disk control information 331 and the second disk control information 332 are referred to by a plurality of tasks and the release process is not performed normally due to a failure of the memory release process, both the memory acquisition status management unit 330 are informed. The registered memory name is not deleted but remains registered. The task memory status confirmation unit 340 confirms the memory acquisition status when the system is terminated, finds the remaining first disk control information 331 and second disk control information 332, deletes the registered name, and remains acquired. Force memory to be freed.

このように、メモリ解放処理の不具合でメモリが解放されずに残ってしまった場合でも、システム終了時に、メモリ獲得状況を確認して強制的に解放を行うことで、メモリが不要に残らないように対処することができる。   In this way, even if memory is left unreleased due to a failure in memory release processing, memory is not left unnecessarily by checking the memory acquisition status and forcibly releasing it at the time of system termination. Can deal with.

なお、上述する実施形態は、本発明の好適な実施形態であり、上記実施形態のみに本発明の範囲を限定するものではなく、本発明の要旨を逸脱しない範囲において種々の変更を施した形態での実施が可能である。   The above-described embodiment is a preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiment alone, and various modifications are made without departing from the gist of the present invention. Implementation is possible.

本発明の実施形態に係るプロセス共有メモリ管理方式の全体構成図である。It is a whole block diagram of the process shared memory management system which concerns on embodiment of this invention. 本発明の実施形態に係るプロセス共有メモリ管理方式の全体構成図である。It is a whole block diagram of the process shared memory management system which concerns on embodiment of this invention. 本発明の実施形態に係るプロセス共有メモリ管理方式の全体構成図である。It is a whole block diagram of the process shared memory management system which concerns on embodiment of this invention. 従来におけるプロセス共有メモリ管理方式の全体構成図である。It is a whole block diagram of the conventional process shared memory management system.

符号の説明Explanation of symbols

1 プロセスA
2 プロセスB
3 プロセスC
11,211 プロセス起動手段
12,212 プロセス停止手段
13,213 共有メモリ獲得手段
14,214 共有メモリ解放手段
20,220 プロセス起動状況管理手段
21 プロセス登録名a
22 プロセス登録名b
23 プロセス登録名c
30,230 共有メモリ獲得状況管理手段
31 共有メモリ登録名1a
32 共有メモリ登録名1b
33 共有メモリ登録名1c
40,240 プロセス共有メモリ状況確認手段
1 Process A
2 Process B
3 Process C
11, 211 Process activation means 12, 212 Process stop means 13, 213 Shared memory acquisition means 14, 214 Shared memory release means 20, 220 Process activation status management means 21 Process registration name a
22 Process registration name b
23 Process registration name c
30, 230 Shared memory acquisition status management means 31 Shared memory registration name 1a
32 Shared memory registration name 1b
33 Shared memory registration name 1c
40,240 Process shared memory status confirmation means

Claims (7)

複数のプロセスが実行され、前記プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、
前記プロセスからの起動要求を受けてプロセス起動を行うプロセス起動手段と、
前記プロセスからの停止要求を受けてプロセス停止を行うプロセス停止手段と、
前記プロセス起動手段により起動されたプロセス起動状況を管理するプロセス起動状況管理手段と、
前記プロセス起動手段により起動されたプロセスからの獲得要求を受けて対応する共有メモリの獲得を行う共有メモリ獲得手段と、
前記共有メモリ獲得手段により獲得したプロセスからの解放要求を受けて前記共有メモリの解放を行う共有メモリ解放手段と、
前記共有メモリ獲得手段により獲得された共有メモリ獲得状況を管理する共有メモリ獲得状況管理手段と、
前記プロセス起動状況及び前記共有メモリ獲得状況を最終的に確認するプロセス共有メモリ状況確認手段とを有し、
前記プロセス共有メモリ状況確認手段は、システム終了時に、前記プロセス起動状況管理手段及び前記共有メモリ獲得状況管理手段を確認し、起動状態にあるプロセスの停止及び獲得状態にある共有メモリの開放を強制的に行うことを特徴とするプロセス共有メモリ管理方式。
In a computer system in which a plurality of processes are executed and processing for controlling a shared memory is performed by the processes,
Process starting means for starting a process in response to a start request from the process;
A process stop means for stopping a process in response to a stop request from the process;
Process activation status management means for managing the process activation status activated by the process activation means;
A shared memory acquisition means for acquiring a corresponding shared memory in response to an acquisition request from a process activated by the process activation means;
A shared memory releasing means for releasing the shared memory in response to a release request from the process acquired by the shared memory acquiring means;
Shared memory acquisition status management means for managing the shared memory acquisition status acquired by the shared memory acquisition means;
Process shared memory status confirmation means for finally confirming the process activation status and the shared memory acquisition status,
The process shared memory status confirmation means confirms the process activation status management means and the shared memory acquisition status management means at the time of system termination, and forcibly stops the process in the activated state and releases the shared memory in the acquired state. A process shared memory management system characterized by
前記プロセス起動手段は、起動したプロセスを特定するための登録名であるプロセス登録名を前記プロセス起動状況管理手段へ登録し、
前記プロセス停止手段は、前記プロセス起動手段により登録したプロセス登録名を前記プロセス起動状況管理手段から削除し、
前記プロセス共有メモリ状況確認手段は、システム終了時に、前記プロセス停止手段により削除されずに前記プロセス起動状況管理手段に登録された状態のプロセス登録名を削除することを特徴とする請求項1に記載のプロセス共有メモリ管理方式。
The process activation means registers a process registration name, which is a registration name for identifying the activated process, in the process activation status management means,
The process stop unit deletes the process registration name registered by the process start unit from the process start state management unit,
The process shared memory status confirmation unit deletes a process registration name registered in the process activation status management unit without being deleted by the process stop unit when the system is terminated. Process shared memory management method.
前記共有メモリ獲得手段は、獲得した共有メモリを特定するための登録名である共有メモリ登録名を前記共有メモリ獲得状況管理手段へ登録し、
前記共有メモリ解放手段は、前記共有メモリ獲得手段により登録した共有メモリ登録名を前記共有メモリ獲得状況管理手段から削除し、
前記プロセス共有メモリ状況確認手段は、システム終了時に、前記共有メモリ解放手段により削除されずに前記共有メモリ獲得状況管理手段に登録された状態の共有メモリ登録名を削除することを特徴とする請求項1又は2に記載のプロセス共有メモリ管理方式。
The shared memory acquisition means registers a shared memory registration name, which is a registered name for identifying the acquired shared memory, in the shared memory acquisition status management means,
The shared memory releasing means deletes the shared memory registration name registered by the shared memory acquiring means from the shared memory acquisition status managing means,
The process shared memory status confirmation unit deletes a shared memory registration name registered in the shared memory acquisition status management unit without being deleted by the shared memory release unit when the system is terminated. 3. The process shared memory management method according to 1 or 2.
アプリケーションのためのメモリ領域とドライバのためのメモリ領域とが分かれているコンピュータシステムに対して適用されることを特徴とする請求項1から3のいずれか1項に記載のプロセス共有メモリ管理方式。   4. The process shared memory management system according to claim 1, which is applied to a computer system in which a memory area for an application and a memory area for a driver are separated. アプリケーションのためのメモリ領域とドライバのためのメモリ領域とが同じメモリ領域で使用されるコンピュータシステムに対して適用されることを特徴とする請求項1から3のいずれか1項に記載のプロセス共有メモリ管理方式。   The process sharing according to any one of claims 1 to 3, wherein the memory area for an application and the memory area for a driver are applied to a computer system used in the same memory area. Memory management method. 複数のプロセスが実行され、前記プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、
前記プロセスからの起動要求を受けてプロセス起動を行うプロセス起動工程と、
前記プロセスからの停止要求を受けてプロセス停止を行うプロセス停止工程と、
前記プロセス起動工程により起動されたプロセス起動状況を管理するプロセス起動状況管理工程と、
前記プロセス起動工程により起動されたプロセスからの獲得要求を受けて対応する共有メモリの獲得を行う共有メモリ獲得工程と、
前記共有メモリ獲得工程により獲得したプロセスからの解放要求を受けて前記共有メモリの解放を行う共有メモリ解放工程と、
前記共有メモリ獲得工程により獲得された共有メモリ獲得状況を管理する共有メモリ獲得状況管理工程と、
前記プロセス起動状況及び前記共有メモリ獲得状況を最終的に確認するプロセス共有メモリ状況確認工程とを有し、
前記プロセス共有メモリ状況確認工程は、システム終了時に前記プロセス起動状況管理工程によるプロセス起動状況及び前記共有メモリ獲得状況管理工程による共有メモリ獲得状況を確認し、起動状態にあるプロセス及び獲得状態にある共有メモリを強制終了することを特徴とするプロセス共有メモリ管理方法。
In a computer system in which a plurality of processes are executed and processing for controlling a shared memory is performed by the processes,
A process start step for starting a process in response to a start request from the process;
A process stop step for stopping a process in response to a stop request from the process;
A process activation status management step for managing the process activation status activated by the process activation step;
A shared memory acquisition step for acquiring a corresponding shared memory in response to an acquisition request from the process started by the process start step;
A shared memory release step for releasing the shared memory in response to a release request from the process acquired in the shared memory acquisition step;
A shared memory acquisition status management step for managing a shared memory acquisition status acquired by the shared memory acquisition step;
A process shared memory status confirmation step for finally confirming the process activation status and the shared memory acquisition status,
The process shared memory status confirmation step confirms the process activation status by the process activation status management step and the shared memory acquisition status by the shared memory acquisition status management step at the time of system termination, and the process in the activated state and the share in the acquired state A process shared memory management method characterized by forcibly terminating memory.
複数のプロセスが実行され、前記プロセスにより共有メモリを制御する処理を行うコンピュータシステムにおいて、
前記プロセスからの起動要求を受けてプロセス起動を行うプロセス起動機能と、
前記プロセスからの停止要求を受けてプロセス停止を行うプロセス停止機能と、
前記プロセス起動機能により起動されたプロセス起動状況を管理するプロセス起動状況管理機能と、
前記プロセス起動機能により起動されたプロセスからの獲得要求を受けて対応する共有メモリの獲得を行う共有メモリ獲得機能と、
前記共有メモリ獲得機能により獲得したプロセスからの解放要求を受けて前記共有メモリの解放を行う共有メモリ解放機能と、
前記共有メモリ獲得機能により獲得された共有メモリ獲得状況を管理する共有メモリ獲得状況管理機能と、
前記プロセス起動状況及び前記共有メモリ獲得状況を最終的に確認するプロセス共有メモリ状況確認機能とをコンピュータに実行させるプログラムであって、
前記プロセス共有メモリ状況確認機能は、システム終了時に前記プロセス起動状況管理機能によるプロセス起動状況及び前記共有メモリ獲得状況管理機能による共有メモリ獲得状況を確認し、起動状態にあるプロセス及び獲得状態にある共有メモリを強制終了することを特徴とするプログラム。
In a computer system in which a plurality of processes are executed and processing for controlling a shared memory is performed by the processes,
A process start function for starting a process in response to a start request from the process;
A process stop function for stopping a process in response to a stop request from the process;
A process activation status management function for managing the process activation status activated by the process activation function;
A shared memory acquisition function for receiving an acquisition request from a process started by the process start function and acquiring a corresponding shared memory;
A shared memory release function for releasing the shared memory in response to a release request from a process acquired by the shared memory acquisition function;
A shared memory acquisition status management function for managing a shared memory acquisition status acquired by the shared memory acquisition function;
A program for causing a computer to execute a process shared memory status confirmation function for finally confirming the process activation status and the shared memory acquisition status,
The process shared memory status check function checks the process startup status by the process startup status management function and the shared memory acquisition status by the shared memory acquisition status management function when the system is terminated, and the process in the startup state and the share in the acquisition status A program characterized by forcibly terminating memory.
JP2006005060A 2006-01-12 2006-01-12 Process-sharing memory management system, process- sharing memory management method and program Pending JP2007188244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006005060A JP2007188244A (en) 2006-01-12 2006-01-12 Process-sharing memory management system, process- sharing memory management method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006005060A JP2007188244A (en) 2006-01-12 2006-01-12 Process-sharing memory management system, process- sharing memory management method and program

Publications (1)

Publication Number Publication Date
JP2007188244A true JP2007188244A (en) 2007-07-26

Family

ID=38343382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006005060A Pending JP2007188244A (en) 2006-01-12 2006-01-12 Process-sharing memory management system, process- sharing memory management method and program

Country Status (1)

Country Link
JP (1) JP2007188244A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009181466A (en) * 2008-01-31 2009-08-13 Canon Inc Semiconductor exposure apparatus, control method, and computer program
JP2009199303A (en) * 2008-02-21 2009-09-03 Fuji Xerox Co Ltd Image processor and image processing program
WO2010113212A1 (en) * 2009-03-31 2010-10-07 富士通株式会社 Memory leak monitoring device and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009181466A (en) * 2008-01-31 2009-08-13 Canon Inc Semiconductor exposure apparatus, control method, and computer program
JP2009199303A (en) * 2008-02-21 2009-09-03 Fuji Xerox Co Ltd Image processor and image processing program
WO2010113212A1 (en) * 2009-03-31 2010-10-07 富士通株式会社 Memory leak monitoring device and method
JPWO2010113212A1 (en) * 2009-03-31 2012-10-04 富士通株式会社 Memory leak monitoring apparatus and method

Similar Documents

Publication Publication Date Title
JP5215779B2 (en) Information processing apparatus and information processing method
JPH0831047B2 (en) Apparatus and method for inter-partition control in a logical partition data processor
JP4315016B2 (en) System switching method for computer system
US10353786B2 (en) Virtualization substrate management device, virtualization substrate management system, virtualization substrate management method, and recording medium for recording virtualization substrate management program
JP2010224847A (en) Computer system and setting management method
JP6024138B2 (en) Cluster system
JP2009146387A (en) Information processing apparatus, information processing method and program
JP2007188244A (en) Process-sharing memory management system, process- sharing memory management method and program
JP6599725B2 (en) Information processing apparatus, log management method, and computer program
US20110225463A1 (en) Detecting and recovering from process failures
JP2015106345A (en) Information processing system, information processor, and program
JP2001022709A (en) Cluster system and computer-readable storage medium storing program
CN105760276B (en) Reboot orders are improved to restart reliability and increase the method for the reset log
US9727381B2 (en) Image forming apparatus and resource management method
JP5683088B2 (en) Recovery system, recovery method, and backup control system
JP5387767B2 (en) Update technology for running programs
JP3551079B2 (en) Recovery method and device after replacement of modified load module
JP2006065440A (en) Process management system
JP4882291B2 (en) Module update program
JP2010146436A (en) Monitoring system, control method and program
JP2000003271A (en) Software managing device and computer readable recording medium for recording program
JP6430321B2 (en) Control server
JP2015041273A (en) Program update system, program update method, program update program, and communication device
WO2023042426A1 (en) Vehicle-mounted device and program updating system
JP2006268146A (en) Station business relay unit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090312

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090317

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090423

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090728