JP4199746B2 - Computer system, exclusive control method, and program - Google Patents
Computer system, exclusive control method, and program Download PDFInfo
- Publication number
- JP4199746B2 JP4199746B2 JP2005089946A JP2005089946A JP4199746B2 JP 4199746 B2 JP4199746 B2 JP 4199746B2 JP 2005089946 A JP2005089946 A JP 2005089946A JP 2005089946 A JP2005089946 A JP 2005089946A JP 4199746 B2 JP4199746 B2 JP 4199746B2
- Authority
- JP
- Japan
- Prior art keywords
- cache
- exclusive control
- lock
- entry address
- address
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 38
- 238000003745 diagnosis Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 8
- 230000000694 effects Effects 0.000 description 6
- 239000000284 extract Substances 0.000 description 2
- 238000002405 diagnostic procedure Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
本発明は、排他制御を行う機能を備えた計算機システム、排他制御方法、およびプログラムに関する。 The present invention relates to a computer system having an exclusive control function, an exclusive control method, and a program.
従来より、計算機システムでは、複数のプロセッサ(計算手段)が同一データへアクセスするために生じるデータの矛盾を回避する方法として、排他制御が用いられている。 Conventionally, in a computer system, exclusive control is used as a method for avoiding data inconsistency caused by a plurality of processors (calculation means) accessing the same data.
こうした従来の排他制御におけるロック取得イメージを図8に示す。
この図8に示すように、一般的な排他制御では、ロックアドレス1とロックアドレス2といった複数のロックが同一キャッシュブロックへアクセスする。
FIG. 8 shows a lock acquisition image in such conventional exclusive control.
As shown in FIG. 8, in general exclusive control, a plurality of locks such as
また、従来の排他制御として、処理ユニットによりロック指示情報をキャッシュブロックに対応づけて登録し、他のプロセッサが同一データへアクセスした場合に登録済みのロック指示情報によりアクセスの可否を判定し制御するものがある(例えば、特許文献1参照)。
しかしながら、図8により上述した従来の排他制御では、同一キャッシュブロックへのアクセスが競合した場合、排他制御構造体1と排他制御構造体2の各々のメモリストアにより異なる排他制御構造体でのメモリリード時のキャッシュミス要因となってしまう虞があった。このキャッシュミスは、メモリリード量に比例して増加する。
However, in the conventional exclusive control described above with reference to FIG. 8, when access to the same cache block competes, the memory read in the exclusive control structure differs depending on the memory stores of the
また、このように同一キャッシュブロックへのアクセス競合による待ち合わせが発生してしまうと、マルチプロセッサとしての処理効率が低下してしまうという問題があった。 In addition, when waiting due to contention for access to the same cache block occurs in this way, there is a problem that the processing efficiency as a multiprocessor is lowered.
また、上述した特許文献1のものは、上述した同一キャッシュブロックへのアクセス競合によるキャッシュミスの防止についてまで考慮されたものではなかった。
In addition, the above-mentioned
本発明はこのような状況に鑑みてなされたものであり、同一キャッシュブロックへのアクセス競合によるキャッシュミスを防止することができると共に、アクセス競合による待ち時間を最小限にすることができる計算機システム、排他制御方法、およびプログラムを提供することをを目的とする。 The present invention has been made in view of such a situation, and a computer system capable of preventing a cache miss due to access conflict to the same cache block and minimizing waiting time due to access conflict, An object is to provide an exclusive control method and a program.
かかる目的を達成するために、本発明の第1の態様としての計算機システムは、複数の計算手段を備え、排他制御を行う機能を備えた計算機システムであって、キャッシュのエントリアドレスが存在しない場合に当該キャッシュのエントリアドレスを算出するキャッシュエントリアドレス算出手段(例えば、図2のステップS2)と、キャッシュのエントリアドレスが存在しない場合に上記キャッシュエントリアドレス算出手段により算出されたエントリアドレスを用いてキャッシュブロック単位にロックアドレスを設定するロックアドレス設定手段と、1つの計算手段によりロックアドレスが取得されてロック取得状態となった後で当該ロックアドレスに他の計算手段からロック取得要求が行われるアクセス競合が発生した場合に、当該他の計算手段に優先順位のより高い処理を先に実行させる優先処理実行手段(例えば、図6のステップS14)とを備え、上記キャッシュエントリアドレス算出手段は、上記複数の計算手段の数および、キャッシュ構造を調査するための測定プログラムにより測定したキャッシュブロック容量に応じて上記キャッシュのエントリアドレスを算出することを特徴とする。 To achieve this object, the computer system according to the first aspect of the present invention is a computer system having a plurality of calculation means and a function of performing exclusive control, and there is no cache entry address. Cache entry address calculating means (for example, step S2 in FIG. 2) for calculating the entry address of the cache, and if there is no cache entry address, the cache entry address is calculated using the entry address calculated by the cache entry address calculating means. Lock content setting means for setting a lock address in block units, and access conflict in which a lock acquisition request is issued from another calculation means to the lock address after the lock address is acquired by one calculation means and the lock acquisition state is obtained If this occurs, the other Priority processing execution means for executing a higher processing priority to calculating means earlier (e.g., step S14 in FIG. 6) and a, the cache entry address calculation means, the number of said plurality of calculation means and the cache structure The cache entry address is calculated according to the cache block capacity measured by the measurement program for investigating
障害の発生が通知されると、該障害の発生した計算手段について上記ロックアドレス設定手段により設定されたロックアドレスにおけるロックを解放する診断装置を備えることが好ましい。When the occurrence of a failure is notified, it is preferable to provide a diagnostic device that releases the lock at the lock address set by the lock address setting unit for the calculation unit in which the failure has occurred.
記憶手段における排他制御に用いられる排他制御領域を備え、上記した排他制御領域は、上記した複数の計算手段の数を最大エントリ数とすることが好ましい。 An exclusive control area used for exclusive control in the storage means is provided, and the exclusive control area described above preferably uses the number of the plurality of calculating means as the maximum number of entries.
また、本発明の第2の態様としての排他制御方法は、複数の計算手段を備え、排他制御を行う機能を備えたシステムにおける排他制御方法であって、キャッシュのエントリアドレスが存在しない場合に当該キャッシュのエントリアドレスを算出するキャッシュエントリアドレス算出工程(例えば、図2のステップS2)と、キャッシュのエントリアドレスが存在しない場合に上記キャッシュエントリアドレス算出工程で算出されたエントリアドレスを用いて1つの計算手段によりキャッシュブロック単位のロックアドレスが取得されてロック取得状態となる排他制御工程と、排他制御工程の後で当該ロックアドレスに他の計算手段からロック取得要求が行われるアクセス競合が発生した場合に、当該他の計算手段が優先順位のより高い処理を先に実行する優先処理実行工程(例えば、図6のステップS14)とを備え、上記キャッシュエントリアドレス算出工程では、上記複数の計算手段の数および、キャッシュ構造を調査するための測定プログラムにより測定したキャッシュブロック容量に応じて上記キャッシュのエントリアドレスを算出することを特徴とする。 The exclusive control method according to the second aspect of the present invention is an exclusive control method in a system having a plurality of calculation means and a function of performing exclusive control, and when the cache entry address does not exist A cache entry address calculation step (for example, step S2 in FIG. 2) for calculating the cache entry address and one calculation using the entry address calculated in the cache entry address calculation step when there is no cache entry address An exclusive control process that obtains a lock address in cache block units by the means and enters the lock acquisition state, and an access conflict occurs after the exclusive control process that causes a lock acquisition request from another calculation means to the lock address , The other calculation means perform the higher priority processing Cache priority processing execution step of executing (e.g., step S14 in FIG. 6) and provided with, in the cache entry address calculating step, the number of said plurality of calculation means and, measured by the measurement program to investigate the cache structure The cache entry address is calculated according to the block capacity .
障害の発生が通知されると、該障害の発生した計算手段について上記排他制御工程で取得されたロックアドレスにおけるロックを解放する診断工程を備えることが好ましい。It is preferable to provide a diagnosis step of releasing the lock at the lock address acquired in the exclusive control step for the calculation means in which the failure has been notified when the occurrence of the failure is notified.
上記した優先処理実行工程では、排他制御に用いられる排他制御領域に対して、上記した複数の計算手段の数を最大エントリ数とすることが好ましい。 In the above priority processing execution step, it is preferable that the number of the plurality of calculation means described above is set to the maximum number of entries for the exclusive control area used for exclusive control.
また、本発明の第3の態様としての排他制御プログラムは、複数の計算手段を備え、排他制御を行う機能を備えたシステムにおける排他制御プログラムであって、コンピュータに、キャッシュのエントリアドレスが存在しない場合に当該キャッシュのエントリアドレスを算出するキャッシュエントリアドレス算出処理(例えば、図2のステップS2)と、キャッシュのエントリアドレスが存在しない場合に上記キャッシュエントリアドレス算出処理で算出されたエントリアドレスを用いて1つの計算手段によりキャッシュブロック単位のロックアドレスが取得されてロック取得状態となる排他制御処理と、排他制御処理の後で当該ロックアドレスに他の計算手段からロック取得要求が行われるアクセス競合が発生した場合に、当該他の計算手段が優先順位のより高い処理を先に実行する優先処理実行処理(例えば、図6のステップS14)とを実行させ、上記キャッシュエントリアドレス算出処理では、上記複数の計算手段の数および、キャッシュ構造を調査するための測定プログラムにより測定したキャッシュブロック容量に応じて上記キャッシュのエントリアドレスを算出することを特徴とする。 The exclusive control program according to the third aspect of the present invention is an exclusive control program in a system having a plurality of calculation means and a function of performing exclusive control, and there is no cache entry address in the computer. In this case, the cache entry address calculation process (for example, step S2 in FIG. 2) for calculating the entry address of the cache and the entry address calculated by the cache entry address calculation process when the cache entry address does not exist are used. An exclusive control process in which a lock address for each cache block is acquired by one calculation means and the lock acquisition state is entered, and an access conflict occurs after the exclusive control process in which a lock acquisition request is issued from another calculation means to the lock address The other calculator There priority processing execution process for executing a higher processing priority to previously (e.g., step S14 in FIG. 6) and allowed to run, with the cache entry address calculation process, the number of said plurality of calculation means and the cache structure The cache entry address is calculated according to the cache block capacity measured by the measurement program for investigating .
障害の発生が通知されると、該障害の発生した計算手段について上記排他制御処理で取得されたロックアドレスにおけるロックを解放する診断処理を上記コンピュータに実行させることが好ましい。When the occurrence of a failure is notified, it is preferable to cause the computer to execute a diagnostic process for releasing the lock at the lock address acquired by the exclusive control process for the calculation means in which the failure has occurred.
上記した優先処理実行処理では、排他制御に用いられる排他制御領域に対して、上記した複数の計算手段の数を最大エントリ数とすることが好ましい。 In the above priority processing execution processing, it is preferable that the number of the plurality of calculation means described above is set to the maximum number of entries for the exclusive control region used for exclusive control.
以上のように、本発明によれば、同一キャッシュブロックへのアクセス競合によるキャッシュミスを防止することができると共に、アクセス競合による待ち時間を最小限にすることができる。 As described above, according to the present invention, it is possible to prevent a cache miss due to access contention to the same cache block and to minimize waiting time due to access contention.
次に、本発明に係る計算機システム、排他制御方法、およびプログラムを適用した一実施形態について、図面を用いて詳細に説明する。
本実施形態の計算機システムは、排他制御動作における同一キャッシュブロックへのアクセス競合を削減しキャッシュ常駐率を高めることで、マルチプロセッサの処理効率を向上させる好適なものを例示している。
Next, an embodiment to which a computer system, an exclusive control method, and a program according to the present invention are applied will be described in detail with reference to the drawings.
The computer system of the present embodiment exemplifies a suitable system that improves the processing efficiency of the multiprocessor by reducing the access competition to the same cache block in the exclusive control operation and increasing the cache residence rate.
まず、図1を参照して、本実施形態におけるキャッシュエントリアドレスを利用した排他制御方法の概要について説明する。
キャッシュエントリアドレスの生成手段11は、プロセッサ1のキャッシュ10の構成情報が存在するか調査し、キャッシュ10のキャッシュエントリアドレスが存在する場合その情報をキャッシュ情報記憶部21へ格納する。キャッシュ10の構成情報が存在しない場合は、キャッシュ構造を調査するための測定プログラムを起動しキャッシュ10のキャッシュエントリアドレスを算出してキャッシュ情報記憶部21へ格納する。
First, an overview of an exclusive control method using a cache entry address in the present embodiment will be described with reference to FIG.
The cache entry
また、本実施形態では、複数プロセッサでアクセスするデータ領域の排他制御時に、上記したキャッシュ10の構成情報が存在しない場合であっても、キャッシュエントリアドレスの生成手段11により算出されたキャッシュエントリアドレスに対応する排他制御領域のアドレスビットを利用してキャッシュブロック単位に排他制御を行い、同一キャッシュブロックへのアクセス競合を完全に排除しマルチプロセッサ性能を向上させる。また、排他制御領域のアクセス競合時には、他の優先度の高い割り込み処理等を優先して処理することによりマルチプロセッサの処理効率を向上させる。
In the present embodiment, the cache entry address calculated by the cache entry
次に、本実施形態の構成について、図面を参照して詳細に説明する。
図1を参照すると、本実施形態としての計算機システムは、プログラムを実行するプロセッサ1と、プログラムやデータを記憶する記憶装置2と、診断装置3と、キャッシュエントリアドレスの生成手段11と、排他制御の実行手段12とを備えて構成されている。
Next, the configuration of the present embodiment will be described in detail with reference to the drawings.
Referring to FIG. 1, a computer system according to this embodiment includes a
プロセッサ1は、キャッシュエントリアドレスの生成手段11と、排他制御の実行手段12とを含む。
記憶装置2は、プログラム記憶部20と、キャッシュエントリアドレスの生成手段11で生成したキャッシュエントリアドレスを格納するキャッシュ情報記憶部21と、排他制御領域22と、排他制御が必要なデータアクセス領域23とを含む。プログラム記憶部20は、キャッシュエントリアドレス生成手段11と排他制御の実行手段12とのプログラムを格納する。
診断装置3は、プロセッサの障害発生時に障害処理を行う。
The
The
The
上述した各部分は、それぞれ概略、次のように動作する。
キャッシュエントリアドレスの生成手段11は、図2に示すように、プロセッサ1のキャッシュ10の構成情報が存在するか調査し(ステップS1)、キャッシュ10のキャッシュエントリアドレスが存在する場合(ステップS1;Yes)、その情報をキャッシュ情報記憶部21へ格納する(ステップS3)。
Each of the above-described parts generally operates as follows.
As shown in FIG. 2, the cache entry address generation means 11 checks whether the configuration information of the
キャッシュ10の構成情報が存在しない場合(ステップS1;No)、キャッシュ構造を調査するための測定プログラムを起動し、キャッシュ10のキャッシュエントリアドレスを算出して(ステップS2)、キャッシュ情報記憶部21へ格納する(ステップS3)。
When the configuration information of the
また、キャッシュエントリアドレスの生成手段11は、システムの立ち上げ時等に一度だけ動作し、キャッシュ10のキャッシュエントリアドレスとシステムに接続されるプロセッサ台数から排他制御に必要なロックエントリアドレスをキャッシュ情報記憶部21へ格納する。
排他制御の実行時には、キャッシュ情報記憶部21へ格納したロックエントリ有効情報を排他制御情報として使用する(ステップS4)。
The cache entry address generation means 11 operates only once when the system is started up, and stores the cache entry address of the
When executing exclusive control, the lock entry valid information stored in the cache
本実施形態における排他制御では、図3に示すように、キャッシュブロック単位にロックアドレスを取得する(排他制御としてのロックを行う)。すなわち、本発明の実施形態では、図8により上述した従来の排他制御におけるロックアドレス2,4を使用せず、キャッシュブロックに対応するロックアドレスを生成するようにしている。
なお、図3に示す例では、ブロック容量32byte、最大プロセッサ数4台の場合を例として示している。
In the exclusive control in the present embodiment, as shown in FIG. 3, a lock address is acquired for each cache block (locking as exclusive control is performed). That is, in the embodiment of the present invention, the lock addresses corresponding to the cache block are generated without using the
In the example illustrated in FIG. 3, a block capacity of 32 bytes and a maximum number of processors of 4 are illustrated as an example.
また、本実施形態では、ロックエントリアドレスとして、キャッシュブロックに対応したロックアドレスをロックエントリアドレスとして使用している。
この本実施形態によるロックエントリアドレスの取得例を図4に示す。
In this embodiment, the lock address corresponding to the cache block is used as the lock entry address as the lock entry address.
An example of acquiring the lock entry address according to this embodiment is shown in FIG.
また、排他制御の実行手段12は、排他制御が必要なデータアクセス領域23へアクセスする場合に、キャッシュ情報記憶部21へ格納されているロックエントリ有効情報に該当するアドレスビットに対応するアドレスを抽出し排他制御領域22のキャッシュブロックに対応するエントリを算出する。また、この排他制御領域22のエントリ数は、全てのキャッシュブロック分を確保する必要はないため、同時にメモリアクセスを行うシステムのプロセッサ台数と同数のエントリを最大エントリ数として確保するだけで良い。排他制御を取得する場合には、排他制御領域22の該当するエントリを読み出しロック取得状態“FF以外”であれば、データアクセス領域へのアクセスを中止し保留されている処理や優先度の高いプロセスを起動する。ロック未取得状態“FF”であれば、排他制御領域の該当するエントリがロック取得状態であることを示す“プロセッサ番号”を格納する。
The exclusive control executing means 12 extracts an address corresponding to the address bit corresponding to the lock entry valid information stored in the cache
次に、本実施形態による動作について、図面を参照して詳細に説明する。
図5は、本発明による排他制御領域のレイアウト例を示す図である。
Next, the operation according to the present embodiment will be described in detail with reference to the drawings.
FIG. 5 is a diagram showing a layout example of the exclusive control area according to the present invention.
以下の動作説明では、キャッシュブロックは32byteであることと仮定する。また、アドレスのビット幅は32bit、有効なプロセッサの台数は4台とし、プロセッサの番号は、00〜03として説明する。 In the following description of the operation, it is assumed that the cache block is 32 bytes. In the following description, the address bit width is 32 bits, the number of valid processors is four, and the processor numbers are 00 to 03.
システムの立ち上げ時に、プログラム記憶部20からキャッシュエントリアドレスの生成手段11が起動されると、キャッシュブロックの調査が行われる。キャッシュエントリアドレスの生成手段11は、キャッシュ10のキャッシュブロックが32byteであると判断すると、図4の〈例1〉に示すように、メモリへアクセスするアドレスビットのキャッシュブロック単位のアドレスの下位bitから有効なプロセッサの台数に対応する25〜26bitの2bit(プロセッサの台数が2の階乗でなければ、2の階乗に切り上げる)をロックエントリアドレスの有効ビットのマスク情報をロックエントリ情報としてキャッシュ情報記憶部21へ格納する。
また、排他制御領域22に、排他制御に必要なエントリをキャッシュブロック単位に有効なプロセッサ台数分確保する。このとき、ロック取得状態は未取得状態“FF”に初期化しておく。
When the cache entry
In the
次に、本実施形態による排他制御の動作について、図6のフローチャートを参照して説明する。
まず、プロセッサ“00”にてデータアクセス領域にアクセスするアドレス(ビット25〜26=“00”)への排他制御が実行されると、排他制御の実行手段12にてキャッシュ情報記憶部21からロックエントリ情報(図4〈例2〉参照)を取り出し、ロックエントリアドレスを生成する(ステップS11)。
該当するエントリ00の排他制御領域22がロック未取得状態“FF”の時にロック取得状態“00”とする。この時、有効なプロセッサの台数が4台であるため、ロックエントリは、最大4エントリ確保されている。このときロックエントリアドレスは0と仮定し、図5で示すロックエントリ00以外の領域は、ロック取得状態と仮定する。
Next, the exclusive control operation according to the present embodiment will be described with reference to the flowchart of FIG.
First, when exclusive control to an address (
When the
この状態でプロセッサ“01”により、プロセッサ“00”と同一アドレスの排他制御が行われると、まず排他制御領域22の該当するエントリ00を読み出す(ステップS12)。このとき、エントリ00は、すでにロックされた「ロック取得状態」であるため(ステップS13;Yes)、ロックの取得を中止し、他の割り込み処理など、より優先順位の高いプロセスの実行を行う(ステップS14)。
In this state, when the exclusive control of the same address as the processor “00” is performed by the processor “01”, the corresponding entry 00 in the
こうした割り込み処理など、実行要求がなされている排他制御よりも優先順位の高い処理の実行が完了すると(ステップS15;Yes)、再び上述したステップS12の処理から繰り返し、エントリ00が「ロック取得状態」でなくなっていれば、上述したステップS11と同様に、排他制御の実行手段12がキャッシュ情報記憶部21からロックエントリ情報を取り出し、プロセッサ“01”についてロックエントリアドレスを生成し、キャッシュ情報記憶部21に格納する。
When the execution of a process having a higher priority than the exclusive control for which an execution request has been made, such as the interrupt process, is completed (step S15; Yes), the process from step S12 described above is repeated again, and entry 00 becomes “lock acquisition state”. If not, as in step S11 described above, the exclusive control execution means 12 extracts the lock entry information from the cache
ここで仮に、プロセッサ“00”によりエントリ00が「ロック取得状態」となっている状態で、プロセッサ“01”がロックエントリアドレス(“01”)に対応するアドレスへの排他制御を実行すると、ロック未取得状態であるため、ロック取得が可能となる。 If the processor “01” executes exclusive control to the address corresponding to the lock entry address (“01”) in a state where the entry “00” is in the “lock acquisition state” by the processor “00”, the lock is performed. Since it is in an unacquired state, lock acquisition is possible.
次に、1台のプロセッサで障害が発生した時の動作について、図7のフローチャートを参照して説明する。この説明では、プロセッサ“00”で障害が発生したと仮定する。 Next, the operation when a failure occurs in one processor will be described with reference to the flowchart of FIG. In this description, it is assumed that a failure has occurred in the processor “00”.
プロセッサ“00”の障害が診断装置3に通知されると、排他制御領域22の4つのロックエントリを検索する(ステップS21)。ロックエントリ00には障害が発生したプロセッサの番号が格納されているため、診断装置3はそのプロセッサ番号のロックエントリ情報におけるロックを解放する(ステップS22)。
When the failure of the processor “00” is notified to the
このようにして、キャッシュブロックの登録アドレス単位に排他制御を行うことにより、排他制御が必要なデータアクセス領域23へのアクセスを完全に抑止しキャッシュ常駐率を高めると共に、排他制御時のアクセス競合を最小化することによりマルチプロセッサの処理効率を向上させることができる。また、排他制御の高速化のために必要な専用の処理ユニットを有することなくSW(ソフトウェア)のバイナリコードを維持しつつプロセッサのキャッシュ構造に応じた最適な排他制御を行うことも可能となる。
In this way, by performing exclusive control for each registered address of the cache block, access to the
以上のように、上述した本発明の実施形態によれば、以下の効果を得ることができる。
第1の効果は、排他制御を行うためのアクセス競合による待ちあわせ時間を最小限に出来ることである。
その理由は、キャッシュブロックの登録アドレス単位に排他制御を行うためである。
As described above, according to the embodiment of the present invention described above, the following effects can be obtained.
The first effect is that the waiting time due to access contention for performing exclusive control can be minimized.
This is because exclusive control is performed in units of cache block registration addresses.
第2の効果は、排他制御するためにキャッシュメモリ内などに専用の処理ユニットを設ける必要がないことである。
その理由は、プログラムとして排他制御手段の実現が可能なためである。このため、排他制御を行うためのハードウェアリソースの不要な増加を抑えることができる。
The second effect is that it is not necessary to provide a dedicated processing unit in the cache memory or the like for exclusive control.
This is because the exclusive control means can be realized as a program. For this reason, an unnecessary increase in hardware resources for performing exclusive control can be suppressed.
第3の効果は、キャッシュ構造に応じて排他制御で使用するキャッシュブロックを容易に変更でき、キャッシュ構造の変化に柔軟に対応できることである。
その理由は、算出したキャッシュ情報により排他制御しているためである。
このように、キャッシュの構造に合わせてロック指示情報をキャッシュメモリ内の処理ユニットへ登録しないため、キャッシュ容量やエントリの変更が生じた場合であっても、ハードウェアリソースの変更を生じさせないようにすることができる。
A third effect is that the cache block used in the exclusive control can be easily changed according to the cache structure, and can flexibly cope with the change in the cache structure.
This is because exclusive control is performed based on the calculated cache information.
In this way, lock instruction information is not registered in the processing unit in the cache memory in accordance with the cache structure, so that even if the cache capacity or entry changes, the hardware resource does not change. can do.
第4の効果は、SWの実行ファイル(バイナリコード)を変更せずにプロセッサのキャッシュ構造に適した排他制御が可能なことである。
その理由は、プロセッサのキャッシュ情報を事前に調査し排他制御情報として利用しているためである。
The fourth effect is that exclusive control suitable for the cache structure of the processor is possible without changing the SW execution file (binary code).
This is because the cache information of the processor is examined in advance and used as exclusive control information.
第5の効果は、排他制御で使用するキャッシュブロック数を最小化できることである。
その理由は、プロセッサ台数に応じて排他制御に必要なキャッシュブロックの使用量を算出しているためである。
A fifth effect is that the number of cache blocks used in exclusive control can be minimized.
This is because the usage amount of the cache block necessary for exclusive control is calculated according to the number of processors.
このように、本発明の実施形態によれば、排他制御によるアクセス競合が生じた場合、割り込みや他の処理を優先して処理するため、アクセス競合による待ち時間を最小限にすることができる。 As described above, according to the embodiment of the present invention, when an access conflict due to exclusive control occurs, an interrupt or other processing is preferentially processed, so that a waiting time due to access conflict can be minimized.
また、図3により上述したようにキャッシュブロック単位にロックアドレスを取得するようにしているため、同一キャッシュブロックへのアクセス競合によるキャッシュミスを確実に防止することができる。 Also, as described above with reference to FIG. 3, since the lock address is acquired in units of cache blocks, it is possible to reliably prevent cache misses due to access competition to the same cache block.
また、発明の他の実施形態として、上述した実施形態のロックエントリアドレスビットの空きビットをロック種別表示として利用することにより、複数のロック制御も実現することが可能となる。 As another embodiment of the invention, a plurality of lock controls can be realized by using the empty bits of the lock entry address bits of the above-described embodiment as a lock type display.
以上のように、本発明の実施形態は、マルチプロセッサシステムの処理効率を向上するといった用途に適用できる。また、プログラムのバイナリコードを変更することなくプロセッサに適した排他制御を実現する機能といった用途にも適用可能である。 As described above, the embodiments of the present invention can be applied to uses such as improving the processing efficiency of a multiprocessor system. Further, the present invention can also be applied to uses such as a function for realizing exclusive control suitable for a processor without changing the binary code of the program.
なお、上述した各実施形態は本発明の好適な実施形態であり、本発明はこれに限定されることなく、本発明の技術的思想に基づいて種々変形して実施することが可能である。
例えば、上述した実施形態では、プロセッサ(計算手段)を“00”〜“03”の4台備えることとして説明したが、複数のプロセッサを備えていればこの数に限定されず、いくつであってもよい。
Each of the above-described embodiments is a preferred embodiment of the present invention, and the present invention is not limited to this, and various modifications can be made based on the technical idea of the present invention.
For example, in the above-described embodiment, it has been described that four processors (calculation means) “00” to “03” are provided. However, the number of processors is not limited to this number as long as a plurality of processors are provided. Also good.
また、上述した各実施形態では、プログラムは、プログラム記憶部20に格納されることとして説明したが、コンピュータが読み取り可能な記録媒体であればこのものに限定されず、例えば、フロッピー(登録商標)ディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,EEPROM等に格納されてもよい。
すなわち、本発明の各実施形態による上述した各機能が、上述した記録媒体から供給されるプログラムによって、各種計算機システムのCPUなどが処理を行うことにより実現されてもよい。
そして、その場合、上述した記録媒体により、あるいはネットワークを介して外部の記録媒体から、プログラムを含む情報群を出力装置に供給される場合でも本発明は適用されるものである。
すなわち、記録媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記録媒体および該記録媒体から読み出された信号は本発明を構成することになる。
In each of the above-described embodiments, the program has been described as being stored in the
That is, each function described above according to each embodiment of the present invention may be realized by a CPU or the like of various computer systems performing a process by a program supplied from the above-described recording medium.
In this case, the present invention is applied even when an information group including a program is supplied to the output device from the recording medium described above or from an external recording medium via a network.
That is, the program code itself read from the recording medium realizes the novel function of the present invention, and the recording medium storing the program code and the signal read from the recording medium constitute the present invention. It will be.
この本発明に係るプログラムによれば、当該プログラムによって制御されるコンピュータに、上述した本発明に係る各実施形態としての計算機システムにおける各機能を実現させることができる。 According to the program according to the present invention, each function in the computer system as each embodiment according to the present invention described above can be realized by a computer controlled by the program.
1 プロセッサ
10 キャッシュ
11 キャッシュエントリアドレスの生成手段
12 排他制御の実行手段
2 記憶装置
20 プログラム記憶部
21 キャッシュ情報記憶部
22 排他制御領域
23 データアクセス領域
3 診断装置
DESCRIPTION OF
Claims (9)
キャッシュのエントリアドレスが存在しない場合に当該キャッシュのエントリアドレスを算出するキャッシュエントリアドレス算出手段と、
キャッシュのエントリアドレスが存在しない場合に前記キャッシュエントリアドレス算出手段により算出されたエントリアドレスを用いてキャッシュブロック単位にロックアドレスを設定するロックアドレス設定手段と、
1つの計算手段によりロックアドレスが取得されてロック取得状態となった後で当該ロックアドレスに他の計算手段からロック取得要求が行われるアクセス競合が発生した場合に、当該他の計算手段に優先順位のより高い処理を先に実行させる優先処理実行手段とを備え、
前記キャッシュエントリアドレス算出手段は、前記複数の計算手段の数および、キャッシュ構造を調査するための測定プログラムにより測定したキャッシュブロック容量に応じて前記キャッシュのエントリアドレスを算出することを特徴とする計算機システム。 A computer system having a plurality of calculation means and a function of performing exclusive control,
A cache entry address calculating means for calculating an entry address of the cache when there is no cache entry address;
Lock address setting means for setting a lock address for each cache block using the entry address calculated by the cache entry address calculation means when there is no cache entry address ;
When an access conflict occurs in which a lock acquisition request is made from another calculation means after the lock address is acquired by one calculation means and the lock acquisition state is set, the priority is given to the other calculation means. Priority processing execution means for executing the higher processing first ,
The cache entry address calculation means calculates the cache entry address according to the number of the plurality of calculation means and the cache block capacity measured by a measurement program for investigating the cache structure. .
前記排他制御領域は、前記複数の計算手段の数を最大エントリ数とすることを特徴とする請求項1または2記載の計算機システム。 Provided with an exclusive control area used for exclusive control in the storage means,
3. The computer system according to claim 1, wherein the exclusive control area sets the number of the plurality of calculation means as a maximum number of entries.
キャッシュのエントリアドレスが存在しない場合に当該キャッシュのエントリアドレスを算出するキャッシュエントリアドレス算出工程と、
キャッシュのエントリアドレスが存在しない場合に前記キャッシュエントリアドレス算出工程で算出されたエントリアドレスを用いて1つの計算手段によりキャッシュブロック単位のロックアドレスが取得されてロック取得状態となる排他制御工程と、
前記排他制御工程の後で当該ロックアドレスに他の計算手段からロック取得要求が行われるアクセス競合が発生した場合に、当該他の計算手段が優先順位のより高い処理を先に実行する優先処理実行工程とを備え、
前記キャッシュエントリアドレス算出工程では、前記複数の計算手段の数および、キャッシュ構造を調査するための測定プログラムにより測定したキャッシュブロック容量に応じて前記キャッシュのエントリアドレスを算出することを特徴とする排他制御方法。 An exclusive control method in a system having a plurality of calculation means and a function of performing exclusive control,
A cache entry address calculating step for calculating an entry address of the cache when the entry address of the cache does not exist;
An exclusive control step in which a lock address in units of cache blocks is acquired by one calculation means using the entry address calculated in the cache entry address calculation step when there is no cache entry address, and a lock acquisition state is obtained;
Priority processing execution in which, when an access conflict occurs in which the lock acquisition request is made from the other calculation means at the lock address after the exclusive control step, the other calculation means executes the higher priority processing first. A process ,
In the cache entry address calculating step, the cache entry address is calculated according to the number of the plurality of calculation means and the cache block capacity measured by a measurement program for investigating the cache structure. Method.
コンピュータに、
キャッシュのエントリアドレスが存在しない場合に当該キャッシュのエントリアドレスを算出するキャッシュエントリアドレス算出処理と、
キャッシュのエントリアドレスが存在しない場合に前記キャッシュエントリアドレス算出処理で算出されたエントリアドレスを用いて1つの計算手段によりキャッシュブロック単位のロックアドレスが取得されてロック取得状態となる排他制御処理と、
前記排他制御処理の後で当該ロックアドレスに他の計算手段からロック取得要求が行われるアクセス競合が発生した場合に、当該他の計算手段が優先順位のより高い処理を先に実行する優先処理実行処理とを実行させ、
前記キャッシュエントリアドレス算出処理では、前記複数の計算手段の数および、キャッシュ構造を調査するための測定プログラムにより測定したキャッシュブロック容量に応じて前記キャッシュのエントリアドレスを算出することを特徴とする排他制御プログラム。 An exclusive control program in a system having a plurality of calculation means and a function of performing exclusive control,
On the computer,
A cache entry address calculation process for calculating an entry address of the cache when there is no cache entry address;
An exclusive control process in which a lock address for each cache block is acquired by one calculation means using the entry address calculated in the cache entry address calculation process when a cache entry address does not exist, and a lock acquisition state is obtained;
Execution of priority processing in which, when an access conflict occurs in which the lock acquisition request is made from the other calculation means at the lock address after the exclusive control process, the other calculation means executes the higher priority processing first. to execute the processing,
In the cache entry address calculation process, the cache entry address is calculated according to the number of the plurality of calculation means and the cache block capacity measured by a measurement program for investigating the cache structure. program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005089946A JP4199746B2 (en) | 2005-03-25 | 2005-03-25 | Computer system, exclusive control method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005089946A JP4199746B2 (en) | 2005-03-25 | 2005-03-25 | Computer system, exclusive control method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006268781A JP2006268781A (en) | 2006-10-05 |
JP4199746B2 true JP4199746B2 (en) | 2008-12-17 |
Family
ID=37204627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005089946A Expired - Fee Related JP4199746B2 (en) | 2005-03-25 | 2005-03-25 | Computer system, exclusive control method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4199746B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4767361B2 (en) * | 2008-03-31 | 2011-09-07 | パナソニック株式会社 | Cache memory device, cache memory system, processor system |
-
2005
- 2005-03-25 JP JP2005089946A patent/JP4199746B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2006268781A (en) | 2006-10-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9513959B2 (en) | Contention management for a hardware transactional memory | |
EP2972885B1 (en) | Memory object reference count management with improved scalability | |
KR101470713B1 (en) | Mechanisms to accelerate transactions using buffered stores | |
US7890725B2 (en) | Bufferless transactional memory with runahead execution | |
US20150154045A1 (en) | Contention management for a hardware transactional memory | |
JP5137971B2 (en) | Method and system for achieving both locking fairness and locking performance with spin lock | |
JP6333848B2 (en) | System and method for implementing a statistical counter with scalable competitive adaptability | |
JP4764360B2 (en) | Techniques for using memory attributes | |
JP5270268B2 (en) | Computer system for allowing exclusive access to shared data, method and computer-readable recording medium | |
JP2008501199A (en) | Thread synchronization based on lock sizing method and lock sizing device in managed runtime environment | |
KR101970390B1 (en) | Lock elision with binary translation based processors | |
US20090177847A1 (en) | System and method for handling overflow in hardware transactional memory with locks | |
US20090183159A1 (en) | Managing concurrent transactions using bloom filters | |
JP2011529603A (en) | Advanced synchronization mechanism that can be virtualized | |
JP6341931B2 (en) | System and method for implementing a shared probabilistic counter that stores update probability values | |
US11594252B2 (en) | Reader bias based locking technique enabling high read concurrency for read-mostly workloads | |
JP6310943B2 (en) | System and method for implementing a NUMA aware statistics counter | |
US20100205609A1 (en) | Using time stamps to facilitate load reordering | |
Negi et al. | π-TM: Pessimistic invalidation for scalable lazy hardware transactional memory | |
JP5435741B2 (en) | Using mold-fixability to facilitate conflict management | |
JP4199746B2 (en) | Computer system, exclusive control method, and program | |
US20130103930A1 (en) | Data processing device and method, and processor unit of same | |
JP6222100B2 (en) | Data storage device, data storage method and program | |
WO1993003436A1 (en) | Method and apparatus for reducing lock period of shared buffer | |
JP4755232B2 (en) | compiler |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071106 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071228 |
|
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: 20080924 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20081003 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111010 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4199746 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121010 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131010 Year of fee payment: 5 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |