JP2009251871A - Contention analysis device, contention analysis method, and program - Google Patents

Contention analysis device, contention analysis method, and program Download PDF

Info

Publication number
JP2009251871A
JP2009251871A JP2008098145A JP2008098145A JP2009251871A JP 2009251871 A JP2009251871 A JP 2009251871A JP 2008098145 A JP2008098145 A JP 2008098145A JP 2008098145 A JP2008098145 A JP 2008098145A JP 2009251871 A JP2009251871 A JP 2009251871A
Authority
JP
Japan
Prior art keywords
access right
access
shared resource
analysis
right acquisition
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
JP2008098145A
Other languages
Japanese (ja)
Inventor
Takeshi Miyata
剛 宮田
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 JP2008098145A priority Critical patent/JP2009251871A/en
Priority to PCT/JP2009/057034 priority patent/WO2009123343A1/en
Publication of JP2009251871A publication Critical patent/JP2009251871A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a contention analysis device, a contention analysis method, and a program, which are suitable for analyzing whether the state of access contention for a shared resource is normal or not. <P>SOLUTION: Control units 110A-110N execute an analysis target program including an instruction for exclusively making access to a shared resource. Meanwhile, the control unit 110X acquires an access right (lock) for the shared resource accessed by the analysis target program, and measures a lock acquisition required time required for acquiring the lock. Further, the control unit 110X stores nearest preceding lock acquisition required time by a predetermined number, and on the basis of the stored lock acquisition required time, calculates an allowable range for allowing as the lock acquisition required time. If a latest lock acquisition required time is within the allowable range, the control unit 110X analyzes the state of access contention for a shared resource as being normal. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

共有資源に対するアクセス競合の状態が正常か否かを分析するのに好適な競合分析装置、競合分析方法、およびプログラム   A contention analysis apparatus, contention analysis method, and program suitable for analyzing whether the state of access contention for a shared resource is normal or not

メモリやファイルなどの資源を共有して、データ処理を行うマルチタスクシステムや、マルチプロセッサシステムが知られている。マルチタスクシステムでは、複数のタスク(プロセスおよび、同一プロセス内で実行されるスレッドを含む)が時間分割で1つのCPU(Central Processing Unit)で処理されるよう制御され、マルチプロセッサシステムでは、複数のプロセスが複数のCPU(プロセッサ)に分散して並列に実行されるよう制御される。CPUのそれぞれが、マルチタスクシステムとして動作するマルチプロセッサシステムも知られている。   Multitask systems and multiprocessor systems that perform data processing by sharing resources such as memory and files are known. In a multitask system, a plurality of tasks (including processes and threads executed in the same process) are controlled to be processed by one CPU (Central Processing Unit) in a time division manner. The process is controlled so as to be distributed to a plurality of CPUs (processors) and executed in parallel. A multiprocessor system in which each of the CPUs operates as a multitask system is also known.

いずれの場合も、プロセス(プロセスに替えてスレッドについても同様であるが、理解を容易にするために、ここではプロセスについて説明する)は、共有資源のクリティカルセクション(即ち、1つの共有資源に対して複数の処理が同時に行われると、整合性が保てない部分)にアクセスする際に、ロック、即ち、排他的なアクセス権を獲得して、他のプロセスがアクセスするのを防ぐ必要がある。共有資源へのアクセスを終了すると、プロセスはロックを開放して、アクセス権を他のプロセスに譲る。   In either case, the process (similar to threads instead of processes, but for ease of understanding, here we will describe the process) is a critical section of shared resources (ie, for one shared resource). When multiple processes are performed at the same time, it is necessary to acquire a lock, that is, an exclusive access right to prevent access by other processes when accessing a portion that cannot maintain consistency. . When the access to the shared resource is completed, the process releases the lock and transfers the access right to another process.

しかしながら、ロックの獲得に対して激しい競合が生じた場合、他のプロセスがロックの解放を待つ時間の割合が増え、処理効率が下がる。このため、共有資源のアクセスをより効率よく行うために、排他制御区間の命令の実行に要する時間を求める技術が提案されている。このような技術は、例えば、以下の文献に開示されている。
特開平5−66972号公報
However, when intense contention for lock acquisition occurs, the percentage of time that other processes wait for lock release increases, and processing efficiency decreases. For this reason, in order to access shared resources more efficiently, a technique for obtaining the time required to execute an instruction in the exclusive control section has been proposed. Such a technique is disclosed in the following documents, for example.
Japanese Patent Laid-Open No. 5-66972

特許文献1に開示の技術では、トレースファイル、即ち、動作プログラムにおいて実行された命令の情報を記憶するファイルを解析して排他制御区間を抽出し、当該排他制御区間の平均命令実行時間を計算する。   In the technique disclosed in Patent Document 1, a trace file, that is, a file storing information of instructions executed in an operation program is analyzed to extract an exclusive control section, and an average instruction execution time of the exclusive control section is calculated. .

しかし、共有資源へのアクセスのタイミングは、実行時の環境に応じてその都度変化するため、特許文献1のように一度プログラムを実行して取得したトレースファイルを用いるだけでは、共有資源の厳しい競合状態や、2つ以上のタスクが互いに相手の占有している資源の解放を待ってしまう状況(即ち、デッドロック)等の異常を必ずしも検出できない。   However, since the timing of access to the shared resource changes each time depending on the environment at the time of execution, just using the trace file obtained by executing the program once as in Patent Document 1, severe competition of the shared resource It is not always possible to detect an abnormality such as a state or a situation in which two or more tasks are waiting for the release of resources occupied by each other (ie, deadlock).

また、記録した時間に基づいて、想定範囲内の競合が発生しているのか、あるいは、ロックの不正な残留状態やデッドロック状態などの異常な状態が発生しているのかを判定するためには、異常と判定するための判定基準を予め定めておく必要がある。しかし、ロックによって排他制御される資源の利用状況は一般に均一でなく、ゆえに、ロック獲得要求後、実際に獲得するために要する時間も均一ではない。このため、例えば、コンピュータ内の別なプロセスがCPUを多く使用したためにロック獲得に時間を要したケースについても、異常が発生していると誤判定してしまう可能性がある。   Also, based on the recorded time, in order to determine whether there is a conflict within the expected range, or whether an abnormal state such as an illegal lock remaining state or deadlock state has occurred. Therefore, it is necessary to determine a determination criterion for determining an abnormality. However, the usage status of resources exclusively controlled by locks is generally not uniform, and therefore the time required for actual acquisition after a lock acquisition request is not uniform. For this reason, for example, even in a case where it takes time to acquire the lock because another process in the computer uses many CPUs, there is a possibility that it is erroneously determined that an abnormality has occurred.

本発明は以上のような課題を解決するためのものであり、共有資源に対するアクセス競合の状態が正常か否かを分析するのに好適な競合分析装置、競合分析方法、およびプログラムを提供することを目的とする。   The present invention is to solve the above-described problems, and provides a contention analysis apparatus, contention analysis method, and program suitable for analyzing whether or not the state of access contention for a shared resource is normal. With the goal.

