JP7757657B2 - Deadlock analysis support device, deadlock analysis support method, and deadlock analysis support program - Google Patents
Deadlock analysis support device, deadlock analysis support method, and deadlock analysis support programInfo
- Publication number
- JP7757657B2 JP7757657B2 JP2021131987A JP2021131987A JP7757657B2 JP 7757657 B2 JP7757657 B2 JP 7757657B2 JP 2021131987 A JP2021131987 A JP 2021131987A JP 2021131987 A JP2021131987 A JP 2021131987A JP 7757657 B2 JP7757657 B2 JP 7757657B2
- Authority
- JP
- Japan
- Prior art keywords
- lock
- information
- deadlock
- lock state
- secured
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、デッドロック解析支援装置、デッドロック解析支援方法、及び、デッドロック解析支援プログラムに関する。 The present invention relates to a deadlock analysis support device, a deadlock analysis support method, and a deadlock analysis support program.
大規模なコンピュータシステムでは、多数の情報処理資源を共有する多数のスレッド(タスク、プロセスとも称する)が実行されている。個々のスレッドは、通常、ある情報処理資源を使用する際に、当該情報処理資源に対するロックを取得することによって、他のスレッドによる当該情報処理資源へのアクセスに関する排他制御を行う。このようなコンピュータシステムでは、複数のスレッドが、それぞれ異なる情報処理資源のロックを取得した状態で、互いに他のスレッドによるロックの解放を待つことによって処理が停止するデッドロックが発生することがある。したがって、このようなデッドロックの発生を、迅速かつ的確に検出するための技術が期待されている。 Large-scale computer systems run a large number of threads (also called tasks or processes) that share a large number of information processing resources. When using a certain information processing resource, each thread typically acquires a lock on that resource, thereby providing exclusive control over access to that resource by other threads. In such computer systems, deadlocks can occur, where multiple threads each have acquired locks on different information processing resources and are waiting for the other threads to release their locks, causing processing to halt. Therefore, there is a need for technology that can quickly and accurately detect the occurrence of such deadlocks.
このような技術に関連して、特許文献1には、共有資源に対するアクセス競合の状態を判定する装置が開示されている。この装置は、共有資源へのアクセス権の獲得に関して得られる特徴量を検出し、当該特徴量に基づいて、共有資源に対するアクセス競合の状態を判定する。 In relation to this technology, Patent Document 1 discloses a device for determining the state of access contention for a shared resource. This device detects characteristic quantities obtained in relation to the acquisition of access rights to a shared resource, and determines the state of access contention for the shared resource based on these characteristic quantities.
また、特許文献2には、適切な遅延時間の経過後にデッドロックのチェックを実施する装置が開示されている。この装置は、資源がタスクにロックされているロック時間を計測し、計測されたロック時間に基づいて遅延時間を決定する。そしてこの装置は、タスクが待ち状態になっている時間が当該支援時間以上になると、デッドロックのチェックを実施する。 Patent document 2 also discloses a device that performs a deadlock check after an appropriate delay time has elapsed. This device measures the lock time during which a resource is locked by a task, and determines the delay time based on the measured lock time. This device then performs a deadlock check when the time that the task has been in a waiting state exceeds the support time.
また、特許文献3には、ノードにおけるデッドロックの発生をイベントドリブンで検出するシステムが開示されている。このシステムは、個々のスレッドによる資源のロックの取得状態をロック状態テーブルに登録し、スレッドからのロック取得要求と、ロック状態テーブルに登録されているロックの取得状態とに基づいて、デッドロックの発生を検出する。 Patent document 3 also discloses a system that uses an event-driven method to detect the occurrence of deadlocks in a node. This system registers the resource lock acquisition status of individual threads in a lock status table, and detects the occurrence of a deadlock based on the lock acquisition request from the thread and the lock acquisition status registered in the lock status table.
また、特許文献4には、アプリケーションプログラムに影響することなくデッドロック状態を検出するリアルタアイムOS(Operating System)が開示されている。このOSは、複数のタスクが共有資源を共有し合うことによるデッドロック状態を検出するための管理テーブルを備える。このOSは、共有資源の獲得待ち状態に遷移したタスクの情報と、当該タスクの獲得待ち状態の原因となる当該共有資源を獲得中のタスクの情報とを、当該管理テーブルに記録する。 Patent document 4 also discloses a real-time OS (Operating System) that detects deadlock states without affecting application programs. This OS has a management table for detecting deadlock states caused by multiple tasks sharing a shared resource. This OS records in the management table information about tasks that have transitioned to a state waiting to acquire a shared resource, as well as information about tasks currently acquiring the shared resource that are causing the task to enter a waiting state.
デッドロックに対する対策として、例えば、デッドロックの発生の監視を行い、デッドロックが発生したと推定される状態を検出した場合、情報処理資源に対するロックの解放あるいはロック待ちの状態を解除することによって、デッドロックを解消することが行われる。そして、通常、デッドロックの発生要因の解析のためにシステムのログが採取される。この場合においてログの採取ポイントが少ない場合、デッドロックの発生に関わる被疑箇所の特定が困難になる。またログの採取ポイントが多い場合、特に大規模なシステムでは採取するログの量が膨大になるので、ログの採取時間が長くなることによるシステムの運用への影響が大きくなるとともに、膨大なログを解析することによるユーザへの負担も大きくなる。したがって、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供することが課題である。上述した特許文献1乃至4の技術では、この課題を解決するのに十分であるとは言えない。 Countermeasures against deadlocks include, for example, monitoring for deadlock occurrences. If a state that suggests a deadlock has occurred is detected, the deadlock is resolved by releasing the lock on the information processing resource or canceling the lock wait state. System logs are typically collected to analyze the cause of the deadlock. In this case, if there are few log collection points, it becomes difficult to identify suspected deadlock-related areas. Furthermore, if there are many log collection points, the volume of collected logs becomes enormous, especially in large-scale systems. This increases the impact on system operation due to the long log collection time, and also increases the burden on users due to analyzing the vast amount of logs. Therefore, the challenge is to efficiently provide information that accurately supports users in analyzing the cause of deadlocks. The technologies described in Patent Documents 1 to 4 above cannot be said to be sufficient to solve this problem.
本発明の主たる目的は、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供するデッドロック解析支援装置等を提供することにある。 The primary objective of the present invention is to provide a deadlock analysis support device that efficiently provides information that accurately supports users in analyzing the causes of deadlocks.
本発明の一態様に係るデッドロック解析支援装置は、情報処理装置において実行される単位情報処理の個々について、前記単位情報処理が使用するロック対象資源に対するロックの状態を表すロック状態情報を管理する管理手段と、前記ロック状態情報が表す前記ロックの状態が、デッドロックの発生の可能性を示す所定の検出基準を満たすことを検出する検出手段と、前記ロックの状態が前記所定の検出基準を満たす場合、前記ロック状態情報を出力する出力手段と、を備える。 A deadlock analysis support device according to one aspect of the present invention comprises: management means for managing lock state information representing the lock state of a locked resource used by each unit information process executed on an information processing device; detection means for detecting whether the lock state represented by the lock state information satisfies predetermined detection criteria indicating the possibility of a deadlock occurring; and output means for outputting the lock state information when the lock state satisfies the predetermined detection criteria.
上記目的を達成する他の見地において、本発明の一態様に係るデッドロック解析支援方法は、情報処理装置によって、前記情報処理装置において実行される単位情報処理の個々について、前記単位情報処理が使用するロック対象資源に対するロックの状態を表すロック状態情報を管理し、前記ロック状態情報が表す前記ロックの状態が、デッドロックの発生の可能性を示す所定の検出基準を満たすことを検出し、前記ロックの状態が前記所定の検出基準を満たす場合、前記ロック状態情報を出力する。 In another aspect of achieving the above object, a deadlock analysis support method according to one aspect of the present invention manages, by an information processing device, lock state information representing the lock state of a locked resource used by each unit information processing executed on the information processing device, detects whether the lock state represented by the lock state information satisfies predetermined detection criteria indicating the possibility of a deadlock occurring, and outputs the lock state information if the lock state satisfies the predetermined detection criteria.
また、上記目的を達成する更なる見地において、本発明の一態様に係るデッドロック解析支援プログラムは、情報処理装置において実行される単位情報処理の個々について、前記単位情報処理が使用するロック対象資源に対するロックの状態を表すロック状態情報を管理する管理処理と、前記ロック状態情報が表す前記ロックの状態が、デッドロックの発生の可能性を示す所定の検出基準を満たすことを検出する検出処理と、前記ロックの状態が前記所定の検出基準を満たす場合、前記ロック状態情報を出力する出力処理と、を前記情報処理装置に実行させる。 In addition, in a further aspect of achieving the above object, a deadlock analysis support program according to one aspect of the present invention causes an information processing device to execute, for each unit information processing executed on the information processing device, a management process for managing lock state information representing the lock state of a locked resource used by the unit information processing; a detection process for detecting whether the lock state represented by the lock state information satisfies predetermined detection criteria indicating the possibility of a deadlock occurring; and an output process for outputting the lock state information when the lock state satisfies the predetermined detection criteria.
更に、本発明は、係るデッドロック解析支援プログラム(コンピュータプログラム)が格納された、コンピュータ読み取り可能な、不揮発性の記録媒体によっても実現可能である。 Furthermore, the present invention can also be realized by a computer-readable, non-volatile recording medium on which such a deadlock analysis support program (computer program) is stored.
本発明によれば、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供するデッドロック解析支援装置等が得られる。 The present invention provides a deadlock analysis support device that efficiently provides information that accurately supports users in analyzing the causes of deadlocks.
以下、本発明の実施の形態について図面を参照して詳細に説明する。 Embodiments of the present invention will be described in detail below with reference to the drawings.
<第1の実施形態>
図1は、本発明の第1の実施の形態に係るデッドロック解析支援装置10の構成を示すブロック図である。デッドロック解析支援装置10は、例えば図9を参照して後述する情報処理装置900に含まれ、情報処理装置900において発生するデッドロックを、解析支援の対象とする装置である。デッドロック解析支援装置10は、あるいは、自装置とは異なる情報処理装置において発生するデッドロックを、解析支援の対象としてもよい。
First Embodiment
1 is a block diagram showing the configuration of a deadlock analysis support device 10 according to a first embodiment of the present invention. The deadlock analysis support device 10 is included in an information processing device 900, which will be described later with reference to FIG. 9, for example, and is a device that provides analytical support for deadlocks that occur in the information processing device 900. Alternatively, the deadlock analysis support device 10 may provide analytical support for deadlocks that occur in an information processing device other than the deadlock analysis support device 10 itself.
デッドロック解析支援装置10を含む情報処理装置は、AP(Application)スレッド100-1乃至100-3等を実行する。当該情報処理装置において実行されるAPスレッドの数は任意である。本実施形態では、以降、APスレッド100-1乃至100-3等をまとめて、あるいは、それらの少なくともいずれかを、APスレッド100と称する場合がある。APスレッド100は、当該情報処理装置がアプリケーションプログラムを実行することによって生成される情報処理単位であり、タスクあるいはプロセスとも称する。 An information processing device including the deadlock analysis support device 10 executes AP (Application) threads 100-1 to 100-3, etc. The number of AP threads executed by the information processing device is arbitrary. In this embodiment, hereafter, AP threads 100-1 to 100-3, etc., may be collectively referred to as an AP thread 100, or at least one of them. An AP thread 100 is an information processing unit generated when the information processing device executes an application program, and is also referred to as a task or process.
APスレッド100は、当該情報処理装置に含まれる情報処理資源であるロック対象資源103-1乃至103-3等を使用する。当該情報処理装置に含まれるロック対象資源の数は任意である。本実施形態では、以降、ロック対象資源103-1乃至103-3等をまとめて、あるいは、それらの少なくともいずれかを、ロック対象資源103と称する場合がある。ロック対象資源103は、複数のAPスレッド100からのアクセスに関して排他制御が必要となる、所定の情報処理機能を備えるデバイス等である。 AP thread 100 uses locked resources 103-1 to 103-3, which are information processing resources included in the information processing device. The information processing device may include any number of locked resources. In this embodiment, hereafter, locked resources 103-1 to 103-3, etc., may be collectively referred to as locked resources 103, or at least one of them may be referred to as locked resources 103. Locked resources 103 are devices with specific information processing functions that require exclusive control regarding access from multiple AP threads 100.
APスレッド100-1は、例えばロック対象資源103-1を使用する場合、ロック取得部101を介して、ロック対象資源103-1に対するロックを取得する。ロック対象資源103-1が、例えばAPスレッド100-2によって既にロックされている状態にある場合、APスレッド100-1によるロック対象資源103-1に対するロックは、APスレッド100-2によるロックが解放されるまで待たされる。APスレッド100-1は、ロック対象資源103-1に対するロックを取得した後、ロック対象資源103-1の使用を開始する。APスレッド100-1は、ロック対象資源103-1の使用を終了後、ロック解放部102を介して、ロック対象資源103-1に対するロックを解放する。ロック取得部101及びロック解放部102は、例えばAPI(Application Programming Interface)を呼び出して実行する。当該APIは、例えば、mutex等のシステムコール、あるいは、ソフトウェア製品が提供するロック確保関数である。 When AP thread 100-1 uses lock target resource 103-1, for example, it acquires a lock on lock target resource 103-1 via lock acquisition unit 101. If lock target resource 103-1 is already locked by AP thread 100-2, for example, AP thread 100-1's lock on lock target resource 103-1 is held in a wait state until AP thread 100-2 releases the lock. After acquiring the lock on lock target resource 103-1, AP thread 100-1 begins using lock target resource 103-1. After finishing using lock target resource 103-1, AP thread 100-1 releases the lock on lock target resource 103-1 via lock release unit 102. The lock acquisition unit 101 and lock release unit 102 are executed by calling, for example, an API (Application Programming Interface). The API is, for example, a system call such as mutex, or a lock acquisition function provided by a software product.
デッドロック解析支援装置10には、端末装置20が通信可能に接続されている。端末装置20は、例えばパーソナルコンピュータ等の情報処理装置である。端末装置20は、デッドロック解析支援装置10に入力される情報に関するユーザによる入力操作を受け付け、デッドロック解析支援装置10から出力される情報を、具備する表示画面(不図示)に表示する。 A terminal device 20 is communicatively connected to the deadlock analysis support device 10. The terminal device 20 is, for example, an information processing device such as a personal computer. The terminal device 20 accepts user input operations related to information to be input to the deadlock analysis support device 10, and displays information output from the deadlock analysis support device 10 on a display screen (not shown) provided with the terminal device 20.
デッドロック解析支援装置10は、管理部11、検出部12、出力部13、及び、解析部14を備える。管理部11、検出部12、出力部13、及び、解析部14は、順に、管理手段、検出手段、出力手段、及び、解析手段の一例である。 The deadlock analysis support device 10 includes a management unit 11, a detection unit 12, an output unit 13, and an analysis unit 14. The management unit 11, the detection unit 12, the output unit 13, and the analysis unit 14 are examples of a management means, a detection means, an output means, and an analysis means, respectively.
本実施形態では、まず、デッドロック解析支援装置10がAPスレッド100によるロック対象資源103に対するロックの状態を管理する動作について説明する。そしてその次に、デッドロック解析支援装置10が、デッドロックの発生の可能性を検出して、APスレッド100によるロック対象資源103に対するロックの状態を表す情報を出力し、さらにデッドロックの発生状況を解析する動作について説明する。 In this embodiment, we will first explain the operation of the deadlock analysis support device 10, which manages the lock status of the AP thread 100 on the lock target resource 103. Next, we will explain the operation of the deadlock analysis support device 10, which detects the possibility of a deadlock occurring, outputs information indicating the lock status of the AP thread 100 on the lock target resource 103, and further analyzes the deadlock occurrence situation.
<APスレッド100によるロック対象資源103に対するロックの状態を管理する動作>
管理部11は、APスレッド100の個々について、APスレッド100が使用するロック対象資源103に対するロックの状態を表す情報を、ロック状態テーブル111を更新することによって管理する。
<Operation of managing the lock state of the AP thread 100 for the lock target resource 103>
The management unit 11 manages, for each AP thread 100 , information indicating the lock state of the lock target resource 103 used by the AP thread 100 by updating the lock state table 111 .
図2は、本実施形態に係るロック状態テーブル111のデータを例示する図である。ロック状態テーブル111は、図2に例示する通り、ロック対象資源103の個々に関して、ロックを確保したAPスレッド100の識別子、及び、そのロック確保時刻を表す。図2に例示するロック状態テーブル111によれば、ロック対象資源103-1は、APスレッド100-1によってロック中であり、そのロックが確保された時刻は時刻Aである。ロック対象資源103-2は、APスレッド100-2によってロック中であり、そのロックが確保された時刻は時刻Bである。ロック対象資源103-3は、APスレッド100-2によってロック中であり、そのロックが確保された時刻は時刻Cである。 Figure 2 is a diagram illustrating data in the lock status table 111 according to this embodiment. As illustrated in Figure 2, the lock status table 111 indicates, for each of the lock target resources 103, the identifier of the AP thread 100 that secured the lock and the time the lock was secured. According to the lock status table 111 illustrated in Figure 2, the lock target resource 103-1 is locked by AP thread 100-1, and the time the lock was secured is time A. The lock target resource 103-2 is locked by AP thread 100-2, and the time the lock was secured is time B. The lock target resource 103-3 is locked by AP thread 100-2, and the time the lock was secured is time C.
またロック状態テーブル111は、ロック対象資源103とAPスレッド100との組み合わせごとに、「状態」、「ロック要求時刻」、「ロック確保時刻」、「ロック解放時刻」、「ロック要求回数」、「確保待ち累積時間」、「ロック確保累積時間」、「ラベル」を表す。ロック状態テーブル111は、これらの項目のうち、デッドロックの発生の可能性を検出するのに必要となる「状態」、「ロック要求時刻」、「ロック確保時刻」、「ロック解放時刻」を含む必要がある。ロック状態テーブル111は、性能問題等の解析に必要となる「ロック要求回数」、「確保待ち累積時間」、「ロック確保累積時間」、「ラベル」については、必要に応じて含むようにすればよい。尚、ロック状態テーブル111の仕様は、図2に例示する仕様に限定されず、ロック状態テーブル111は、図2に例示する項目とは異なる項目を含んでもよい。 Furthermore, the lock status table 111 represents the "state," "lock request time," "lock acquisition time," "lock release time," "number of lock requests," "accumulated acquisition wait time," "accumulated lock acquisition time," and "label" for each combination of lock target resource 103 and AP thread 100. Of these items, the lock status table 111 must include the "state," "lock request time," "lock acquisition time," and "lock release time" that are necessary to detect the possibility of a deadlock occurring. The lock status table 111 may also include the "number of lock requests," "accumulated acquisition wait time," "accumulated lock acquisition time," and "label" that are necessary for analyzing performance issues, etc., as needed. Note that the specifications of the lock status table 111 are not limited to those illustrated in FIG. 2, and the lock status table 111 may include items other than those illustrated in FIG. 2.
ロック状態テーブル111における「状態」は、APスレッド100とロック対象資源103とに関して、「ロック確保済み」、「ロック確保待ち」、「ロック要求無し」の何れかを表す。図2に例示するロック状態テーブル111は、例えばAPスレッド100-1に関して、ロック対象資源103-1に対するロックを確保済みであり、ロック対象資源103―2に対するロックを確保待ち(要求中)であり、ロック対象資源103―3に対するロックを要求していないことを表す。図2に例示するロック状態テーブル111は、例えばAPスレッド100-2に関して、ロック対象資源103-1に対するロックを確保待ちであり、ロック対象資源103―2に対するロックを確保済みであり、ロック対象資源103―3に対するロックを確保済みであることを表す。 The "state" in the lock state table 111 indicates one of "lock secured," "waiting for lock to be secured," and "no lock requested" for the AP thread 100 and the lock target resource 103. The lock state table 111 illustrated in FIG. 2 indicates, for example, that for AP thread 100-1, a lock has been secured for lock target resource 103-1, a lock is waiting to be secured (requesting) for lock target resource 103-2, and no lock has been requested for lock target resource 103-3. The lock state table 111 illustrated in FIG. 2 indicates, for example, that for AP thread 100-2, a lock is waiting to be secured for lock target resource 103-1, a lock has been secured for lock target resource 103-2, and a lock has been secured for lock target resource 103-3.
ロック状態テーブル111における「ロック要求時刻」は、APスレッド100がロック対象資源103に対するロックを要求した時刻を表す。図2に例示するロック状態テーブル111によれば、例えば、APスレッド100-1がロック対象資源103-1に対するロックを要求した時刻は時刻D(但し時刻Dは時刻Aよりも過去の時刻とする)であり、APスレッド100-1がロック対象資源103-2に対するロックを要求した時刻は時刻Gである。 The "lock request time" in the lock status table 111 indicates the time at which the AP thread 100 requested a lock on the lock target resource 103. According to the lock status table 111 illustrated in FIG. 2, for example, the time at which the AP thread 100-1 requested a lock on the lock target resource 103-1 was time D (however, time D is assumed to be a time earlier than time A), and the time at which the AP thread 100-1 requested a lock on the lock target resource 103-2 was time G.
ロック状態テーブル111における「ロック解放時刻」は、APスレッド100がロック対象資源103に対するロックを解放した時刻を表す。図2に示す例の場合、APスレッド100-1はロック対象資源103-1をロック中であるので、APスレッド100-1がロック対象資源103-1のロックを解放した時刻は、ロック状態テーブル111において値が設定されていない。 The "lock release time" in the lock status table 111 represents the time when the AP thread 100 released the lock on the locked resource 103. In the example shown in Figure 2, since the AP thread 100-1 is currently locking the locked resource 103-1, no value is set in the lock status table 111 for the time when the AP thread 100-1 released the lock on the locked resource 103-1.
ロック状態テーブル111における「ロック要求回数」は、APスレッド100がロック対象資源103に対するロックを要求した累積の回数を表す。図2に例示するロック状態テーブル111によれば、例えば、APスレッド100-1がロック対象資源103-1に対するロックを要求した回数は1回である。 The "Lock Request Count" in the lock status table 111 represents the cumulative number of times that the AP thread 100 has requested a lock on the lock target resource 103. According to the lock status table 111 illustrated in FIG. 2, for example, the number of times that the AP thread 100-1 has requested a lock on the lock target resource 103-1 is one.
ロック状態テーブル111における「確保待ち累積時間」は、APスレッド100がロック対象資源103に対するロックを要求してからロックを確保するまでの累積時間を表す。図2に例示するロック状態テーブル111によれば、例えば、APスレッド100-1がロック対象資源103-1に対するロックを確保するまでの累積時間は時間Eである。 The "accumulated wait time for locking" in the lock status table 111 represents the accumulated time from when the AP thread 100 requests a lock on the lock target resource 103 until the lock is secured. According to the lock status table 111 illustrated in FIG. 2, for example, the accumulated time until the AP thread 100-1 secures a lock on the lock target resource 103-1 is time E.
ロック状態テーブル111における「ロック確保累積時間」は、APスレッド100がロック対象資源103に対するロックを確保した状態の累積時間を表す。図2に例示するロック状態テーブル111によれば、例えば、APスレッド100-1がロック対象資源103-1に対するロックを確保した状態の累積時間は時間Fである。 The "Lock Acquisition Accumulative Time" in the lock status table 111 represents the accumulated time that the AP thread 100 has acquired a lock on the lock target resource 103. According to the lock status table 111 illustrated in FIG. 2, for example, the accumulated time that the AP thread 100-1 has acquired a lock on the lock target resource 103-1 is time F.
ロック状態テーブル111における「ラベル」は、APスレッド100を生成したアプリケーションプログラムにおける、ロック対象資源103に対するロックを要求した(APIを呼び出した)場所を表す情報であり、アプリケーションプログラムの動作を解析できるように、ユーザが任意でアプリケーションプログラムに付与した情報である。図2に例示するロック状態テーブル111によれば、例えば、APスレッド100-1がロック対象資源103-1に対するロックを呼び出したアプリケーションプログラムにおける場所は、「ラベルX」として表される場所である。 The "label" in the lock state table 111 is information that indicates the location in the application program that created the AP thread 100 where a lock was requested for the lock target resource 103 (where the API was called), and is information that the user optionally assigns to the application program so that the operation of the application program can be analyzed. According to the lock state table 111 illustrated in Figure 2, for example, the location in the application program where AP thread 100-1 called to lock the lock target resource 103-1 is the location represented as "label X."
次に図3及び図4のフローチャートを参照して、本実施形態に係るデッドロック解析支援装置10が、APスレッド100によるロック対象資源103に対するロックの状態を管理する動作(処理)について詳細に説明する。 Next, with reference to the flowcharts in Figures 3 and 4, the operation (processing) of the deadlock analysis support device 10 according to this embodiment to manage the lock state of the AP thread 100 on the lock target resource 103 will be described in detail.
図3は、デッドロック解析支援装置10の、APスレッド100によってロック対象資源103のロックを確保する際におけるロックの状態を管理する動作を示すフローチャートである。 Figure 3 is a flowchart showing the operation of the deadlock analysis support device 10 to manage the lock state when the AP thread 100 secures a lock on the lock target resource 103.
ロック取得部101は、APスレッド100-i(iは任意の自然数)によるロック対象資源103-j(jは任意の自然数)に対するロック要求のAPIを呼び出して実行する(ステップS101)。管理部11は、ロック状態テーブル111における、APスレッド100-iのロック対象資源103-jに関するエントリにおいて、状態を「ロック確保待ち」に更新し、ロック要求時刻を現在の時刻に更新し、ロック要求回数を1つ加算する(ステップS102)。 The lock acquisition unit 101 calls and executes the API for a lock request by AP thread 100-i (i is any natural number) for lock target resource 103-j (j is any natural number) (step S101). The management unit 11 updates the status of the entry for AP thread 100-i's lock target resource 103-j in the lock status table 111 to "Waiting for lock to be secured," updates the lock request time to the current time, and increments the number of lock requests by one (step S102).
ロック対象資源103-jが、APスレッド100-i以外のAPスレッド100によってロックされている場合(ステップS103でYes)、処理はステップS103に戻る。ロック対象資源103-jが、APスレッド100-i以外のAPスレッド100によってロックされていない場合(ステップS103でNo)、ロック取得部101は、APスレッド100-iによるロック対象資源103-jに対するロック確保のAPIを実行する(ステップS104)。 If the lock target resource 103-j is locked by an AP thread 100 other than AP thread 100-i (Yes in step S103), processing returns to step S103. If the lock target resource 103-j is not locked by an AP thread 100 other than AP thread 100-i (No in step S103), the lock acquisition unit 101 executes an API for AP thread 100-i to secure a lock on the lock target resource 103-j (step S104).
管理部11は、ロック状態テーブル111における、APスレッド100-iのロック対象資源103-jに関するエントリにおいて、状態を「ロック確保済み」に更新し、ロック確保時刻を現在の時刻に更新し、確保待ち累積時間をロック確保時刻とロック要求時刻との差分を加算した値に更新する。管理部11は、また、ロック状態テーブル111における、ロック対象資源103-jのエントリにおいて、「APスレッド100-iによりロック中」に更新し、ロック確保時刻を現在の時刻に更新し(ステップS105)、全体の処理は終了する。 In the entry for the locked resource 103-j of AP thread 100-i in the lock status table 111, the management unit 11 updates the status to "lock secured," updates the lock acquisition time to the current time, and updates the cumulative wait time to the sum of the difference between the lock acquisition time and the lock request time. The management unit 11 also updates the entry for the locked resource 103-j in the lock status table 111 to "locked by AP thread 100-i," and updates the lock acquisition time to the current time (step S105), and the entire process ends.
図4は、デッドロック解析支援装置10の、APスレッド100によってロック対象資源103のロックを解放する際におけるロックの状態を管理する動作を示すフローチャートである。 Figure 4 is a flowchart showing the operation of the deadlock analysis support device 10 to manage the lock state when the AP thread 100 releases the lock on the locked resource 103.
ロック解放部102は、APスレッド100-iによるロック対象資源103-jに対するロック解放のAPIを呼び出して実行する(ステップS201)。管理部11は、ロック状態テーブル111における、APスレッド100-iのロック対象資源103-jに関するエントリにおいて、状態を「ロック要求無し」に更新し、ロック解放時刻を現在の時刻に更新し、ロック確保累積時間をロック解放時刻とロック確保時刻との差分を加算した値に更新する。管理部11は、また、ロック状態テーブル111における、ロック対象資源103-jのエントリにおいて、「ロック要求無し」に更新し(ステップS202)、全体の処理は終了する。 The lock release unit 102 calls and executes the API for AP thread 100-i to release the lock on resource 103-j (step S201). The management unit 11 updates the status in the lock status table 111 for the lock target resource 103-j of AP thread 100-i to "no lock request," updates the lock release time to the current time, and updates the cumulative lock acquisition time to the value obtained by adding the difference between the lock release time and the lock acquisition time. The management unit 11 also updates the entry for resource 103-j in the lock status table 111 to "no lock request" (step S202), and the entire process ends.
<デッドロックの発生の可能性を検出して、APスレッド100によるロック対象資源103に対するロックの状態を表す情報を出力し、デッドロックの発生状況を解析する動作>
次に、デッドロック解析支援装置10が、デッドロックの発生の可能性を検出して、APスレッド100によるロック対象資源103に対するロックの状態を表す情報を出力し、デッドロックの発生状況を解析する動作について説明する。
<Operations for detecting the possibility of a deadlock occurring, outputting information indicating the lock status of the AP thread 100 on the lock target resource 103, and analyzing the occurrence of a deadlock>
Next, the operation of the deadlock analysis support device 10 to detect the possibility of a deadlock occurring, output information indicating the lock state of the AP thread 100 on the lock target resource 103, and analyze the state of deadlock occurrence will be described.
管理部11は、デッドロック解析支援装置10がデッドロックの発生の可能性を検出する際に参照するロック状態参照テーブル112を管理する。 The management unit 11 manages the lock state reference table 112 that the deadlock analysis support device 10 references when detecting the possibility of a deadlock occurring.
図5は、本実施形態に係るロック状態参照テーブル112のデータを例示する図である。図5に例示する通り、ロック状態参照テーブル112は、デッドロック解析支援装置10が前回デッドロックの発生の可能性を判定することを行ったときのロック状態テーブル111が表す、ロック対象資源103の個々に関する、いずれかのAPスレッド100によるロック確保時刻を表す。但し、デッドロック解析支援装置10は、例えば所定の時間間隔でデッドロックの発生の可能性を判定する動作を行うこととする。あるいはデッドロック解析支援装置10は、例えば、ユーザによって入力されたデッドロックの発生の可能性を判定することを指示する情報を端末装置20から受信したときに、デッドロックの発生の可能性を判定する動作を行ってもよい。図5に例示するロック状態参照テーブル112は、ロック対象資源103-1乃至103-3に関して、上述した前回参照時のロック確保時刻が、順に、時刻P、時刻Q、時刻Rであることを表している。 Figure 5 is a diagram illustrating data in the lock state reference table 112 according to this embodiment. As illustrated in Figure 5, the lock state reference table 112 indicates the time at which any AP thread 100 secured a lock for each of the locked resources 103 indicated in the lock state table 111 the last time the deadlock analysis support device 10 determined the possibility of a deadlock occurring. However, the deadlock analysis support device 10 performs the operation of determining the possibility of a deadlock occurring, for example, at predetermined time intervals. Alternatively, the deadlock analysis support device 10 may perform the operation of determining the possibility of a deadlock occurring when, for example, it receives information from the terminal device 20 input by the user instructing it to determine the possibility of a deadlock occurring. The lock state reference table 112 illustrated in Figure 5 indicates that the lock secured times at the time of the previous reference, as described above, for the locked resources 103-1 to 103-3 are time P, time Q, and time R, respectively.
管理部11は、デッドロック解析支援装置10がデッドロックの発生の可能性を判定することを行ったときに、ロック対象資源103の個々に関して、ロック状態テーブル111とロック状態参照テーブル112との間でロック確保時刻とが異なるか否かを確認する。管理部11は、ロック状態テーブル111とロック状態参照テーブル112との間でロック確保時刻とが異なる場合、ロック状態参照テーブル112のロック確保時刻を、ロック状態テーブル111のロック確保時刻に更新する。 When the deadlock analysis support device 10 determines the possibility of a deadlock occurring, the management unit 11 checks whether the lock acquisition time differs between the lock status table 111 and the lock status reference table 112 for each of the locked resources 103. If the lock acquisition time differs between the lock status table 111 and the lock status reference table 112, the management unit 11 updates the lock acquisition time in the lock status reference table 112 to the lock acquisition time in the lock status table 111.
この場合、デッドロック解析支援装置10が前回デッドロックの発生の可能性を判定したときから、ロック対象資源103に対するロック確保時刻が更新されている(即ち新たなロックの確保が行われている)ので、デッドロックが発生している可能性は低いと考えられる。したがってこの場合、デッドロック解析支援装置10は、後述する検出部12によるデッドロックの発生の可能性を検出する動作を行わずに、デッドロックの発生の可能性を検出する次回のタイミングまで待機する(デッドロックの発生の可能性を検出する動作を停止する)。デッドロック解析支援装置10は、ロック対象資源103の個々に関して、ロック状態テーブル111とロック状態参照テーブル112との間でロック確保時刻とが一致する場合、後述する検出部12によるデッドロックの発生の可能性を検出する動作を行う。 In this case, the lock acquisition time for the locked resource 103 has been updated (i.e., a new lock has been acquired) since the deadlock analysis support device 10 last determined the possibility of a deadlock occurring, so it is considered unlikely that a deadlock has occurred. Therefore, in this case, the deadlock analysis support device 10 does not perform the operation of detecting the possibility of a deadlock using the detection unit 12 described below, but waits until the next time it detects the possibility of a deadlock occurring (stops the operation of detecting the possibility of a deadlock occurring). If the lock acquisition time matches between the lock state table 111 and the lock state reference table 112 for each locked resource 103, the deadlock analysis support device 10 performs the operation of detecting the possibility of a deadlock using the detection unit 12 described below.
検出部12は、ロック状態テーブル111が表すロック対象資源103に関するロックの状態が、デッドロックの発生の可能性を示す検出基準120を満たすか否かを確認する。但し、検出部12は、検出基準120を、例えばユーザによって事前に与えられていることとする。 The detection unit 12 checks whether the lock state of the locked resource 103 represented by the lock state table 111 satisfies the detection criteria 120, which indicate the possibility of a deadlock occurring. However, the detection unit 12 assumes that the detection criteria 120 have been provided in advance, for example, by the user.
検出基準120は、例えば、ロック状態テーブル111が、少なくともいずれかのAPスレッド100とロック対象資源103とに関して、ロックを確保待ちであり、かつ、現在時刻とロック要求時刻との差分が閾値以上であることを表す場合に、デッドロックが発生した可能性があることを示す。 The detection criterion 120 indicates that a deadlock may have occurred, for example, when the lock status table 111 indicates that a lock is waiting to be secured for at least one AP thread 100 and a lock target resource 103, and the difference between the current time and the lock request time is greater than or equal to a threshold value.
検出部12は、少なくともいずれかのAPスレッド100とロック対象資源103とに関して、デッドロックが発生した可能性があることを検出した場合、ロック状態テーブル111のデータと、ロック対象資源103の識別子とを、デッドロックが発生した可能性の検出結果として、出力部13に出力する。 When the detection unit 12 detects that a deadlock may have occurred between at least one AP thread 100 and a locked resource 103, it outputs the data in the lock status table 111 and the identifier of the locked resource 103 to the output unit 13 as a detection result of the possibility of a deadlock having occurred.
出力部13は、検出部12から入力されたデッドロックが発生した可能性の検出結果を解析部14に出力する。出力部13はまた、当該検出結果を端末装置20に送信する。端末装置20は、検出部12から受信した当該検出結果を、具備する表示画面に表示する。出力部13は、当該検出結果を表すファイルを出力してもよい。 The output unit 13 outputs the detection result of the possibility of deadlock occurrence input from the detection unit 12 to the analysis unit 14. The output unit 13 also transmits the detection result to the terminal device 20. The terminal device 20 displays the detection result received from the detection unit 12 on a display screen provided therein. The output unit 13 may output a file representing the detection result.
デッドロック解析支援装置10は、検出部12によってあるロック対象資源103に関してデッドロックが発生した可能性があることを検出したのち、当該ロック対象資源103について、ロック状態参照テーブル112の前回参照時のロック確保時刻と、ロック状態テーブル111のロック確保時刻が一致しなくなるまで、デッドロックの発生の可能性を検出する動作を待機する。即ち、デッドロック解析支援装置10は、当該ロック対象資源103について、いずれかのAPスレッド100による新たなロックの取得が行われるまで当該ロック対象資源103に関するデッドロックの発生の可能性を検出する動作を待機する。 After the detection unit 12 detects that a deadlock may have occurred for a certain locked resource 103, the deadlock analysis support device 10 waits before detecting the possibility of a deadlock occurring for that locked resource 103 until the lock acquisition time at the previous reference in the lock state reference table 112 and the lock acquisition time in the lock state table 111 no longer match. In other words, the deadlock analysis support device 10 waits before detecting the possibility of a deadlock occurring for that locked resource 103 until one of the AP threads 100 acquires a new lock for that locked resource 103.
デッドロック解析支援装置10は、当該ロック対象資源103について、いずれかのAPスレッド100による新たなロックの取得が行われた場合、管理部11によって、ロック状態参照テーブル112の前回参照時のロック確保時刻を、新たなロックにより更新されたロック状態テーブル111のロック確保時刻に更新する。そしてデッドロック解析支援装置10は、当該ロック対象資源103に関するデッドロックの発生の可能性を検出する動作を再開する。 When a new lock is acquired by one of the AP threads 100 for the locked resource 103, the deadlock analysis support device 10 causes the management unit 11 to update the lock acquisition time from the previous reference in the lock state reference table 112 to the lock acquisition time in the lock state table 111 updated by the new lock. The deadlock analysis support device 10 then resumes operation to detect the possibility of a deadlock occurring for the locked resource 103.
解析部14は、出力部13から出力されたロック状態テーブル111のデータとロック対象資源103の識別子とを解析基準140と照合することによって、解析対象のロック対象資源103に関するロックの状態を解析する。解析部14は、その解析結果を、出力部13を介して端末装置20に送信する。端末装置20は、出力部13から受信した当該解析結果を、具備する表示画面に表示する。 The analysis unit 14 analyzes the lock status of the locked resource 103 being analyzed by comparing the data in the lock status table 111 output from the output unit 13 and the identifier of the locked resource 103 with the analysis criteria 140. The analysis unit 14 transmits the analysis results to the terminal device 20 via the output unit 13. The terminal device 20 displays the analysis results received from the output unit 13 on its display screen.
解析部14は、ロック状態テーブル111のデータから、少なくともいずれかのAPスレッド100がロックを確保済みであるロック対象資源103のロックを解放する以前に、当該ロック対象資源103に対する新たなロックを要求したか否かを確認する。解析部14は、例えば、ロック状態テーブル111が表す、ロック要求時刻、ロック確保時刻、ロック解放時刻の時系列の関係から、前述の確認を行う。解析部14は、ロック状態テーブル111が前述した状況を表す場合、当該APスレッド100による当該ロック対象資源103に対する多重ロックが発生したことを示す解析結果を、出力部13を介して出力する。 The analysis unit 14 checks the data in the lock status table 111 to see if at least one AP thread 100 has requested a new lock on a locked resource 103 before releasing a lock on that locked resource 103 for which it has already secured a lock. The analysis unit 14 performs the above-mentioned check, for example, from the chronological relationship between the lock request time, lock acquisition time, and lock release time shown in the lock status table 111. If the lock status table 111 shows the above-mentioned situation, the analysis unit 14 outputs, via the output unit 13, an analysis result indicating that a multiple lock has occurred on the locked resource 103 by the AP thread 100.
解析部14は、ロック状態テーブル111のデータから、ロック対象資源103-i(第1のロック対象資源)に対するロックを確保済みであるAPスレッド100-j(第1の単位情報処理)がロック対象資源103-k(第2のロック対象資源)に対するロックを確保待ちであるか否かを確認する。解析部14は、併せて、ロック対象資源103-kに対するロックを確保済みであるAPスレッド100-l(第2の単位情報処理)がロック対象資源103-iに対するロックを確保待ちであるか否かを確認する。解析部14は、ロック状態テーブル111が前述した状況を表す場合、APスレッド100-j及び100-lとロック対象資源103-i及び103-kとの間でデッドロックが発生したことを示す解析結果を、出力部13を介して出力する。但し、i、j、k、lはいずれも自然数である。出力部13は、当該解析結果を表すファイルを出力してもよい。 The analysis unit 14 checks the data in the lock status table 111 to see if AP thread 100-j (first unit information process), which has secured a lock on lock target resource 103-i (first lock target resource), is waiting to secure a lock on lock target resource 103-k (second lock target resource). The analysis unit 14 also checks whether AP thread 100-l (second unit information process), which has secured a lock on lock target resource 103-k, is waiting to secure a lock on lock target resource 103-i. If the lock status table 111 indicates the above-mentioned situation, the analysis unit 14 outputs, via the output unit 13, an analysis result indicating that a deadlock has occurred between AP threads 100-j and 100-l and lock target resources 103-i and 103-k. Note that i, j, k, and l are all natural numbers. The output unit 13 may output a file representing the analysis result.
次に図6A及び6B、及び、図7のフローチャートを参照して、本実施形態に係るデッドロック解析支援装置10が、デッドロックの発生の可能性を検出して、APスレッド100によるロック対象資源103に対するロックの状態を表す情報を出力し、デッドロックの発生状況を解析する動作(処理)について詳細に説明する。 Next, with reference to Figures 6A and 6B and the flowchart in Figure 7, we will explain in detail the operation (processing) of the deadlock analysis support device 10 according to this embodiment, which detects the possibility of a deadlock occurring, outputs information indicating the lock status of the AP thread 100 on the lock target resource 103, and analyzes the deadlock occurrence status.
図6A及び6Bは、デッドロック解析支援装置10が、デッドロックの発生の可能性を検出して、ロック状態テーブル111のデータを出力する動作を示すフローチャートである。 Figures 6A and 6B are flowcharts showing the operation of the deadlock analysis support device 10 to detect the possibility of a deadlock occurring and output data from the lock status table 111.
デッドロック解析支援装置10によるデッドロックの発生の可能性を検出するタイミングが到来していない場合(ステップS301でNo)、処理はステップS301に戻る。即ち、デッドロック解析支援装置10は、デッドロックの発生の可能性を検出するタイミングが到来するまで待機する。デッドロック解析支援装置10によるデッドロックの発生の可能性を検出するタイミングが到来した場合(ステップS301でYes)、検出部12は、ロック対象資源103について、ロック状態参照テーブル112の前回参照時のロック確保時刻と、ロック状態テーブル111のロック確保時刻とを比較する(ステップS302)。 If the timing for the deadlock analysis support device 10 to detect the possibility of a deadlock occurring has not yet arrived (No in step S301), processing returns to step S301. That is, the deadlock analysis support device 10 waits until the timing for detecting the possibility of a deadlock occurring arrives. If the timing for the deadlock analysis support device 10 to detect the possibility of a deadlock occurring arrives (Yes in step S301), the detection unit 12 compares the lock acquisition time of the previous reference to the lock status reference table 112 with the lock acquisition time in the lock status table 111 for the locked resource 103 (step S302).
ロック確保時刻が一致しない場合(ステップS303でNo)、管理部11は、ロック状態参照テーブル112の前回参照時のロック確保時刻を、ロック状態テーブル111のロック確保時刻に更新し(ステップS304)、処理はステップS301へ戻る。ロック確保時刻が一致する場合(ステップS303でYes)、検出部12は、ロック状態テーブル111において、当該ロック対象資源103に対して 「ロック確保待ち」の状態にあるAPスレッド100が存在するか確認する(ステップS305)。 If the lock acquisition times do not match (No in step S303), the management unit 11 updates the lock acquisition time from the previous reference in the lock status reference table 112 to the lock acquisition time in the lock status table 111 (step S304), and processing returns to step S301. If the lock acquisition times match (Yes in step S303), the detection unit 12 checks the lock status table 111 to see if there is an AP thread 100 in the "waiting for lock acquisition" state for the locked resource 103 (step S305).
「ロック確保待ち」の状態にあるAPスレッド100-iが存在しない場合(ステップS306でNo)、処理はステップS301へ戻る。「ロック確保待ち」の状態にあるAPスレッド100-iが存在する場合(ステップS306でYes)、検出部12は、ロック状態テーブル111において、当該ロック対象資源103とAPスレッド100-iとに関して、ロック要求時刻と現在時刻との差分が閾値以上であるか否かを確認する(ステップS307)。 If there is no AP thread 100-i in the "waiting for lock to be secured" state (No in step S306), processing returns to step S301. If there is an AP thread 100-i in the "waiting for lock to be secured" state (Yes in step S306), the detection unit 12 checks in the lock status table 111 whether the difference between the lock request time and the current time for the lock target resource 103 and the AP thread 100-i is greater than or equal to a threshold (step S307).
当該差分が閾値以上でない場合(ステップS308でNo)、処理はステップS301へ戻る。当該差分が閾値以上である場合(ステップS308でYes)、検出部12は、ロック状態テーブル111のデータと、解析対象となる当該ロック対象資源103の識別子とを検出結果として、出力部13を介して解析部14及び端末装置20へ出力する(ステップS309)。 If the difference is not greater than or equal to the threshold (No in step S308), processing returns to step S301. If the difference is greater than or equal to the threshold (Yes in step S308), the detection unit 12 outputs the data in the lock status table 111 and the identifier of the locked resource 103 being analyzed as the detection result to the analysis unit 14 and terminal device 20 via the output unit 13 (step S309).
管理部11は、当該ロック対象資源103について、ロック状態参照テーブル112の前回参照時のロック確保時刻と、ロック状態テーブル111のロック確保時刻とを比較する(ステップS310)。ロック確保時刻が一致する場合(ステップS311でYes)、処理はステップS310へ戻る。ロック確保時刻が一致しない場合(ステップS311でNo)、管理部11は、ロック状態参照テーブル112の前回参照時のロック確保時刻を、ロック状態テーブル111のロック確保時刻に更新し(ステップS312)、処理はステップS301へ戻る。 The management unit 11 compares the lock acquisition time of the previous reference in the lock status reference table 112 with the lock acquisition time in the lock status table 111 for the relevant lock target resource 103 (step S310). If the lock acquisition times match (Yes in step S311), processing returns to step S310. If the lock acquisition times do not match (No in step S311), the management unit 11 updates the lock acquisition time of the previous reference in the lock status reference table 112 to the lock acquisition time in the lock status table 111 (step S312), and processing returns to step S301.
図7は、デッドロック解析支援装置10が、ロック状態テーブル111のデータからデッドロックの発生状況を解析する動作を示すフローチャートである。 Figure 7 is a flowchart showing the operation of the deadlock analysis support device 10 to analyze the occurrence of a deadlock from the data in the lock status table 111.
解析部14は、検出部12による上述した検出結果において解析対象となったロック対象資源103-iについて、少なくともいずれかのAPスレッド100がロックを確保済みであるロック対象資源103-iのロックを解放する以前に、ロック対象資源103-iに対する新たなロックを要求したか否かを確認する(ステップS401)。ステップS401の状況に該当する場合(ステップS402でYes)、解析部14は、当該APスレッド100によるロック対象資源103-iに対する多重ロックが発生したことを示す解析結果を、出力部13を介して端末装置20へ出力し(ステップS403)、全体の処理は終了する。 The analysis unit 14 checks whether at least one AP thread 100 has requested a new lock on the lock target resource 103-i that was the subject of analysis in the detection result by the detection unit 12 before releasing the lock on the lock target resource 103-i for which it had already secured a lock (step S401). If the situation in step S401 applies (Yes in step S402), the analysis unit 14 outputs an analysis result indicating that a multiple lock on the lock target resource 103-i by the AP thread 100 has occurred to the terminal device 20 via the output unit 13 (step S403), and the entire process ends.
ステップS401の状況に該当しない場合(ステップS402でNo)、解析部14は、ロック対象資源103-iに対するロックを確保済みであるAPスレッド100-jが別のロック対象資源103-kに対するロックを確保待ちであり、かつ、ロック対象資源103-kに対するロックを確保済みであるAPスレッド100-lがロック対象資源103-iに対するロックを確保待ちであるか否かを確認する(ステップS404)。 If the situation in step S401 does not apply (No in step S402), the analysis unit 14 checks whether AP thread 100-j, which has secured a lock on lock target resource 103-i, is waiting to secure a lock on another lock target resource 103-k, and whether AP thread 100-l, which has secured a lock on lock target resource 103-k, is waiting to secure a lock on lock target resource 103-i (step S404).
ステップS404の状況に該当しない場合(ステップS405でNo)、全体の処理は終了する。ステップS404の状況に該当する場合(ステップS405でYes)、解析部14は、APスレッド100-j及び100-lとロック対象資源103-i及び103-kとの間でデッドロックが発生したことを示す解析結果を、出力部13を介して端末装置20へ出力し(ステップS406)、全体の処理は終了する。 If the situation in step S404 does not apply (No in step S405), the entire process ends. If the situation in step S404 applies (Yes in step S405), the analysis unit 14 outputs an analysis result indicating that a deadlock has occurred between AP threads 100-j and 100-l and lock target resources 103-i and 103-k to the terminal device 20 via the output unit 13 (step S406), and the entire process ends.
本実施形態に係るデッドロック解析支援装置10は、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供することができる。その理由は、デッドロック解析支援装置10は、APスレッド100が使用するロック対象資源103に対するロックの状態を表すロック状態テーブル111を管理し、ロック状態テーブル111がデッドロックの発生の可能性を示す検出基準120を満たす場合に、ロック状態テーブル111のデータを出力するからである。 The deadlock analysis support device 10 according to this embodiment can efficiently provide information that accurately supports the user in analyzing the causes of deadlocks. This is because the deadlock analysis support device 10 manages a lock status table 111 that indicates the lock status of the lock target resources 103 used by the AP thread 100, and outputs data from the lock status table 111 when the lock status table 111 satisfies detection criteria 120 that indicate the possibility of a deadlock occurring.
以下に、本実施形態に係るデッドロック解析支援装置10によって実現される効果について、詳細に説明する。 The following provides a detailed explanation of the effects achieved by the deadlock analysis support device 10 according to this embodiment.
通常、デッドロックの発生要因の解析のためにシステムのログが採取される。この場合においてログの採取ポイントが少ない場合、デッドロックの発生に関わる被疑箇所の特定が困難になる。またログの採取ポイントが多い場合、特に大規模なシステムでは採取するログの量が膨大になるので、ログの採取時間が長くなることによるシステムの運用への影響が大きくなるとともに、膨大なログを解析することによるユーザへの負担も大きくなる。したがって、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供することが課題である。 System logs are typically collected to analyze the causes of deadlocks. In this case, if there are few log collection points, it becomes difficult to identify suspected deadlock-related areas. Furthermore, if there are many log collection points, the amount of logs collected becomes enormous, especially in large-scale systems. This not only increases the impact on system operation due to the long log collection time, but also places a heavy burden on users due to the need to analyze the vast amount of logs. Therefore, the challenge is to efficiently provide information that accurately supports users in analyzing the causes of deadlocks.
このような課題に対して、本実施形態に係るデッドロック解析支援装置10は、管理部11と検出部12と出力部13とを備え、例えば図1乃至図7を参照して上述した通り動作する。即ち、管理部11は、情報処理装置において実行されるAPスレッド100の個々について、APスレッド100が使用するロック対象資源103に対するロックの状態を表すロック状態テーブル111を管理する。検出部12は、ロック状態テーブル111が表すロックの状態が、デッドロックの発生の可能性を示す所定の検出基準120を満たすことを検出する。そして、出力部13は、ロックの状態が検出基準120を満たす場合、ロック状態テーブル111が表す情報を出力する。 In response to these issues, the deadlock analysis support device 10 according to this embodiment includes a management unit 11, a detection unit 12, and an output unit 13, and operates as described above with reference to Figures 1 to 7, for example. That is, the management unit 11 manages a lock state table 111 that indicates the lock state of the lock target resource 103 used by each AP thread 100 executed in the information processing device. The detection unit 12 detects whether the lock state indicated by the lock state table 111 satisfies predetermined detection criteria 120, which indicate the possibility of a deadlock occurring. Then, the output unit 13 outputs the information indicated by the lock state table 111 when the lock state satisfies the detection criteria 120.
即ち、デッドロック解析支援装置10は、デッドロックの発生の可能性を検出した場合、デッドロックの発生とは関連性のない情報も含む一般的に採取されるようなログではなく、ロック状態テーブル111が表す情報を出力する。図2に例示するようなロック状態テーブル111は、デッドロックの発生と関連性のある情報のみを表し、ユーザはロック状態テーブル111が表す情報に基づいて、デッドロックの発生要因の的確な解析を効率的に行うことができる。したがって、デッドロック解析支援装置10は、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供することができる。 In other words, when the deadlock analysis support device 10 detects the possibility of a deadlock occurring, it outputs the information represented by the lock status table 111, rather than a commonly collected log that also includes information unrelated to the occurrence of a deadlock. The lock status table 111, as shown in the example of FIG. 2, represents only information related to the occurrence of a deadlock, allowing the user to accurately and efficiently analyze the causes of the deadlock based on the information represented by the lock status table 111. Therefore, the deadlock analysis support device 10 can efficiently provide information that accurately supports the user in analyzing the causes of the deadlock.
また、本実施形態に係るデッドロック解析支援装置10は、デッドロックの発生の可能性を検出した際に出力したロック状態テーブル111が表す情報を所定の解析基準140と照合することによって、ロックの状態を解析し、その解析結果を出力する解析部14を備える。これにより、ユーザは解析部14による解析結果もふまえてデッドロックの発生要因を解析することができる。したがって、デッドロック解析支援装置10は、ユーザによるデッドロックの発生要因の解析をより的確に支援することができる。 The deadlock analysis support device 10 according to this embodiment also includes an analysis unit 14 that analyzes the lock state by comparing the information represented by the lock state table 111 output when the possibility of a deadlock is detected with predetermined analysis criteria 140, and outputs the analysis results. This allows the user to analyze the cause of the deadlock based on the analysis results from the analysis unit 14. Therefore, the deadlock analysis support device 10 can more accurately support the user in analyzing the cause of the deadlock.
また、本実施形態に係る出力部13は、ロック状態テーブル111が表すロックの状態が検出基準120を満たさない場合であっても、ロック状態テーブル111が表す情報の出力を要求する情報がユーザによって入力された場合、ロック状態テーブル111が表す情報を出力するようにしてもよい。これによりデッドロック解析支援装置10は、アプリケーションプログラムの実行によって生成されるAPスレッド100が、ロック対象資源103のロックを確保あるいは開放する詳細な動作をユーザが解析することを的確に支援することができる。 Furthermore, the output unit 13 according to this embodiment may be configured to output the information represented by the lock state table 111 when the user inputs information requesting the output of the information represented by the lock state table 111, even if the lock state represented by the lock state table 111 does not satisfy the detection criteria 120. This allows the deadlock analysis support device 10 to accurately support the user in analyzing the detailed operations of the AP thread 100 generated by the execution of an application program to secure or release a lock on the lock target resource 103.
また、本実施形態に係るロック状態テーブル111は、「ロック要求回数」、「確保待ち累積時間」、「ロック確保累積時間」、「ラベル」というような項目を含む。これによりデッドロック解析支援装置10は、デッドロックの解析に加えて、ロックに起因する性能問題をユーザが解析することを支援することができる。 In addition, the lock status table 111 according to this embodiment includes items such as "number of lock requests," "accumulated wait time for locking," "accumulated lock acquisition time," and "label." This allows the deadlock analysis support device 10 to not only analyze deadlocks, but also assist users in analyzing performance problems caused by locks.
また、本実施形態に係るデッドロック解析支援装置10の構成は、既存のロック方式のラップ関数としてシステムに実装されてもよい。この場合、デッドロック解析支援装置10は、異なるロック種類、ロック対象資源の間で発生したデッドロックの解析を支援することができる。 The configuration of the deadlock analysis support device 10 according to this embodiment may also be implemented in a system as a wrap function for an existing locking method. In this case, the deadlock analysis support device 10 can support the analysis of deadlocks that occur between different lock types and locked resources.
<第2の実施形態>
図8は、本発明の第2の実施形態に係るデッドロック解析支援装置30の構成を示すブロック図である。
Second Embodiment
FIG. 8 is a block diagram showing the configuration of a deadlock analysis support device 30 according to the second embodiment of the present invention.
デッドロック解析支援装置30は、管理部31、検出部32、及び、出力部33を備える。管理部31、検出部32、出力部33は、順に、管理手段、検出手段、出力手段の一例である。 The deadlock analysis support device 30 includes a management unit 31, a detection unit 32, and an output unit 33. The management unit 31, the detection unit 32, and the output unit 33 are examples of a management means, a detection means, and an output means, respectively.
管理部31は、情報処理装置40において実行される単位情報処理401の個々について、単位情報処理401が使用するロック対象資源402に対するロックの状態を表すロック状態情報311を管理する。単位情報処理401は、例えば第1の実施形態に係るAPスレッド100のような情報処理の単位である。ロック対象資源402は、例えば第1の実施形態に係るロック対象資源103のような情報処理資源である。ロック状態情報311は、例えば第1の実施形態に係るロック状態テーブル111が表すような情報である。管理部31は、例えば第1の実施形態に係る管理部11と同様に動作する。 The management unit 31 manages lock state information 311 that indicates the lock state of the lock target resource 402 used by each unit information process 401 executed in the information processing device 40. The unit information process 401 is a unit of information processing, such as the AP thread 100 according to the first embodiment. The lock target resource 402 is an information processing resource, such as the lock target resource 103 according to the first embodiment. The lock state information 311 is information such as that represented by the lock state table 111 according to the first embodiment. The management unit 31 operates in the same manner as the management unit 11 according to the first embodiment, for example.
検出部32は、ロック状態情報311が表すロックの状態が、デッドロックの発生の可能性を示す所定の検出基準320を満たすことを検出する。検出基準320は、例えば第1の実施形態に係る検出基準120と同様な基準である。検出部32は、例えば第1の実施形態に係る検出部12と同様に動作する。 The detection unit 32 detects whether the lock state represented by the lock state information 311 satisfies a predetermined detection criterion 320, which indicates the possibility of a deadlock occurring. The detection criterion 320 is, for example, the same as the detection criterion 120 according to the first embodiment. The detection unit 32 operates in the same manner as the detection unit 12 according to the first embodiment, for example.
出力部33は、当該ロックの状態が検出基準320を満たす場合、ロック状態情報311を出力する。出力部33は、例えば第1の実施形態に係る出力部13と同様に動作する。 If the lock state satisfies the detection criteria 320, the output unit 33 outputs lock state information 311. The output unit 33 operates in the same manner as the output unit 13 according to the first embodiment, for example.
本実施形態に係るデッドロック解析支援装置30は、ユーザによるデッドロックの発生要因の解析を的確に支援する情報を効率的に提供することができる。その理由は、デッドロック解析支援装置30は、単位情報処理401が使用するロック対象資源402に対するロックの状態を表すロック状態情報311を管理し、ロック状態情報311がデッドロックの発生の可能性を示す検出基準320を満たす場合に、ロック状態情報311を出力するからである。 The deadlock analysis support device 30 according to this embodiment can efficiently provide information that accurately supports the user in analyzing the causes of deadlocks. This is because the deadlock analysis support device 30 manages lock state information 311 that indicates the lock state of the locked resources 402 used by the unit information process 401, and outputs the lock state information 311 when the lock state information 311 satisfies the detection criteria 320 that indicate the possibility of a deadlock occurring.
<ハードウェア構成例>
上述した各実施形態において図1、及び、図8に示したデッドロック解析支援装置における各部は、専用のHW(HardWare)(電子回路)によって実現することができる。また、図1、及び、図8において、少なくとも、下記構成は、プロセッサによって実行される命令を含むソフトウェアプログラムの機能(処理)単位(ソフトウェアモジュール)と捉えることができる。
・管理部11及び31、
・検出部12及び32、
・出力部13及び33、
・解析部14。
<Hardware configuration example>
In each of the above-described embodiments, each unit in the deadlock analysis support device shown in Figures 1 and 8 can be realized by dedicated HW (Hardware) (electronic circuitry). In Figures 1 and 8, at least the following components can be considered as functional (processing) units (software modules) of a software program that includes instructions executed by a processor.
Management units 11 and 31,
detection units 12 and 32,
Output units 13 and 33,
- Analysis section 14.
但し、これらの図面に示した各部の区分けは、説明の便宜上の構成であり、実装に際しては、様々な構成が想定され得る。この場合のハードウェア環境の一例を、図9を参照して説明する。 However, the division of each component shown in these drawings is for the sake of convenience, and various configurations are possible when implementing the system. An example of the hardware environment in this case will be explained with reference to Figure 9.
図9は、本発明の各実施形態に係るデッドロック解析支援装置を実現可能な情報処理装置900(コンピュータ)の構成を例示的に説明する図である。即ち、図9は、図1、及び、図8に示したデッドロック解析支援装置を実現可能なコンピュータ(情報処理装置)の構成であって、上述した実施形態における各機能を実現可能なハードウェア環境を表す。 Figure 9 is a diagram illustrating an exemplary configuration of an information processing device 900 (computer) capable of realizing the deadlock analysis support device according to each embodiment of the present invention. That is, Figure 9 shows the configuration of a computer (information processing device) capable of realizing the deadlock analysis support device shown in Figures 1 and 8, and represents a hardware environment capable of realizing each function in the above-described embodiments.
図9に示した情報処理装置900は、構成要素として下記を備えている。
・CPU(Central_Processing_Unit)901、
・ROM(Read_Only_Memory)902、
・RAM(Random_Access_Memory)903、
・ハードディスク(記憶装置)904、
・通信インタフェース905、
・バス906(通信線)、
・CD-ROM(Compact_Disc_Read_Only_Memory)等の記録媒体907に格納されたデータを読み書き可能なリーダライタ908、
・モニターやスピーカ、キーボード等の入出力インタフェース909。
The information processing device 900 shown in FIG. 9 includes the following components.
・CPU (Central_Processing_Unit) 901,
・ROM (Read_Only_Memory) 902,
・RAM (Random_Access_Memory) 903,
Hard disk (storage device) 904,
communication interface 905,
Bus 906 (communication line),
A reader/writer 908 capable of reading and writing data stored on a recording medium 907 such as a CD-ROM (Compact Disc Read Only Memory),
Input/output interface 909 including a monitor, speaker, keyboard, etc.
即ち、上記構成要素を備える情報処理装置900は、これらの構成がバス906を介して接続された一般的なコンピュータである。情報処理装置900は、CPU901を複数備える場合もあれば、マルチコアにより構成されたCPU901を備える場合もある。 In other words, the information processing device 900 having the above components is a general computer in which these components are connected via a bus 906. The information processing device 900 may have multiple CPUs 901, or may have a CPU 901 configured with multiple cores.
そして、上述した実施形態は、図9に示した情報処理装置900に対して、次の機能を実現可能なコンピュータプログラムを供給してもよい。例えば、その機能とは、その実施形態の説明において参照したブロック構成図(図1及び図8)における上述した構成、或いはフローチャート(図3及び図4、図6A乃至図7)の機能である。上述した実施形態に係るサーバあるいは情報処理装置の機能は、その後、そのコンピュータプログラムを、当該ハードウェアのCPU901に読み出して解釈し実行することによって達成される。また、当該装置内に供給されたコンピュータプログラムは、読み書き可能な揮発性のメモリ(RAM903)、または、ROM902やハードディスク904等の不揮発性の記憶デバイスに格納すれば良い。 The above-described embodiment may also supply a computer program capable of realizing the following functions to the information processing device 900 shown in FIG. 9. For example, the functions are the above-described configurations in the block diagrams (FIGS. 1 and 8) or flowcharts (FIGS. 3, 4, 6A to 7) referred to in the description of the embodiment. The functions of the server or information processing device according to the above-described embodiment are then achieved by reading, interpreting, and executing the computer program into the CPU 901 of the hardware. The computer program supplied to the device may be stored in readable and writable volatile memory (RAM 903) or a non-volatile storage device such as ROM 902 or hard disk 904.
また、前記の場合において、当該ハードウェア内へのコンピュータプログラムの供給方法は、現在では一般的な手順を採用することができる。その手順としては、例えば、CD-ROM等の各種記録媒体907を介して当該装置内にインストールする方法や、インターネット等の通信回線を介して外部よりダウンロードする方法等がある。そして、このような場合において、本実施形態に係る情報処理装置に供給されるコンピュータプログラムは、そのプログラムを構成するコード或いは、そのコードが格納された記録媒体907によって構成されると捉えることができる。 Furthermore, in the above case, the method for supplying the computer program to the hardware can employ currently common procedures. Examples of such procedures include installing the program into the device via a recording medium 907 such as a CD-ROM, or downloading it from an external source via a communications line such as the Internet. In such cases, the computer program supplied to the information processing device according to this embodiment can be considered to be composed of the code that constitutes the program, or the recording medium 907 on which that code is stored.
以上、上述した実施形態を模範的な例として本発明を説明した。しかしながら、本発明は、上述した実施形態には限定されない。即ち、本発明は、本発明のスコープ内において、当業者が理解し得る様々な態様を適用することができる。 The present invention has been described above using the above-described embodiment as an exemplary example. However, the present invention is not limited to the above-described embodiment. In other words, the present invention can be applied in various aspects that are understandable to those skilled in the art within the scope of the present invention.
10 デッドロック解析支援装置
100 APスレッド
101 ロック取得部
102 ロック解放部
103 ロック対象資源
11 管理部
111 ロック状態テーブル
112 ロック状態参照テーブル
12 検出部
120 検出基準
13 出力部
14 解析部
140 解析基準
20 端末装置
30 デッドロック解析支援装置
31 管理部
311 ロック状態情報
32 検出部
320 検出基準
33 出力部
40 情報処理装置
401 単位情報処理
402 ロック対象資源
900 情報処理装置
901 CPU
902 ROM
903 RAM
904 ハードディスク(記憶装置)
905 通信インタフェース
906 バス
907 記録媒体
908 リーダライタ
909 入出力インタフェース
REFERENCE SIGNS LIST 10 Deadlock analysis support device 100 AP thread 101 Lock acquisition unit 102 Lock release unit 103 Lock target resource 11 Management unit 111 Lock state table 112 Lock state reference table 12 Detection unit 120 Detection criteria 13 Output unit 14 Analysis unit 140 Analysis criteria 20 Terminal device 30 Deadlock analysis support device 31 Management unit 311 Lock state information 32 Detection unit 320 Detection criteria 33 Output unit 40 Information processing device 401 Unit information processing 402 Lock target resource 900 Information processing device 901 CPU
902 ROM
903 RAM
904 Hard disk (storage device)
905 Communication interface 906 Bus 907 Recording medium 908 Reader/writer 909 Input/output interface
Claims (8)
前記ロック状態情報が表す前記ロックの状態が、デッドロックの発生の可能性を示す所定の検出基準を満たすことを検出する検出手段と、
前記ロックの状態が前記所定の検出基準を満たす場合、前記ロック状態情報を出力する出力手段と、
前記出力手段から出力された前記ロック状態情報を所定の解析基準と照合することによって、前記ロックの状態を解析し、その解析結果を出力する解析手段と、
を備え、
前記ロック状態情報は、
前記ロックを確保済みであるのか、あるいは確保待ちであるのか、あるいは要求していないのかを表す情報と、前記ロックを要求した時刻と、前記ロックを確保した時刻と、前記ロックを解放した時刻と、を含み、
前記ロックを要求した累積回数と、過去に行われた1以上の前記ロックに関して前記ロックを要求してから確保するまでに要した累積時間と、過去に行われた1以上の前記ロックに関して前記ロックを確保してから解放するまでに要した累積時間と、前記単位情報処理を生成したプログラムにおける前記ロックを指示した部分を示す情報と、の少なくともいずれかを含む場合がある、
デッドロック解析支援装置。 a management means for managing lock state information representing a lock state for a lock target resource used by each unit information process executed in the information processing device;
a detection means for detecting whether the lock state represented by the lock state information satisfies a predetermined detection criterion indicating the possibility of a deadlock occurring;
an output means for outputting the lock state information when the lock state satisfies the predetermined detection criterion;
analysis means for analyzing the lock state by comparing the lock state information output from the output means with a predetermined analysis standard and outputting the analysis result;
Equipped with
The lock state information is
The lock information includes information indicating whether the lock has been secured, is waiting to be secured, or has not been requested, the time at which the lock was requested, the time at which the lock was secured, and the time at which the lock was released,
The information may include at least one of the cumulative number of times the lock was requested, the cumulative time required from requesting the lock to securing the lock for one or more locks that were previously performed, the cumulative time required from securing the lock to releasing the lock for one or more locks that were previously performed, and information indicating a part of the program that generated the unit information processing that instructed the lock.
Deadlock analysis support device.
請求項1に記載のデッドロック解析支援装置。 the output means outputs the lock state information when information requesting output of the lock state information is input, even if the lock state does not satisfy the predetermined detection criterion.
The deadlock analysis support device according to claim 1 .
請求項1または2に記載のデッドロック解析支援装置。 The predetermined detection criterion is that a deadlock may have occurred when the lock status information indicates that the lock is waiting to be secured for at least one of the unit information processes and the lock target resource, and the difference between the current time and the time when the lock was requested is equal to or greater than a threshold value.
3. The deadlock analysis support device according to claim 1 .
請求項1乃至請求項3のいずれか一項に記載のデッドロック解析支援装置。 The predetermined analysis criterion is that, when the lock state information indicates that at least one of the unit information processes has requested a new lock on the lock target resource before releasing the lock on the lock target resource for which the lock has already been secured, this indicates that a multiple lock has occurred on the lock target resource by the unit information process.
The deadlock analysis support device according to any one of claims 1 to 3 .
請求項1乃至請求項4のいずれか一項に記載のデッドロック解析支援装置。 The predetermined analysis criterion indicates that a deadlock has occurred between the first and second unit information processes and the first and second lock target resources when the lock state information indicates that a first unit information process that has secured the lock on the first lock target resource is waiting to secure the lock on the second lock target resource, and that a second unit information process that has secured the lock on the second lock target resource is waiting to secure the lock on the first lock target resource.
The deadlock analysis support device according to any one of claims 1 to 4 .
前記検出手段は、前記ロック状態情報と前記ロック状態参照情報との間で前記ロックを確保した時刻が一致する場合に、前記ロックの状態が前記所定の検出基準を満たすことを検出し、前記ロックの状態が前記所定の検出基準を満たすことを検出したのち、前記ロック状態情報と前記ロック状態参照情報との間で前記ロックを確保した時刻が一致しなくなるまで、前記ロックの状態が前記所定の検出基準を満たすことの検出を停止する、
請求項1乃至請求項5のいずれか一項に記載のデッドロック解析支援装置。 the management means manages lock state reference information indicating the time at which the lock indicated by the lock state information was secured the last time the detection means referred to the lock state information, and
the detection means detects that the lock state satisfies the predetermined detection criterion when the times at which the lock was secured match between the lock state information and the lock state reference information, and after detecting that the lock state satisfies the predetermined detection criterion, stops detecting that the lock state satisfies the predetermined detection criterion until the times at which the lock was secured no longer match between the lock state information and the lock state reference information.
The deadlock analysis support device according to any one of claims 1 to 5 .
前記情報処理装置において実行される単位情報処理の個々について、前記単位情報処理が使用するロック対象資源に対するロックの状態を表すロック状態情報を管理し、
前記ロック状態情報が表す前記ロックの状態が、デッドロックの発生の可能性を示す所定の検出基準を満たすことを検出し、
前記ロックの状態が前記所定の検出基準を満たす場合、前記ロック状態情報を出力し、
出力された前記ロック状態情報を所定の解析基準と照合することによって、前記ロックの状態を解析し、その解析結果を出力し、
前記ロック状態情報は、
前記ロックを確保済みであるのか、あるいは確保待ちであるのか、あるいは要求していないのかを表す情報と、前記ロックを要求した時刻と、前記ロックを確保した時刻と、前記ロックを解放した時刻と、を含み、
前記ロックを要求した累積回数と、過去に行われた1以上の前記ロックに関して前記ロックを要求してから確保するまでに要した累積時間と、過去に行われた1以上の前記ロックに関して前記ロックを確保してから解放するまでに要した累積時間と、前記単位情報処理を生成したプログラムにおける前記ロックを指示した部分を示す情報と、の少なくともいずれかを含む場合がある、
デッドロック解析支援方法。 By the information processing device,
managing lock state information representing a lock state for a lock target resource used by each unit information process executed in the information processing device;
detecting that the state of the lock represented by the lock state information satisfies a predetermined detection criterion indicating the possibility of a deadlock occurring;
If the lock state satisfies the predetermined detection criterion, output the lock state information;
Analyzing the lock status by comparing the output lock status information with a predetermined analysis standard and outputting the analysis result;
The lock state information is
The lock information includes information indicating whether the lock has been secured, is waiting to be secured, or has not been requested, the time at which the lock was requested, the time at which the lock was secured, and the time at which the lock was released,
The information may include at least one of the cumulative number of times the lock was requested, the cumulative time required from requesting the lock to securing the lock for one or more locks that were previously performed, the cumulative time required from securing the lock to releasing the lock for one or more locks that were previously performed, and information indicating a part of the program that generated the unit information processing that instructed the lock.
A method for supporting deadlock analysis.
前記ロック状態情報が表す前記ロックの状態が、デッドロックの発生の可能性を示す所定の検出基準を満たすことを検出する検出処理と、
前記ロックの状態が前記所定の検出基準を満たす場合、前記ロック状態情報を出力する出力処理と、
出力された前記ロック状態情報を所定の解析基準と照合することによって、前記ロックの状態を解析し、その解析結果を出力する解析処理と、
を前記情報処理装置に実行させ、
前記ロック状態情報は、
前記ロックを確保済みであるのか、あるいは確保待ちであるのか、あるいは要求していないのかを表す情報と、前記ロックを要求した時刻と、前記ロックを確保した時刻と、前記ロックを解放した時刻と、を含み、
前記ロックを要求した累積回数と、過去に行われた1以上の前記ロックに関して前記ロックを要求してから確保するまでに要した累積時間と、過去に行われた1以上の前記ロックに関して前記ロックを確保してから解放するまでに要した累積時間と、前記単位情報処理を生成したプログラムにおける前記ロックを指示した部分を示す情報と、の少なくともいずれかを含む場合がある、
デッドロック解析支援プログラム。 a management process for managing lock state information representing a lock state for a lock target resource used by each unit information process executed in the information processing device;
a detection process for detecting whether the lock state represented by the lock state information satisfies a predetermined detection criterion indicating the possibility of a deadlock occurring;
an output process for outputting the lock state information when the lock state satisfies the predetermined detection criterion;
an analysis process for analyzing the lock status by comparing the output lock status information with predetermined analysis criteria and outputting the analysis result;
causing the information processing device to execute the above ;
The lock state information is
The lock information includes information indicating whether the lock has been secured, is waiting to be secured, or has not been requested, the time at which the lock was requested, the time at which the lock was secured, and the time at which the lock was released,
The information may include at least one of the cumulative number of times the lock was requested, the cumulative time required from requesting the lock to securing the lock for one or more locks that were previously performed, the cumulative time required from securing the lock to releasing the lock for one or more locks that were previously performed, and information indicating a part of the program that generated the unit information processing that instructed the lock.
A deadlock analysis support program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021131987A JP7757657B2 (en) | 2021-08-13 | 2021-08-13 | Deadlock analysis support device, deadlock analysis support method, and deadlock analysis support program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021131987A JP7757657B2 (en) | 2021-08-13 | 2021-08-13 | Deadlock analysis support device, deadlock analysis support method, and deadlock analysis support program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023026210A JP2023026210A (en) | 2023-02-24 |
| JP7757657B2 true JP7757657B2 (en) | 2025-10-22 |
Family
ID=85252360
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021131987A Active JP7757657B2 (en) | 2021-08-13 | 2021-08-13 | Deadlock analysis support device, deadlock analysis support method, and deadlock analysis support program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7757657B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004341878A (en) | 2003-05-16 | 2004-12-02 | Toshiba Corp | Real-time OS and deadlock detection method |
| WO2012114516A1 (en) | 2011-02-25 | 2012-08-30 | 富士通株式会社 | Lock control device, lock control program and lock control method |
| JP2013117852A (en) | 2011-12-02 | 2013-06-13 | Internatl Business Mach Corp <Ibm> | Device and method for acquiring lock of resource |
| JP2015075871A (en) | 2013-10-08 | 2015-04-20 | 株式会社リコー | Exclusive control program, information processing apparatus, and exclusive control method |
-
2021
- 2021-08-13 JP JP2021131987A patent/JP7757657B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004341878A (en) | 2003-05-16 | 2004-12-02 | Toshiba Corp | Real-time OS and deadlock detection method |
| WO2012114516A1 (en) | 2011-02-25 | 2012-08-30 | 富士通株式会社 | Lock control device, lock control program and lock control method |
| JP2013117852A (en) | 2011-12-02 | 2013-06-13 | Internatl Business Mach Corp <Ibm> | Device and method for acquiring lock of resource |
| JP2015075871A (en) | 2013-10-08 | 2015-04-20 | 株式会社リコー | Exclusive control program, information processing apparatus, and exclusive control method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023026210A (en) | 2023-02-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7908521B2 (en) | Process reflection | |
| JP6499986B2 (en) | Fault tolerant batch processing | |
| US9477576B2 (en) | Using application state data and additional code to resolve deadlocks | |
| US8661450B2 (en) | Deadlock detection for parallel programs | |
| US6502122B1 (en) | Method and apparatus for executing transaction programs in parallel | |
| US8918776B2 (en) | Self-adapting software system | |
| US9411661B2 (en) | Deadlock avoidance | |
| US20100186013A1 (en) | Controlling Access to a Shared Resource in a Computer System | |
| US20140130065A1 (en) | Method and Device for Obtaining Using-Frequency of Application Program | |
| US9009537B2 (en) | Diagnostic data capture in a computing environment | |
| CN113703831A (en) | Method, device, equipment and medium for realizing service idempotency | |
| JP2009251871A (en) | Contention analysis device, contention analysis method, and program | |
| JP7757657B2 (en) | Deadlock analysis support device, deadlock analysis support method, and deadlock analysis support program | |
| US8392469B2 (en) | Model based distributed application management | |
| US6487580B1 (en) | Method and system for managing concurrently executable computer processes | |
| US8145903B2 (en) | Method and system for a kernel lock validator | |
| CN112199391A (en) | Data locking detection method and device and computer readable storage medium | |
| US9619306B2 (en) | Information processing device, control method thereof, and recording medium | |
| US20230229582A1 (en) | Information processing apparatus, processing method for information processing apparatus, and storage medium | |
| CN120020712A (en) | A plug-in configuration method, device, equipment and storage medium | |
| CN121326738A (en) | Computing resource allocation methods, devices, electronic equipment, media and program products | |
| JP6369333B2 (en) | Software installation determination program, software installation determination method, and software installation determination device | |
| CN120994415A (en) | Thread pool deadlock detection methods, devices, computer equipment, and storage media | |
| JP2023039164A (en) | Information processing execution control apparatus, information processing execution control method, and information processing execution control program | |
| CN121597308A (en) | Component loading method, device, electronic equipment, medium and program product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20211112 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240712 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20250203 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250217 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250411 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250603 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250711 |
|
| 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: 20250909 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250922 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7757657 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |