JPH03230238A - Cache memory control system - Google Patents
Cache memory control systemInfo
- Publication number
- JPH03230238A JPH03230238A JP2026446A JP2644690A JPH03230238A JP H03230238 A JPH03230238 A JP H03230238A JP 2026446 A JP2026446 A JP 2026446A JP 2644690 A JP2644690 A JP 2644690A JP H03230238 A JPH03230238 A JP H03230238A
- Authority
- JP
- Japan
- Prior art keywords
- cache memory
- information
- layer
- address
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Memory System (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は情報処理装置におけるキャッシュメモリ制御方
式に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory control method in an information processing device.
各プロセッサがそれぞれ個別にキャッシュメモリを備え
る密結合マルチプロセッサにあっては、各キャッシュメ
モリと主メモリ及び前記キャッシュメモリ相互間の情報
一致を保証する機構が必要となる。In a tightly coupled multiprocessor in which each processor has its own cache memory, a mechanism is required to ensure information consistency between each cache memory, the main memory, and the cache memory.
すなわち、各プロセッサがバスで結合されたバス結合型
の密結合マルチプロセッサではバスを監視して他のプロ
セッサからのメモリアクセスを検畠し、あらかじめ定め
られた規則に従って該アドレスに対応する情報が自キャ
ッシュメモリ上に存在する場合、該情報を無効化するこ
とにより情報一致を保証する方法が一般にとられている
。そしてこの場合、前記プロセッサ内のキャッシュメモ
リが多階層になっている場合は自プロセッサ内の全ての
階層のキャッシュメモリに該アドレスに対応する情報が
格納されているか否かをチエツクし該情報が格納されて
おればそれを無効化する必要がある。In other words, a bus-coupled, tightly coupled multiprocessor in which each processor is connected by a bus monitors the bus to check for memory accesses from other processors, and automatically records information corresponding to the address according to predetermined rules. If the information exists in the cache memory, a method is generally used to ensure that the information matches by invalidating the information. In this case, if the cache memory in the processor has multiple layers, it is checked whether information corresponding to the address is stored in the cache memory of all layers in the processor, and the information is stored. If so, you need to disable it.
第1図は、上述したように各プロセッサが個別に2階層
のキャッシュメモリを有するバス結合型の密結合マルチ
プロセッサを示すブロック図である。同図において、1
,2はプロセッサ、3,4は命令実行部(以下CPUと
称す)、5.6は第1階層のキャッシュメモリ、7,8
は第2階層のキャッシュメモリ、9は主メモリ、10は
前記プロセッサ1,2及び主メモリ9を接続するバス、
11゜12はそれぞれ前記CPU3,4と第1階層のキ
ャッシュメモリ5,6とを接続する信号線、13.14
はそれぞれ前記第1階層のキャッシュメモリ5゜6と第
2階層のキャッシュメモリ7.8とを接続する信号線で
ある。FIG. 1 is a block diagram showing a bus-coupled tightly coupled multiprocessor in which each processor individually has two levels of cache memory as described above. In the same figure, 1
, 2 is a processor, 3 and 4 are instruction execution units (hereinafter referred to as CPUs), 5.6 is a first layer cache memory, 7 and 8
9 is a second layer cache memory; 9 is a main memory; 10 is a bus connecting the processors 1, 2 and the main memory 9;
11 and 12 are signal lines connecting the CPUs 3 and 4 to the first layer cache memories 5 and 6, respectively; 13 and 14;
are signal lines connecting the first layer cache memory 5.6 and the second layer cache memory 7.8, respectively.
同図において、前記プロセッサ1,2における第1階層
のキャッシュメモリ5,6は情報を格納するため2個の
エントリを、また、第2階層のキャッシュメモリ7.8
は4個のエントリを有している。前記各エントリは、そ
れぞれ格納している情報の主メモリ9上のアドレス、内
容(データ)、エントリの有効/無効及び各エントリの
使用履歴<LRU)を保持できるようになっている。い
ま、第1階層のキャッシュメモリ5,6及び第2階層の
キャッシュメモリ7.8の各エントリには第1図に示す
ような情報がそれぞれ格納されているとする。In the figure, the first layer cache memories 5 and 6 in the processors 1 and 2 have two entries for storing information, and the second layer cache memories 7 and 8 have two entries for storing information.
has four entries. Each entry can hold the address of the stored information in the main memory 9, contents (data), validity/invalidity of the entry, and usage history of each entry (<LRU). It is now assumed that information as shown in FIG. 1 is stored in each entry of the cache memories 5 and 6 of the first layer and the cache memories 7 and 8 of the second layer.
このような場合において、キャッシュメモリ制御の動作
について以下説明する。In such a case, the operation of cache memory control will be described below.
まず、前記CPU5が主メモリの6番地の情報を読み出
す場合、信号!11を介してアドレスを第1階層のキャ
ッシュメモリ5に送る。前記第1階層のキャッシュメモ
リ5には該情報がないため、信号線13を介して該アド
レスを第2階層のキャッジメモリ7に送る。前記第2階
層のキャッシュメモリ7にも該情報がないため、バス1
0を介して主メモリ9から6番地の内容を読み出し、第
2階層のキャッシュメモリ7ではその情報をLRtJが
最も大きい4のエントリ、すなわち今まで0番地の内容
が格納されていたエントリに格納する。また第2階層の
キャッシュメモリ7は信号1a13を介して該情報を第
1階層のキャッシュメモリ5に送る。First, when the CPU 5 reads information at address 6 of the main memory, the signal ! 11, the address is sent to the first layer cache memory 5. Since the first layer cache memory 5 does not have this information, the address is sent to the second layer cache memory 7 via the signal line 13. Since the second layer cache memory 7 also does not have this information, the bus 1
The contents of address 6 are read from the main memory 9 via 0, and in the cache memory 7 of the second layer, that information is stored in the entry 4 with the largest LRtJ, that is, the entry where the contents of address 0 were previously stored. . Further, the second layer cache memory 7 sends the information to the first layer cache memory 5 via the signal 1a13.
第1階層のキャッシュメモリ5では該情報をLRUが最
も大きい2のエントリ、すなわち今まで3番地の内容が
格納されていたエントリに格納し、さらに信号線11を
介して該情報をCPU3に送る。In the cache memory 5 of the first layer, the information is stored in the entry 2 having the largest LRU, that is, the entry in which the contents of address 3 have been stored up to now, and the information is further sent to the CPU 3 via the signal line 11.
このようにして前記CPU3が主メモリ9の6番地の情
報を読み出す処理を行う前とその後の第1階層のキャッ
シュメモリ5と第2階層のキャッシュメモリ7の各エン
トリを比較すると第2図に示すようになる。A comparison of each entry in the first layer cache memory 5 and the second layer cache memory 7 before and after the CPU 3 reads the information at address 6 of the main memory 9 in this way is shown in FIG. It becomes like this.
しかしながらこのような制御にあっては、第2図から判
るように、第1階層のキャッシュメモリ5に格納されて
いる情報が第2階層のキャッシュメモリ7に格納されな
い場合が生ずる(同図では、0番地がこれに相当する)
。この理由は、第1階層のキャッシュメモリ5のLRU
はCPU3からのアクセスにより更新され、第2階層の
キャッシュメモリ7のLRUは第1階層のキャッシュメ
モリからのアクセスにより更新され、第1階層のキャッ
シュメモリ5でLRUが最も小さいO番地が第2階層の
キャッシュメモリ7ではLRUが最も大きくなるという
ことが生ずるためである。However, with such control, as can be seen from FIG. 2, there are cases in which the information stored in the first layer cache memory 5 is not stored in the second layer cache memory 7 (in the figure, Address 0 corresponds to this)
. The reason for this is that the LRU of the first layer cache memory 5
is updated by access from the CPU 3, the LRU of the second layer cache memory 7 is updated by access from the first layer cache memory, and the address O with the smallest LRU in the first layer cache memory 5 is the second layer cache memory 7. This is because the LRU of the cache memory 7 becomes the largest.
このような状態で、CPU4が0番地の内容をDoから
DO+に書き換えるストアアクセスを行うと、CPU4
から送られるアドレス及びデータ(Do’ )が信号線
12、第1階層のキャッシュメモリ6、信号線14及び
第2階層のキャッシュメモリ8を経由してバス10に送
り出され、主メモリ9で0番地がDO′に書き換えられ
る。ここで、キャッシュメモリの情報一致を保証するた
め、プロセッサ1では第2階層のキャッシュメモリ7及
び第1階層のキャッシュメモリ5に0番地の内容が格納
されておれば、それを無効化しなければならない。この
ため、プロセッサ1の第2階層のキャッシュメモリ7は
バス10を監視し、CPU4からのストアアクセスを検
出し、まず第2階層のキャッシュメモリ7に0番地の情
報が格納されているか否かをチエツクする。第2階層の
キャッシュメモリ7にはO番地の情報は格納されていな
いため(第2図の(2)参照)無効化の必要はない。し
かし、先に説明したように第2階層のキャッシュメモリ
7にO番地の内容が存在しなくとも第1階層のキャッジ
メモリ5に存在する場合がある。このため、第2階層の
キャッシュメモリ7は信号線13を介して該アドレスを
第1階層のキャッシュメモリ5に送り、第1階層のキャ
ッシュメモリ5ではO番地の情報が格納されているため
、そのエントリを無効化する。In this state, when CPU4 performs a store access to rewrite the contents of address 0 from Do to DO+, CPU4
The address and data (Do') sent from is rewritten to DO'. Here, in order to guarantee information consistency in the cache memories, if the contents of address 0 are stored in the cache memory 7 of the second layer and the cache memory 5 of the first layer, the processor 1 must invalidate it. . Therefore, the second layer cache memory 7 of the processor 1 monitors the bus 10, detects a store access from the CPU 4, and first checks whether information at address 0 is stored in the second layer cache memory 7. Check. Since the information at address O is not stored in the second layer cache memory 7 (see (2) in FIG. 2), there is no need to invalidate it. However, as described above, even if the contents of address O do not exist in the cache memory 7 of the second hierarchy, they may exist in the cache memory 5 of the first hierarchy. Therefore, the cache memory 7 in the second layer sends the address to the cache memory 5 in the first layer via the signal line 13, and since the information at address O is stored in the cache memory 5 in the first layer, Disable an entry.
このように従来のキャッシュメモリ制御では情報一致の
ため、他プロセッサからストアアクセスがあった場合、
該アドレスに対応する情報が第2階層のキャッシュメモ
リ7に存在するか否かにかかわらず、信号線13を介し
て第1階層のキャッシュメモリ5で該アドレスを送り、
第1階層のキャッシュメモリ5へ該アドレスに対応する
情報が格納されているか否かをチエツクし、該情報が格
納されておれば該情報を無効化する必要があった。In this way, in conventional cache memory control, because of information matching, when there is a store access from another processor,
Sending the address in the first layer cache memory 5 via the signal line 13 regardless of whether information corresponding to the address exists in the second layer cache memory 7;
It is necessary to check whether information corresponding to the address is stored in the cache memory 5 of the first layer, and if the information is stored, it is necessary to invalidate the information.
このため、CPUの自キャッシュメモリアクセスと他プ
ロセッサのストアアクセスに伴う自キャッシュメモリを
チエツクするためのアクセスとが自キャッシュメモリ上
でぶつかり、密結合マルチプロセッサの性能を低下させ
る欠点があった。Therefore, the CPU's access to its own cache memory and the access for checking its own cache memory accompanying a store access by another processor collide on its own cache memory, resulting in a drawback that the performance of the tightly coupled multiprocessor is degraded.
それ故、本発明は、このような事情に基づいてなされた
ものであり、その目的とするところのものは、CPUの
自キャッシュメモリアクセスと他プロセッサのストアア
クセスに伴う自キャッシュメモリをチエツクするための
アクセスとが自キャッシュメモリ上でぶつかりあうのを
極めて少なくし、これにより密結合マルチプロセッサの
性能を向上させたキャッシュメモリ制御方式を提供する
ことにある。Therefore, the present invention has been made based on these circumstances, and its purpose is to check the own cache memory associated with the CPU's own cache memory access and the store access of other processors. An object of the present invention is to provide a cache memory control method that greatly reduces collisions between accesses from and on its own cache memory, thereby improving the performance of a tightly coupled multiprocessor.
前記目的を達成するために、本発明は、基本的には、C
PUの必要とする情報が第1階層のキャッシュメモリに
存在しない場合、第2階層のキャッシュメモリにアクセ
スし、以後同様に第1階層のキャッシュメモリに存在し
ない場合、第i+1階層のキャッシュメモリにアクセス
し、最後に第N階層のキャッシュメモリに存在しない場
合、主メモリにアクセスするように構成されたN階層か
らなるキャッシュメモリにおいて、CPUの必要とする
情報が第1階層のキャッシュメモリに存在しない場合、
CPUが必要とする情報を格納するエリアを確保するた
め、あらかじめ定められた規則に従って第1階層のキャ
ッシュメモリから追い出す情報のアドレスを決定し、該
アドレスに対応する情報が第i−1階層〜第1階層のキ
ャッシュメモリに存在する場合、該情報を無効化するこ
とを特徴とするものである。In order to achieve the above object, the present invention basically provides C.
If the information required by the PU does not exist in the cache memory of the first layer, it accesses the cache memory of the second layer, and if it does not exist in the cache memory of the first layer, it accesses the cache memory of the i+1th layer. Finally, if the information required by the CPU does not exist in the cache memory of the Nth hierarchy, in the cache memory of the Nth hierarchy configured to access the main memory, the information required by the CPU does not exist in the cache memory of the first hierarchy. ,
In order to secure an area for storing information required by the CPU, the address of the information to be evicted from the first layer cache memory is determined according to predetermined rules, and the information corresponding to the address is This information is characterized by invalidating the information if it exists in the first layer cache memory.
(2)また、上述のようにN階層からなるキャッシュメ
モリを有するプロセッサがバスで多数接続された密結合
マルチプロセッサにおいて、他プロセッサのメモリアク
セスを第N階層のキャッシュメモリにより検出し、あら
かじめ定められた規則に従って、該アドレスに対応する
キャッシュメモリ上の情報を無効化しなければならない
場合、第N階層のキャッシュメモリに該アドレスに対応
する情報が存在しないときは無動作とし、該アドレスに
対応する情報が存在するときには第N階層のキャッシュ
メモリ上で該情報を無効化するとともに、第N−IJ層
のキャッシュメモリに該アドレスを送り、以後同様に第
1階層のキャッシュメモリに該アドレスに対応する情報
が存在しないときは無動作とし、該アドレスに対応する
情報が存在するときは該情報を無効化するとともに第i
−1階層のキャッシュメモリに該アドレスを送ることを
特徴とするものである。(2) Furthermore, in a tightly coupled multiprocessor in which a large number of processors each having a cache memory consisting of N layers are connected via a bus as described above, memory accesses of other processors can be detected by the cache memory of the N layer, and predetermined If the information on the cache memory corresponding to the address must be invalidated according to the rules set forth in the table, if the information corresponding to the address does not exist in the cache memory of the Nth layer, no operation is performed, and the information corresponding to the address is invalidated. If exists, the information is invalidated on the cache memory of the Nth layer, and the address is sent to the cache memory of the N-IJ layer, and thereafter, the information corresponding to the address is stored in the cache memory of the first layer in the same way. If the address does not exist, there is no operation, and if the information corresponding to the address exists, the information is invalidated and the i-th
- This is characterized in that the address is sent to the cache memory of the first layer.
このように構成したキャッシュメモリ制御方式は、第1
階層のキャッシュメモリに存在する情報は必ず第i+1
階層のキャッシュメモリに存在するように各階層のキャ
ッシュメモリを制御するようになっている。このことは
、第i+1階層のキャッシュメモリに存在しない情報は
必ず第1階層のキャッシュメモリに存在しないように制
御することとなる。このため、他プロセッサからのスト
アアクセスに伴うキャッシュメモリ無効化があった場合
、第i+1階層のキャッシュメモリに該アドレスに対応
する情報が格納されている時のみ、該無効化アクセスを
第1階層のキャッシュメモリに通知し、格納されていな
いときは該通知を行なわないようにすることができる。The cache memory control method configured in this way is based on the first
The information existing in the cache memory of the hierarchy is always the i+1st
The cache memory of each layer is controlled so that it exists in the cache memory of each layer. This means that information that does not exist in the i+1th layer cache memory is controlled so that it does not exist in the first layer cache memory. Therefore, when cache memory is invalidated due to a store access from another processor, the invalidating access is performed in the first layer only when information corresponding to the address is stored in the cache memory of the i+1th layer. It is possible to notify the cache memory and not to perform the notification when the information is not stored.
したがって、自CPUからのキャッシュメモリへのアク
セスと他プロセッサからのストアアクセスに伴うキャッ
シュメモリ無効化アクセスとのぶつかりを極めて少なく
することができる。Therefore, it is possible to extremely reduce conflicts between accesses to the cache memory from the own CPU and cache memory invalidation accesses accompanying store accesses from other processors.
このように、自CPUからのキャッシュメモリへのアク
セスと他プロセッサからのストアアクセスに伴うキャッ
シュメモリ無効化アクセスとのぶつかりの頻度を少なく
することができることから、密結合マルチプロセッサの
性能向上が図れるようになる。In this way, it is possible to reduce the frequency of collisions between cache memory accesses from the own CPU and cache memory invalidation accesses associated with store accesses from other processors, thereby improving the performance of tightly coupled multiprocessors. become.
第3図は本発明によるキャッシュ制御方式の一実施例を
説明する図であって、CPUからのメモリアクセスに対
するキャッシュメモリの動作フローを示したものである
。同図において、CPU3から必要な情報のアドレス送
出があり、第1階層のキャッシュメモリ5では、該情報
が存在するか否かを判定するようになっている(ステッ
プ101)。存在する場合には、該情報を読みだして前
記CPU3に送出するようになっている(ステップ10
2)。一方、存在していない場合には、第2階層のキャ
ッシュメモリ7に前記CPU3が必要とする情報のアド
レスを送るようになっている(ステップ103)、前記
第2階層のキャッシュメモリ7では、前記情報が存在す
るか否かを判定するようになっている(ステップ104
)。存在する場合には、該情報をよみだして前記第1階
層のキャッシュメモリ5に送出するようになっている(
ステップ105)。この場合、前記第1階層のキャッシ
ュメモリ5では、前記第2階層のキャッシュメモリ7か
ら送られてきた情報を格納して、前記CPU3に送出す
るようになっている(ステップ106)。一方、前記情
報が存在していない場合には、追い出す情報を決定し、
該情報のアドレスを前記第1階層のキャッシュメモリ5
に送出するようになっている(ステップ107)、前記
第1階層のキャッシュメモリ5では、前記追い出す情報
が存在するか否かを判定するようになっている(ステッ
プ108)。存在しない場合は、無動作としくステップ
109)、存在する場合は前記追い畠す情報を無効化す
るようになっている(ステップ110)。前記第2階層
のキャッシュメモリ7において、前記ステップ107後
に、主メモリ9に前記CPU3が必要とする情報のアド
レスを送出するようになっている(ステップ111)。FIG. 3 is a diagram illustrating an embodiment of the cache control method according to the present invention, and shows the operational flow of the cache memory in response to memory access from the CPU. In the figure, the CPU 3 sends the address of necessary information, and the first layer cache memory 5 determines whether or not the information exists (step 101). If the information exists, the information is read out and sent to the CPU 3 (step 10).
2). On the other hand, if it does not exist, the address of the information required by the CPU 3 is sent to the second layer cache memory 7 (step 103). It is determined whether the information exists (step 104).
). If the information exists, the information is read out and sent to the cache memory 5 of the first layer (
Step 105). In this case, the first layer cache memory 5 stores the information sent from the second layer cache memory 7 and sends it to the CPU 3 (step 106). On the other hand, if the information does not exist, determine the information to be evicted,
The address of the information is stored in the first layer cache memory 5.
The cache memory 5 of the first hierarchy determines whether or not the information to be evicted exists (step 108). If it does not exist, no action is taken (step 109), and if it does exist, the information for planting is invalidated (step 110). In the second layer cache memory 7, after step 107, the address of the information required by the CPU 3 is sent to the main memory 9 (step 111).
前記主メモリ9では、送られてきたアドレスに対応する
情報を読みだし、要求元に送るようになっている。この
情報は、前記前記第2階層のキャッシュメモリ7におい
て、格納されるとともに前記第1階層のキャッシュメモ
リ5に送るようになっている(ステップ112)。The main memory 9 reads out information corresponding to the sent address and sends it to the request source. This information is stored in the second layer cache memory 7 and is also sent to the first layer cache memory 5 (step 112).
また、第4図は本発明によるキャッシュ制御方式の他の
実施例を説明する図であって、他CPUからのストアア
クセスに伴うキャッシュメモリ無効化に対するキャッシ
ュメモリの動作フローを示したものである。同図におい
て、第2階層のキャッシュメモリ7では、他プロセッサ
からの主メモリアクセスを監視し、予め決められた規則
に従って該アクセスのアドレスに対応する情報を無効化
しなければならないことを検出するようになっている(
ステップ201)。そして、前記アドレスに対応する情
報が存在するか否かを判定するようになっている(ステ
ップ202)、存在する場合には、該情報を無効化し、
アドレスを前記第1階層のキャッシュメモリ5に送出す
るようになっている(ステップ203)。なお、存在し
ない場合には、そのまま無動作としておく(ステップ2
゜4)。第1階層のキャッシュメモリ5では、前記アド
レスに対応する情報が存在するか否かを判定するように
なっている(ステップ205)。存在する場合には、前
記情報を無効化する(ステップ206)。なお、存在し
ない場合には、そのまま無動作としておく(ステップ2
07)。Further, FIG. 4 is a diagram for explaining another embodiment of the cache control method according to the present invention, and shows the operation flow of the cache memory in response to invalidation of the cache memory due to store access from another CPU. In the figure, the second layer cache memory 7 monitors main memory accesses from other processors and detects that information corresponding to the address of the access must be invalidated according to predetermined rules. It has become (
Step 201). Then, it is determined whether or not information corresponding to the address exists (step 202). If so, the information is invalidated,
The address is sent to the first layer cache memory 5 (step 203). Note that if it does not exist, it will remain inactive (step 2).
゜4). The first layer cache memory 5 determines whether information corresponding to the address exists (step 205). If it exists, the information is invalidated (step 206). Note that if it does not exist, it will remain inactive (step 2).
07).
第3図、第4図では、いずれも2階層キャッシュメモリ
構成の動作フローを示したものであるが、多階層であっ
ても同様の構成となることはいうまでもない。Although FIGS. 3 and 4 both show the operational flow of a two-tier cache memory configuration, it goes without saying that a similar configuration can be achieved even in a multi-tier cache memory configuration.
次に、このような制御方式を採った場合のキャッシュメ
モリの動作を第1図を用いて説明する。Next, the operation of the cache memory when such a control method is adopted will be explained using FIG.
CPU3が主メモリ9の6番地の情報を読み出す場合、
信号線11を介してアドレスを第1階層のキャッシュメ
モリ5に送る。第1階層のキャッシュメモリ5には該情
報がないため、信号線13を介して該アドレスを第2階
層のキャッシュメモリ7に送る。第2階層のキャッシュ
メモリ7にも該情報がないため、まず、該情報を格納す
るエリアを確保するため、LRUが最も大きい4のエン
トリ、すなわち今まで0番地の内容が格納されていたエ
ントリを決定する。このエントリに格納されている0番
地の内容は無効化されるため、該アドレス(0番地)を
第1階層のキャッシュメモリ5に送り、該アドレスが第
1階層のキャッシュメモリ5の格納されている場合、そ
の無効化を指示する。When the CPU 3 reads information at address 6 of the main memory 9,
The address is sent to the first layer cache memory 5 via the signal line 11. Since the first layer cache memory 5 does not have this information, the address is sent to the second layer cache memory 7 via the signal line 13. Since there is no such information in the cache memory 7 on the second layer, first, in order to secure an area to store the information, the entry with the largest LRU of 4, that is, the entry where the content of address 0 has been stored up until now, is decide. Since the contents of address 0 stored in this entry are invalidated, the address (address 0) is sent to the cache memory 5 of the first layer, and the address is stored in the cache memory 5 of the first layer. If so, instruct to disable it.
第1階層のキャッシュメモリ5には0番地の内容が格納
されているため、それを無効化する。次に、これと並行
して、第2階層のキャッシュメモリ7はバス10を介し
て主メモリ9から6番地の内容を読み出し、LRUが最
も大きい4のエントリに格納する。また、第2階層のキ
ャッシュメモリ7は信号線13を介して該情報を第1階
層のキャッシュメモリ5に送る。第1階層のキャッシュ
メモリでは該情報をLRUが最も大きい2のエントリ、
すなわち今まで3番地の内容が格納されていたエントリ
に格納し、さらに信号線11を介して該情報をCPU3
に送る。Since the first layer cache memory 5 stores the contents of address 0, it is invalidated. Next, in parallel with this, the cache memory 7 of the second layer reads the contents of address 6 from the main memory 9 via the bus 10, and stores it in the entry 4 having the largest LRU. Further, the second layer cache memory 7 sends the information to the first layer cache memory 5 via the signal line 13. In the cache memory of the first layer, the information is stored in the entry 2 with the largest LRU,
That is, the content of address 3 is stored in the entry that has been stored up until now, and the information is sent to the CPU 3 via the signal line 11.
send to
このようにして、CPU3が主メモリ9の6番地の情報
を読み出す処理を行う前とその後のそれぞれの第1階層
のキャッシュメモリ5と第2階層のキャッシュメモリ7
の各エントリは第5図に示すようになる。In this way, the first layer cache memory 5 and the second layer cache memory 7 before and after the CPU 3 performs the process of reading out the information at address 6 of the main memory 9.
Each entry is as shown in FIG.
この第5図から判るように、上記実施例によるキャッシ
ュメモリ制御では、第2階層のキャッシュメモリ7に格
納されている情報を追い出す場合、該情報が第1階層の
キャッシュメモリ5に格納されていると該情報を必ず無
効化するため、第2階層のキャッシュメモリ7に格納さ
れていない情報は、必ず第1階層のキャッシュメモリに
も格納されていないことが保証されることになる。As can be seen from FIG. 5, in the cache memory control according to the above embodiment, when the information stored in the second layer cache memory 7 is to be evicted, the information is stored in the first layer cache memory 5. Since the information is always invalidated, it is guaranteed that information that is not stored in the second layer cache memory 7 is also not stored in the first layer cache memory.
このような状態で、CPU4が0番地の内容をDoから
DO′に書き換えるストアアクセスを行うと、CPU4
から送られるアドレス及びデータ(Do’)が信号線1
2.第1階層キャッシュメモリ6、信号線14及び第2
階層のキャッシュメモリ8を経由してバス10に送り出
され、主メモリ9で0番地がDO’に書き換えられる。In this state, when CPU4 performs a store access to rewrite the contents of address 0 from Do to DO', CPU4
The address and data (Do') sent from signal line 1
2. The first layer cache memory 6, the signal line 14 and the second
The data is sent to the bus 10 via the hierarchical cache memory 8, and address 0 is rewritten to DO' in the main memory 9.
ここで、キャッシュメモリの情報一致を保証するため、
プロセッサ1では第2階層のキャッシュメモリ7及び第
1階層のキャッシュメモリ5に0番地の内容が格納され
ておれば、それを無効化しなければならない。このため
、プロセッサ1の第2階層のキャッシュメモリ7はバス
10を監視し、CPU4からのストアアクセスを検出し
、まず第2階層のキャシュメモリ7に0番地の情報が格
納されているか否かをチエツクする。第2階層のキャッ
シュメモリ7には0番地は格納されていないため無効化
の必要はない。また、本実施例では先に説明したように
、第2階層のキャッシュメモリ7に該情報が存在しない
場合は第1階層のキャッシュメモリ5にも存在しないこ
とが保証されている。したがって、第2階層のキャッシ
ュメモリ7は信号線13を介し該アドレスを第1階層の
キャッシュメモリ5に送る必要はなくなる。Here, in order to ensure that the information in the cache memory matches,
In the processor 1, if the contents of address 0 are stored in the second layer cache memory 7 and the first layer cache memory 5, it must be invalidated. Therefore, the second layer cache memory 7 of the processor 1 monitors the bus 10, detects a store access from the CPU 4, and first checks whether information at address 0 is stored in the second layer cache memory 7. Check. Since address 0 is not stored in the second layer cache memory 7, there is no need to invalidate it. Furthermore, in this embodiment, as described above, if the information does not exist in the cache memory 7 of the second layer, it is guaranteed that the information does not exist in the cache memory 5 of the first layer. Therefore, it is no longer necessary for the second layer cache memory 7 to send the address to the first layer cache memory 5 via the signal line 13.
そして、CPU4が3番地の内容を書き換えた場合は、
第2階層のキャッシュメモリ7には該アドレスに対応す
る情報が存在するため、該情報を無効化し、さらに該ア
ドレスを第1階層のキャッシュメモリ5にも送る。第1
階層のキャッシュメモリ5では、3番地の情報が格納さ
れていないため無効化の処理は行わない。Then, if CPU4 rewrites the contents of address 3,
Since information corresponding to the address exists in the second layer cache memory 7, the information is invalidated and the address is also sent to the first layer cache memory 5. 1st
In the hierarchical cache memory 5, since the information at address 3 is not stored, invalidation processing is not performed.
さらに、CPU4が6番地の内容を書き換えた場合は、
第2階層のキャッシュメモリ7は該アドレスに対応する
情報が存在するため、該情報を無効化し、さらに該アド
レスを第1階層のキャッシュメモリ5にも送る。この場
合、第1階層のキャッシュメモリ5では、6番地の情報
が格納されているため該情報の無効化を行うことになる
。Furthermore, if CPU4 rewrites the contents of address 6,
Since the second layer cache memory 7 has information corresponding to the address, it invalidates the information and also sends the address to the first layer cache memory 5. In this case, since information at address 6 is stored in the first layer cache memory 5, this information will be invalidated.
以上、説明したように、上述した実施例によれば、他プ
ロセッサからのストアアクセスを伴うキャッシュメモリ
無効化があった場合、該アドレスに対応する情報が第1
階層のキャッシュメモリに存在しない場合には、第i−
1階層以下のキャッシュメモリでのチエツクを行う必要
がなく、自CPUからのキャッシュメモリアクセスがこ
れらのチエツクのためのアクセスとぶつかる頻度が少な
くなり、密結合マルチプロセッサの性能向上に効果をも
たらすことができるようになる。As explained above, according to the embodiment described above, when there is cache memory invalidation accompanied by a store access from another processor, the information corresponding to the address is
If it does not exist in the cache memory of the hierarchy, the i-th
There is no need to check the cache memory at the first level or lower, and the frequency with which cache memory accesses from the own CPU collide with accesses for these checks is reduced, which can have the effect of improving the performance of tightly coupled multiprocessors. become able to.
以上説明したことから明らがなように、本発明によるキ
ャッシュメモリ制御方式によれば、cPUの自キャッシ
ュメモリアクセスと他プロセッサのストアアクセスに伴
う自キャッシュメモリをチエツクするためのアクセスと
が自キャッシュメモリ上でぶつかりあうのを極めて少な
くでき、これにより密結合マルチプロセッサの性能を向
上させることができるようになる。As is clear from the above explanation, according to the cache memory control method according to the present invention, accesses to the own cache memory by the CPU and accesses to check the own cache memory accompanying store accesses by other processors are performed on the own cache memory. Collision on memory can be extremely reduced, thereby improving the performance of tightly coupled multiprocessors.
第1図は、バス結合型マルチプロセッサの概念を示す構
成図、
第2図は、従来のキャッシュメモリ制御を説明するため
、キャッシュメモリ内に格納される情報の変化を示した
図、
第3図及び第4図は、本発明によるキャッシュメモリ制
御方式の一実施例であるキャッシュメモリの動作フロー
を示した図、
第5図は、本発明のキャッシュメモリ制御を説明するた
め、キャッシュメモリ内に格納される情報の変化を示し
た図である。Fig. 1 is a block diagram showing the concept of a bus-coupled multiprocessor; Fig. 2 is a diagram showing changes in information stored in the cache memory to explain conventional cache memory control; Fig. 3 and FIG. 4 are diagrams showing the operation flow of a cache memory, which is an embodiment of the cache memory control method according to the present invention. FIG. FIG.
Claims (2)
メモリに存在しない場合、第2階層のキャッシュメモリ
にアクセスし、以後同様に第i階層のキャッシュメモリ
に存在しない場合、第i+1階層のキャッシュメモリに
アクセスし、最後に第N階層のキャッシュメモリに存在
しない場合、主メモリにアクセスするように構成された
N階層からなるキャッシュメモリにおいて、CPUの必
要とする情報が第i階層のキャッシュメモリに存在しな
い場合、CPUが必要とする情報を格納するエリアを確
保するため、あらかじめ定められた規則に従って第i階
層のキャッシュメモリから追い出す情報のアドレスを決
定し、該アドレスに対応する情報が第i−1階層〜第1
階層のキャッシュメモリに存在する場合、該情報を無効
化することを特徴とするキャッシュメモリ制御方式。(1) If the information required by the CPU does not exist in the cache memory of the first layer, the cache memory of the second layer is accessed, and if the information does not exist in the cache memory of the i-th layer, the cache memory of the i+1th layer is accessed. When the memory is accessed and the information does not exist in the cache memory of the Nth hierarchy, the information required by the CPU is stored in the cache memory of the ith hierarchy in the cache memory of the Nth hierarchy configured to access the main memory. If it does not exist, in order to secure an area for storing the information required by the CPU, the address of the information to be evicted from the i-th layer cache memory is determined according to predetermined rules, and the information corresponding to the address is 1st floor ~ 1st
A cache memory control method characterized by invalidating information when it exists in a cache memory of a hierarchy.
リを有するプロセッサがバスで多数接続された密結合マ
ルチプロセッサにおいて、他プロセッサのメモリアクセ
スを第N階層のキャッシュメモリにより検出し、あらか
じめ定められた規則に従って、該アドレスに対応するキ
ャッシュメモリ上の情報を無効化しなければならない場
合、第N階層のキャッシュメモリに該アドレスに対応す
る情報が存在しないときは無動作とし、該アドレスに対
応する情報が存在するときには第N階層のキャッシュメ
モリ上で該情報を無効化するとともに、第N−1階層の
キャッシュメモリに該アドレスを送り、以後同様に第i
階層のキャッシュメモリに該アドレスに対応する情報が
存在しないときは無動作とし、該アドレスに対応する情
報が存在するときは該情報を無効化するとともに第i−
1階層のキャッシュメモリに該アドレスを送ることを特
徴とするキャッシュメモリ制御方式。(2) In a tightly coupled multiprocessor in which a large number of processors each having a cache memory consisting of N layers are connected via a bus according to claim 1, the memory accesses of other processors are detected by the cache memory of the N layer, and If the information on the cache memory corresponding to the address must be invalidated according to the rules set forth in the table, if the information corresponding to the address does not exist in the cache memory of the Nth layer, no operation is performed, and the information corresponding to the address is invalidated. If the information exists, the information is invalidated on the cache memory of the Nth layer, and the address is sent to the cache memory of the N-1th layer.
If the information corresponding to the address does not exist in the cache memory of the hierarchy, no operation is performed, and if the information corresponding to the address exists, the information is invalidated and the i-th
A cache memory control method characterized in that the address is sent to a first-layer cache memory.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2026446A JPH03230238A (en) | 1990-02-05 | 1990-02-05 | Cache memory control system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2026446A JPH03230238A (en) | 1990-02-05 | 1990-02-05 | Cache memory control system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03230238A true JPH03230238A (en) | 1991-10-14 |
Family
ID=12193734
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2026446A Pending JPH03230238A (en) | 1990-02-05 | 1990-02-05 | Cache memory control system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03230238A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04242454A (en) * | 1991-01-17 | 1992-08-31 | Nec Corp | Coincidence processing system for cache memory |
| JPH05127996A (en) * | 1991-11-01 | 1993-05-25 | Fujitsu Ltd | Cache invalidation control method |
| JPH07152646A (en) * | 1993-07-15 | 1995-06-16 | Bull Sa | How to manage coherency of exchanges between memory hierarchy levels |
| US6240491B1 (en) | 1993-07-15 | 2001-05-29 | Bull S.A. | Process and system for switching between an update and invalidate mode for each cache block |
| WO2007094048A1 (en) * | 2006-02-14 | 2007-08-23 | Fujitsu Limited | Invalidation processing device and invalidation processing method |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6284350A (en) * | 1985-06-27 | 1987-04-17 | エンコア−・コンピユ−タ・コ−ポレ−シヨン | Hierarchical cash memory apparatus and method |
-
1990
- 1990-02-05 JP JP2026446A patent/JPH03230238A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6284350A (en) * | 1985-06-27 | 1987-04-17 | エンコア−・コンピユ−タ・コ−ポレ−シヨン | Hierarchical cash memory apparatus and method |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04242454A (en) * | 1991-01-17 | 1992-08-31 | Nec Corp | Coincidence processing system for cache memory |
| JPH05127996A (en) * | 1991-11-01 | 1993-05-25 | Fujitsu Ltd | Cache invalidation control method |
| JPH07152646A (en) * | 1993-07-15 | 1995-06-16 | Bull Sa | How to manage coherency of exchanges between memory hierarchy levels |
| US6240491B1 (en) | 1993-07-15 | 2001-05-29 | Bull S.A. | Process and system for switching between an update and invalidate mode for each cache block |
| WO2007094048A1 (en) * | 2006-02-14 | 2007-08-23 | Fujitsu Limited | Invalidation processing device and invalidation processing method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5829040A (en) | Snooper circuit of a multi-processor system | |
| JP3737834B2 (en) | Dual cache snoop mechanism | |
| US5752264A (en) | Computer architecture incorporating processor clusters and hierarchical cache memories | |
| US7827354B2 (en) | Victim cache using direct intervention | |
| US6625698B2 (en) | Method and apparatus for controlling memory storage locks based on cache line ownership | |
| US5146603A (en) | Copy-back cache system having a plurality of context tags and setting all the context tags to a predetermined value for flushing operation thereof | |
| US5249284A (en) | Method and system for maintaining data coherency between main and cache memories | |
| US7305523B2 (en) | Cache memory direct intervention | |
| US7620954B2 (en) | Mechanism for handling load lock/store conditional primitives in directory-based distributed shared memory multiprocessors | |
| JPH0668735B2 (en) | Cache memory | |
| US5806086A (en) | Multiprocessor memory controlling system associating a write history bit (WHB) with one or more memory locations in controlling and reducing invalidation cycles over the system bus | |
| JPH0743670B2 (en) | Store-through cache management system | |
| JPH0576060B2 (en) | ||
| US5987544A (en) | System interface protocol with optional module cache | |
| US7024520B2 (en) | System and method enabling efficient cache line reuse in a computer system | |
| US5737568A (en) | Method and apparatus to control cache memory in multiprocessor system utilizing a shared memory | |
| US6076147A (en) | Non-inclusive cache system using pipelined snoop bus | |
| WO1997004392A1 (en) | Shared cache memory device | |
| JP4577729B2 (en) | System and method for canceling write back processing when snoop push processing and snoop kill processing occur simultaneously in write back cache | |
| US6839806B2 (en) | Cache system with a cache tag memory and a cache tag buffer | |
| US5619673A (en) | Virtual access cache protection bits handling method and apparatus | |
| JPH03230238A (en) | Cache memory control system | |
| JP3626609B2 (en) | Multiprocessor system | |
| EP1314090B1 (en) | Method and system for translation lookaside buffer coherence in multi-processor systems | |
| US6061766A (en) | Non-inclusive cache method using pipelined snoop bus |