上記目的を達成するため、本発明の第1の観点に係る競合分析装置は、
共有資源に対するアクセス競合の状態が正常か否かを分析する競合分析装置であって、
前記共有資源へのアクセスを排他的に行う指示を含む分析対象プログラムに従って、当該共有資源へのアクセスを、それぞれが競合しながら排他的に実行する複数の実行部、
前記共有資源を排他的にアクセスするためのアクセス権を獲得するアクセス権獲得部、
前記アクセス権獲得部が、前記アクセス権の獲得に要した時間を計測する計測部、
前記計測されたアクセス権の獲得時間を、所定の件数蓄積する蓄積部、
前記蓄積された所定の件数のアクセス権獲得時間に基づいて、アクセス権獲得時間として許容する許容範囲を算出する算出部、
前記計測された最新のアクセス権獲得時間が前記許容範囲に含まれる場合、前記共有資源に対するアクセス競合の状態は正常であると分析し、当該計測された最新のアクセス権獲得時間が当該許容範囲に含まれない場合、当該共有資源へのアクセス競合の状態は異常であると分析する分析部、
を備える、
ことを特徴とする。
In order to achieve the above object, a competitive analysis apparatus according to the first aspect of the present invention provides:
A contention analysis device that analyzes whether or not the access contention status for a shared resource is normal,
A plurality of execution units that exclusively execute access to the shared resource while competing with each other according to an analysis target program including an instruction to exclusively access the shared resource;
An access right acquisition unit for acquiring an access right for exclusive access to the shared resource;
A measuring unit for measuring the time required for the access right acquisition unit to acquire the access right;
An accumulating unit for accumulating a predetermined number of acquisition times of the measured access right;
A calculation unit that calculates an allowable range allowed as the access right acquisition time based on the accumulated number of access right acquisition times stored;
When the measured latest access right acquisition time is included in the allowable range, it is analyzed that the state of access conflict for the shared resource is normal, and the measured latest access right acquisition time is within the allowable range. If not included, the analysis unit analyzes that the state of access conflict to the shared resource is abnormal,
Comprising
It is characterized by that.

また、本発明の他の観点に係る競合分析方法は、
共有資源に対するアクセス競合の状態が正常か否かを分析する競合分析方法であって、
前記共有資源へのアクセスを排他的に行う指示を含む分析対象プログラムに従って、当該共有資源へのアクセスを、競合しながら排他的に実行する実行ステップ、
前記共有資源を排他的にアクセスするためのアクセス権を獲得するアクセス権獲得ステップ、
前記アクセス権獲得ステップにおいて、前記アクセス権の獲得に要した時間を計測する計測ステップ、
前記計測されたアクセス権の獲得時間を、所定の件数蓄積する蓄積ステップ、
前記蓄積された所定の件数のアクセス権獲得時間に基づいて、アクセス権獲得時間として許容する許容範囲を算出する算出ステップ、
前記計測された最新のアクセス権獲得時間が前記許容範囲に含まれる場合、前記共有資源に対するアクセス競合の状態は正常であると分析し、当該計測された最新のアクセス権獲得時間が当該許容範囲に含まれない場合、当該共有資源へのアクセス競合の状態は異常であると分析する分析ステップ、
を備えることを特徴とする。
In addition, a competitive analysis method according to another aspect of the present invention includes:
A contention analysis method for analyzing whether the state of access contention for a shared resource is normal,
An execution step of executing exclusive access to the shared resource while competing according to the analysis target program including an instruction to exclusively access the shared resource;
An access right acquisition step of acquiring an access right for exclusive access to the shared resource;
In the access right acquisition step, a measurement step for measuring a time required to acquire the access right,
An accumulating step for accumulating a predetermined number of acquisition times of the measured access right;
A calculation step of calculating an allowable range allowed as the access right acquisition time based on the accumulated predetermined number of access right acquisition times;
When the measured latest access right acquisition time is included in the allowable range, it is analyzed that the state of access conflict for the shared resource is normal, and the measured latest access right acquisition time is within the allowable range. If not, an analysis step for analyzing that the state of contention for access to the shared resource is abnormal;
It is characterized by providing.

また、本発明の他の観点に係るプログラムは、
コンピュータを、
共有資源に対するアクセス競合の状態が正常か否かを分析する競合分析装置として機能させるプログラムであって、
コンピュータを、
前記共有資源へのアクセスを排他的に行う指示を含む分析対象プログラムに従って、当該共有資源へのアクセスを、それぞれが競合しながら排他的に実行する複数の実行部、
前記共有資源を排他的にアクセスするためのアクセス権を獲得するアクセス権獲得部、
前記アクセス権獲得部が、前記アクセス権の獲得に要した時間を計測する計測部、
前記計測されたアクセス権の獲得時間を、所定の件数蓄積する蓄積部、
前記蓄積された所定の件数のアクセス権獲得時間に基づいて、アクセス権獲得時間として許容する許容範囲を算出する算出部、
前記計測された最新のアクセス権獲得時間が前記許容範囲に含まれる場合、前記共有資源に対するアクセス競合の状態は正常であると分析し、当該計測された最新のアクセス権獲得時間が当該許容範囲に含まれない場合、当該共有資源へのアクセス競合の状態は異常であると分析する分析部、
として機能させることを特徴とする。
A program according to another aspect of the present invention is as follows:
Computer
A program that functions as a contention analysis device that analyzes whether the state of access contention for a shared resource is normal,
Computer
A plurality of execution units that exclusively execute access to the shared resource while competing with each other according to an analysis target program including an instruction to exclusively access the shared resource;
An access right acquisition unit for acquiring an access right for exclusive access to the shared resource;
A measuring unit for measuring the time required for the access right acquisition unit to acquire the access right;
An accumulating unit for accumulating a predetermined number of acquisition times of the measured access right;
A calculation unit that calculates an allowable range allowed as the access right acquisition time based on the accumulated number of access right acquisition times stored;
When the measured latest access right acquisition time is included in the allowable range, it is analyzed that the state of access conflict for the shared resource is normal, and the measured latest access right acquisition time is within the allowable range. If not included, the analysis unit analyzes that the state of access conflict to the shared resource is abnormal,
It is made to function as.

本発明によれば、共有資源に対するアクセス競合の状態が正常か否かを分析するのに好適な競合分析装置、競合分析方法、およびプログラムを提供することができる。   According to the present invention, it is possible to provide a contention analysis device, a contention analysis method, and a program suitable for analyzing whether or not the state of access contention for a shared resource is normal.

(実施形態)
以下、本実施の形態に係る競合分析装置100の概要構成について説明する。
(Embodiment)
Hereinafter, a schematic configuration of the competition analysis apparatus 100 according to the present embodiment will be described.

本実施の形態に係る競合分析装置100は、図1に示すように、複数の制御部110と、メインメモリ120と、を備えるマルチプロセッサシステムである。競合分析装置100は、複数の制御部110上で共有資源であるメインメモリへのアクセスを行うプログラムを実行した場合に、当該プログラムの実行によって生じる共有資源に対するアクセスの競合状態が、正常であるのか、あるいは異常であるのかを分析する。   The competition analysis apparatus 100 according to the present embodiment is a multiprocessor system including a plurality of control units 110 and a main memory 120 as shown in FIG. When the contention analysis apparatus 100 executes a program for accessing the main memory, which is a shared resource, on the plurality of control units 110, is the access contention state for the shared resource caused by the execution of the program normal? Or analyze whether it is abnormal.

複数の制御部110のそれぞれは、CPU(Central Processing Unit)111、キャッシュメモリ112等を備える。
ここで、キャッシュメモリ112は、後述するメインメモリ120よりも小容量ではあるが、高速に動作する揮発性メモリであり、メインメモリ120の記憶する情報のコピーを、メインメモリ120と整合性を取りつつ、適宜記憶して、CPU111がメインメモリ120へアクセスする回数を減らすことで種々の処理を高速に実行する。制御部110のそれぞれのCPU111は、キャッシュメモリ112に記憶されるプログラムに従って処理を行う。
Each of the plurality of control units 110 includes a CPU (Central Processing Unit) 111, a cache memory 112, and the like.
Here, the cache memory 112 is a volatile memory that operates at a high speed, although it has a smaller capacity than the main memory 120 described later, and a copy of the information stored in the main memory 120 is consistent with the main memory 120. However, various processes are executed at high speed by appropriately storing and reducing the number of times the CPU 111 accesses the main memory 120. Each CPU 111 of the control unit 110 performs processing according to a program stored in the cache memory 112.

メインメモリ120は、揮発性メモリにより構成され、複数の制御部110によって共有して利用される共有資源として機能する。   The main memory 120 is configured by a volatile memory, and functions as a shared resource that is shared and used by the plurality of control units 110.

なお、本実施の形態においては、制御部110A〜110N(Nは任意の個数を意味する)上で共有資源に対してアクセスを行う分析対象のプログラムを実行し、制御部110X上で、競合分析用アプリケーションを実行する。これにより、制御部110Xが当該分析対象プログラムの分析処理を行う。このとき、制御部110Xは,制御部110A〜110Nとは異なる制御部であることが好ましい。   In the present embodiment, an analysis target program that accesses a shared resource is executed on the control units 110A to 110N (N means an arbitrary number), and a competition analysis is performed on the control unit 110X. Run the application. Thereby, the control unit 110X performs an analysis process of the analysis target program. At this time, the control unit 110X is preferably a control unit different from the control units 110A to 110N.

したがって、本実施の形態においては、制御部110XのCPU111が、後述するアクセス権獲得部、算出部、分析部、として機能する。また、制御部110XのCPU111の備える、発振回路などから構成されるクロック(図示せず)は、後述の計測部として機能する。制御部110Xのキャッシュメモリ112は、競合分析用アプリケーションを記憶する他、後述の蓄積部として機能する。   Therefore, in the present embodiment, the CPU 111 of the control unit 110X functions as an access right acquisition unit, a calculation unit, and an analysis unit, which will be described later. Further, a clock (not shown) configured by an oscillation circuit or the like included in the CPU 111 of the control unit 110X functions as a measurement unit described later. The cache memory 112 of the control unit 110X functions as a storage unit described later in addition to storing the competition analysis application.

ここで、蓄積部は、図2に示すように、分析対象プログラムで定義される、共有資源のそれぞれに用意されるアクセス権毎に、当該アクセス権の獲得処理を開始した時刻(開始時刻)、獲得処理が成功した時刻(終了時刻)、獲得処理に要した時間(ロック獲得所要時間:終了時刻−開始時刻)を最新のM件分(M:所定の整数)記憶する構成を有している。なお、本実施の形態においては、以降排他的なアクセス権をロックと呼ぶ。   Here, as shown in FIG. 2, the storage unit starts the access right acquisition process (start time) for each access right defined for each shared resource defined in the analysis target program, It has a configuration for storing the time (end time) at which the acquisition process was successful and the time required for the acquisition process (lock acquisition required time: end time-start time) for the latest M items (M: a predetermined integer). . In the present embodiment, the exclusive access right is hereinafter referred to as lock.

一方、分析対象プログラムを実行する制御部110A〜110Nのキャッシュメモリ112には、分析対象プログラムが記憶され、CPU111のそれぞれは、当該分析対象プログラムを実行することで実行部として機能する。ただし、実行部として機能する制御部やその数は、分析対象プログラムの内容によって変化する。   On the other hand, the analysis target program is stored in the cache memory 112 of the control units 110A to 110N that execute the analysis target program, and each of the CPUs 111 functions as an execution unit by executing the analysis target program. However, the control units that function as execution units and the number thereof change depending on the contents of the analysis target program.

(競合の分析処理)
上記のような構成を備える競合分析装置100の動作を図3を参照して説明する。このとき、制御部110Xでは競合分析用アプリケーションが、そして、制御部110A〜110Nでは分析対象プログラムがすでに起動されているものとして説明する。
(Competitive analysis process)
The operation of the conflict analysis apparatus 100 having the above configuration will be described with reference to FIG. At this time, it is assumed that the competition analysis application is already started in the control unit 110X, and the analysis target program is already started in the control units 110A to 110N.

まず、制御部110Xは、最後に競合の分析処理を開始した時刻(最終実行時刻と呼ぶ)を現在時刻として記憶する(ステップS201)。次に、現在時刻が最終実行時刻から所定の時間(例えば、T時間)が経過したか判定する(ステップS202)。T時間を経過していなければ、処理はステップS202に戻る。一方、T時間経過している場合(ステップS202;Y)、以降の処理を実行し、分析対象プログラムの分析処理を開始する。即ち、制御部110NはT時間毎に、分析対象プログラムの実行によりアクセスされる共有資源に対するロックのそれぞれについて、次に説明するステップS203〜S211を実行する。   First, the control unit 110X stores, as the current time, the time at which the contention analysis process was last started (referred to as the final execution time) (step S201). Next, it is determined whether a predetermined time (for example, T time) has elapsed from the last execution time (step S202). If the time T has not elapsed, the process returns to step S202. On the other hand, when T time has passed (step S202; Y), the subsequent processing is executed and analysis processing of the analysis target program is started. That is, the control unit 110N executes Steps S203 to S211 described below for each of the locks on the shared resource accessed by executing the analysis target program every T time.

まず、制御部110Xは、ロックの獲得処理を開始した時間(開始時刻)として、現在時刻を、蓄積部の対応する領域に記憶する(ステップS203)。次いで制御部110Xは当該ロックの獲得を実行する(ステップS204)。即ち、制御部110XのCPU111はアクセス権獲得部として機能する。   First, the control unit 110X stores the current time in the corresponding area of the storage unit as the time (start time) at which the lock acquisition process is started (step S203). Next, the control unit 110X acquires the lock (step S204). That is, the CPU 111 of the control unit 110X functions as an access right acquisition unit.

ここで、制御部110Xは、分析対象プログラムと同様の方法を用いてロックを獲得する。例えば、図4に示すソースプログラムを分析対象とした場合を例に示す。   Here, the control unit 110X acquires a lock using the same method as that of the analysis target program. For example, a case where the source program shown in FIG.

図4の分析対象プログラムを実行した場合、図5に示すように、初期化を担当するプロセスP0("-init"を指定して実行されるプロセス)と、それ以外のプロセスP1(引数の指定なしで実行されるプロセス)が、共有メモリ中に実現されるロックを獲得し、クリティカルセクションへのアクセス((A)に示す部分)を排他的に行う処理を繰り返す(図4、45行では1000回)。当該プログラムは、C言語で記述されており、システムV系のOS(Operating System)の提供するシステムコールを呼び出して動作する。   When the analysis target program shown in FIG. 4 is executed, as shown in FIG. 5, the process P0 in charge of initialization (process executed by specifying “-init”) and the other process P1 (designation of arguments) The process executed without the process acquires the lock realized in the shared memory, and repeats the process of exclusive access to the critical section (the part shown in (A)) (1000 in FIG. 4, line 45). Times). The program is written in C language, and operates by calling a system call provided by a system V OS (Operating System).

上記いずれのプロセスも、共有メモリの割り当てを行い(図4、21行)、割り当てられた共有メモリセグメントを、自プロセスのアドレス空間に割当てる(アタッチする)(図4、33行)。そして、アタッチしたメモリ空間中のロックに対して、獲得処理を行う(図4、46行)。ロックを獲得すると、クリティカルセクションへのアクセスを行い(図4、47行)、ロックを解放する(図4、48行)。
このほか、プロセスP0は、共有メモリの作成(図4、21行)やロックの初期化などの処理も行う(図4、40〜43行等)。
Any of the above processes allocates shared memory (FIG. 4, line 21), and allocates (attaches) the allocated shared memory segment to the address space of its own process (FIG. 4, line 33). Then, an acquisition process is performed for the lock in the attached memory space (FIG. 4, line 46). When the lock is acquired, the critical section is accessed (FIG. 4, line 47), and the lock is released (FIG. 4, line 48).
In addition, the process P0 also performs processing such as creation of shared memory (FIG. 4, line 21) and lock initialization (FIG. 4, lines 40 to 43, etc.).

