JP2000132456A - Cache memory device for parallel computer - Google Patents

Cache memory device for parallel computer

Info

Publication number
JP2000132456A
JP2000132456A JP10301123A JP30112398A JP2000132456A JP 2000132456 A JP2000132456 A JP 2000132456A JP 10301123 A JP10301123 A JP 10301123A JP 30112398 A JP30112398 A JP 30112398A JP 2000132456 A JP2000132456 A JP 2000132456A
Authority
JP
Japan
Prior art keywords
cache
data
protocol
cache memory
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.)
Withdrawn
Application number
JP10301123A
Other languages
Japanese (ja)
Inventor
Mitsuru Sato
充 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP10301123A priority Critical patent/JP2000132456A/en
Publication of JP2000132456A publication Critical patent/JP2000132456A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the performance of the whole system by reducing the overhead of a memory access process by changing methods for consistency management according to data. SOLUTION: Cache memories 3-1 to 3-n are provided in cache memory devices 2 attached to respective processors 1 of the parallel computer and different consistency management systems are assigned to the respective cache memories 3-1 to 3-n. For example, an MEI protocol is assigned to one cache memory and data which is not referred to at all and expelled from the cache memory is accessed by using the cache memory of the MEI protocol. Further, it may be possible to specify protocols by the cache lines of the cache memories 3 by providing bits P specifying protocols for the cache lines.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、メモリアクセス高
速化のためのキャッシュメモリ装置に関し、特に、本発
明は相互結合綱によって結合された並列計算機のプロセ
ッサに付随するキャッシュメモリ装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device for speeding up memory access, and more particularly, to a cache memory device attached to a processor of a parallel computer connected by an interconnection line.

【0002】[0002]

【従来の技術】共有メモリ型並列計算機におけるキャッ
シュは、単一プロセッサ・システムのキャッシュに比べ
てキャッシュの一貫性管理の問題が発生する。ここでは
図36に示すような、プロセッサとキャッシュが共有バ
スによって接続されたシステムを例にとって説明する。
図36は並列計算機の構成例を示す図であり、プロセッ
サ101〜10nはキャッシュを通じて共有バス201
に接続している。共有バス201にはメモリ203も接
続されており、このメモリ203はすべてのプロセッサ
101〜10nで共有して使われる。並列計算機には、
このような共有バス/共有メモリ型だけではなく、分散
システムの共有メモリ型も存在するが、ここでは簡単の
ためこの形でのみ説明する。
2. Description of the Related Art A cache in a shared memory type parallel computer has a problem of coherency management of a cache as compared with a cache of a single processor system. Here, a system in which a processor and a cache are connected by a shared bus as shown in FIG. 36 will be described as an example.
FIG. 36 is a diagram illustrating a configuration example of a parallel computer, in which processors 101 to 10n share a shared bus 201 through a cache.
Connected to. A memory 203 is also connected to the shared bus 201, and the memory 203 is used in common by all the processors 101 to 10n. Parallel computers include:
There is not only such a shared bus / shared memory type but also a shared memory type of a distributed system, but here, for simplicity, only this type will be described.

【0003】図36において、プロセッサ101に付随
するキャッシュ101aがすでにメモリのコピーを持っ
ており、同じデータを他のプロセッサ102がアクセス
しようとした場合を考える。単一プロセッサの場合は、
プロセッサ102に付随するキャッシュは単純にメモリ
上のデータのコピーをキャッシュに保存するだけでよい
が、同様の方法を図36に示す並列計算機でも用いると
問題が生じる。今、プロセッサ102に付随するキャッ
シュ102aにデータが格納された後に、プロセッサ1
01がデータを更新したとする。キャッシュがライトバ
ックキャッシュであると、更新されたデータはメモリに
書き戻されず、キャッシュ101aの中に格納される。
したがって、プロセッサ102およびプロセッサ102
に付随するキャッシュ102aはデータが更新されたこ
とを知ることができない。そのため、プロセッサ102
から当該データに対する読み出し要求が発生しても、プ
ロセッサ102に付随するキャッシュ102aはいつま
でも自分が保持する更新前の古いデータを返し続けるこ
とになる。
In FIG. 36, it is assumed that a cache 101a associated with a processor 101 already has a copy of a memory, and another processor 102 attempts to access the same data. For a single processor,
The cache associated with the processor 102 may simply store a copy of the data on the memory in the cache, but a problem arises if a similar method is used in the parallel computer shown in FIG. Now, after the data is stored in the cache 102a attached to the processor 102, the processor 1
Suppose that 01 has updated the data. If the cache is a write-back cache, the updated data is not written back to the memory but is stored in the cache 101a.
Accordingly, processor 102 and processor 102
Cannot know that the data has been updated. Therefore, the processor 102
Therefore, even if a read request for the data is issued, the cache 102a attached to the processor 102 continues to return the old data before update, which is held by itself, forever.

【0004】このような状態になると、プロセッサ10
1およびプロセッサ101に付随するキャッシュ101
aが参照する値とプロセッサ102およびそれに付随す
るキャッシュ102aが参照する値の間で不一致が起こ
り、プログラマが期待する動作とは異なる動作を行なう
可能性がある。このようなことを防ぐために、複数のキ
ャッシュ間でデータを一致させるための仕組みが必要に
なる。データを一致させるためには、キャッシュ上のデ
ータまたはメモリ上のデータに状態を持たせ、状態に応
じて他のキャッシュと連携しなくてはならない。この状
態の持たせ方、連携の仕方には様々な種類がある。
In such a state, the processor 10
1 and the cache 101 associated with the processor 101
An inconsistency may occur between the value referenced by a and the value referenced by the processor 102 and its associated cache 102a, resulting in an operation different from what the programmer expects. In order to prevent such a situation, a mechanism for matching data between a plurality of caches is required. In order to match the data, the data on the cache or the data on the memory must have a state and cooperate with another cache according to the state. There are various types of ways of giving this state and ways of cooperation.

【0005】一般には、キャッシュに状態を設け、その
状態に応じて他のキャッシュと情報をやり取りする方法
が用いられる。MOESIプロトコルというプロトコル
を例にとって説明する。例として前記と同様に、図36
のような並列計算機を考える。共有バスシステムである
ので、あるプロセッサに付随したキャッシュがメモリア
クセスを行うと、その動作は他のプロセッサによって確
認することができる(スヌープキャッシュシステム)。
また、キャッシュは、各ラインごとに状態を持つことが
でき、その状態はM(Modified)、O(Owned )、E
(Exclusive )、S(Shared)、I(Invalid )の5状
態である。
In general, a method is used in which a state is provided in a cache and information is exchanged with another cache according to the state. The description will be made by taking the MOESI protocol as an example. As an example, FIG.
Consider a parallel computer like Since it is a shared bus system, when a cache associated with a certain processor performs memory access, the operation can be confirmed by another processor (a snoop cache system).
The cache can have a state for each line, and the state is M (Modified), O (Owned), E
(Exclusive), S (Shared), and I (Invalid).

【0006】プロセッサ101がアクセス要求を出し、
そのデータがキャッシュ101aに存在しなかったとす
ると、プロセッサ101に付随するキャッシュ101a
はメインメモリ202から当該データを読み出し、保存
する。そしてそのラインに対してE(Exclusive )とい
う状態をつける。次に、プロセッサ102が同じデータ
を読み出そうとすると、プロセッサ102に付随したキ
ャッシュは上記と同様の動作を行なう。この時、プロセ
ッサ101に付随したキャッシュ101aは、当該デー
タは自分が保持していることを知っているので、自分の
データの状態をS(Shared:データの共有)に変えると
ともにプロセッサ102に対して自分が保有しているこ
とを示す信号を出す。プロセッサ102に付随したキャ
ッシュ102aは、読み出したデータの状態をS(Shar
ed)にして保存する。
The processor 101 issues an access request,
If the data does not exist in the cache 101a, the cache 101a associated with the processor 101
Reads the data from the main memory 202 and stores it. Then, a state of E (Exclusive) is given to the line. Next, when the processor 102 attempts to read the same data, the cache associated with the processor 102 performs the same operation as described above. At this time, since the cache 101a attached to the processor 101 knows that the data is held by itself, it changes its own data state to S (Shared: data sharing) and Signals that you own it. The cache 102a attached to the processor 102 changes the state of the read data to S (Shar
ed) and save.

【0007】この状態で、プロセッサ101が当該デー
タに対して書き込みを行なおうとすると、プロセッサ1
01に付随したキャッシュ101aはまずデータの状態
を確認する。すると状態がS(Shared)であるので、他
のキャッシュが同じデータを持っていることを知ること
ができる。そこで、プロセッサ101に付随したキャッ
シュ101aは一貫性を保つため、データを更新する前
に、他のキャッシュに対してデータを無効化するよう要
求するか、更新されるデータを通知する。このように、
キャッシュラインの状態に応じて他のプロセッサとやり
とりすることによって一貫性を保持することができる。
In this state, if the processor 101 attempts to write the data, the processor 1
First, the cache 101a attached to 01 checks the state of data. Then, since the state is S (Shared), it is possible to know that another cache has the same data. Therefore, in order to maintain consistency, the cache 101a attached to the processor 101 requests another cache to invalidate the data or notifies the data to be updated before updating the data. in this way,
Coherency can be maintained by interacting with other processors depending on the state of the cache line.

【0008】[0008]

【発明が解決しようとする課題】しかし、従来の技術で
は、すべてのデータに対して同様の一貫性管理方式を適
用しており、データによっては処理が遅くなってしまう
可能性があった。たとえば、あるプロセッサAが頻繁に
書き込みをして、それを他のプロセッサが一度づつ読む
というデータがあったと仮定する。プロセッサA以外の
プロセッサが参照すると、そのプロセッサに付随するキ
ャッシュがコピーを持ってしまうため、プロセッサAに
付随するキャッシュは当該データをS状態(共有)にし
てしまい、次の書き込み時には一貫性管理処理を行なわ
なければならなくなる。ところが、この場合は、他のプ
ロセッサはもはや参照することはないので、その一貫性
管理処理は無駄な処理となってしまう。このような無駄
な処理が重なると、プログラムの実行は必要以上に遅く
なってしまう。
However, in the prior art, the same consistency management method is applied to all data, and there is a possibility that the processing may be delayed depending on the data. For example, suppose that there is data that one processor A frequently writes, and another processor reads it one at a time. When a processor other than the processor A refers to the cache, the cache associated with the processor A has a copy. Therefore, the cache associated with the processor A changes the data to the S state (shared). Have to be done. However, in this case, since the other processors no longer refer to the data, the consistency management processing is useless. When such useless processes overlap, the execution of the program becomes unnecessarily slow.

【0009】本発明は上記した事情を考慮してなされた
ものであって、その目的とするところは、データに応じ
て一貫性管理の方法を変え、適度な一貫性管理ができる
ようにすることによりメモリアクセス処理のオーバヘッ
ドを削減し、システム全体の性能を向上させることであ
る。
The present invention has been made in view of the above circumstances, and has as its object to change the method of consistency management according to data so that appropriate consistency management can be performed. Is to reduce the overhead of the memory access process and improve the performance of the entire system.

【0010】[0010]

【課題を解決するための手段】本発明では、データごと
に違う一貫性管理方式を用いることができるようにする
ため、次の(1)(2)の方法を用いる。なお、複数の
キャッシュ間での一貫性管理を行う方式を、キャッシュ
プロトコル(必要に応じて以下ではプロトコルと略記す
る)という。
According to the present invention, the following methods (1) and (2) are used in order to use a different consistency management method for each data. A method of performing consistency management between a plurality of caches is referred to as a cache protocol (hereinafter, abbreviated as a protocol as necessary).

【0011】(1)並列計算機の各プロセッサに付随す
るキャッシュメモリ装置内に複数のキャッシュメモリを
用意し、それぞれのキャッシュメモリにそれぞれ別の一
貫性管理方式を割り当てる(同じ一貫性管理方式が割り
当てられたものが複数あってもよい)。すなわち、図1
(a)に示すように、各プロセッサ1に付随するキャッ
シュメモリ装置2の中に、複数のキャッシュメモリ3−
1〜3−n、キャッシュ制御装置4−1〜4−1nを設
け、それぞれのキャッシュメモリ3−1〜3−nに別々
の一貫性管理動作をさせる。
(1) A plurality of cache memories are prepared in a cache memory device associated with each processor of a parallel computer, and a different consistency management method is assigned to each cache memory (the same consistency management method is assigned. May be more than one). That is, FIG.
As shown in (a), a plurality of cache memories 3-3 are stored in a cache memory device 2 associated with each processor 1.
1 to 3-n and the cache control devices 4-1 to 4-1n are provided, and each of the cache memories 3-1 to 3-n performs a separate consistency management operation.

【0012】(2)キャッシュメモリを分割せずに、ひ
とつのキャッシュメモリだけを用意して、データ毎にど
の一貫性管理方式(プロトコル)を用いるかを区別でき
るようにする。このため、本発明においてはキャッシュ
ライン毎にどの一貫性管理方式を用いるかを区別できる
ようにする。すなわち、図1(b)に示すように、各プ
ロセッサ1に付随するキャッシュメモリ装置2の中に、
一つのキャッシュメモリ3、キャッシュ制御装置4を設
け、キャッシュメモリ3の各キャッシュラインにプロト
コルを指定するビットPを設け、キャッシュライン毎に
プロトコルを指定できるようにする。この方法では、キ
ャッシュ制御装置4が各ラインごとにどのような一貫性
管理方式を使うか判断し動作する。上記(1)(2)の
ようにすることにより一貫性管理方式(プロトコル)を
使い分けることができる。
(2) Only one cache memory is prepared without dividing the cache memory so that it is possible to distinguish which consistency management method (protocol) is used for each data. Therefore, in the present invention, it is possible to distinguish which consistency management method is used for each cache line. That is, as shown in FIG. 1B, in the cache memory device 2 associated with each processor 1,
One cache memory 3 and a cache control device 4 are provided, and a bit P for designating a protocol is provided for each cache line of the cache memory 3 so that a protocol can be designated for each cache line. In this method, the cache control device 4 operates by determining what consistency management method is used for each line. By performing the above (1) and (2), the consistency management method (protocol) can be used properly.

【0013】プロセッサ上で走るプログラムによってあ
らかじめ、どのデータがどの一貫性管理方式を用いれば
良いかわかっている場合には、上記(1)(2)におい
て、プロセッサからどのキャッシュメモリを用いるか、
あるいは、キャッシュラインにどのプロトコルを割り当
てるかを指定することができる。しかし、常にプログラ
ムによってデータに適した一貫性管理方法が明らかであ
るとは限らないので、それを自動的に判別する方法が必
要である。そのため、それぞれのキャッシュラインにリ
ファレンスカウンタを付加する。このリファレンスカウ
ンタは、当該キャッシュラインがどのくらいプロセッサ
によって参照されたかを表すもので、この値をプロセッ
サが参照することによって、適切な一貫性管理方法を選
択する基準とすることができる。
If it is known in advance by a program running on the processor which data should use which consistency management method, in the above (1) and (2), which cache memory should be used by the processor,
Alternatively, it is possible to specify which protocol is assigned to the cache line. However, since a consistency management method suitable for data is not always clear by a program, a method for automatically determining the consistency management method is required. Therefore, a reference counter is added to each cache line. The reference counter indicates how much the cache line has been referred to by the processor, and can be used as a reference for selecting an appropriate consistency management method by referring to this value.

【0014】さらに進めてハードウェアによって自動的
に適切な一貫性管理方法を選択するために、具体的なプ
ロトコルを仮定したシステムを提案する。具体的には、
他のキャッシュメモリとのデータの共有を許さないプロ
トコル(例えばMOESI、MESIプロトコル)と他
のキャッシュメモリとのデータの共有を許すプロトコル
(例えばMEIプロトコル)の組合わせを使って、自動
的にどちらの一貫性管理方式を使うかを判断する。
In order to further select the appropriate consistency management method automatically by the hardware, a system which assumes a specific protocol is proposed. In particular,
Using a combination of a protocol that does not allow data sharing with another cache memory (for example, MOESI, MESI protocol) and a protocol that allows data sharing with another cache memory (for example, MEI protocol), either of them is automatically performed. Determine whether to use the consistency management method.

【0015】このため、以下の下の3の方法を用いるこ
とができる。 (1) 主に「他のキャッシュメモリとのデータの共有を許
さないプロトコル」を使い、参照されにくいデータのみ
「他のキャッシュメモリとのデータの共有を許すプロト
コル」を使う。 (2) 主に「他のキャッシュメモリとのデータの共有を許
すプロトコル」を使い、頻繁に参照されるデータのみ
「他のキャッシュメモリとのデータの共有を許さないプ
ロトコル」を使う。 (3) どちらのプロトコルを使うかの判断基準を適応的に
変化させる。
For this reason, the following three methods can be used. (1) Mainly use the "protocol that does not allow data sharing with other cache memories", and use the "protocol that allows data sharing with other cache memories" only for data that is difficult to refer to. (2) Mainly use the "protocol that allows data sharing with other cache memories", and use only the frequently referenced data "protocol that does not allow data sharing with other cache memories". (3) The criteria for determining which protocol to use is adaptively changed.

【0016】例えば、本発明では、MOESIまたはM
ESIプロトコルとMEIプロトコルの2つを組み合わ
せる。そして、前記(1)のようにそれぞれのプロトコ
ルを用いるキャッシュメモリに分割する方法と、前記
(2)のようにキャッシュラインごとにどちらのプロト
コルを用いるかを示すビットを付加する方法を用いて一
貫性管理を行う。どちらの方式にも、各キャッシュライ
ンごとに先にあげたリファレンスカウンタが付加する。
このリファレンスカウンタを用いて、自動的にMOES
I/MESIプロトコルとMEIプロトコルを使い分け
るには大きく分けて以下の2つの方法がある。ひとつ
は、主にMOESI/MESIプロトコルを使い、特
定の条件が満たされたときだけMEIプロトコルを使う
方法、もうひとつはその逆、すなわち主にMEIプロ
トコルを使い、特定の条件が満たされたときだけMOE
SI/MESIプロトコルを使う方法である。
For example, in the present invention, MOESI or M
Combine the two of the ESI protocol and the MEI protocol. Then, a method of dividing into cache memories using respective protocols as in the above (1) and a method of adding a bit indicating which protocol is used for each cache line as in the above (2) are consistently used. Perform sex management. In either method, the above-described reference counter is added for each cache line.
Using this reference counter, MOES
There are two main methods for selectively using the I / MESI protocol and the MEI protocol. One is to use the MOESI / MESI protocol mainly and use the MEI protocol only when a specific condition is satisfied. The other is to use the MEI protocol mainly and use the MEI protocol mainly and only when a specific condition is satisfied. MOE
This is a method using the SI / MESI protocol.

【0017】上記を実現するには、S状態を作らなく
てもよいデータを見極めればよい。そのために、まずア
ドレスを登録できるテーブルを用意する。次に、リファ
レンスカウンタを調べ、全く参照されずにキャッシュメ
モリから追い出されるデータを見つける。見つけたデー
タのアドレスを、先のテーブルに登録しておき、次回か
らはS状態を作らないMEIプロトコルを用いるように
する。この方法は、前記(1)のキャッシュメモリを2
つ用意する方法、(2)のキャッシュラインごとにプロ
トコルを選択できるようにする方法の両方に同様に適用
できる。上記を実現するためには、先の方式の逆を行
なえば良い。すなわち、同様にアドレスを登録できるテ
ーブルを用意し、リファレンスカウンタを調べる。ある
時、ある程度たくさん(本発明ではこれを一定数cとし
ている)参照された後にキャッシュメモリから追い出さ
れるデータを見つけ、テーブルに登録する。次回からこ
のデータに関しては、S状態を使うMOESI/MES
Iプロトコルを用いる。この場合も先の方法と同様に、
前記(1)のキャッシュメモリを2つ用意する方法、
(2)のキャッシュラインごとにプロトコルを選択でき
るようにする方法の両方に適用できる。
In order to realize the above, it is only necessary to determine data for which the S state need not be created. For this purpose, first, a table in which addresses can be registered is prepared. Next, the reference counter is examined to find data that is evicted from the cache memory without being referenced at all. The address of the found data is registered in the previous table, and the MEI protocol that does not create the S state will be used from the next time. In this method, the cache memory of (1) is
The same method can be applied to both the method of preparing one and the method (2) of allowing a protocol to be selected for each cache line. In order to realize the above, the reverse of the above method may be performed. That is, a table in which addresses can be registered is prepared, and the reference counter is checked. At some point, data that is referenced from the cache memory after a certain number of references (this is set to a fixed number c) is found and registered in a table. MOESI / MES using S state from next time
I protocol is used. Again, as in the previous method,
A method of preparing two cache memories of the above (1),
The method (2) can be applied to both of the methods of allowing a protocol to be selected for each cache line.

【0018】この方法はさらに拡張することができる。
すなわち、ある程度たくさん参照されたかどうかを判断
する基準値cは固定であったが、これを動的に変化させ
る方式である。基準値cを動的に変化させることによっ
て、キャッシュサイズやプログラムの性質による違いを
吸収することができる。動的に変化させるための具体的
な方法として、本発明では上記(1)において、MOE
SI/MESIプロトコルを用いるキャッシュで衝突が
生じた場合に上記基準値cを+1、MEIプロトコルを
用いるキャッシュで衝突が生じた場合には上記基準値か
ら−1する方法を用いる。これは2つのキャッシュメモ
リを用いる方法にのみ適用される。
This method can be further extended.
In other words, the reference value c for determining whether or not a certain number of references have been made is fixed, but is dynamically changed. By dynamically changing the reference value c, differences due to cache size and program characteristics can be absorbed. As a specific method for dynamically changing, in the present invention, in the above (1), the MOE
In the case where a collision occurs in a cache using the SI / MESI protocol, the above-mentioned reference value c is incremented by 1, and when a collision occurs in a cache using the MEI protocol, a method of subtracting -1 from the above-mentioned reference value is used. This applies only to the method using two cache memories.

【0019】[0019]

【発明の実施の形態】以下、本発明の実施の形態につい
て説明する。 (1)実施例1 図2は、本発明の第1の実施例の構成を示す図であり、
同図に示すシステムは、複数のプロセッサ11がキャッ
シュメモリ装置20を介して共有バス12に接続され、
メモリ13が共有バス12に接続されている共有メモリ
システムを構成している。キャッシュメモリ装置20の
中には、2つのキャッシュメモリ21,22と2つのキ
ャッシュ制御装置21a,22a(以下制御装置とい
う)が配置されている。それぞれのキャッシュメモリ2
1,22と制御装置21a,22aの組合わせは、通常
のキャッシュと同様に働く。すなわち、メモリ13側か
ら見ると、独立した複数のキャッシュメモリ装置が接続
されているように見える。
Embodiments of the present invention will be described below. (1) First Embodiment FIG. 2 is a diagram showing a configuration of a first embodiment of the present invention.
In the system shown in FIG. 1, a plurality of processors 11 are connected to a shared bus 12 via a cache memory device 20,
The memory 13 constitutes a shared memory system connected to the shared bus 12. In the cache memory device 20, two cache memories 21, 22 and two cache control devices 21a, 22a (hereinafter, referred to as control devices) are arranged. Each cache memory 2
The combination of the control devices 21 and 22 and the control devices 21a and 22a works in the same manner as a normal cache. That is, when viewed from the memory 13 side, it looks as if a plurality of independent cache memory devices are connected.

【0020】それぞれのキャッシュメモリ21,22
は、例えば図3に示すようなキャッシュラインにより構
成されている。なお、キャッシュの構成方法にはフルア
ソシアティブ方式、セットアソシアティブ方式とダイレ
クトマップ方式があるが、図3ではダイレクト・マップ
方式を示しており、〔V〕はvalid/invalid (1:vali
d:有効/0:invalid :無効)を表すビット、〔状態〕
はキャッシュの状態を示すビットであり、例えば、MO
ESIのプロトコルのキャッシュの場合には、S(1:sh
ared/0:non-shared)、D(1:dirty /0:clean )のビ
ットからなり、上記〔V〕を含めた各ビット状態とMO
ESIの状態の対応は図4(a)に示すようになる(但
し〔X〕は任意の値を表す)。
Each of the cache memories 21 and 22
Is constituted by, for example, a cache line as shown in FIG. Note that there are a full associative method, a set associative method, and a direct map method in the cache configuration method. FIG. 3 shows the direct map method, and [V] is valid / invalid (1: vali
d: valid / 0: invalid (invalid), [Status]
Is a bit indicating the state of the cache, for example, MO
In the case of the cache of the ESI protocol, S (1: sh
ared / 0: non-shared) and D (1: dirty / 0: clean) bits, each bit state including the above [V] and MO
The correspondence of the ESI states is as shown in FIG. 4A (where [X] represents an arbitrary value).

【0021】また、MEIのプロトコルのキャッシュの
場合には、D(1:dirt/0:clean )のビットからなり、
上記〔V〕を含めた各ビット状態とMEIの状態の対応
は図4(b)に示すようになる。制御装置21a,22
aは、キャッシュの動きを制御するものであり、プロセ
ッサからの参照要求の解決、メモリの読み出し、キャッ
シュの状態確認、キャッシュへのデータの格納等を行な
う。
In the case of the cache of the MEI protocol, the cache consists of D (1: dirt / 0: clean) bits,
FIG. 4B shows the correspondence between each bit state including the above [V] and the state of the MEI. Control devices 21a, 22
“a” controls the movement of the cache, and performs resolution of a reference request from a processor, reading of a memory, confirmation of a cache state, storage of data in the cache, and the like.

【0022】図2において、キャッシュメモリ21,2
2には、それぞれ別の一貫性管理方式が割り当てられて
いる。例えば、一方のキャッシュメモリ21にMOES
Iプロトコルを割り当て、他方のキャッシュメモリ22
にMEIプロトコルを割り当てる。そして、全く参照さ
れずにキャッシュメモリ21,22から追い出されるデ
ータなどS状態を作らないくてもよいデータには、キャ
ッシュメモリ22を割り当て、頻繁に参照される可能性
のあるデータ等、S状態を作る必要のあるデータには、
キャッシュメモリ21を割り当てる。また、プロセッサ
11上で走るプログラムによってあらかじめ、どのデー
タがどの一貫性管理方式を用いれば良いかわかっている
場合には、プロセッサ11からどのキャッシュメモリを
用いるかを指定する。
In FIG. 2, cache memories 21 and
2 are assigned different consistency management schemes. For example, MOES is stored in one cache memory 21.
I protocol and the other cache memory 22
To the MEI protocol. The cache memory 22 is allocated to data that does not need to be referred to at all and is not required to create an S state, such as data that is evicted from the cache memories 21 and 22, and the S state is assigned to data that may be frequently referred to. The data that needs to be
The cache memory 21 is allocated. If a program running on the processor 11 knows in advance which data should use which consistency management method, the processor 11 specifies which cache memory to use.

【0023】このようにどのキャッシュメモリを用いる
かを指定する例としては、先読み制御を行う場合があ
る。先読みを行う場合、先読みしたデータは使用される
確実性が低い。そこで、先読みを行う場合には、プロセ
ッサが先読みであることをキャッシュに通知して、S
(Shared)状態を作らないようにする。これにより、無
駄になる可能性のある一貫性管理処理を避けることがで
きる。
As an example of specifying which cache memory is to be used, there is a case where read-ahead control is performed. When performing prefetching, there is a low probability that the prefetched data will be used. Therefore, when performing prefetching, the processor notifies the cache that the prefetching is performed, and executes S
(Shared) Do not create a state. Thereby, it is possible to avoid a consistency management process that may be wasted.

【0024】図5は本実施例を先読み制御に適用した構
成例を示す図である。図5において、11はプロセッ
サ、14は先読み制御部であり、先読み制御部14はプ
ロセッサ11がデータの先読みを行う場合に、先読みデ
ータ通知を出力する。21はMOESIプロトコルのキ
ャッシュメモリ、22はMEIプロトコルのキャッシュ
メモリ、21a,22aはキャッシュ制御装置、15は
キャッシュ選択制御部、16はセレクタであり、キャッ
シュ選択制御部15は先読み制御部14が出力する先読
みデータ通知に基づき、セレクタ16を切り替え、キャ
ッシュ21,22の内、いずれのキャッシュを用いるか
を選択する。例えば、先読みデータが通知された場合、
先読みしたデータは使用される確実性が低いので、キャ
ッシュ選択制御部15はセレクタ16をMEIプロトコ
ルのキャッシュメモリ22側に切り替え、キャッシュメ
モリ22を経由して共有バス12に読出し要求を出す。
FIG. 5 is a diagram showing a configuration example in which this embodiment is applied to prefetch control. In FIG. 5, reference numeral 11 denotes a processor, and reference numeral 14 denotes a prefetch control unit. The prefetch control unit 14 outputs a prefetch data notification when the processor 11 prefetches data. 21 is a cache memory of the MOESI protocol, 22 is a cache memory of the MEI protocol, 21a and 22a are cache control devices, 15 is a cache selection control unit, 16 is a selector, and the cache selection control unit 15 is output by the prefetch control unit 14. Based on the pre-read data notification, the selector 16 is switched to select which of the caches 21 and 22 to use. For example, when the prefetch data is notified,
Since the read-ahead data has low reliability, the cache selection control unit 15 switches the selector 16 to the MEI protocol cache memory 22 side, and issues a read request to the shared bus 12 via the cache memory 22.

【0025】図6はメモリ読み出し時の動作を示すフロ
ーチャートであり、同図により図5の実施例の動作を説
明する。プロセッサがメモリアクセスをすると、まずキ
ャッシュを検索し、キャッシュにヒットしたかを調べる
(ステップS1,S2)。キャッシュにヒットした場合
には、ステップS10に行き、プロセッサにキャッシュ
から読み出したデータを返す。また、キャッシュにヒッ
トしない場合には、ステップS3に行き、先読みである
かを調べる。先読みの場合には、ステップS11に行
き、MEIプロトコルのキャッシュメモリ22経由で共
有バスに読み出し要求を出し、ステップS12で、V=
1(valid )、D=0(clean )としてキャッシュメモ
リ22にデータを格納する。
FIG. 6 is a flowchart showing the operation at the time of memory reading, and the operation of the embodiment of FIG. 5 will be described with reference to FIG. When the processor accesses the memory, the cache is first searched to determine whether or not the cache has been hit (steps S1 and S2). If the cache hits, the process proceeds to step S10, and the data read from the cache is returned to the processor. If no hit is found in the cache, the process proceeds to step S3, and it is checked whether the cache is a prefetch. In the case of pre-reading, the process proceeds to step S11, where a read request is issued to the shared bus via the cache memory 22 of the MEI protocol.
Data is stored in the cache memory 22 as 1 (valid) and D = 0 (clean).

【0026】また、先読みでない場合には、ステップS
4に行き、MOESIプロトコルのキャッシュメモリ2
1経由で共有バスに読み出し要求を出す。そしてステッ
プS5で他のキャッシュメモリがデータを持っているか
を調べ、他のキャッシュメモリがデータを持っていない
場合には、V=1(valid )、S=0(non-shared)、
D=0(clean )として、キャッシュメモリ21にデー
タを格納し、ステップS11に行く。他のキャッシュメ
モリがデータを持っている場合には、ステップS6に行
き、データはダーティであるかを調べる。データがダー
ティの場合には、ステップS7に行き、V=1(valid
)、S=1(shared)、D=1(dirty )として、キ
ャッシュメモリ21にデータを格納し、ステップS10
に行く。
If it is not prefetching, step S
4, go to MOESI protocol cache memory 2
1 and issues a read request to the shared bus. In step S5, it is checked whether or not another cache memory has data. If the other cache memory does not have data, V = 1 (valid), S = 0 (non-shared),
Assuming that D = 0 (clean), the data is stored in the cache memory 21, and the procedure goes to step S11. If the other cache memory has the data, the process goes to step S6 to check whether the data is dirty. If the data is dirty, go to step S7, where V = 1 (valid
), S = 1 (shared) and D = 1 (dirty), the data is stored in the cache memory 21, and step S10
go to.

【0027】また、データがダーティでない場合には、
ステップS8に行き、V=1(valid )、S=1(shar
ed)、D=0(clean )として、キャッシュメモリ21
にデータを格納し、ステップS10に行く。以上のよう
に本実施例によれば、プロトコルの異なる2つのキャッ
シュメモリ装置を設け、全く参照されずにキャッシュメ
モリから追い出されるデータについては、S状態を持た
ないプロトコルのキャッシュに割り当てるようにしてい
るので、無駄な一貫性処理が行われることがなく、処理
速度を向上させることができる。
If the data is not dirty,
Go to step S8, where V = 1 (valid), S = 1 (shar
ed), D = 0 (clean) and the cache memory 21
And the process goes to step S10. As described above, according to the present embodiment, two cache memory devices having different protocols are provided, and data that is evicted from the cache memory without being referred to at all is assigned to a cache of a protocol having no S state. Therefore, useless consistency processing is not performed, and the processing speed can be improved.

【0028】(2)実施例2 図7は本発明の第2の実施例の構成を示す図である。図
7では、前記したように複数のプロセッサ11がキャッ
シュメモリ装置20を介して共有バス12に接続され、
メモリ13が共有バス12に接続されている共有メモリ
システムを構成しており、キャッシュメモリ装置20の
中にキャッシュメモリ21およびキャッシュ制御装置2
1aがそれぞれひとつずつ配置されている。このキャッ
シュメモリは図8に示すようなキャッシュラインによっ
て構成されており、前記図3のキャッシュラインと比べ
ると、各キャッシュラインごとにプロトコルを指定する
ビットが付加されているところが相違している。このビ
ットのビット数は、扱うプロトコルの数によって変化す
る。
(2) Embodiment 2 FIG. 7 is a diagram showing a configuration of a second embodiment of the present invention. In FIG. 7, a plurality of processors 11 are connected to the shared bus 12 via the cache memory device 20 as described above,
The memory 13 constitutes a shared memory system in which the shared memory 12 is connected to the shared bus 12, and the cache memory 21 and the cache control device 2
1a are arranged one by one. This cache memory is constituted by cache lines as shown in FIG. 8, and is different from the cache line of FIG. 3 in that a bit for designating a protocol is added to each cache line. The number of bits varies depending on the number of protocols to be handled.

【0029】すなわち、本実施例においては、キャッシ
ュライン毎にプロトコルを指定することができ、このた
め、本実施例ではキャッシュメモリおよび制御装置はひ
とつのプロセッサに対して一つずつしかない。本実施例
では、すべてのキャッシュ動作は通常のキャッシュ動作
の前に「プロトコル指定ビットを調べて、どのプロトコ
ルを用いるか決定する」という動作が入る。その後は、
選択したプロトコルにしたがってキャッシュ動作を行な
う。
That is, in the present embodiment, a protocol can be designated for each cache line. Therefore, in this embodiment, only one cache memory and one control device are provided for one processor. In this embodiment, all the cache operations include an operation of "checking a protocol specification bit and determining which protocol to use" before a normal cache operation. After that,
The cache operation is performed according to the selected protocol.

【0030】例えば、全く参照されずにキャッシュメモ
リ21から追い出されるデータには、プロトコル指定ビ
ットによりMEIプロトコルを割り当て、頻繁に参照さ
れる可能性のあるデータには、プロトコル指定ビットに
よりMOESIプロトコルを割り当てる。また、プロセ
ッサ11上で走るプログラムによってあらかじめ、どの
データがどの一貫性管理方式を用いれば良いかわかって
いる場合には、前記したように、プロセッサ11からど
のプロトコルを用いるかを指定する。
For example, the MEI protocol is assigned to data that is evicted from the cache memory 21 without being referred to at all by the protocol designation bit, and the MOESI protocol is assigned to the data that may be frequently referred to by the protocol designation bit. . If a program running on the processor 11 knows in advance which data should use which consistency management method, the processor 11 specifies which protocol to use as described above.

【0031】以下、前記した先読み制御を例にとり本実
施例の具体例について説明する。図9は本実施例を先読
み制御に適用した具体的構成例である。図9において、
11はプロセッサ、14は先読み制御部であり、先読み
制御部14はプロセッサ11がデータの先読みを行う場
合に、先読みデータ通知を出力する。21はキャッシュ
メモリ、21aはキャッシュ制御装置、17はプロトコ
ル選択制御部であり、プロトコル選択制御部17は先読
み制御部14が出力する先読みデータ通知に基づき、キ
ャッシュラインのプロトコルを選択する。例えば、先読
みデータが通知された場合には、前記と同様、プロトコ
ル選択制御部17は、プロトコルをMEIにして、共有
バスに読み出し要求を出す。
Hereinafter, a specific example of the present embodiment will be described by taking the above-described prefetch control as an example. FIG. 9 shows a specific configuration example in which this embodiment is applied to prefetch control. In FIG.
Reference numeral 11 denotes a processor, and reference numeral 14 denotes a prefetch control unit. The prefetch control unit 14 outputs a prefetch data notification when the processor 11 prefetches data. Reference numeral 21 denotes a cache memory, reference numeral 21a denotes a cache control device, and reference numeral 17 denotes a protocol selection control unit. The protocol selection control unit 17 selects a protocol of a cache line based on a prefetch data notification output from the prefetch control unit 14. For example, when the prefetch data is notified, the protocol selection control unit 17 sets the protocol to MEI and issues a read request to the shared bus as described above.

【0032】図10はメモリ読み出し時の動作を示すフ
ローチャートであり、同図により本実施例の動作につい
て説明する。プロセッサがメモリアクセスをすると、ま
ずキャッシュを検索し、キャッシュにヒットしたかを調
べる(ステップS1,S2)。キャッシュにヒットした
場合には、ステップS10に行き、プロセッサにキャッ
シュから読み出したデータを返す。また、キャッシュに
ヒットしない場合には、ステップS3に行き、先読みで
あるかを調べる。先読みの場合には、ステップS11に
行き、プロトコルをMEIとして、共有バスに読み出し
要求を出し、ステップS12で、V=1(valid )、D
=0(clean )、P=0(MOESI:1 /MEI:0 )としてキ
ャッシュメモリ21にデータを格納する(SビットはP
=1の場合のみ有効で、P=0のときは無視される)。
FIG. 10 is a flowchart showing the operation at the time of memory reading, and the operation of this embodiment will be described with reference to FIG. When the processor accesses the memory, the cache is first searched to determine whether or not the cache has been hit (steps S1 and S2). If the cache hits, the process proceeds to step S10, and the data read from the cache is returned to the processor. If no hit is found in the cache, the process proceeds to step S3, and it is checked whether the cache is a prefetch. In the case of pre-reading, the procedure goes to step S11, and a read request is issued to the shared bus with the protocol set to MEI. At step S12, V = 1 (valid), D
= 0 (clean) and P = 0 (MOESI: 1 / MEI: 0) and store data in the cache memory 21 (S bit is P
Is effective only when = 1, and is ignored when P = 0).

【0033】また、先読みでない場合には、ステップS
4に行き、プロトコルをMOESIとして共有バスに読
み出し要求を出す。そしてステップS5で他のキャッシ
ュメモリがデータを持っているかを調べ、他のキャッシ
ュメモリがデータを持っていない場合には、V=1(va
lid )、S=0(non-shared)、D=0(clean )、P
=1(MOESI )として、キャッシュメモリ21にデータ
を格納し、ステップS10に行く。他のキャッシュメモ
リがデータを持っている場合には、ステップS6に行
き、データはダーティであるかを調べる。データがダー
ティの場合には、ステップS7に行き、V=1(valid
)、S=1(shared)、D=1(dirty )、P=1(M
OESI )として、キャッシュメモリ21にデータを格納
し、ステップS10に行く。また、データがダーティで
ない場合には、ステップS8に行き、V=1(valid
)、S=1(shared)、D=0(clean )、P=1(M
OESI )として、キャッシュメモリ21にデータを格納
し、ステップS14に行く。
If it is not prefetching, step S
4 and issues a read request to the shared bus with the protocol being MOESI. In step S5, it is checked whether or not the other cache memory has data. If the other cache memory has no data, V = 1 (va
lid), S = 0 (non-shared), D = 0 (clean), P
= 1 (MOESI), the data is stored in the cache memory 21, and the process goes to step S10. If the other cache memory has the data, the process goes to step S6 to check whether the data is dirty. If the data is dirty, go to step S7, where V = 1 (valid
), S = 1 (shared), D = 1 (dirty), P = 1 (M
OESI), the data is stored in the cache memory 21, and the process goes to step S10. If the data is not dirty, the process goes to step S8 and V = 1 (valid
), S = 1 (shared), D = 0 (clean), P = 1 (M
OESI), the data is stored in the cache memory 21, and the process goes to step S14.

【0034】以上のように本実施例によれば、キャッシ
ュライン毎にプロトコルを指定できるようにし、全く参
照されずにキャッシュメモリから追い出されるデータに
ついては、S状態を持たないプロトコルを指定するよう
にしたので、第1の実施例と同様、無駄な一貫性処理が
行われることがなく、処理速度を向上させることができ
る。また、キャッシュメモリ、キャッシュ制御装置がプ
ロセッサ毎に一つあればよいので、第1の実施例と比べ
構成を簡単化することができる。
As described above, according to this embodiment, a protocol can be designated for each cache line, and a protocol having no S state is designated for data that is evicted from the cache memory without being referred to at all. Therefore, as in the first embodiment, unnecessary consistency processing is not performed, and the processing speed can be improved. Further, since only one cache memory and one cache control device are required for each processor, the configuration can be simplified as compared with the first embodiment.

【0035】(3)実施例3 本実施例は、実施例1および実施例2にあげたキャッシ
ュメモリ装置にリファレンスカウンタを付加したもので
ある。本実施例の構成は、前記図2、図7と同様であ
り、複数のプロセッサ11がキャッシュメモリ装置20
を通して共有バス12に接続される形態をとっており、
メモリ13は共有バス12に接続されており井有メモリ
システムを構成している。それぞれのキャッシュメモリ
装置20には、複数のキャッシュメモリもしくは、一つ
のキャッシュメモリ設けられている。本実施例において
は、図11、図12に示すように、キャッシュメモリ2
1の各ラインに、そのラインに格納されたデータが参照
された回数を表すリファレンスカウンタを付加してい
る。なお、図11、図12は前記図3および図8に対応
し、リファレンスカウンタを付加した点以外は、図3、
図8と同じである。
(3) Embodiment 3 In this embodiment, a reference counter is added to the cache memory device described in Embodiments 1 and 2. The configuration of the present embodiment is the same as that of FIGS. 2 and 7 described above.
Is connected to the shared bus 12 through
The memory 13 is connected to the shared bus 12 and constitutes an Inari memory system. Each cache memory device 20 is provided with a plurality of cache memories or one cache memory. In the present embodiment, as shown in FIGS.
A reference counter indicating the number of times data stored in the line is referred to is added to each line. 11 and 12 correspond to FIGS. 3 and 8 except that a reference counter is added.
It is the same as FIG.

【0036】このリファレンスカウンタの値は、キャッ
シュにデータが格納されたときに0にクリアされ、以降
プロセッサによって読み出し/書き込みが行われる毎に
+1される。上記リファレンスカウンタの値は、プロセ
ッサ11によって読み出すことができる。したがって、
プロセッサ11はリファレンスカウンタの値により、全
く参照されずにキャッシュメモリ21,22から追い出
されるデータと、頻繁に参照される可能性のあるデータ
(のアドレス)を知ることができ、これを基準として適
切な一貫性管理方式を選択することができる。
The value of this reference counter is cleared to 0 when data is stored in the cache, and is incremented by one each time reading / writing is performed by the processor. The value of the reference counter can be read by the processor 11. Therefore,
Based on the value of the reference counter, the processor 11 can know the data that is evicted from the cache memories 21 and 22 without being referred to at all and the (address of) the data that may be frequently referred to. A consistent consistency management method.

【0037】例えば、前記第1の実施例に示したよう
に、全く参照されずにキャッシュメモリ21,22から
追い出されるデータには、キャッシュメモリ22を割り
当て、頻繁に参照される可能性のあるデータには、キャ
ッシュメモリ21を割り当てたり、また第2の実施例の
ように、プロセッサ11が、どのプロトコルを用いるか
を指定することが可能となる。上記のように、リファレ
ンスカウンタを設けることによって、プログラムによっ
てデータに適切なプロトコルを決定するための助けにな
る。
For example, as shown in the first embodiment, the cache memory 22 is allocated to data that is evicted from the cache memories 21 and 22 without being referred to at all, and data that may be frequently referred to is assigned. , It is possible to allocate the cache memory 21 and, as in the second embodiment, to specify which protocol the processor 11 uses. As mentioned above, providing a reference counter helps the program determine the appropriate protocol for the data.

【0038】(4)実施例4 図13は、一貫性管理方式としてMOESIプロトコル
を用いたキャッシュメモリとMEIプロトコルを用いた
キャッシュメモリを組み合わせるとともに、各キャッシ
ュメモリのキャッシュラインにリファレンスカウンタを
付加し、さらに、アドレスを格納するためのアドレステ
ーブルを付随させた実施例を示している。本実施例の構
成は、前記図2と同様であり、複数のプロセッサ11が
キャッシュメモリ装置20を介して共有バス12に接続
され、メモリ13が共有バス12に接続されている共有
メモリシステムを構成している。キャッシュメモリ装置
20の中には、2つのキャッシュメモリ21,22とプ
ロトコルの異なる2つのキャッシュ制御装置21a,2
2aが配置されている。
(4) Fourth Embodiment FIG. 13 shows a combination of a cache memory using the MOESI protocol and a cache memory using the MEI protocol as a coherence management method, and adding a reference counter to a cache line of each cache memory. Further, an embodiment in which an address table for storing addresses is added is shown. The configuration of the present embodiment is the same as that of FIG. 2 described above, and constitutes a shared memory system in which a plurality of processors 11 are connected to a shared bus 12 via a cache memory device 20 and a memory 13 is connected to the shared bus 12. are doing. The cache memory device 20 includes two cache memories 21 and 22 and two cache controllers 21a and 21 with different protocols.
2a is arranged.

【0039】図14、図15は本実施例におけるキャッ
シュラインであり、図14はMOESIプロトコルのキ
ャッシュラインを示し、図15はMEIプロトコルのキ
ャッシュラインを示している。MOESIプロトコルの
キャッシュラインには、図14に示すように、前記図1
1に示した〔状態〕に対応するビットとしてS(shared
/non-shared)、D(dirty /clean )のビットと、V
(valid /invalid )のビットと、リファレンスカウン
タが付加され、また、MEIプロトコルのキャッシュラ
ンイには、図15に示すように前記図12に示した〔状
態〕に対応するビットとしてD(dirty/clean )のビ
ットと、V(valid /invalid )のビットと、リファレ
ンスカウンタが付加されている。
FIGS. 14 and 15 show cache lines in this embodiment. FIG. 14 shows a cache line of the MOESI protocol, and FIG. 15 shows a cache line of the MEI protocol. As shown in FIG. 14, the cache line of the MOESI protocol
S (shared) as a bit corresponding to [state] shown in FIG.
/ Non-shared), D (dirty / clean) bits and V
A (valid / invalid) bit and a reference counter are added, and the cache run of the MEI protocol has D (dirty / invalid) as a bit corresponding to the [state] shown in FIG. 12 as shown in FIG. clean), V (valid / invalid) bits, and a reference counter.

【0040】また、本実施例のキャッシュメモリ装置に
は、アドレスを格納するアドレステーブル23が用意さ
れている。アドレステーブル23の各エントリの内容を
図16に示す。同図に示すように、アドレステーブル2
3は、V(valid /invalid )およびアドレスのフィー
ルドから構成されている。そして、キャッシュメモリ2
1,22からデータが追い出されるときに、リファレン
スカウンタが参照され、その値が0であれば当該データ
のアドレスがアドレステーブル23に登録される。後
に、同じアドレスに対する要求が発生したとき、アドレ
スがアドレステーブル23に登録されているため、ME
Iプロトコルを使うキャッシュを用いてアクセスされ
る。このようにして、あまり参照されないデータをME
Iプロトコルを用いるキャッシュに格納することによっ
て、S状態を少なくし一貫性管理のオーバーヘッドを小
さくすることができる。
The cache memory device of this embodiment has an address table 23 for storing addresses. FIG. 16 shows the contents of each entry of the address table 23. As shown in FIG.
3 is composed of V (valid / invalid) and address fields. And the cache memory 2
When data is expelled from 1 and 22, the reference counter is referred to, and if the value is 0, the address of the data is registered in the address table 23. Later, when a request for the same address occurs, the address is registered in the address table 23,
It is accessed using a cache that uses the I protocol. In this way, data that is not often referenced is stored in the ME.
By storing in the cache using the I protocol, the S state can be reduced and the overhead of consistency management can be reduced.

【0041】図17は本実施例の具体的構成例を示す図
である。図17において、11はプロセッサ、21はM
OESIプロトコルのキャッシュメモリ、22はMEI
プロトコルのキャッシュメモリ、21a,22aはキャ
ッシュ制御装置である。なお、キャッシュメモリ21,
22の”R”はリファレンスカウンタを示している。1
5はキャッシュ選択制御部であり、キャッシュ選択制御
部15には前記したアドレステーブル23と、アドレス
登録手段24が設けられており、アドレス登録手段24
はリファレンスカウンタの値に基づき、全く参照されず
にキャッシュメモリ21,22から追い出されるデータ
のアドレスを求め、上記アドレステーブル23に登録す
る。そして、キャッシュ選択制御部15はメモリ要求が
発生したとき上記アドレステーブル23を参照し、アド
レスがアドレステーブル23に登録されていると、セレ
クタ16によりMEIプロトコルのキャッシュメモリ2
2を選択し、MEIプロトコルのキャッシュメモリ22
経由で共有バスに読み出し要求を出す。
FIG. 17 is a diagram showing a specific configuration example of this embodiment. In FIG. 17, 11 is a processor, 21 is M
OESI protocol cache memory, 22 is MEI
The cache memory of the protocol, 21a and 22a are cache control devices. Note that the cache memory 21,
“R” of 22 indicates a reference counter. 1
Reference numeral 5 denotes a cache selection control unit. The cache selection control unit 15 is provided with the above-described address table 23 and address registration means 24.
Calculates the address of data that is evicted from the cache memories 21 and 22 without being referred to at all based on the value of the reference counter, and registers the address in the address table 23. Then, the cache selection control unit 15 refers to the address table 23 when a memory request is issued, and if the address is registered in the address table 23, the selector 16 uses the selector 16 to set the cache memory 2 of the MEI protocol.
2 and the cache memory 22 of the MEI protocol is selected.
Send a read request to the shared bus via

【0042】図18、図19は、本実施例におけるメモ
リ読み出し時の動作を示すフローチャートであり、ま
た、図20はMOESIプロトコルを用いるキャッシュ
メモリとMEIプロトコルを用いるキャッシュメモリの
どちらを使うか判断するフローチャートであり、同図に
より本実施例の動作を説明する。プロセッサがメモリア
クセスをすると、まずキャッシュを検索し、キャッシュ
にヒットしたかを調べる(ステップS1,S2)。キャ
ッシュにヒットした場合には、ステップS15でリファ
レンスカウンタを+1する。そして、プロセッサにキャ
ッシュから読み出したデータを返す。また、キャッシュ
にヒットしない場合には、ステップS3に行き、キャッ
シュ選択制御部は当該アドレスがアドレステーブルに登
録されているかを調べる。
FIGS. 18 and 19 are flow charts showing the operation at the time of memory reading in this embodiment. FIG. 20 determines whether to use the cache memory using the MOESI protocol or the cache memory using the MEI protocol. 5 is a flowchart, and the operation of the present embodiment will be described with reference to FIG. When the processor accesses the memory, the cache is first searched to determine whether or not the cache has been hit (steps S1 and S2). If the cache hits, the reference counter is incremented by one in step S15. Then, the data read from the cache is returned to the processor. If no hit is found in the cache, the process proceeds to step S3, and the cache selection control unit checks whether the address is registered in the address table.

【0043】当該アドレスがアドレステーブルに登録さ
れている場合には、ステップS16に行き、MEIプロ
トコルのキャッシュメモリ22経由で共有バスに読み出
し要求を出し、ステップS17で、V=1(valid )、
D=0(clean )としてキャッシュメモリ22にデータ
を格納し、ステップS18において、リファレンスカウ
ンタを0クリアしてステップS14に行く。また、当該
アドレスがアドレステーブルに登録されていない場合に
は、ステップS4に行き、MOESIプロトコルのキャ
ッシュメモリ21経由で共有バスに読み出し要求を出
す。すなわち、キャッシュ選択制御部は図19に示すよ
うに、当該アドレスがアドレステーブルに登録されてい
るか否かに応じてMEIプロトコルを用いるか、MOE
SIプロトコルを用いるかを選択する。
If the address is registered in the address table, the process goes to step S16, where a read request is issued to the shared bus via the MEI protocol cache memory 22, and in step S17, V = 1 (valid),
The data is stored in the cache memory 22 as D = 0 (clean), and in step S18, the reference counter is cleared to 0 and the flow proceeds to step S14. If the address is not registered in the address table, the process proceeds to step S4, and a read request is issued to the shared bus via the cache memory 21 of the MOESI protocol. That is, as shown in FIG. 19, the cache selection control unit uses the MEI protocol according to whether the address is registered in the address table,
Select whether to use the SI protocol.

【0044】そしてステップS5で他のキャッシュメモ
リがデータを持っているかを調べ、他のキャッシュメモ
リがデータを持っていない場合には、V=1(valid
)、S=0(non-shared)、D=0(clean )とし
て、キャッシュメモリ21にデータを格納し、ステップ
S10に行く。他のキャッシュメモリがデータを持って
いる場合には、ステップS6に行き、データはダーティ
であるかを調べる。データがダーティの場合には、ステ
ップS7に行き、V=1(valid )、S=1(share
d)、D=1(dirty )として、キャッシュメモリ21
にデータを格納し、ステップS10に行く。
In step S5, it is checked whether another cache memory has data. If the other cache memory has no data, V = 1 (valid
), S = 0 (non-shared) and D = 0 (clean), the data is stored in the cache memory 21, and the process goes to step S10. If the other cache memory has the data, the process goes to step S6 to check whether the data is dirty. If the data is dirty, go to step S7, where V = 1 (valid), S = 1 (share
d), D = 1 (dirty), and the cache memory 21
And the process goes to step S10.

【0045】また、データがダーティでない場合には、
ステップS8に行き、V=1(valid )、S=1(shar
ed)、D=0(clean )として、キャッシュメモリ21
にデータを格納し、ステップS10に行く。ステップS
10において、リファレンスカウンタを0クリアし、ス
テップ11において、キャッシュからデータの追い出し
が発生したかを調べる。キャッシュからデータの追い出
しが発生していない場合には、ステップS14に行く。
また、データの追い出しが発生した場合には、ステップ
S12において追い出されたデータのリファレンスカウ
ンタが0であるかを調べる。リファレンスカウンタが0
でない場合にはステップS14に行き、また、リファレ
ンスカウンタが0の場合には、ステップS13に行き、
追い出されるデータのアドレスをアドレステーブルに登
録し、ステップS14に行き、プロセッサに読み出した
データを返す。
If the data is not dirty,
Go to step S8, where V = 1 (valid), S = 1 (shar
ed), D = 0 (clean) and the cache memory 21
And the process goes to step S10. Step S
In step 10, the reference counter is cleared to 0, and in step 11, it is checked whether data has been evicted from the cache. If data has not been evicted from the cache, the process proceeds to step S14.
If data has been flushed, it is checked in step S12 whether the reference counter of the flushed data is zero. Reference counter is 0
If not, go to step S14. If the reference counter is 0, go to step S13.
The address of the data to be evicted is registered in the address table, the process goes to step S14, and the read data is returned to the processor.

【0046】(5)実施例5 図21は、本発明の第5の実施例の構成を示す図であ
り、本実施例は、上記第4の実施例を前記第2の実施例
に適用し各キャッシュラインごとにプロトコルを指定す
るようにしたものである。本実施例は、前記した図7に
示したように複数のプロセッサ11がキャッシュメモリ
装置20を介して共有バス12に接続され、メモリ13
が共有バス12に接続されている共有メモリシステムの
形態をとっており、キャッシュメモリ装置20の中にキ
ャッシュメモリ21およびキャッシュ制御装置21aが
それぞれひとつずつ配置されている。
(5) Fifth Embodiment FIG. 21 is a diagram showing a configuration of a fifth embodiment of the present invention. In the present embodiment, the fourth embodiment is applied to the second embodiment. The protocol is specified for each cache line. In the present embodiment, a plurality of processors 11 are connected to a shared bus 12 via a cache memory device 20 as shown in FIG.
Takes the form of a shared memory system connected to the shared bus 12, and a cache memory 21 and a cache control device 21 a are respectively arranged in a cache memory device 20.

【0047】本実施例において、キャッシュメモリ21
は図22に示すようなキャッシュラインによって構成さ
れている。図22に示すように、キャッシュラインに
は、前記図12に示した〔状態〕に対応するビットとし
てS(shared/non-shared)、D(dirty /clean )の
ビットと、V(valid /invalid )のビットと、プロト
コルの種類を示すP(MOESI/MEI )のビットが設けら
れ、さらに、リファレンスカウンタが付加されており、
実施例3と同様の動作を行なう。なお、SビットはP=
1の時のみ有効であり、P=0のときは無視される。
In this embodiment, the cache memory 21
Are constituted by cache lines as shown in FIG. As shown in FIG. 22, the cache line has S (shared / non-shared) and D (dirty / clean) bits and V (valid / invalid) as bits corresponding to the [state] shown in FIG. ) And a P (MOESI / MEI) bit indicating the type of protocol are provided, and a reference counter is added.
The same operation as in the third embodiment is performed. The S bit is P =
It is valid only when 1 and ignored when P = 0.

【0048】本実施例のキャッシュメモリ装置には、図
21に示したように、アドレスを格納するアドレステー
ブル23が用意されている。アドレステーブル23の各
エントリの内容は、実施例4と同様に図16のように構
成され、V(valid /invalid )およびアドレスのフィ
ールドから構成されている。そして、前記と同様、キャ
ッシュメモリからデータが追い出されるときに、リファ
レンスカウンタが参照され、その値が0であれば当該デ
ータのアドレスがアドレステーブル23に登録される。
後で同じアドレスに対する要求が発生したとき、アドレ
スがアドレステーブル23に登録されていれば、MEI
プロトコルを使ってアクセスされ、キャッシュラインの
プロトコル選択ビットPはMEIプロトコルに設定され
る。このようにして、参照されずに追い出されるデータ
をMEIプロトコルを用いるよう設定することによっ
て、S状態を少なくし、一貫性管理のオーバーヘッドを
小さくすることができる。
The cache memory device of this embodiment is provided with an address table 23 for storing addresses, as shown in FIG. The contents of each entry of the address table 23 are configured as shown in FIG. 16 similarly to the fourth embodiment, and are composed of V (valid / invalid) and address fields. As described above, when data is evicted from the cache memory, the reference counter is referred to. If the value is 0, the address of the data is registered in the address table 23.
Later, when a request for the same address occurs, if the address is registered in the address table 23, the MEI
Accessed using a protocol, the protocol selection bit P of the cache line is set to the MEI protocol. In this way, by setting data to be evicted without being referred to using the MEI protocol, the S state can be reduced, and the overhead of consistency management can be reduced.

【0049】図23は、本実施例の具体的構成例であ
る。図23において、11はプロセッサ、21はキャッ
シュメモリ、21aはキャッシュ制御装置、17はプロ
トコル選択制御部であり、プロトコル選択制御部17に
は上記したアドレステーブル23と、アドレス登録手段
24が設けられており、アドレス登録手段24はリファ
レンスカウンタの値に基づき、全く参照されずにキャッ
シュメモリ21から追い出されるデータのアドレスを求
め、上記アドレステーブル23に登録する。そして、メ
モリ要求が発生したとき上記アドレステーブル23を参
照し、アドレスがアドレステーブル23に登録されてい
ると、キャッシュメモリ21のキャッシュラインにME
Iプロトコルを設定する。
FIG. 23 shows a specific configuration example of this embodiment. In FIG. 23, 11 is a processor, 21 is a cache memory, 21a is a cache control device, 17 is a protocol selection control unit, and the protocol selection control unit 17 is provided with the above-mentioned address table 23 and address registration means 24. The address registration unit 24 obtains the address of the data that is evicted from the cache memory 21 without being referred to at all based on the value of the reference counter, and registers the address in the address table 23. Then, when a memory request is generated, the address table 23 is referred to, and if the address is registered in the address table 23, the ME is added to the cache line of the cache memory 21.
Set the I protocol.

【0050】図24、図25はメモリ読み出し時の動作
を示すフローチャートであり同図により本実施例の動作
について説明する。なお、MOESIプロトコルとME
Iプロトコルのどちらを使うか判断する処理は、前記図
20と同じである。本実施例の動作は、前記図18、図
19のフローチャートで説明したのと同様であり、以下
本実施例の動作について説明する。ステップS1〜3ま
での処理は前記図18と同様であり、キャッシュを検索
し、キャッシュにヒットしたかを調べ、キャッシュにヒ
ットした場合には、ステップS15でリファレンスカウ
ンタを+1する。そして、プロセッサにキャッシュから
読み出したデータを返す。また、キャッシュにヒットし
ない場合には、当該アドレスがアドレステーブルに登録
されているかを調べる(ステップS1〜S3)。
FIGS. 24 and 25 are flow charts showing the operation at the time of memory reading, and the operation of this embodiment will be described with reference to FIG. The MOESI protocol and ME
The process of determining which of the I protocols to use is the same as in FIG. The operation of this embodiment is the same as that described in the flowcharts of FIGS. 18 and 19, and the operation of this embodiment will be described below. The processing in steps S1 to S3 is the same as that in FIG. 18 described above. The cache is searched and it is checked whether or not the cache has been hit. If the cache has been hit, the reference counter is incremented by one in step S15. Then, the data read from the cache is returned to the processor. If no hit is found in the cache, it is checked whether the address is registered in the address table (steps S1 to S3).

【0051】当該アドレスがアドレステーブルに登録さ
れている場合には、プロトコルをMEIとして共有バス
に読み出し要求を出し、V=1(valid )、D=0(cl
ean)、P=0(MEI)としてキャッシュメモリ21にデ
ータを格納し、リファレンスカウンタを0クリアしてス
テップS14に行く(ステップS16〜S18)。ま
た、当該アドレスがアドレステーブルに登録されていな
い場合には、ステップS4に行き、プロトコルをMOE
SIとして、共有バスに読み出し要求を出す。そしてス
テップS5で他のキャッシュメモリがデータを持ってい
るかを調べ、他のキャッシュメモリがデータを持ってい
ない場合には、V=1(valid )、S=0(non-share
d)、D=0(clean )、P=1(MOESI)として、キャ
ッシュメモリ21にデータを格納し、ステップS10に
行く。他のキャッシュメモリがデータを持っている場合
には、ステップS6、S7において、データはダーティ
であるかを調べ、データがダーティの場合には、V=1
(valid )、S=1(shared)、D=1(dirty )、P
=1(MOESI)として、データを格納し、ステップS10
に行く。
If the address is registered in the address table, a read request is issued to the shared bus with the protocol being MEI, and V = 1 (valid) and D = 0 (cl
ean), the data is stored in the cache memory 21 as P = 0 (MEI), the reference counter is cleared to 0, and the procedure goes to step S14 (steps S16 to S18). If the address is not registered in the address table, the process goes to step S4 and the protocol is set to MOE.
A read request is issued to the shared bus as SI. In step S5, it is checked whether the other cache memory has data. If the other cache memory has no data, V = 1 (valid), S = 0 (non-share)
d), D = 0 (clean), P = 1 (MOESI), store the data in the cache memory 21, and go to step S10. If another cache memory has data, it is checked in steps S6 and S7 whether the data is dirty. If the data is dirty, V = 1
(Valid), S = 1 (shared), D = 1 (dirty), P
= 1 (MOESI), and store the data.
go to.

【0052】また、データがダーティでない場合には、
ステップS8においてV=1(valid )、S=1(shar
ed)、D=0(clean )、P=1(MOESI)としてデータ
を格納し、ステップS10に行く。ステップS10以降
の処理は前記図19と同様であり、リファレンスカウン
タを0クリアし、キャッシュからデータの追い出しが発
生したかを調べ、キャッシュからデータの追い出しが発
生していない場合には、プロセッサに読み出したデータ
を返す。また、データの追い出しが発生した場合には、
データのリファレンスカウンタが0であるかを調べ、リ
ファレンスカウンタが0でない場合にはステップS14
に行き、また、リファレンスカウンタが0の場合には、
追い出されるデータのアドレスをアドレステーブルに登
録し、プロセッサに読み出したデータを返す。
If the data is not dirty,
In step S8, V = 1 (valid), S = 1 (shar
ed), data is stored as D = 0 (clean), and P = 1 (MOESI), and the process goes to step S10. The processing after step S10 is the same as that in FIG. 19 described above. The reference counter is cleared to 0, it is checked whether data has been evicted from the cache, and if data has not been evicted from the cache, the data is read out to the processor. Returns the data. Also, if data eviction occurs,
It is determined whether the data reference counter is 0. If the reference counter is not 0, the process proceeds to step S14.
And if the reference counter is 0,
The address of the data to be evicted is registered in the address table, and the read data is returned to the processor.

【0053】(6)実施例6 本実施例は、実施例4と同様の構成をとる。全体構成は
図13と同じであり、各キャッシュメモリの内容は図1
4、図15に示すキャッシュラインから構成される。本
実施例においても、実施例4と同様にアドレステーブル
23を用意する。エントリの内容は図16と同じである
が、本実施例においては、リファレンスカウンタの値が
予め定められた一定値cより大きいとき、当該データの
アドレスをアドレステーブルに登録する。すなわち、キ
ャッシュメモリからデータが追い出されるときに、リフ
ァレンスカウンタを参照し、その値がある一定値c以上
であると当該データのアドレスをアドレステーブル23
に登録する。そして、後で同じアドレスに対する要求が
発生したとき、アドレスがアドレステーブル23に登録
されている場合には、MOESIプロトコルを使うキャ
ッシュを用いてアクセスされる。このようにして、頻繁
に参照されるデータをMOESIプロトコルを用いるキ
ャッシュに格納することによって、S状態を適切に用い
ることができる。
(6) Sixth Embodiment This embodiment has the same configuration as the fourth embodiment. The overall configuration is the same as that of FIG.
4 and the cache line shown in FIG. In this embodiment, the address table 23 is prepared similarly to the fourth embodiment. Although the contents of the entry are the same as those in FIG. 16, in the present embodiment, when the value of the reference counter is larger than a predetermined constant value c, the address of the data is registered in the address table. That is, when data is evicted from the cache memory, the reference counter is referred to, and if the value is equal to or greater than a certain value c, the address of the data is stored in the address table 23
Register with. Then, when a request for the same address occurs later, if the address is registered in the address table 23, it is accessed using a cache using the MOESI protocol. In this way, by storing frequently referenced data in a cache using the MOESI protocol, the S state can be used appropriately.

【0054】図26は本実施例の具体的構成例を示す図
であり、前記図17と同様な構成であるが、本実施例に
おけるキャッシュ選択制御部15は一定の閾値cを保持
する手段25を備え、キャッシュ選択制御部15のアド
レス登録手段24は、上記一定値cとリファレンスカウ
ンタRの値を比較し、リファレンスカウンタRの値が一
定値cより大きいとき、当該データのアドレスをアドレ
ステーブルに登録する。そして、キャッシュ選択制御部
15はメモリ要求が発生したとき上記アドレステーブル
23を参照し、アドレスがアドレステーブル23に登録
されていると、セレクタ16によりMOESIプロトコ
ルのキャッシュメモリ22を選択する。
FIG. 26 is a diagram showing a specific configuration example of the present embodiment, which has the same configuration as that of FIG. 17, but the cache selection control unit 15 in the present embodiment employs a means 25 for holding a constant threshold value c. The address registration means 24 of the cache selection control unit 15 compares the constant value c with the value of the reference counter R, and when the value of the reference counter R is larger than the constant value c, stores the address of the data in the address table. register. Then, the cache selection control unit 15 refers to the address table 23 when a memory request is issued, and if the address is registered in the address table 23, the selector 16 selects the cache memory 22 of the MOESI protocol by the selector 16.

【0055】図27、図28は本実施例におけるメモリ
読み出し時の動作を示すフローチャートである。また、
MOESIプロトコルとMEIプロトコルのどちらを使
うか判断する処理のフロチャートを図29に示す。図2
7、図28において、ステップS1〜3までの処理は前
記図24と同様であり、キャッシュを検索し、キャッシ
ュにヒットしたかを調べ、キャッシュにヒットした場合
には、ステップS18でリファレンスカウンタを+1す
る。そして、プロセッサにキャッシュから読み出したデ
ータを返す。また、キャッシュにヒットしない場合に
は、当該アドレスがアドレステーブルに登録されている
かを調べる(ステップS1〜S3)。
FIGS. 27 and 28 are flow charts showing the operation at the time of memory reading in this embodiment. Also,
FIG. 29 is a flowchart of a process for determining whether to use the MOESI protocol or the MEI protocol. FIG.
7. In FIG. 28, the processes up to steps S1 to S3 are the same as those in FIG. 24. The cache is searched, it is checked whether or not the cache is hit. If the cache is hit, the reference counter is incremented by +1 in step S18. I do. Then, the data read from the cache is returned to the processor. If no hit is found in the cache, it is checked whether the address is registered in the address table (steps S1 to S3).

【0056】当該アドレスがアドレステーブルに登録さ
れている場合には、MEIキャッシュ経由で共有バスに
読み出し要求を出し、V=1(valid )、D=0(clea
n )としてキャッシュメモリ21にデータを格納し、リ
ファレンスカウンタを0クリアしてステップS14に行
く(ステップS11〜S13)。そして、ステップS1
4において、キャッシュからデータの追い出しが発生し
たかを調べ、キャッシュからデータの追い出しが発生し
ていない場合には、ステップS17に行き、プロセッサ
に読み出したデータを返す。また、データの追い出しが
発生した場合には、ステップS15において、データの
リファレンスカウンタがc以上であるかを調べ、リファ
レンスカウンタがc以上でない場合にはステップS17
に行き、また、リファレンスカウンタがc以上の場合に
は、ステップS16において、追い出されるデータのア
ドレスをアドレステーブルに登録し、ステップS17に
行き、プロセッサに読み出したデータを返す。
If the address is registered in the address table, a read request is issued to the shared bus via the MEI cache, and V = 1 (valid) and D = 0 (clea).
The data is stored in the cache memory 21 as n), the reference counter is cleared to 0, and the procedure goes to step S14 (steps S11 to S13). Then, step S1
In step 4, it is checked whether data has been evicted from the cache. If data has not been evicted from the cache, the process proceeds to step S17, and the read data is returned to the processor. If data eviction has occurred, it is checked in step S15 whether the data reference counter is equal to or greater than c.
If the reference counter is equal to or larger than c, the address of the data to be evicted is registered in the address table in step S16, and the process goes to step S17 to return the read data to the processor.

【0057】また、当該アドレスがアドレステーブルに
登録されていない場合には、ステップS4に行き、MO
ESIキャッシュ経由で共有バスに読み出し要求を出
す。そしてステップS5で他のキャッシュメモリがデー
タを持っているかを調べ、他のキャッシュメモリがデー
タを持っていない場合には、V=1(valid )、S=0
(non-shared)、D=0(clean )として、キャッシュ
メモリ21にデータを格納し、ステップS10に行く。
If the address is not registered in the address table, the process goes to step S4, where the MO
A read request is issued to the shared bus via the ESI cache. In step S5, it is checked whether another cache memory has data. If the other cache memory does not have data, V = 1 (valid) and S = 0.
(Non-shared), D = 0 (clean), the data is stored in the cache memory 21, and the procedure goes to step S10.

【0058】他のキャッシュメモリがデータを持ってい
る場合には、ステップS6、S7において、データはダ
ーティであるかを調べ、データがダーティの場合には、
V=1(valid )、S=1(shared)、D=1(dirty
)として、データを格納し、ステップS10に行く。
また、データがダーティでない場合には、ステップS8
においてV=1(valid )、S=1(shared)、D=0
(clean )としてデータを格納し、ステップS10に行
く。ステップS10でリファレンスカウンタを0クリア
し、ステップS17においてプロセッサに読み出したデ
ータを返す。
If the other cache memory has data, it is checked in steps S6 and S7 whether the data is dirty. If the data is dirty,
V = 1 (valid), S = 1 (shared), D = 1 (dirty
), The data is stored, and the procedure goes to step S10.
If the data is not dirty, step S8
V = 1 (valid), S = 1 (shared), D = 0
The data is stored as (clean), and the process goes to step S10. In step S10, the reference counter is cleared to 0, and in step S17, the read data is returned to the processor.

【0059】(7)実施例7 本実施例は、実施例5と同様の構成をとる。全体構成は
図21であり、キャッシュメモリの内容は図22に示す
キャッシュラインから構成される。本実施例において
も、実施例5と同様に、アドレステーブルを用意する。
エントリの内容は図16と同じであるが、本実施例にお
いては、第6の実施例と同様、リファレンスカウンタの
値が予め定められた一定値cより大きいとき、当該デー
タのアドレスをアドレステーブルに登録する。すなわ
ち、キャッシュメモリからデータが追い出されるとき
に、リファレンスカウンタが参照され、その値がある一
定値c以上であると当該データのアドレスがアドレステ
ーブルに登録される。後に、同じアドレスに対する要求
が発生したとき、アドレスがアドレステーブルに登録さ
れているため、MOESIプロトコルを使ってアクセス
され、キャッシュラインのプロトコル選択ビットはMO
ESIプロトコルに改定される。このようにして、頻繁
に参照されるデータをMOESIプロトコルを用いるよ
うに設定することによって、S状態を適切に用いること
ができる。
(7) Embodiment 7 This embodiment has a configuration similar to that of the fifth embodiment. FIG. 21 shows the overall configuration, and the contents of the cache memory are composed of the cache lines shown in FIG. In this embodiment, an address table is prepared as in the fifth embodiment.
Although the contents of the entry are the same as those in FIG. 16, in this embodiment, as in the sixth embodiment, when the value of the reference counter is larger than a predetermined constant value c, the address of the data is stored in the address table. register. That is, when data is evicted from the cache memory, the reference counter is referred to, and if the value is equal to or greater than a certain value c, the address of the data is registered in the address table. Later, when a request for the same address occurs, since the address is registered in the address table, it is accessed using the MOESI protocol, and the protocol selection bit of the cache line is set to MO.
Revised to ESI protocol. In this way, by setting frequently referenced data to use the MOESI protocol, the S state can be used appropriately.

【0060】図30は本実施例の具体的構成例を示す図
であり、前記図23と同様な構成であるが、本実施例に
おけるプロトコル選択制御部17は一定の閾値cを保持
する手段25を備え、プロトコル選択制御部17のアド
レス登録手段24は、上記一定値cとリファレンスカウ
ンタRの値を比較し、リファレンスカウンタRの値が一
定値cより大きいとき、当該データのアドレスをアドレ
ステーブル23に登録する。そして、キャッシュ選択制
御部15はメモリ要求が発生したとき上記アドレステー
ブル23を参照し、アドレスがアドレステーブル23に
登録されていると、セレクタ16によりMOESIプロ
トコルのキャッシュメモリ22を選択する。
FIG. 30 is a diagram showing a specific configuration example of the present embodiment, which has the same configuration as that of FIG. 23, but the protocol selection control unit 17 in the present embodiment employs a means 25 for holding a constant threshold value c. The address registration means 24 of the protocol selection control unit 17 compares the constant value c with the value of the reference counter R, and when the value of the reference counter R is larger than the constant value c, stores the address of the data in the address table 23. Register with. Then, the cache selection control unit 15 refers to the address table 23 when a memory request is issued, and if the address is registered in the address table 23, the selector 16 selects the cache memory 22 of the MOESI protocol by the selector 16.

【0061】図31、図32は本実施例におけるメモリ
読み出し時の動作を示すフローチャートである。また、
MOESIプロトコルを用いるかMEIプロトコルを用
いるかを判断するフローチヤートは第6の実施例と同
様、図29のようになる。本実施例のメモリ読み出し時
の動作は、第6の実施例と同様であり、ステップS4に
おいてプロトコルをMOESIとして共有バスに読み出
し要求を出すようにした点、ステップS11においてプ
ロトコルをMEIとして共有バスに読み出し要求を出す
ようにした点、および、ステップS12、ステップS7
〜S9、ステップS12において、Pの値を設定するよ
うにした点で相違するだけでその他の動作は前記図2
7、図28と同様である。
FIGS. 31 and 32 are flow charts showing the operation at the time of memory reading in this embodiment. Also,
A flowchart for determining whether to use the MOESI protocol or the MEI protocol is as shown in FIG. 29 as in the sixth embodiment. The operation at the time of reading the memory of the present embodiment is the same as that of the sixth embodiment. A read request is issued to the shared bus with the protocol set to MOESI in step S4, and the protocol is set to the shared bus as MEI in step S11. Point that a read request is issued, and steps S12 and S7
In S9 and S12, the only difference is that the value of P is set.
7 and FIG.

【0062】(8)実施例8 本実施例は、実施例4、6と同様の構成をとり、全体構
成は図13の通りであり、各キャッシュメモリの内容は
前記した図14、図15に示すキャッシュラインから構
成される。本実施例においても、実施例4、6と同様
に、アドレステーブル23を用意する。エントリの内容
は図16と同じであるが、本実施例においては、リファ
レンスカウンタの値が予め定められた一定値cより大き
いとき、当該データのアドレスをアドレステーブルに登
録するとともに、cの値を動的に変化させる。
(8) Eighth Embodiment This embodiment has a configuration similar to that of the fourth and sixth embodiments, and the overall configuration is as shown in FIG. 13. The contents of each cache memory are as shown in FIG. 14 and FIG. It consists of the indicated cache line. Also in the present embodiment, an address table 23 is prepared as in the fourth and sixth embodiments. Although the contents of the entry are the same as those in FIG. 16, in this embodiment, when the value of the reference counter is larger than a predetermined constant value c, the address of the data is registered in the address table and the value of c is changed. Change dynamically.

【0063】すなわち、キャッシュメモリからデータが
追い出されるときに、リファレンスカウンタが参照さ
れ、その値がある閾値c以上であると当該データのアド
レスがアドレステーブルに登録される。後に、同じアド
レスに対する要求が発生したとき、アドレスがアドレス
テーブルに登録されているため、MOESIプロトコル
を使うキャッシュを用いてアクセスされる。このように
して、頻繁に参照されるデータをMOESIプロトコル
を用いるキャッシュに格納することによって、S状態を
適切に用いることができる。さらに、本実施例では、第
6の実施例とは異なり、上記閾値cを次にように動的に
変化させる。
That is, when data is evicted from the cache memory, the reference counter is referred to, and when the value is equal to or greater than a certain threshold value c, the address of the data is registered in the address table. Later, when a request for the same address occurs, the address is registered in the address table and is accessed using a cache using the MOESI protocol. In this way, by storing frequently referenced data in a cache using the MOESI protocol, the S state can be used appropriately. Further, in the present embodiment, unlike the sixth embodiment, the threshold value c is dynamically changed as follows.

【0064】cの値は、MOESIプロトコルを用いる
キャッシュメモリに衝突が生じた場合(有効なデータが
キャッシュメモリから追い出された場合)に十1し、M
EIプロトコルを用いるキャッシュメモリに衝突が生じ
た場合(有効なデータがキャッシュメモリから追い出さ
れた場合)に−1する。このように閾値cを変化させる
ことにより、MOESIプロトコルを用いるキャッシュ
メモリが多く使われる場合には、閾値をあげてMOES
Iプロトコルを用いるキャッシュメモリをあまり使わな
いようにし、また、MEIプロトコルを用いるキャッシ
ュメモリが多く使われる場合には、閾値を下げてMEI
プロトコルを用いるキャッシュメモリをあまり使わない
ようにすることができる。これによって、キャッシュメ
モリの量などの環境によらず、双方のキャッシュメモリ
を有効に使い分けることができる。
The value of c is 11 when a collision occurs in the cache memory using the MOESI protocol (when valid data is evicted from the cache memory), and M
It is decremented by 1 when a collision occurs in the cache memory using the EI protocol (when valid data is evicted from the cache memory). By changing the threshold value c in this way, when a cache memory using the MOESI protocol is frequently used, the threshold value is increased and the MOES
If the cache memory using the MEI protocol is not used very much, and if the cache memory using the MEI protocol is used frequently, the threshold is lowered to reduce the MEI.
The cache memory using the protocol can be less used. As a result, both cache memories can be used effectively regardless of the environment such as the amount of cache memory.

【0065】図33は本実施例の具体的構成例を示す図
であり、前記図26と同様な構成であるが、本実施例に
おけるキャッシュ選択制御部15は動的に変化する閾値
cを保持する手段25とアドレス登録手段24に加え、
キャッシュメモリ21,22から有効なデータが追い出
されたとき、上記閾値cを増減させる閾値増減手段27
を備えている。そして、上記アドレス登録手段24は、
閾値cとリファレンスカウンタRの値を比較し、リファ
レンスカウンタRの値が一定値cより大きいとき、当該
データのアドレスをアドレステーブルに登録する。ま
た、閾値増加減手段27は、前記したようにMOESI
プロトコルを用いるキャッシュメモリに衝突が生じた場
合に閾値cを十1し、MEIプロトコルを用いるキャッ
シュメモリに衝突が生じた場合に閾値cを−1する。
FIG. 33 is a diagram showing a specific configuration example of the present embodiment. The configuration is similar to that of FIG. 26, but the cache selection control unit 15 in the present embodiment holds a dynamically changing threshold value c. Means 25 and address registration means 24,
Threshold value increasing / decreasing means 27 for increasing / decreasing the threshold value c when valid data is evicted from the cache memories 21 and 22
It has. Then, the address registration means 24
The threshold value c is compared with the value of the reference counter R, and when the value of the reference counter R is larger than the fixed value c, the address of the data is registered in the address table. Further, the threshold value increasing / decreasing means 27 is, as described above,
When a collision occurs in the cache memory using the protocol, the threshold value c is set to 11, and when a collision occurs in the cache memory using the MEI protocol, the threshold value c is set to −1.

【0066】キャッシュ選択制御部15は前記したよう
にメモリ要求が発生したとき上記アドレステーブル23
を参照し、アドレスがアドレステーブル23に登録され
ていると、セレクタ16によりMOESIプロトコルの
キャッシュメモリ22を選択する。
As described above, when a memory request occurs, the cache selection control unit 15
And if the address is registered in the address table 23, the selector 16 selects the cache memory 22 of the MOESI protocol.

【0067】図34、図35は本実施例におけるメモリ
読み出し時の動作を示すフローチャートである。また、
MOESIプロトコルを用いるキャッシュメモリとME
Iプロトコルを用いるキャッシュメモリのどちらを使う
か判断するフローチャートは、実施例6と同様に図30
である。図34、図35により本実施例の動作を説明す
る。図34、図35において、ステップS1〜S3まで
の処理は前記図31と同様であり、キャッシュを検索
し、キャッシュにヒットしたかを調べ、キャッシュにヒ
ットした場合には、ステップS18でリファレンスカウ
ンタを+1する。そして、ステップS20に行き、プロ
セッサにキャッシュから読み出したデータを返す。ま
た、キャッシュにヒットしない場合には、当該アドレス
がアドレステーブルに登録されているかを調べる(ステ
ップS1〜S3)。当該アドレスがアドレステーブルに
登録されている場合には、MEIキャッシュ経由で共有
バスに読み出し要求を出し、V=1(valid )、D=0
(clean )としてキャッシュメモリ21にデータを格納
し、リファレンスカウンタを0クリアしてステップS1
6に行く(ステップS13〜S15)。
FIGS. 34 and 35 are flow charts showing the operation at the time of memory reading in this embodiment. Also,
Cache memory and ME using MOESI protocol
A flowchart for determining which one of the cache memories using the I protocol is used is the same as FIG.
It is. The operation of this embodiment will be described with reference to FIGS. 34 and 35, the processes in steps S1 to S3 are the same as those in FIG. 31 described above. The cache is searched, it is checked whether or not the cache has been hit. If the cache has been hit, the reference counter is reset in step S18. +1. Then, the process goes to step S20 to return the data read from the cache to the processor. If no hit is found in the cache, it is checked whether the address is registered in the address table (steps S1 to S3). If the address is registered in the address table, a read request is issued to the shared bus via the MEI cache, and V = 1 (valid), D = 0
(Clean), the data is stored in the cache memory 21, the reference counter is cleared to 0, and step S1 is executed.
6 (steps S13 to S15).

【0068】そして、ステップS16において、キャッ
シュからデータの追い出しが発生したかを調べ、キャッ
シュからデータの追い出しが発生していない場合には、
ステップS20に行き、プロセッサに読み出したデータ
を返す。また、データの追い出しが発生した場合には、
ステップS17において、閾値cの値を−1し、ステッ
プS18において、追い出されるデータのリファレンス
カウンタがc以上であるかを調べる。リファレンスカウ
ンタがc以上でない場合にはステップS20に行き、ま
た、リファレンスカウンタがc以上の場合には、ステッ
プS19において、追い出されるデータのアドレスをア
ドレステーブルに登録し、ステップS17に行き、プロ
セッサに読み出したデータを返す。
Then, at step S16, it is checked whether or not data has been evicted from the cache. If no data has been evicted from the cache,
Go to step S20, and return the read data to the processor. Also, if data eviction occurs,
In step S17, the value of the threshold value c is decremented by one, and in step S18, it is checked whether the reference counter of the data to be expelled is equal to or larger than c. If the reference counter is not equal to or greater than c, the process proceeds to step S20. If the reference counter is equal to or greater than c, the address of the data to be evicted is registered in the address table in step S19, and the process proceeds to step S17 to read out to the processor. Returns the data.

【0069】また、当該アドレスがアドレステーブルに
登録されていない場合には、ステップS4に行き、MO
ESIキャッシュ経由で共有バスに読み出し要求を出
す。そしてステップS5で他のキャッシュメモリがデー
タを持っているかを調べ、他のキャッシュメモリがデー
タを持っていない場合には、V=1(valid )、S=0
(non-shared)、D=0(clean )として、キャッシュ
メモリ21にデータを格納し、ステップS10に行く。
他のキャッシュメモリがデータを持っている場合には、
ステップS6、S7において、データはダーティである
かを調べ、データがダーティの場合には、V=1(vali
d )、S=1(shared)、D=1(dirty )として、デ
ータを格納し、ステップS10に行く。
If the address is not registered in the address table, the process goes to step S4, where the MO
A read request is issued to the shared bus via the ESI cache. In step S5, it is checked whether another cache memory has data. If the other cache memory does not have data, V = 1 (valid) and S = 0.
(Non-shared), D = 0 (clean), the data is stored in the cache memory 21, and the procedure goes to step S10.
If the other cache memory has data,
In steps S6 and S7, it is checked whether the data is dirty. If the data is dirty, V = 1 (vali
d), S = 1 (shared), D = 1 (dirty), the data is stored, and the process goes to step S10.

【0070】また、データがダーティでない場合には、
ステップS8においてV=1(valid )、S=1(shar
ed)、D=0(clean )としてデータを格納し、ステッ
プS10に行く。ステップS10でリファレンスカウン
タを0クリアし、ステップ11でデータの追い出しが発
生したかを調べる。データの追い出しが発生していない
場合にはステップS20に行き、また、データの追い出
しが発生した場合には、ステップS12において閾値c
の値を+1し、ステップS20に行きプロセッサに読み
だしたデータを返す。
If the data is not dirty,
In step S8, V = 1 (valid), S = 1 (shar
ed), the data is stored as D = 0 (clean), and the procedure goes to step S10. In step S10, the reference counter is cleared to 0, and in step 11, it is checked whether data eviction has occurred. If data eviction has not occurred, the process proceeds to step S20. If data eviction has occurred, the process proceeds to step S12.
Is incremented by 1, and the process goes to step S20 to return the data read to the processor.

【0071】[0071]

【発明の効果】以上説明したように、本発明において
は、並列計算機上のキャッシュにおいて、データに応じ
て一貫性管理の方法を変えるようにしたので、余分な一
貫性管理処理に起因するメモリアクセス処理のオーバー
ヘッドを削減することができる。このため、システム全
体の性能を向上させることができる。
As described above, in the present invention, in the cache on the parallel computer, the method of consistency management is changed according to data, so that memory access caused by extra consistency management processing is performed. Processing overhead can be reduced. Therefore, the performance of the entire system can be improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の基本構成を示す図である。FIG. 1 is a diagram showing a basic configuration of the present invention.

【図2】キャッシュメモリ装置内に2つのキャッシュメ
モリ、キャッシュ制御装置を設けた第1(第3)の実施
例の全体構成を示す図である。
FIG. 2 is a diagram showing an overall configuration of a first (third) embodiment in which two cache memories and a cache control device are provided in a cache memory device;

【図3】第1の実施例のキャッシュメモリのキャッシュ
ラインを示す図である。
FIG. 3 is a diagram illustrating a cache line of the cache memory according to the first embodiment.

【図4】状態を表すビットとキャッシュの各状態との対
応を示す図である。
FIG. 4 is a diagram showing a correspondence between a bit indicating a state and each state of a cache;

【図5】第1の実施例を先読み制御に適用した構成例を
示す図である。
FIG. 5 is a diagram illustrating a configuration example in which the first embodiment is applied to prefetch control.

【図6】第1の実施例のメモリ読み出し時の動作を示す
フローチャートである。
FIG. 6 is a flowchart illustrating an operation at the time of memory reading according to the first embodiment;

【図7】キャッシュメモリ装置内に1つのキャッシュメ
モリ、キャッシュ制御装置を設けた第2(第3)の実施
例の全体構成を示す図である。
FIG. 7 is a diagram showing an overall configuration of a second (third) embodiment in which one cache memory and a cache control device are provided in a cache memory device;

【図8】第2の実施例のキャッシュメモリのキャッシュ
ラインを示す図である。
FIG. 8 is a diagram illustrating a cache line of a cache memory according to a second embodiment;

【図9】第2の実施例を先読み制御に適用した具体的構
成例である。
FIG. 9 is a specific configuration example in which the second embodiment is applied to prefetch control.

【図10】第2の実施例のメモリ読み出し時の動作を示
すフローチャートである。
FIG. 10 is a flowchart showing an operation at the time of memory reading according to the second embodiment.

【図11】各ラインにリファレンスカウンタを設けた第
3の実施例のキャッシュラインを示す図(その1)であ
る。
FIG. 11 is a diagram (part 1) illustrating a cache line according to a third embodiment in which a reference counter is provided for each line;

【図12】各ラインにリファレンスカウンタを設けた第
3の実施例のキャッシュラインを示す図(その2)であ
る。
FIG. 12 is a diagram illustrating a cache line according to a third embodiment in which a reference counter is provided for each line (part 2);

【図13】リファレンスカウンタとアドレステーブルを
設けた本発明の第4(第6,8)の実施例の全体構成を
示す図である。
FIG. 13 is a diagram showing an overall configuration of a fourth (sixth and eighth) embodiment of the present invention provided with a reference counter and an address table.

【図14】第4の実施例のキャッシュメモリ(MOES
I)のキャッシュラインを示す図である。
FIG. 14 shows a cache memory (MOES) of the fourth embodiment.
It is a figure which shows the cache line of I).

【図15】第4の実施例のキャッシュメモリ(MEI)
のキャッシュラインを示す図である。
FIG. 15 is a cache memory (MEI) according to a fourth embodiment;
FIG. 3 is a diagram showing a cache line of FIG.

【図16】アドレステーブルの構造を示す図である。FIG. 16 is a diagram showing a structure of an address table.

【図17】第4の実施例の具体的構成例を示す図であ
る。
FIG. 17 is a diagram showing a specific configuration example of the fourth embodiment.

【図18】第4の実施例のメモリ読み出し時の動作を示
すフローチャート(その1)である。
FIG. 18 is a flowchart (part 1) illustrating an operation at the time of memory reading according to the fourth embodiment;

【図19】第4の実施例のメモリ読み出し時の動作を示
すフローチャート(その2)である。
FIG. 19 is a flowchart (part 2) illustrating an operation at the time of memory reading according to the fourth embodiment;

【図20】第4(第5)の実施例におけるMOESIプ
ロトコルとMEIプロトコルのどちらを使うか判断する
フローチャートである。
FIG. 20 is a flowchart for determining whether to use the MOESI protocol or the MEI protocol in the fourth (fifth) embodiment.

【図21】キャッシュメモリ装置内に1つのキャッシュ
メモリ、キャッシュ制御装置を設けた第5(第7)の実
施例の全体構成を示す図である。
FIG. 21 is a diagram showing an overall configuration of a fifth (seventh) embodiment in which one cache memory and a cache control device are provided in a cache memory device.

【図22】第5の実施例のキャッシュメモリのキャッシ
ュラインを示す図である。
FIG. 22 is a diagram illustrating cache lines of a cache memory according to a fifth embodiment.

【図23】第5の実施例の具体的構成例を示す図であ
る。
FIG. 23 is a diagram illustrating a specific configuration example of the fifth embodiment.

【図24】第5の実施例のメモリ読み出し時の動作を示
すフローチャート(その1)である。
FIG. 24 is a flowchart (part 1) illustrating an operation at the time of memory reading according to the fifth embodiment;

【図25】第5の実施例のメモリ読み出し時の動作を示
すフローチャート(その2)である。
FIG. 25 is a flowchart (No. 2) illustrating an operation at the time of memory reading according to the fifth embodiment;

【図26】第6の実施例の具体的構成例を示す図であ
る。
FIG. 26 is a diagram showing a specific configuration example of the sixth embodiment.

【図27】第6の実施例のメモリ読み出し時の動作を示
すフローチャート(その1)である。
FIG. 27 is a flowchart (part 1) illustrating an operation at the time of memory reading according to the sixth embodiment;

【図28】第6の実施例のメモリ読み出し時の動作を示
すフローチャート(その2)である。
FIG. 28 is a flowchart (part 2) illustrating an operation at the time of memory reading according to the sixth embodiment;

【図29】第6(第7,8)の実施例のMOESIプロ
トコルとMEIプロトコルのどちらを使うか判断する処
理のフロチャートである。
FIG. 29 is a flowchart of a process of determining whether to use the MOESI protocol or the MEI protocol according to the sixth (seventh and eighth) embodiments.

【図30】第7の実施例の具体的構成例を示す図であ
る。
FIG. 30 is a diagram showing a specific configuration example of the seventh embodiment.

【図31】第7の実施例のメモリ読み出し時の動作を示
すフローチャート(その1)である。
FIG. 31 is a flowchart (part 1) illustrating an operation at the time of memory reading according to the seventh embodiment;

【図32】第7の実施例のメモリ読み出し時の動作を示
すフローチャート(その2)である。
FIG. 32 is a flowchart (part 2) illustrating an operation at the time of memory reading according to the seventh embodiment;

【図33】第8の実施例の具体的構成例を示す図であ
る。
FIG. 33 is a diagram showing a specific configuration example of the eighth embodiment.

【図34】第8の実施例のメモリ読み出し時の動作を示
すフローチャート(その1)である。
FIG. 34 is a flowchart (part 1) illustrating an operation at the time of memory reading according to the eighth embodiment;

【図35】第8の実施例のメモリ読み出し時の動作を示
すフローチャート(その2)である。
FIG. 35 is a flowchart (part 2) illustrating an operation at the time of memory reading according to the eighth embodiment;

【図36】並列計算機の構成例を示す図である。FIG. 36 is a diagram illustrating a configuration example of a parallel computer.

【符号の説明】[Explanation of symbols]

1 プロセッサ 2 キャッシュメモリ装置 3,3−1〜3−n キャッシュメモリ 4,4−1〜4−n キャッシュ制御装置 11 プロセッサ 20 キャッシュメモリ装置 12 共有バス 13 メモリ 21,22 キャッシュメモリ 21a,22a キャッシュ制御装置 14 先読み制御部 15 キャッシュ選択制御部 16 セレクタ 17 プロトコル選択制御部 23 アドレステーブル 24 アドレス登録手段 25 一定の閾値を保持する手段 26 動的に変化する閾値cを保持する
手段 27 閾値増減手段
DESCRIPTION OF SYMBOLS 1 Processor 2 Cache memory device 3, 3-1 to 3-n cache memory 4, 4-1 to 4-n Cache control device 11 Processor 20 Cache memory device 12 Shared bus 13 Memory 21, 22, Cache memory 21a, 22a Cache control Apparatus 14 Prefetch control unit 15 Cache selection control unit 16 Selector 17 Protocol selection control unit 23 Address table 24 Address registration means 25 Means for holding a constant threshold 26 Means for holding a dynamically changing threshold c 27 Threshold increase / decrease means

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 共有メモリ型並列計算機の各プロセッサ
に対応して設けられたキャッシュメモリ装置であって、 上記キャッシュメモリ装置に、キャッシュプロトコルが
異なる複数のキャッシュメモリ設け、 上記複数のキャッシュメモリ毎に異なった一貫性管理を
行うことを特徴とするキャッシュメモリ装置。
1. A cache memory device provided corresponding to each processor of a shared memory type parallel computer, wherein a plurality of cache memories having different cache protocols are provided in the cache memory device. A cache memory device which performs different coherence management.
【請求項2】 共有メモリ型並列計算機の各プロセッサ
に対応して設けられたキャッシュメモリ装置であって、 キャッシュメモリのキャッシュライン毎に、どのキャッ
シュプロトコルを用いるかを指定するビットを付加し、 キャッシュライン毎に異なった一貫性管理を行うことを
特徴とするキャッシュメモリ装置。
2. A cache memory device provided corresponding to each processor of a shared memory type parallel computer, wherein a bit for designating which cache protocol is used is added to each cache line of the cache memory. A cache memory device wherein different consistency management is performed for each line.
【請求項3】 キャッシュラインごとに、当該キャッシ
ュラインがどのくらいプロセッサにより参照されたかを
示すリファレンスカウンタを設け、 上記リファレンスカウンタの値に基づきキャッシュプロ
トコルを選択することを特徴とする請求項1または請求
項2のキャッシュメモリ装置。
3. The method according to claim 1, wherein a reference counter is provided for each cache line to indicate how much the cache line has been referenced by the processor, and a cache protocol is selected based on the value of the reference counter. 2 cache memory device.
【請求項4】 アドレスを登録するためのアドレステー
ブルを設け、上記リファレンスカウンタの値に基づき、
全く参照されずにキャッシュメモリから追い出されたデ
ータのアドレス、もしくは、所定の回数以上参照された
のちにキャッシュメモリから追い出されたデータのアド
レスを求めて上記アドレステーブルに登録し、 上記アドレステーブルに登録されたアドレスに基づき、
どのキャッシュプロトコルを用いるかを自動的に選択す
ることを特徴とする請求項3のキャッシュメモリ装置。
4. An address table for registering an address is provided, and based on a value of the reference counter,
Find the address of the data that was evicted from the cache memory without being referenced at all, or the address of the data that was evicted from the cache memory after being referenced a predetermined number of times or more and registered in the address table, and registered in the address table Based on the address provided,
4. The cache memory device according to claim 3, wherein a cache protocol to be used is automatically selected.
【請求項5】 他のキャッシュメモリとのデータの共有
を許さない第1のプロトコルと、他のキャッシュメモリ
とのデータの共有を許す第2のプロトコルを用いた複数
のキャッシュメモリを設けるとともに、キャッシュメモ
リのキャッシュラインごとに、当該キャッシュラインが
どのくらいプロセッサにより参照されたかを示すリファ
レンスカウンタと、アドレスを登録するためのアドレス
テーブルと、上記第1のプロトコルを用いるキャッシュ
メモリに衝突が生じた場合に−1され、上記第2のプロ
トコルを用いるキャッシュメモリに衝突が生じた場合に
+1される閾値を保持する手段を設け、 リファレンスカウンタの値が上記閾値以上のデータがキ
ャッシュメモリから追い出されるとき、当該データのア
ドレスを求めて上記アドレステーブルに登録し、 上記アドレステーブルに登録されたアドレスに基づき、
どのキャッシュプロトコルのキャッシュメモリを用いる
かを自動的に選択することを特徴とする請求項1のキャ
ッシュメモリ装置。
5. A cache system comprising: a plurality of cache memories using a first protocol that does not allow data sharing with another cache memory and a second protocol that allows data sharing with another cache memory; For each cache line in the memory, a reference counter indicating how much the cache line has been referred to by the processor, an address table for registering an address, and a conflict in the cache memory using the first protocol. A means for holding a threshold value that is incremented by one when a collision occurs in a cache memory using the second protocol, and when data whose reference counter value is equal to or greater than the threshold value is evicted from the cache memory, Find the address of Register Le based on the registered address in the address table,
2. The cache memory device according to claim 1, wherein a cache protocol of which cache protocol is used is automatically selected.
【請求項6】 請求項1,2,3,4または請求項5の
キャッシュメモリ装置を備えた計算機。
6. A computer comprising the cache memory device according to claim 1, 2, 3, 4, or 5.
JP10301123A 1998-10-22 1998-10-22 Cache memory device for parallel computer Withdrawn JP2000132456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10301123A JP2000132456A (en) 1998-10-22 1998-10-22 Cache memory device for parallel computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10301123A JP2000132456A (en) 1998-10-22 1998-10-22 Cache memory device for parallel computer

Publications (1)

Publication Number Publication Date
JP2000132456A true JP2000132456A (en) 2000-05-12

Family

ID=17893113

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10301123A Withdrawn JP2000132456A (en) 1998-10-22 1998-10-22 Cache memory device for parallel computer

Country Status (1)

Country Link
JP (1) JP2000132456A (en)

Similar Documents

Publication Publication Date Title
US7266647B2 (en) List based method and apparatus for selective and rapid cache flushes
KR100970229B1 (en) Computer system with processor cache that stores remote cache presence information
EP1388065B1 (en) Method and system for speculatively invalidating lines in a cache
US6289420B1 (en) System and method for increasing the snoop bandwidth to cache tags in a multiport cache memory subsystem
US6021468A (en) Cache coherency protocol with efficient write-through aliasing
JP4447580B2 (en) Partitioned sparse directory for distributed shared memory multiprocessor systems
US6272602B1 (en) Multiprocessing system employing pending tags to maintain cache coherence
KR101014394B1 (en) Computer system with integrated directory and processor cache
US6826651B2 (en) State-based allocation and replacement for improved hit ratio in directory caches
JP3281893B2 (en) Method and system for implementing a cache coherency mechanism utilized within a cache memory hierarchy
US7434007B2 (en) Management of cache memories in a data processing apparatus
EP0780769A1 (en) Hybrid numa coma caching system and methods for selecting between the caching modes
EP0780770A1 (en) Hybrid numa coma caching system and methods for selecting between the caching modes
US20070136535A1 (en) System and Method for Reducing Unnecessary Cache Operations
JPH09259036A (en) Write-back cache and method for maintaining consistency in write-back cache
JPH11506852A (en) Reduction of cache snooping overhead in a multi-level cache system having a large number of bus masters and a shared level 2 cache
US6587922B2 (en) Multiprocessor system
US20020078304A1 (en) System and method for allocating a directory entry for use in multiprocessor-node data processing systems
US7117312B1 (en) Mechanism and method employing a plurality of hash functions for cache snoop filtering
US7024520B2 (en) System and method enabling efficient cache line reuse in a computer system
US5987544A (en) System interface protocol with optional module cache
JP3068469B2 (en) Second level cache memory system
JP3732397B2 (en) Cash system
JP3626609B2 (en) Multiprocessor system
JP2000132456A (en) Cache memory device for parallel computer

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060110