制御部110Xも分析対象プログラムに記載の命令と同様の命令を発行して、ロック獲得処理を実行する。即ち、図4の例であれば、制御部110Xは、21行と同様に、パス名を"sample"、プロジェクトIDを'A'として、共有メモリを割り当て、33行と同様に共有メモリを自分のアドレス空間にアタッチし、46行と同様にロックを獲得する。   The control unit 110X also issues a command similar to the command described in the analysis target program and executes lock acquisition processing. That is, in the example of FIG. 4, the control unit 110X assigns a shared memory with the path name “sample” and the project ID “A” as in line 21, and allocates the shared memory as in line 33. To the address space and acquire the lock in the same manner as the 46th line.

ロックを獲得する命令は、分析対象プログラムに基づいて、例えば、所定のファイル(以降ロック属性ファイルと呼ぶ)に予め登録しておき、制御部110Xのキャッシュ112に読み込まれるように、メインメモリ120などに記憶しておく。図7(B)にロック属性ファイルの一例を示す。図7(B)に示すように、ロック属性ファイルには、ロック獲得のために必要な、一連の定義や処理を記載する。制御部110Xはロック属性ファイルに登録されている情報に基づいて、ロック獲得命令を発行するために必要な変数定義などを行い、T時間ごとに、ロック族定ファイルに登録されているロック獲得命令を実行する。   The instruction to acquire the lock is registered in advance in a predetermined file (hereinafter referred to as a lock attribute file) based on the analysis target program, and is read into the cache 112 of the control unit 110X. Remember it. FIG. 7B shows an example of the lock attribute file. As shown in FIG. 7B, the lock attribute file describes a series of definitions and processes necessary for acquiring the lock. Based on the information registered in the lock attribute file, the control unit 110X defines variables necessary for issuing a lock acquisition command, and lock acquisition commands registered in the lock family definition file every T time. Execute.

ロック獲得に成功すると、制御部110Xは、現在時刻を終了時刻とし、ロックの獲得に要したロック獲得所要時間を計測(即ち、ステップS203で記憶した開始時刻から、ロック獲得が終了した時刻までを計測)する(ステップS205)。即ち、制御部110XのCPU111は計測部として機能する。そして、終了時刻とロック獲得所要時間を蓄積部の対応する領域に記憶(ステップS206)し、直ちにロックを開放する(ステップS207)。ここで、ロック開放命令は、ロック獲得命令と同様にロック属性ファイルに登録されており、制御部110Xは、ロック属性ファイルからロック開放命令を読み出してロックを開放する。   When the lock acquisition is successful, the control unit 110X uses the current time as the end time, measures the lock acquisition time required for acquiring the lock (that is, from the start time stored in step S203 to the time when the lock acquisition ends). Measurement) (step S205). That is, the CPU 111 of the control unit 110X functions as a measurement unit. Then, the end time and the required lock acquisition time are stored in the corresponding areas of the storage unit (step S206), and the lock is immediately released (step S207). Here, the lock release command is registered in the lock attribute file in the same manner as the lock acquisition command, and the control unit 110X reads the lock release command from the lock attribute file and releases the lock.

なお、本実施の形態では、上記のようにシステムV系のシステムコールを呼び出してクリティカルセクションを排他的にアクセスするC言語で記載のプログラムを分析対象として説明したが、それ以外を分析対象としてもよい。即ち、C言語以外で記述されたプログラムであっても、あるいは、システムV系以外のシステムコールを用いたプログラムであっても、明示的に排他制御を行うプログラムであれば、本実施の形態に記載の方法でアクセス競合の状態を分析することが可能である。   In the present embodiment, the program described in C language that exclusively accesses the critical section by calling the system V system call as described above has been described as an analysis target. Good. That is, even if the program is written in a language other than the C language, or is a program using a system call other than the system V system, as long as the program explicitly performs exclusive control, It is possible to analyze the state of access contention in the manner described.

次いで、制御部110Xは、現在処理中のロックについて、直近の所定の数(例えば最新の値を除いた、M−1件)のロック獲得所要時間を蓄積部から取得し、これらM−1件のロック獲得所要時間に基づいて、ロック獲得所要時間としての通常値の範囲を算出する(ステップS208)。このように、制御部110XのCPU111は算出部として機能する。   Next, the control unit 110X obtains the latest predetermined number (for example, M-1 cases excluding the latest value) of locks currently being processed from the storage unit, and acquires these M-1 cases. Based on the required lock acquisition time, the normal value range as the lock acquisition required time is calculated (step S208). Thus, the CPU 111 of the control unit 110X functions as a calculation unit.

このとき、通常値としては、例えば、統計的に許容される範囲(例えば直近のM−1件のロック獲得所要時間について、平均値±標準偏差×2、等)を求める。なお、蓄積されたロック獲得所要時間が所定の件数に満たない場合は、所定の下限値と上限値を通常値の範囲として使用する。あるいは、所定の件数のロック獲得所要時間が蓄積するまで、ステップS208〜S211の処理を飛ばしてもよい。   At this time, as a normal value, for example, a statistically acceptable range (for example, an average value ± standard deviation × 2, etc. for the latest M-1 lock acquisition time periods) is obtained. When the accumulated lock acquisition time is less than the predetermined number, the predetermined lower limit value and the upper limit value are used as the normal value range. Alternatively, the processes in steps S208 to S211 may be skipped until a predetermined number of lock acquisition times are accumulated.

次いで、制御部110Xは、ステップS205で求めた、現在処理中のロックの最新のロック獲得所要時間が、ステップS208で求められた通常値の範囲内であるか否かを判定する(ステップS209)。範囲内であった場合(ステップS209;Y)、制御部110Xは、最新の1件のロック獲得所要時間が平均的なものであるとし、当該ロックの管理している共有資源への競合は正常な状態であると分析する(ステップS210)。一方、最新の1件のロック獲得所要時間が通常値の範囲外であった場合(ステップS209;N)、制御部110Xは、当該ロックの管理している共有資源への競合は異常な状態であると分析する(ステップS211)。このように制御部110XのCPU111は分析部として機能する。   Next, the control unit 110X determines whether or not the latest lock acquisition required time of the currently processed lock obtained in step S205 is within the normal value range obtained in step S208 (step S209). . If it is within the range (step S209; Y), the control unit 110X assumes that the time required for acquiring the latest one lock is average, and the contention for the shared resource managed by the lock is normal. Is analyzed (step S210). On the other hand, when the time required for acquiring the latest lock is out of the normal range (step S209; N), the control unit 110X indicates that the contention for the shared resource managed by the lock is abnormal. It is analyzed that there is (step S211). Thus, the CPU 111 of the control unit 110X functions as an analysis unit.

以上の処理が終了すると、処理はステップS201へと戻り、所定の時間Tが経過すると、再度上述のステップS203〜S211の処理を全ロックについて実行する。   When the above process is completed, the process returns to step S201, and when the predetermined time T has elapsed, the processes of steps S203 to S211 described above are performed again for all locks.

このように、本発明に係る実施の形態は、あるクリティカルセクションの競合状態を動的に分析し、固定的な判定基準を用いることなく、蓄積された過去のロック獲得所要時間から統計的にロック獲得処理に異常が生じているかを分析する。クリティカルセクションへのアクセス状況は均一でないため、固定基準を用いないことで、状況に応じて柔軟に異常を検出することが可能となる。   As described above, the embodiment according to the present invention dynamically analyzes the contention state of a certain critical section, and statistically locks from the accumulated past lock acquisition time without using a fixed criterion. Analyze whether there is an abnormality in the acquisition process. Since the access status to the critical section is not uniform, it is possible to detect an abnormality flexibly according to the status by not using a fixed reference.

また、本発明に係る実施の形態は、ロック変数のセット/リセットを不可分(アトミック)に行うようなロック機構だけでなく、例えば、排他制御管理用のデーモンプロセスが、ある特定の共有資源(クリティカルセクション)へのアクセスを一元管理するようなロック機構にも適用できる。例えば、共有資源へアクセスするためには、当該排他制御管理用デーモンのポート番号を指定して、ロック獲得要求を送信するようなロック機構がある場合、ロック属性ファイルには、当該デーモンのポート番号、引き渡すデータ構造とその値、成功時、あるいは失敗時に返却されるデータ構造とその値、等を対応付けて記憶するようにすればよい。そして、制御部110Xは当該ロック属性ファイルに登録されている内容に基づいて、ロックの獲得を実行すればよい。   In addition, the embodiment according to the present invention is not limited to a lock mechanism that performs atomic setting / reset of lock variables. For example, a daemon process for exclusive control management has a specific shared resource (critical It can also be applied to a locking mechanism that centrally manages access to (section). For example, in order to access a shared resource, if there is a lock mechanism that specifies the port number of the exclusive control management daemon and sends a lock acquisition request, the lock attribute file contains the port number of the daemon The data structure to be delivered and its value, the data structure returned upon success or failure, its value, etc. may be stored in association with each other. Then, the control unit 110X may execute acquisition of a lock based on the contents registered in the lock attribute file.

以上、本発明の実施の形態について説明したが、本発明は、上述した実施形態に限定されず、種々の変形および応用が可能である。また、上述した実施形態の各構成要素を自由に組み合わせることも可能である。   As mentioned above, although embodiment of this invention was described, this invention is not limited to embodiment mentioned above, A various deformation | transformation and application are possible. Moreover, it is also possible to freely combine the constituent elements of the above-described embodiments.

例えば、上記実施の形態において、競合の状態が正常であるか否かを判定した後に(ステップS210、S211)、分析結果を、ロック獲得所要時間、および通常値として算出された範囲とともに、ログファイルなどに出力するようにしてもよい。さらに、競合状態が異常であると分析した場合(ステップS211)は、ダイアログボックスなどを表示して、ログファイルに出力した情報と同様の情報をモニタなどを備える表示部(図示せず)に出力して、ユーザに通知してもよい。このとき、処理を中断するか否かをユーザが選択入力できるようにしてもよい。このように、制御部110XのCPU111は図6に示す出力部として機能するようにしてもよい。   For example, in the above embodiment, after determining whether or not the contention state is normal (steps S210 and S211), the analysis result is displayed in the log file along with the lock acquisition time and the range calculated as the normal value. Or the like. Furthermore, when analyzing that the race condition is abnormal (step S211), a dialog box or the like is displayed, and information similar to the information output to the log file is output to a display unit (not shown) including a monitor or the like. Then, the user may be notified. At this time, the user may be able to select and input whether or not to interrupt the process. As described above, the CPU 111 of the control unit 110X may function as the output unit illustrated in FIG.

また、上記実施の形態において、ステップS204で獲得中のロックがデッドロック状態にある場合、ステップS204は終了しない。これを避けるため、制御部110Xは、ステップS204を実行してから、現在時刻がステップS203で記録した開始時刻から所定の時間T2よりも長い時間が経過している場合に、ロック獲得処理を終了するようにしてもよい。   In the above embodiment, if the lock being acquired in step S204 is in a deadlock state, step S204 does not end. In order to avoid this, the control unit 110X ends the lock acquisition process when the current time has passed a predetermined time T2 from the start time recorded in step S203 after executing step S204. You may make it do.

即ち、例えば、制御部110Xは、定期的にロック獲得処理を中断して、現在時刻がステップS203で記録した開始時刻から所定の時間T2よりも長い時間が経過しているかを判定するようにして、所定の時間T2よりも長い時間が経過していれば、ロック獲得処理を終了するようにしてもよい。一方、所定の時間T2がまだ経過していない場合は、ロック獲得処理を再開すればよい。   That is, for example, the control unit 110X periodically interrupts the lock acquisition process, and determines whether the current time is longer than the predetermined time T2 from the start time recorded in step S203. If the time longer than the predetermined time T2 has elapsed, the lock acquisition process may be terminated. On the other hand, if the predetermined time T2 has not yet elapsed, the lock acquisition process may be resumed.

このように、ロックを獲得できずに所定の時間T2が経過した場合、デッドロックが生じているものと分析して、制御部110Xは、競合分析処理をステップS211へと進めればよい。また、直前のステップS203で記録した最新の開始時刻は以後利用しないため、削除すればよい。   As described above, when the predetermined time T2 has elapsed without being able to acquire the lock, it is analyzed that the deadlock has occurred, and the control unit 110X may advance the conflict analysis process to step S211. Further, since the latest start time recorded in the immediately preceding step S203 is not used thereafter, it may be deleted.

また、ロックを獲得できずに所定の時間T2が経過した場合、ログファイルへの分析結果を出力するときに、ロック獲得所要時間に替えて、デッドロックの可能性がある旨を出力してもよい。   In addition, when a predetermined time T2 has passed without acquiring a lock, when outputting the analysis result to the log file, it may be output that there is a possibility of deadlock instead of the lock acquisition required time. Good.

また、上記実施の形態では、制御部110Xが実行するロック獲得の命令は、分析対象プログラムに基づいて、ロック属性ファイル等に登録しておき、メインメモリ120等に記憶しておくものとした。そうではなく、図6に示すように、制御部110Xがアクセス権情報抽出部を備えるようにして、ロック属性ファイルを分析対象プログラムから自動的に抽出するようにしてもよい。   In the above embodiment, the lock acquisition command executed by the control unit 110X is registered in the lock attribute file or the like based on the analysis target program and stored in the main memory 120 or the like. Instead, as shown in FIG. 6, the control unit 110X may include an access right information extraction unit so that the lock attribute file is automatically extracted from the analysis target program.

例えば、プログラム内で呼び出される、ロックに関連するシステムコールについての基礎情報を予め所定のファイルに登録しておく(以降このファイルをロック基礎情報ファイルと呼ぶ)。アクセス権情報抽出部として機能する制御部110XのCPU 111は、分析対象プログラムに対して、当該ロック基礎情報ファイルを参照して、既存の構文解析手法、意味解析手法などを適用することでロック獲得に必要な一連の命令を抽出すればよい。   For example, basic information about a system call related to lock called in a program is registered in a predetermined file in advance (this file is hereinafter referred to as a lock basic information file). The CPU 111 of the control unit 110X functioning as the access right information extracting unit refers to the lock basic information file and applies the existing syntax analysis method, semantic analysis method, etc. to the analysis target program to acquire the lock. What is necessary is just to extract a series of instructions required for.

図4のプログラムを分析対象とした場合の、ロック基礎情報ファイルの例を、図7(A)に示す。ロック基礎情報ファイルには、例えば、プログラムの記述言語、OSのタイプ、ロック獲得命令、ロック解放命令、共有メモリの割当命令、共有メモリ空間のアタッチ命令、共有メモリのデタッチ命令、などの情報を記載する。   FIG. 7A shows an example of the lock basic information file when the program of FIG. 4 is the analysis target. In the lock basic information file, for example, information such as a program description language, an OS type, a lock acquisition instruction, a lock release instruction, a shared memory allocation instruction, a shared memory space attach instruction, and a shared memory detach instruction are described. To do.

制御部110Xは、ロック基礎情報ファイルに記載されたロック獲得命令を参照して、ソースファイルを分析することで、ソースファイルの46行目:"pthread_mutex_lock(&shmptr->mutex);" がロックを獲得している箇所であることを特定する。さらに、制御部110Xは、ロックの獲得に利用される構造体shmptrが7行目:"typedef struct shared_mem"で定義されていること、および、33行目:"shmat(shmid,0,0)"で、値を代入されていることを特定する。   The control unit 110X refers to the lock acquisition command described in the lock basic information file and analyzes the source file, so that the 46th line of the source file: “pthread_mutex_lock (& shmptr-> mutex);” acquires the lock. Identify the location that you are doing. Further, the control unit 110X determines that the structure shmptr used to acquire the lock is defined in the seventh line: “typedef struct shared_mem”, and the 33rd line: “shmat (shmid, 0,0)”. And specify that the value is assigned.

制御部110Xは、ロック基礎情報ファイルを参照して、"shmat"システムコールは、第1引数の指定する共有メモリ・セグメントを、コールしたプロセスのアドレス空間(即ちshmptrの指す空間)にアタッチすることを特定する。   The control unit 110X refers to the lock basic information file, and the “shmat” system call attaches the shared memory segment specified by the first argument to the address space of the calling process (ie, the space pointed to by shmptr). Is identified.

また、制御部110Xは、shmatシステムコールの第1引数である、int型変数、shmidが、21行目:"shmget(ftok("sample",'A'), sizeof(shared_mem) , IPC_CREAT)"で、値を代入されていることを特定する。制御部110Xはロック基礎情報ファイルを参照することにより、shmgetの第1引数である"ftok("sample",'A')"は、共有メモリのキーを生成すること、また、shmgetが、当該生成されたキーを指定して、共有メモリ・セグメントを割り当てることを特定する。   In addition, the control unit 110X has an int type variable, shmid, which is the first argument of the shmat system call, line 21: "shmget (ftok (" sample ", 'A'), sizeof (shared_mem), IPC_CREAT)" And specify that the value is assigned. The control unit 110X refers to the lock basic information file so that "ftok (" sample ", 'A')", which is the first argument of shmget, generates a shared memory key, and shmget Specify the generated key to specify that a shared memory segment is to be allocated.

このように制御部110Xは、ロック基礎情報ファイルに記載されているロック獲得命令をソースファイルから抽出し、ロック獲得命令の引数として利用される値をまず特定する。そして、当該引数として利用される値を得るために必要な処理を、順次ロック基礎情報ファイルを参照しながら取得する。以上のようにして取得した情報は、例えば、図7(B)に示すようなロック属性ファイルとして出力する。
なお、同様のシステムコールを用いるプログラムが分析対象であれば、ロック基礎情報ファイルを再利用することもできる。
As described above, the control unit 110X extracts the lock acquisition command described in the lock basic information file from the source file, and first specifies a value to be used as an argument of the lock acquisition command. Then, a process necessary for obtaining a value used as the argument is acquired while sequentially referring to the lock basic information file. The information acquired as described above is output, for example, as a lock attribute file as shown in FIG.
If a program that uses the same system call is an analysis target, the lock basic information file can be reused.

また、上記実施の形態では、競合分析装置100において、種々の動作プログラムがキャッシュメモリ等に予め記憶されているものとして説明した。しかし、上述の処理動作を実行させるためのプログラムを、フレキシブルディスク、CD−ROM(Compact Disk Read-Only Memory)、MO(Magneto-Optical disk)等のコンピュータ読み取り可能な記録媒体に格納して配布し、当該プログラムをコンピュータにインストールすることにより、上述の処理動作を実行をする装置を構成してもよい。   In the above embodiment, the competition analysis apparatus 100 has been described as having various operation programs stored in advance in a cache memory or the like. However, a program for executing the above processing operations is stored and distributed on a computer-readable recording medium such as a flexible disk, a CD-ROM (Compact Disk Read-Only Memory), and an MO (Magneto-Optical disk). A device that executes the above-described processing operation may be configured by installing the program in a computer.

また、コンピュータに通信インタフェース等を有する通信部を備えるようにしてもよい。そして、プログラムをインターネット等の通信ネットワーク上の所定のサーバ装置が有するディスク装置等に格納しておき、例えば、搬送波に重畳させて、通信部を介してコンピュータにダウンロード等するようにしてもよい。さらに、通信ネットワークを介してプログラムを転送しながら起動実行することによっても、上述の処理を達成することができる。   Further, the computer may include a communication unit having a communication interface or the like. The program may be stored in a disk device or the like included in a predetermined server device on a communication network such as the Internet, and may be superimposed on a carrier wave and downloaded to a computer via a communication unit. Furthermore, the above-described processing can also be achieved by starting and executing a program while transferring it via a communication network.

また、上述の機能を、OSが分担して実現する場合、又はOSとアプリケーションとの協働により実現する場合等には、OS以外の部分のみを媒体に格納して配布してもよく、また、コンピュータにダウンロード等してもよい。   In addition, when the functions described above are realized by sharing the OS, or when the functions are realized by cooperation between the OS and the application, only the part other than the OS may be stored in the medium and distributed. It may be downloaded to a computer.

また、上記実施の形態に係る競合分析装置100は、専用のハードウェアによっても実現することもできる。   Moreover, the competition analysis apparatus 100 according to the above embodiment can also be realized by dedicated hardware.

本実施の形態に係る競合分析装置の概要構成を示すブロック図である。It is a block diagram which shows schematic structure of the competition analyzer which concerns on this Embodiment. 本実施の形態に係る蓄積部の構成例を示す図である。It is a figure which shows the structural example of the storage part which concerns on this Embodiment. 本実施の形態に係る競合分析処理の例を示すフロー図である。It is a flowchart which shows the example of the competition analysis process which concerns on this Embodiment. 本実施の形態に係る分析対象プログラムの例を示す図である。It is a figure which shows the example of the analysis object program which concerns on this Embodiment. 図4のプログラムの動作を説明する図である。It is a figure explaining operation | movement of the program of FIG. 本実施の形態の変形例の1つを示す図である。It is a figure which shows one of the modifications of this Embodiment. (A)は本実施の形態の変形例の1つで利用するロック基礎情報ファイルの例を示す図であり、(B)はロック基礎情報ファイルを元に得られたロック属性ファイルの例を示す図である。(A) is a figure which shows the example of the lock basic information file utilized in one of the modifications of this Embodiment, (B) shows the example of the lock attribute file obtained based on the lock basic information file FIG.

符号の説明Explanation of symbols

100 競合分析装置
110 制御部
111 CPU
112 キャッシュメモリ
120 メインメモリ
100 competition analyzer 110 control unit 111 CPU
112 Cache memory 120 Main memory

Claims (6)

共有資源に対するアクセス競合の状態が正常か否かを分析する競合分析装置であって、
前記共有資源へのアクセスを排他的に行う指示を含む分析対象プログラムに従って、当該共有資源へのアクセスを、それぞれが競合しながら排他的に実行する複数の実行部、
前記共有資源を排他的にアクセスするためのアクセス権を獲得するアクセス権獲得部、
前記アクセス権獲得部が、前記アクセス権の獲得に要した時間を計測する計測部、
前記計測されたアクセス権の獲得時間を、所定の件数蓄積する蓄積部、
前記蓄積された所定の件数のアクセス権獲得時間に基づいて、アクセス権獲得時間として許容する許容範囲を算出する算出部、
前記計測された最新のアクセス権獲得時間が前記許容範囲に含まれる場合、前記共有資源に対するアクセス競合の状態は正常であると分析し、当該計測された最新のアクセス権獲得時間が当該許容範囲に含まれない場合、当該共有資源へのアクセス競合の状態は異常であると分析する分析部、
を備える、
ことを特徴とする競合分析装置。
A contention analysis device that analyzes whether or not the access contention status for a shared resource is normal,
A plurality of execution units that exclusively execute access to the shared resource while competing with each other according to an analysis target program including an instruction to exclusively access the shared resource;
An access right acquisition unit for acquiring an access right for exclusive access to the shared resource;
A measuring unit for measuring the time required for the access right acquisition unit to acquire the access right;
An accumulating unit for accumulating a predetermined number of acquisition times of the measured access right;
A calculation unit that calculates an allowable range allowed as the access right acquisition time based on the accumulated number of access right acquisition times stored;
When the measured latest access right acquisition time is included in the allowable range, it is analyzed that the state of access conflict for the shared resource is normal, and the measured latest access right acquisition time is within the allowable range. If not included, the analysis unit analyzes that the state of access conflict to the shared resource is abnormal,
Comprising
Competitive analysis device characterized by that.
請求項1に記載の競合分析装置であって、
前記分析対象プログラムのソースコードを解析し、当該プログラムで定義される、前記共有資源に対するアクセス権を獲得するためのアクセス権獲得命令を抽出するアクセス権情報抽出部をさらに備え、
前記アクセス権獲得部は、前記抽出されたアクセス権獲得命令に基づいて、アクセス権の獲得を行う、
ことを特徴とする競合分析装置。
The competition analysis apparatus according to claim 1,
Further comprising an access right information extraction unit that analyzes a source code of the analysis target program and extracts an access right acquisition instruction for acquiring an access right to the shared resource, which is defined in the program;
The access right acquisition unit acquires an access right based on the extracted access right acquisition command.
Competitive analysis device characterized by that.
請求項1に記載の競合分析装置であって、
前記分析結果をログファイルに出力するか、またはユーザに通知する表示用画面を出力するか、の少なくともいずれかを行う、出力手段をさらに備える、
ことを特徴とする競合分析装置。
The competition analysis apparatus according to claim 1,
An output unit that outputs at least one of outputting the analysis result to a log file or outputting a display screen to notify a user;
Competitive analysis device characterized by that.
請求項1に記載の競合分析装置であって、
前記アクセス権獲得部は、アクセス権の獲得を開始してから所定の時間以上が経過した場合、アクセス権の獲得を中止する、
ことを特徴とする競合分析装置。
The competition analysis apparatus according to claim 1,
The access right acquisition unit stops acquiring the access right when a predetermined time or more has elapsed since the start of the acquisition of the access right;
Competitive analysis device characterized by that.
共有資源に対するアクセス競合の状態が正常か否かを分析する競合分析方法であって、
前記共有資源へのアクセスを排他的に行う指示を含む分析対象プログラムに従って、当該共有資源へのアクセスを、競合しながら排他的に実行する実行ステップ、
前記共有資源を排他的にアクセスするためのアクセス権を獲得するアクセス権獲得ステップ、
前記アクセス権獲得ステップにおいて、前記アクセス権の獲得に要した時間を計測する計測ステップ、
前記計測されたアクセス権の獲得時間を、所定の件数蓄積する蓄積ステップ、
前記蓄積された所定の件数のアクセス権獲得時間に基づいて、アクセス権獲得時間として許容する許容範囲を算出する算出ステップ、
前記計測された最新のアクセス権獲得時間が前記許容範囲に含まれる場合、前記共有資源に対するアクセス競合の状態は正常であると分析し、当該計測された最新のアクセス権獲得時間が当該許容範囲に含まれない場合、当該共有資源へのアクセス競合の状態は異常であると分析する分析ステップ、
を備える
ことを特徴とする競合分析方法。
A contention analysis method for analyzing whether the state of access contention for a shared resource is normal,
An execution step of executing exclusive access to the shared resource while competing according to the analysis target program including an instruction to exclusively access the shared resource;
An access right acquisition step of acquiring an access right for exclusive access to the shared resource;
In the access right acquisition step, a measurement step for measuring a time required to acquire the access right,
An accumulating step for accumulating a predetermined number of acquisition times of the measured access right;
A calculation step of calculating an allowable range allowed as the access right acquisition time based on the accumulated predetermined number of access right acquisition times;
When the measured latest access right acquisition time is included in the allowable range, it is analyzed that the state of access conflict for the shared resource is normal, and the measured latest access right acquisition time is within the allowable range. If not, an analysis step for analyzing that the state of contention for access to the shared resource is abnormal;
A competitive analysis method characterized by comprising:
コンピュータを、
共有資源に対するアクセス競合の状態が正常か否かを分析する競合分析装置として機能させるプログラムであって、
コンピュータを、
前記共有資源へのアクセスを排他的に行う指示を含む分析対象プログラムに従って、当該共有資源へのアクセスを、それぞれが競合しながら排他的に実行する複数の実行部、
前記共有資源を排他的にアクセスするためのアクセス権を獲得するアクセス権獲得部、
前記アクセス権獲得部が、前記アクセス権の獲得に要した時間を計測する計測部、
前記計測されたアクセス権の獲得時間を、所定の件数蓄積する蓄積部、
前記蓄積された所定の件数のアクセス権獲得時間に基づいて、アクセス権獲得時間として許容する許容範囲を算出する算出部、
前記計測された最新のアクセス権獲得時間が前記許容範囲に含まれる場合、前記共有資源に対するアクセス競合の状態は正常であると分析し、当該計測された最新のアクセス権獲得時間が当該許容範囲に含まれない場合、当該共有資源へのアクセス競合の状態は異常であると分析する分析部、
として機能させることを特徴とするプログラム。
Computer
A program that functions as a contention analysis device that analyzes whether the state of access contention for a shared resource is normal,
Computer
A plurality of execution units that exclusively execute access to the shared resource while competing with each other according to an analysis target program including an instruction to exclusively access the shared resource;
An access right acquisition unit for acquiring an access right for exclusive access to the shared resource;
A measuring unit for measuring the time required for the access right acquisition unit to acquire the access right;
An accumulating unit for accumulating a predetermined number of acquisition times of the measured access right;
A calculation unit that calculates an allowable range allowed as the access right acquisition time based on the accumulated number of access right acquisition times stored;
When the measured latest access right acquisition time is included in the allowable range, it is analyzed that the state of access conflict for the shared resource is normal, and the measured latest access right acquisition time is within the allowable range. If not included, the analysis unit analyzes that the state of access conflict to the shared resource is abnormal,
A program characterized by functioning as
JP2008098145A 2008-04-04 2008-04-04 Contention analysis device, contention analysis method, and program Pending JP2009251871A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008098145A JP2009251871A (en) 2008-04-04 2008-04-04 Contention analysis device, contention analysis method, and program
PCT/JP2009/057034 WO2009123343A1 (en) 2008-04-04 2009-03-31 Contention analysis device, contention analysis method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008098145A JP2009251871A (en) 2008-04-04 2008-04-04 Contention analysis device, contention analysis method, and program

Publications (1)

Publication Number Publication Date
JP2009251871A true JP2009251871A (en) 2009-10-29

Family

ID=41135692

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008098145A Pending JP2009251871A (en) 2008-04-04 2008-04-04 Contention analysis device, contention analysis method, and program

Country Status (2)

Country Link
JP (1) JP2009251871A (en)
WO (1) WO2009123343A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011114496A1 (en) * 2010-03-18 2011-09-22 富士通株式会社 Multi-core processor system, arbitration circuit control method, and arbitration circuit control program
US8510281B2 (en) * 2008-12-18 2013-08-13 Sap Ag Ultimate locking mechanism
JP2014139851A (en) * 2014-05-08 2014-07-31 Fujitsu Ltd Multi-core processor system, control method of multi-core processor system and control program of multi-core processor system
JP2015075871A (en) * 2013-10-08 2015-04-20 株式会社リコー Exclusive control program, information processing apparatus, and exclusive control method
JP2017228192A (en) * 2016-06-24 2017-12-28 日立オートモティブシステムズ株式会社 Vehicle controller
WO2018042935A1 (en) * 2016-08-31 2018-03-08 日立オートモティブシステムズ株式会社 Electronic control device and analysis system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01125637A (en) * 1987-11-10 1989-05-18 Nippon Telegr & Teleph Corp <Ntt> Data access control system
JPH01125537A (en) * 1987-11-10 1989-05-18 Fuji Heavy Ind Ltd Fuel injection controller for internal combustion engine
JPH0354660A (en) * 1989-07-21 1991-03-08 Nec Corp Shared memory management system for multiprocessor system
JPH03266170A (en) * 1990-03-16 1991-11-27 Nec Corp Lock mechanism
JPH04330529A (en) * 1991-05-02 1992-11-18 Mitsubishi Electric Corp Management system for shared resource
JPH10257127A (en) * 1997-03-06 1998-09-25 Omron Corp Device for transmitting radio data
JPH1185574A (en) * 1997-09-11 1999-03-30 Nec Corp Lock operation measuring method
JP2001084235A (en) * 1999-09-10 2001-03-30 Nec Corp Exclusive control method using lock particle size satistical information and computer-readable recording medium with program recorded therein
JP2003060704A (en) * 2001-07-25 2003-02-28 Hewlett Packard Co <Hp> Method and device for monitoring performance of network
JP2005143117A (en) * 2003-11-06 2005-06-02 Soc Francaise Du Radiotelephone Authentication method in transmission establishment or transaction establishment between network terminal and element of infrastructure
JP2005339437A (en) * 2004-05-31 2005-12-08 Nec Corp Performance bottleneck analysis system and performance bottleneck analysis method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01125637A (en) * 1987-11-10 1989-05-18 Nippon Telegr & Teleph Corp <Ntt> Data access control system
JPH01125537A (en) * 1987-11-10 1989-05-18 Fuji Heavy Ind Ltd Fuel injection controller for internal combustion engine
JPH0354660A (en) * 1989-07-21 1991-03-08 Nec Corp Shared memory management system for multiprocessor system
JPH03266170A (en) * 1990-03-16 1991-11-27 Nec Corp Lock mechanism
JPH04330529A (en) * 1991-05-02 1992-11-18 Mitsubishi Electric Corp Management system for shared resource
JPH10257127A (en) * 1997-03-06 1998-09-25 Omron Corp Device for transmitting radio data
JPH1185574A (en) * 1997-09-11 1999-03-30 Nec Corp Lock operation measuring method
JP2001084235A (en) * 1999-09-10 2001-03-30 Nec Corp Exclusive control method using lock particle size satistical information and computer-readable recording medium with program recorded therein
JP2003060704A (en) * 2001-07-25 2003-02-28 Hewlett Packard Co <Hp> Method and device for monitoring performance of network
JP2005143117A (en) * 2003-11-06 2005-06-02 Soc Francaise Du Radiotelephone Authentication method in transmission establishment or transaction establishment between network terminal and element of infrastructure
JP2005339437A (en) * 2004-05-31 2005-12-08 Nec Corp Performance bottleneck analysis system and performance bottleneck analysis method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8510281B2 (en) * 2008-12-18 2013-08-13 Sap Ag Ultimate locking mechanism
WO2011114496A1 (en) * 2010-03-18 2011-09-22 富士通株式会社 Multi-core processor system, arbitration circuit control method, and arbitration circuit control program
JP5541355B2 (en) * 2010-03-18 2014-07-09 富士通株式会社 Multi-core processor system, arbitration circuit control method, control method, and arbitration circuit control program
US9110733B2 (en) 2010-03-18 2015-08-18 Fujitsu Limited Multi-core processor system, arbiter circuit control method, and computer product
JP2015075871A (en) * 2013-10-08 2015-04-20 株式会社リコー Exclusive control program, information processing apparatus, and exclusive control method
JP2014139851A (en) * 2014-05-08 2014-07-31 Fujitsu Ltd Multi-core processor system, control method of multi-core processor system and control program of multi-core processor system
JP2017228192A (en) * 2016-06-24 2017-12-28 日立オートモティブシステムズ株式会社 Vehicle controller
EP3477474A4 (en) * 2016-06-24 2020-03-04 Hitachi Automotive Systems, Ltd. Vehicle control apparatus
US10597040B2 (en) 2016-06-24 2020-03-24 Hitachi Automotive Systems, Ltd. Vehicle control apparatus
WO2018042935A1 (en) * 2016-08-31 2018-03-08 日立オートモティブシステムズ株式会社 Electronic control device and analysis system

Also Published As

Publication number Publication date
WO2009123343A1 (en) 2009-10-08

Similar Documents

Publication Publication Date Title
US8230201B2 (en) Migrating sleeping and waking threads between wake-and-go mechanisms in a multiple processor data processing system
US8225120B2 (en) Wake-and-go mechanism with data exclusivity
KR100898315B1 (en) Enhanced runtime hosting
US8191069B2 (en) Method of monitoring performance of virtual computer and apparatus using the method
US8171476B2 (en) Wake-and-go mechanism with prioritization of threads
CN102222015B (en) Detect the method and system of the deadlock in multithread programs
US8015379B2 (en) Wake-and-go mechanism with exclusive system bus response
US8145849B2 (en) Wake-and-go mechanism with system bus response
US8127080B2 (en) Wake-and-go mechanism with system address bus transaction master
US8732683B2 (en) Compiler providing idiom to idiom accelerator
US6622189B2 (en) Method and system for low overhead spin lock instrumentation
JP2009251871A (en) Contention analysis device, contention analysis method, and program
JP2006277115A (en) Abnormality detection program and abnormality detection method
JP4992740B2 (en) Multiprocessor system, failure detection method, and failure detection program
US8682914B2 (en) Method and system for robust futexes
JP2008107875A (en) Job control unit and job control program
US11645124B2 (en) Program execution control method and vehicle control device
US20130055281A1 (en) Information processing apparatus and scheduling method
US20170109182A1 (en) Safepoints for guest languages on a virtual machine
JP2016051395A (en) Image forming apparatus and resource management method
JP2004192052A (en) Software processing method and software processing system
US9223637B1 (en) Method and apparatus to advise spin and yield decisions
Prasad et al. A frugal approach to reduce RCU grace period overhead
US20130191839A1 (en) Information processing apparatus, control method therefor, and computer-readable storage medium
JP2023026210A (en) Dead lock analysis assisting device, dead lock analysis assisting method and dead lock analysis assisting program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100330

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100526

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100615