JPH04191946A - Snoop cache memory control system - Google Patents

Snoop cache memory control system

Info

Publication number
JPH04191946A
JPH04191946A JP2320914A JP32091490A JPH04191946A JP H04191946 A JPH04191946 A JP H04191946A JP 2320914 A JP2320914 A JP 2320914A JP 32091490 A JP32091490 A JP 32091490A JP H04191946 A JPH04191946 A JP H04191946A
Authority
JP
Japan
Prior art keywords
block
shared
cache memory
cache
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.)
Granted
Application number
JP2320914A
Other languages
Japanese (ja)
Other versions
JPH0532776B2 (en
Inventor
Masaki Sato
正樹 佐藤
Akira Yamamoto
明 山本
Teruhiko Ohara
輝彦 大原
Koichi Takeda
浩一 武田
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP2320914A priority Critical patent/JPH04191946A/en
Publication of JPH04191946A publication Critical patent/JPH04191946A/en
Publication of JPH0532776B2 publication Critical patent/JPH0532776B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To improve the utilizing efficiency of a common bus by dynamically discriminating whether a cache memory having a same block is to be revised or invalidated based on an operating state of the block of a processor when a common data in other cache memory is rewritten. CONSTITUTION:A flag (access flag) 20 set when a processor accesses a block in a cache memory 13 once or over is provided in the unit of blocks. When its own access flag is set up to a point of time when a same block of other cache memory is rewritten, its own block is revised but when the access flag 20 is not set, its own block is invalidated and the consistency is maintained by giving information representing whether the block is revised or invalidated to the cache memory 13 being a revision request source. Thus, undesired revision of the common block is minimized in this way to improve the utilizing efficiency of the common bus 80.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、共有バス型マルチプロセッサ7ステムにおけ
るキャッシュメモリの制御方式に関するものであり、特
に、共有バスを介して共有メモリに接続された各キャッ
シュメモリ相互の記憶内容の一貫性(coherenc
e )を効果的に保証するスヌープキャッシュメモリ制
御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory control method in a shared bus type multiprocessor 7 system, and in particular, to Coherence of storage contents between cache memories
The present invention relates to a snoop cache memory control method that effectively guarantees e).

〔従来の技術〕[Conventional technology]

複数のプロセッサが共有バスを介して共有メモリに接続
された共有バス型マルチプロセッサシステムにおいては
、多くの場合、各要素プロセッサ毎にキャッシュメモリ
を有する。この場合、これらのキャッシュメモリ相互間
の記憶内容に対する更新の一貫性が問題となる。このた
め共有バス型マルチプロセッサシステムにおいては共有
バスのトランザクシロンを各キャッシュメモリが監視し
、各プロセッサシステム毎にローカルにキャッシュメモ
リ内の情報更新を管理して上記一貫性を保つようにして
いる。このような一貫性を保証するためのキャッシュメ
モリの制御方式をスヌーブキャソシュ制御方式と呼ぶ。
In a shared bus multiprocessor system in which a plurality of processors are connected to a shared memory via a shared bus, each element processor often has a cache memory. In this case, consistency in updating the storage contents between these cache memories becomes a problem. For this reason, in a shared bus type multiprocessor system, each cache memory monitors transactions on the shared bus, and updates of information in the cache memory are locally managed for each processor system to maintain the above consistency. A cache memory control method for ensuring such consistency is called a snub cache control method.

このスヌープキャ1.シュ制御方式にはキャッシュメモ
リの管理についていくつかの制御方法が提案され、評価
か試みられている(たとえば、  Cache Coh
erence Protocols:Evaluati
on tlsing a Multiprocesso
r SimulationModel″、 James
 Archibald、他+ aca+ Trnasa
cLions on Computer System
s、 1986. November、 Volume
4. Number4. pp、273−298)。
This Snoopy 1. Several control methods for cache memory management have been proposed and evaluated or attempted (for example, Cache Coh
erence Protocols:Evaluati
on tlsing a Multiprocesso
r SimulationModel'', James
Archibald, et al + aca + Trnasa
cLions on Computer System
s, 1986. November, Volume
4. Number4. pp. 273-298).

従来のスヌーブキャッシュメモリ制御方式(7)L)ず
れにおいても、キャッシュメモリ相互間で互いに共有し
ているブロック(これを共有ブロックと呼ぶ)の写しを
複数のキャッシュメモリで持つことは許している。一方
、共有ブロックの中のデータ(これを共有データと呼ぶ
)を書き換えた場合の扱い方として、他のキャッシュメ
モリの共有ブロックを無効にする無効化方式と、他のキ
ャッシュメモリの古いブロックを新たなブロックに更新
する更新方式との2つの方式が提案されている。
Even in the conventional snob cache memory control method (7)L), it is allowed for multiple cache memories to have copies of blocks that are mutually shared between cache memories (this is called a shared block). . On the other hand, when data in a shared block (this is called shared data) is rewritten, two methods are available: an invalidation method that invalidates the shared block in other cache memories, and an invalidation method that invalidates the shared block in other cache memories. Two methods have been proposed: an update method that updates the block to a new block;

しかしながら、どちらの方式もすべての共有データの取
扱いに対しても有効というわけではなく、ブロモ、す間
で共有データの受は渡しが頻繁に起こる場合には更新方
式が有利であるが、データの受は渡しの頻度が少ない場
合は無効化方式が有利な場合がある。
However, neither method is effective for handling all types of shared data; the update method is advantageous when shared data is exchanged frequently between brokers; If the frequency of receiving and passing is low, the invalidation method may be advantageous.

従って、スヌープキャノシュの制御方式として無効化方
式か更新方式かのいずれかに固定した場合、ある種のデ
ータの受渡しには有効であるが他のデータについては効
率か悪くなることがある。
Therefore, if the snoop canosh control method is fixed to either the invalidation method or the update method, it may be effective for passing certain types of data, but the efficiency may be poor for other data.

このため上記2方式を切り換えることが提案されている
。この切り換え方法としては、キャシュメモリ全体とし
てではなく、ページと呼ぶキャッシュメモリ内の一定の
記憶領域ごとに無効化方式か更新方式かのどちらの制御
方式をとるかの情報をソフトウェアで指定し、その指定
に従ってページ単位でどちらかの方式に切り換える方式
が提案されている(たとえば、[細粒度並列実行支援機
構」、松本、(社)情報処理学会「情報処理学会研究報
告J、89−ARC−77,1989年7月13日14
日、第91〜98ページ)。
For this reason, it has been proposed to switch between the above two methods. This switching method involves using software to specify information on which control method to use, the invalidation method or the update method, for each fixed storage area in the cache memory called a page, rather than for the cache memory as a whole. A method has been proposed that switches to either method on a page-by-page basis according to specifications (for example, [Fine-Grained Parallel Execution Support Mechanism], Matsumoto, Information Processing Society of Japan, Information Processing Society of Japan Research Report J, 89-ARC-77). , July 13, 1989 14
(Japanese, pp. 91-98).

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、以上述べた切換方式では共有データの特
性によってデータの記憶領域を分けると共に、無効化方
式または更新方式のどちらを使用するかをユーザが指定
する必要があり、この指定が厄介である。
However, in the switching method described above, the data storage area is divided according to the characteristics of the shared data, and the user must specify whether to use the invalidation method or the update method, which is cumbersome.

また、事前によく検討してプログラムの実行開始前にペ
ージ単位で更新方式が無効化方式に固定的に指定したと
しても、プロセッサ間での共有データの受は渡しの頻度
(共有データの特性)が動的に変化する場合もありうる
ため、静的ないし固定的に指定した更新方式または無効
化方式では有効に働かない場合に遭遇するという問題が
ある。
Furthermore, even if you carefully consider in advance that the update method is fixedly set to the invalidation method for each page before the start of program execution, the frequency of passing shared data between processors (characteristics of shared data) Since the information may change dynamically, there is a problem that a statically or fixedly specified update method or invalidation method may not work effectively.

したがって、本発明は、該当するブロックを更新するか
無効にするかの決定をハードウェアで行なわせることに
よって、共有データの特性変化に対しても、効率の良い
スヌープキャッシュメモリ制御方式を提供することを目
的とするものである。
Therefore, the present invention provides a snoop cache memory control method that is efficient even in response to changes in the characteristics of shared data, by having hardware decide whether to update or invalidate a corresponding block. The purpose is to

〔課題を解決するための手段〕[Means to solve the problem]

上述した問題を解決するため、本発明は、それぞれがキ
ャシュメモリおよびプロセッサを有する複数の要素プロ
セッサの各キャ/ユメモリが共有バスを介して共有メモ
リに接続され、各キャシュメモリが共有バスのトランザ
クションを監視して当該キャシュメモリ内の情報を管理
するスヌーブキャッンユ制御方式において、あるキャッ
シュメモリ内の共有データが書き換えられる際に、同じ
共有データを含むブロックを有する他のキャッシュメモ
リが、前記ブロックを更新するか無効にするかの決定を
プロセッサによるブロックの使用状況により動的に判断
する手段を設けたものである。
To solve the above-mentioned problems, the present invention provides that each cache memory of a plurality of element processors each having a cache memory and a processor is connected to the shared memory via a shared bus, and each cache memory handles transactions on the shared bus. In a snob-catch control method that monitors and manages information in a cache memory, when shared data in a cache memory is rewritten, another cache memory that has a block containing the same shared data updates the block. A means is provided for dynamically determining whether to update or invalidate based on the usage status of the block by the processor.

〔作用〕[Effect]

キャッシュメモリの情報管理、すなわち、更新方式によ
るか無効化方式によるかの切換判断をプロセッサがブロ
ックを使用する状況(頻度)に応じて動的に行う。
Cache memory information management, that is, switching judgment between an update method and an invalidation method is performed dynamically depending on the situation (frequency) in which a processor uses a block.

より具体的に述べると、更新型のスヌーブキャッシュに
おいて、−変地のキャッシュメモリが書き換えられたこ
とに伴なって更新されたブロックは、次に他のキャッシ
ュメモリによって同じブロツクが更新されるまでにプロ
セッサによって一度もアクセスされていなければ、その
後もプロセッサがそのブロックを使用する可能性は少な
いと考えられる。したがって、そのようなブロックは無
効化しても効率的にあまり問題とはならず、再び使用す
ることが必要になった時点で改めてキャッシュメモリに
登録したほうが全体としては効率がよくなる。
To be more specific, in an update-type snob cache, a block that is updated as a result of a change in cache memory being rewritten will not be updated until the same block is updated by another cache memory. If a block has never been accessed by a processor since then, it is unlikely that the processor will use that block again. Therefore, even if such a block is invalidated, it will not cause much problem in terms of efficiency, and overall efficiency will be better if it is re-registered in the cache memory when it becomes necessary to use it again.

このように、本発明は更新型スヌーブキャッシニメモリ
制御方式で、キャッシュメモリ内のブロックをプロセッ
サが一度以上アクセスした場合にセ、ツトされるフラグ
(アクセスフラグ)をブロック単位に設け、他のキャッ
シュメモリで同じブロックが書き換えられた時点までに
自己のアクセスフラグがセットされていれば自己のブロ
ックを更新するが、アクセスフラグがセットされていな
ければ自己のブロックを無効化するとともに、ブロック
を更新したか無効化したのかいずれかの情報を更新要求
元のキャッシュメモリに知らせることによって一貫性を
保つように構成する。
As described above, the present invention is an update type snob cache memory control method, and a flag (access flag) is set for each block when a processor accesses a block in the cache memory once or more. If the own access flag is set by the time the same block is rewritten in the cache memory, the own block is updated, but if the access flag is not set, the own block is invalidated and the block is updated. The configuration is such that consistency is maintained by notifying the cache memory of the update request source of either the updated or invalidated information.

すなわち、本発明は共有ブロックの不要な更新を極力低
減することにより、共有バスの使用効率を向上させると
いう構想に基づくものである。
That is, the present invention is based on the idea of improving the efficiency of use of the shared bus by minimizing unnecessary updates of shared blocks.

〔実施例〕〔Example〕

第2図に示すように本発明の実施例としての共有バス型
キャッシュメモリ制御方式は、共有メモリ50と、複数
の要素プロセッサ6o〜70を有しており、各プロセッ
サシステム、たとえば、要素プロセッサ60はスヌーブ
キヤツシュメモリ61とプロセッサ62とを有している
。そして、各キャッシュメモリ61〜71が共有メモリ
50と共有バス80を介して接続されている。
As shown in FIG. 2, the shared bus type cache memory control system as an embodiment of the present invention has a shared memory 50 and a plurality of element processors 6o to 70. has a snob cache memory 61 and a processor 62. Each of the cache memories 61 to 71 is connected to the shared memory 50 via a shared bus 80.

共有バス80は、共有メモリ、キャッシュメモリに共通
するアドレスを転送する共有アドレスバス線1、データ
をブロック単位で転送する共有データバス線2、読み込
み要求や書き込み要求を転諾する共有バス制御線3、お
よびキャッシュメモリ相互間の一貫性を保つためデータ
を共有していることを表すシェアード線4からなり、図
示の如く共有メモリ5oと各キャッシュメモリ61〜7
1との間を接続している。
The shared bus 80 includes a shared address bus line 1 that transfers addresses common to the shared memory and cache memory, a shared data bus line 2 that transfers data in blocks, and a shared bus control line 3 that transfers read requests and write requests. , and a shared line 4 indicating that data is shared in order to maintain consistency between cache memories, and as shown in the figure, a shared memory 5o and each cache memory 61 to 7.
1 is connected.

また、第3図に示すように、本発明の実施例のスヌー7
’−1−ヤ・yシュメモリ制御方式におけるアドレスは
、タグ部41.インデックス部42.オフセット43か
ら構成されており、共有メモリ5゜中のブロック格納位
置はタグ部41とインデックス部42で特定され、ブロ
ック中のデータはオフセット43によって特定される。
Moreover, as shown in FIG. 3, the Snoo 7 according to the embodiment of the present invention
The address in the '-1-yash memory control method is the tag part 41. Index section 42. The block storage position in the shared memory 5° is specified by the tag section 41 and the index section 42, and the data in the block is specified by the offset 43.

また、キャッシュ中のブロックの格納位置はインデック
ス部42によって特定される。
Furthermore, the storage position of the block in the cache is specified by the index unit 42.

各キャッシュメモリは第1図に示す構成となっている。Each cache memory has the configuration shown in FIG.

第1図において、キャッシュメモリは、プロセッサから
の要求を処理するためのアドレスが格納されるアドレス
レジスタ10.アドレスレジスタ10の出力に接続され
たバッファ17、共有バス80からの要求を処理するた
めのアドレスが格納される共有アドレスレジスタ14、
アドレスレジスタ10または共有アドレスレジスタ14
の値と後述するタグメモリllaの値とを比較してキャ
ツシュヒツトを判定するヒツト判定部11、後に詳述す
るステータスメモリ12、キャッシュメモリ13、共有
データバス線2上のデータ、キャソンユメモリ13内の
データ及びデータレジスタ15のデータを相互でやり取
りするための双方向バッファ19、プロセッサに読み込
ませるデータおよびプロセッサからのデータを一時的に
格納するデータレジスタ15、キャッシュを統括制御す
るキャッシュ制御部16が、図示される如く接続されて
構成されている。
In FIG. 1, the cache memory includes an address register 10. a buffer 17 connected to the output of the address register 10; a shared address register 14 in which an address for processing a request from the shared bus 80 is stored;
Address register 10 or shared address register 14
A hit determination unit 11 that determines a cache hit by comparing the value of 1 and a value of a tag memory lla (described later), a status memory 12 (described in detail later), a cache memory 13, data on the shared data bus line 2, and data in the cassonry memory 13. and a bidirectional buffer 19 for mutually exchanging data in the data register 15, a data register 15 for temporarily storing data to be read into the processor and data from the processor, and a cache control unit 16 for controlling the cache in an integrated manner. It is connected and configured as follows.

マタ、キャッンユ制御部16には、アクセス要求線5、
共有バス制御線3゛およびシェアード線4が図示の如く
接続されている。また、共有データバス線2が双方向バ
ッファ19を介してキャッシュメモリ13およびデータ
レジスタ15接続され、共有アドレスバス線1がアドレ
スレジスタ10に接続されたバッファ17に接続される
と共に、共有アドレスレジスタ14およびヒツト判定部
11に接続されている。
The access request line 5,
A shared bus control line 3' and a shared line 4 are connected as shown. Further, the shared data bus line 2 is connected to the cache memory 13 and the data register 15 via the bidirectional buffer 19, and the shared address bus line 1 is connected to the buffer 17 connected to the address register 10, and the shared address register 14 is connected to the buffer 17 connected to the address register 10. and is connected to the human judgment section 11.

ヒツト判定部11にはタグメモリllaとキャッシュメ
モリのヒツト判定回路が含まれている。
The hit determination unit 11 includes a tag memory lla and a cache memory hit determination circuit.

タグメモリllaにはキャツンユメモリ13に格納され
ている各ブロックに対応するアドレスのタグ部41(第
3図参照)が格納されている。
The tag memory lla stores tag portions 41 (see FIG. 3) of addresses corresponding to each block stored in the catch memory 13.

また、上記ステータスメモリ12はプロセッサがそのブ
ロックを1度以上アクセスしたことを表すアクセスフラ
グ20、他のキャッシュメモリがそのブロックを共有し
ていることを表すシエアードフラグ21、キャッシュメ
モリ内の該ブロックが存効なものであることを表すバリ
ッドフラグ22、プロセッサがそのブロックに書き込み
を行ったことを表すダーティフラグ23、および、その
ブロックの所有者であることを表すオーナフラグ24か
らなる。これらのフラグの判定及び値のセクトはキャッ
シュ制御部16によって行われる。
The status memory 12 also includes an access flag 20 indicating that the processor has accessed the block once or more, a shared flag 21 indicating that the block is shared by another cache memory, and a shared flag 21 indicating that the block is shared by another cache memory; A valid flag 22 indicates that the block is valid, a dirty flag 23 indicates that the processor has written to the block, and an owner flag 24 indicates that the block is the owner. Determination of these flags and sectoring of values are performed by the cache control unit 16.

ダーティフラグ23はプロセッサからの書き込み要求が
あった時に「1」にセットされ、他のキャッシュからそ
のブロックの更新要求があった時およびキャッンユから
追い出される時「0」にセットされる。またオーナフラ
グ24はプロセッサからの書き込み要求があった時およ
び共有メモリよりそのプロ、りを読み出した時「1」に
セットされ、他のキャッシュからそのブロックの更新要
求があった時およびキャッシュから追い出される時「0
」にセットされる。これらのフラグの管理は本発明に直
接関与しないため以下の説明では省略しである。
The dirty flag 23 is set to "1" when there is a write request from the processor, and is set to "0" when there is an update request for the block from another cache or when the block is evicted from the cache. The owner flag 24 is set to "1" when there is a write request from the processor or when the block is read from the shared memory, and when there is a request to update the block from another cache or when the block is evicted from the cache. Time “0”
” is set. Since the management of these flags is not directly related to the present invention, the following explanation will be omitted.

ブロモ、すからのデータの読み出し及び書き込み要求は
アクセス要求線5を通してキャッシュ制御部16に知ら
される。また共有バス80上の他のキャッシュメモリや
共有メモリとキャッシュ制御部16とのデータの読み出
し及び書き込み要求は共有バス制御線3を通して相互に
行われる。
Requests for reading and writing data from Bromo and Sukara are notified to the cache control unit 16 through the access request line 5. Further, data read and write requests between other cache memories or the shared memory on the shared bus 80 and the cache control unit 16 are mutually performed through the shared bus control line 3.

ヒツト判定部11のタグメモリ11a5ステータスメモ
リ12及びキャッシュメモリ13に対するデータの読み
出しおよび書き込み番地はアドレスレジスタ10または
共有アドレスレジスタ14のインデックス部42(第3
図参照)で指定される。
The address for reading and writing data to the tag memory 11a5, status memory 12, and cache memory 13 of the hit determination unit 11 is determined by the address register 10 or the index unit 42 (third address register) of the shared address register 14.
(see figure).

キヤ・7シユメモリにヒツトしたことの判定は、ヒツト
判定部11においてアドレスレジスタ10または共有ア
ドレスレジスタ14のインデックス部で指定されたタグ
メモリllaの値とアドレスレジスタ10または共有ア
ドレスレジスタ14のタグ部41の値が一致したことを
示す信号30と、アドレスレジスタ10または共有アド
レスレジスタ14のインデックス部で措定されたステー
タスメモリ12のバリッドフラグ22が「1」で有るこ
とを示す信号31とをキャッシュ制御部16で調べるこ
とにより行われる。以後、特に断らない限りプロセッサ
からの要求を処理する場合のアドレスは、アドレスレジ
スタ10にセットされており、共有バス80からの要求
を処理する場合のアドレスは共有アドレスレジスタ14
にセットされているものとする。また処理に応じてどち
らかのレジスタ10.14が選択されキャッシュメモリ
13゜ステータスメモリ12.ヒツト判定部11の各部
にアドレスを供給するものとする。
The hit determination unit 11 determines whether a hit has occurred in the cache memory by checking the value of the tag memory lla specified by the index part of the address register 10 or the shared address register 14 and the tag part 41 of the address register 10 or the shared address register 14. The cache control unit sends a signal 30 indicating that the values match, and a signal 31 indicating that the valid flag 22 of the status memory 12 set in the index part of the address register 10 or the shared address register 14 is "1". This is done by checking 16. From now on, unless otherwise specified, the address for processing a request from the processor is set in the address register 10, and the address for processing a request from the shared bus 80 is set in the shared address register 14.
Assume that it is set to . Also, depending on the process, either register 10.14 is selected such as cache memory 13, status memory 12. It is assumed that addresses are supplied to each part of the hit determination section 11.

なお、上述したヒツト判定部11.ステータスメモリ1
2.キャッシュ制御部16等で、本発明の、該当するブ
ロックを更新するか無効にするかの決定をブロモ、すに
よるブロックの使用状況により動的に判断する手段が構
成される。
Note that the above-mentioned human judgment unit 11. Status memory 1
2. The cache control unit 16 and the like constitute a means of the present invention for dynamically determining whether to update or invalidate a corresponding block based on the usage status of the block.

次にプロセッサまたは共有バスからの要求にしたがって
行われるキャッシュメモリ及びアクセスフラグの動作を
第4図を用いて説明する。
Next, the operations of the cache memory and access flags performed in accordance with requests from the processor or the shared bus will be explained with reference to FIG.

キャッシュ制御部16は、まず、出力された要求がプロ
セッサからの要求であるのか、共有バスからの要求であ
るのかを判断する(ステップ401)。
The cache control unit 16 first determines whether the output request is a request from the processor or a shared bus (step 401).

プロセッサからの要求であれば、更にその要求内容が読
み出し要求であるのか、書き込み要求であるのかの判断
を行う(ステップ402)。読み出し要求であれば、そ
の読み出し要求の判断結果に応じて(1)プロセッサか
らの読み出し要求でキャツシュヒツトしたく要求された
データがキャッシュにある)場合、または(2)プロセ
ッサからの読み出し要求でキヤ・7シユミスした(要求
されたデータがキャッシュにない)場合へ分岐する(ス
テップ403)。
If the request is from the processor, it is further determined whether the request is a read request or a write request (step 402). In the case of a read request, depending on the determination result of the read request, (1) the data requested to be cached by the read request from the processor is in the cache, or (2) the data requested to be cached by the read request from the processor is cached. The process branches to the case where the requested data is not in the cache (step 403).

ステップ402で書き込み要求であると判断されれば、
その書き込み要求の結果に応じて(3)ブロモ、すから
の書き込み要求でキャツシュヒツトした場合、または(
4)プロセッサからの書き込み要求でキャッシュミスし
た場合へ分岐する(ステ丁ズ、ブ404)。
If it is determined in step 402 that it is a write request,
Depending on the result of the write request, (3) if Bromo or Sukara cashes in on the write request, or (
4) Branch to the case where a cache miss occurs due to a write request from the processor (step 404).

11,1 ゴー’、: 1また、ステップ401で要求が共有バス
からの′要゛求であると判断されれば、更にその要求内
容が一更新要求であるのか、読み出し要求であるのかの
判断を行う(ステップ405)。更新要求であれば、そ
の更新要求でキャツシュヒツトした(要求されたブロッ
クがキャッシュにある)とき、(5)共有バスからの更
新登録要求でキャツシュヒツトした場合へ進む(ステッ
プ406)。読み出し要求であれば、その読み出し要求
でキャツシュヒツトした(要求されたブロックがキャッ
シュにある)とき、(6)共有バスからの読み出し要求
でキャツシュヒツトした場合へ進む(ステップ407)
。なお、ステップ406,407でキャッシュミスした
場合は何もしない。
11,1 Go',: 1 If it is determined in step 401 that the request is a request from the shared bus, it is further determined whether the request is an update request or a read request. (Step 405). If it is an update request, when the update request causes a cache hit (the requested block is in the cache), the process proceeds to (5) the case where an update registration request from the shared bus causes a cache hit (step 406). If it is a read request, when the read request causes a cache hit (the requested block is in the cache), the process proceeds to (6) When the read request from the shared bus causes a cache hit (step 407).
. Note that if a cache miss occurs in steps 406 and 407, nothing is done.

このように主なものとして6通りの場合が考えられるが
、この内、特に(5)の場合がキャッンユ内の共有ブロ
ックを無効化するか更新するかの選択を行う本処理フロ
ーとなり、(5)を除<(1)〜(6)の場合が、その
選択を可能にするための前処理的フローなる。以下、こ
れらの場合を個別的に説明する。
In this way, there are six main cases, but among these, case (5) is the main processing flow for selecting whether to invalidate or update the shared block in the kyanyu, and (5) )<(1) to (6) is a preprocessing flow for making the selection possible. These cases will be explained individually below.

(1)プロセッサからの読み出し要求でキャツシュヒツ
トした場合 プロセッサによってアクセスされたので、アドレスレジ
スタ10で指定されたステータスメモリ12のアクセス
フラグ20を「1」にセントするとともに、ヒツトした
データをキャッシュメモリ13よりデータレジスタ15
にセットする(ステップ411.4.12)。
(1) When a cache hit occurs due to a read request from the processor. Since the processor accessed the data, the access flag 20 of the status memory 12 specified by the address register 10 is set to "1", and the hit data is transferred from the cache memory 13. data register 15
(step 411.4.12).

(2)プロセッサからの読み出し要求でキャッシュミス
した場合 説明順序が逆になるが、便宜上、途中のステ。
(2) When a cache miss occurs due to a read request from the processor The order of explanation will be reversed, but for convenience, we will explain the steps in the middle.

プ426から説明する。オフセットを除くアドレスレジ
スタ10の値を共有アドレスバス線1に出力し、かつ共
有バス制御線3にキャッシュメモリ又は共有メモリへの
読み出し要求を出すことにより、対応するブロックを共
有データバス線2より読み込んでキャッシュメモリ13
に書き込む(ステップ426,427,428)。また
ヒツト判定部11のタグメモリllaにアドレスレジス
タ10のタグ部41をセットするとともに、バリッドフ
ラグ22に「1」をセットするが、シェアードフラグ2
1は共有バス80からブロックを読み込む際、シェアー
ド線4が1になっていれば「1」を、そうでない場合は
「0」をセットする(ステップ430,431,432
,433,434)。
The explanation will start from step 426. The corresponding block is read from the shared data bus line 2 by outputting the value of the address register 10 excluding the offset to the shared address bus line 1 and issuing a read request to the cache memory or shared memory to the shared bus control line 3. cache memory 13
(steps 426, 427, 428). Also, the tag part 41 of the address register 10 is set in the tag memory lla of the hit determination part 11, and the valid flag 22 is set to "1", but the shared flag 2
1 is set to ``1'' if the shared line 4 is 1 when reading a block from the shared bus 80, otherwise it is set to ``0'' (steps 430, 431, 432).
, 433, 434).

ここで、プロセッサによるアクセス要求に対する処理が
行われ、上記で書き込まれたブロックにプロセッサから
要求されたデータがあるためキャツシュヒツトと同様に
、アドレスレジスタ10で指定されたステータスメモリ
12のアクセスフラグ20を「1」にセットすると共に
、上記データをキャッシュメモリ13よりデータレジス
タ15にセットする(ステップ435,436)。
Here, processing is performed in response to the access request by the processor, and since the data requested by the processor is in the block written above, the access flag 20 of the status memory 12 specified by the address register 10 is set to "1'' and the above data is also set from the cache memory 13 to the data register 15 (steps 435, 436).

なお、キャッシュミスしたデータをキャッシュメモリに
登録するにあたって、現在あるキャッシュメモリ内のブ
ロックを追い出す必要がある場合、上記処理(ステップ
426)の前に以下の処理を行う。なお、追い出すか上
書きするかは、キャッシュメモリ内の該ブロックに対す
るダーティフラグ23によって判断し、ダーティフラグ
23が「1」の場合に追い出す。
Note that when registering cache-missed data in the cache memory, if it is necessary to evict a block currently in the cache memory, the following process is performed before the above process (step 426). Note that whether to evict or overwrite the block is determined based on the dirty flag 23 for the block in the cache memory, and if the dirty flag 23 is "1", the block is evicted.

ブロックの追い出しか、上書きかを判断して、追い出し
であれば、追い出すブロックのアドレスのタグ部41を
ヒツト判定部11のタグメモリ11aより読み出し、そ
の値とアドレスレジスタ10のインデックス部42の値
とを共有アドレスバス線1に出力する(ステップ421
,422,423)。そして、キャッシュメモリ13の
ブロックを共有データバス線2に出力し、共有バス制御
信号線3により書き込み要求を共有メモリに送出する(
ステップ424,425)。
It is determined whether the block is to be evicted or overwritten, and if it is an evicted block, the tag part 41 of the address of the block to be evicted is read from the tag memory 11a of the hit determination unit 11, and the value is combined with the value of the index part 42 of the address register 10. is output to shared address bus line 1 (step 421
, 422, 423). Then, the block of the cache memory 13 is output to the shared data bus line 2, and a write request is sent to the shared memory via the shared bus control signal line 3 (
Steps 424, 425).

(3)プロセッサからの書き込み要求でキャツシュヒツ
トした場合 キャッシュメモリ13にデータレジスタ15よリデータ
を書き込む(ステップ441)。またアドレスレジスタ
lOで指定されたステータスメモリ12のンエアードフ
ラグが「1」か否かを判断する(ステップ442)。シ
エアードフラグが「1」ならばオフセットを除いたアド
レスレジスタ10のM ヲ共有アドレスバス線1に、ア
ドレスレジスタ10で指定されたキャッシュメモリ13
のブロックを共有データバス線2に出力すると共に、共
有バス制御線3を通して他のキャッシュメモリに共有ブ
ロックの更新要求を送出する(ステップ443.444
)。さらにシェアード線4を監視し、シェアード線4が
「1」になればステータスメモリ12のンエアードフラ
グ21を「1」に、そうでない場合はrOJにセットす
る(ステップ445.446,447)。また、ブロモ
・ツサからアクセスされたので、アクセスフラグ20を
「1」にセットする(ステy 7’ 44 a )。
(3) If the cache is cached due to a write request from the processor, rewrite the data from the data register 15 to the cache memory 13 (step 441). It is also determined whether the aired flag of the status memory 12 specified by the address register IO is "1" (step 442). If the shared flag is "1", the cache memory 13 specified by the address register 10 is transferred to the shared address bus line 1 from the address register 10 excluding the offset.
block is output to the shared data bus line 2, and a shared block update request is sent to other cache memories via the shared bus control line 3 (steps 443 and 444).
). Furthermore, the shared line 4 is monitored, and if the shared line 4 becomes "1", the unaired flag 21 of the status memory 12 is set to "1", otherwise it is set to rOJ (steps 445, 446, 447). Also, since the access was made from Bromo Tusa, the access flag 20 is set to "1" (Stay 7' 44 a).

(4)プロセッサからの書き込み要求でキャッシュミス
した場合 データレジスタ15へのデータのセットおよびアクセス
フラグのセット(ステップ435□ 436)を除いて
、読み込み要求でキャッシュミスした場合の(2)と同
じ処理を行った後、書き込み要求でキャツシュヒツトし
た場合の(3)と同じ処理を行う。
(4) When a cache miss occurs due to a write request from the processor Same processing as in (2) when a cache miss occurs due to a read request, except for setting data to the data register 15 and setting the access flag (steps 435□ 436) After performing this, the same process as in (3) when a cache hit is made with a write request is performed.

(5)共有バスからの更新要求でキャ/シュヒ。(5) Kya/Shuhi with an update request from the shared bus.

トした場合 共有アドレスレジスタ14で指定されたステータスメモ
リ12のアクセスフラグ20が「1」か否かを判定する
(ステップ451)。アクセスフラグ20が「1」なら
ば、他のキャッシュにより更新されたブロックをプロセ
ッサが一度以上アクセスしたと判断して、プロ、りを更
新する。すなわち共有データバス線2上のブロックをキ
ャッシュメモリ13に取り込むと共に、シェアード線4
を「1」にし、また、更新されたことに伴い、アクセス
フラグ20を「0」にセットする(ステップ452.4
53)。またアクセスフラグ20が「○Jの場合、−変
地のキャッシュが書き換えられたことに伴い更新された
ブロックが、次に他のキャッシュにより同じブロックが
更新されるまでにプロセッサによって一度もアクセスさ
れていないと判断して、ブロックを無効化する。すなわ
ち、データは取り込まずシェアード線4をrOJにする
と共に、バリッドフラグ22をrOJにする。
If so, it is determined whether the access flag 20 of the status memory 12 specified by the shared address register 14 is "1" (step 451). If the access flag 20 is "1", it is determined that the processor has accessed a block updated by another cache more than once, and the processor is updated. That is, the block on the shared data bus line 2 is taken into the cache memory 13, and the block on the shared data bus line 4 is taken into the cache memory 13.
is set to "1", and the access flag 20 is set to "0" in response to the update (step 452.4).
53). In addition, if the access flag 20 is "○J," the block that was updated as a result of the rewriting of the cache at a different location has never been accessed by the processor before the same block is updated by another cache. It is determined that there is no data, and the block is invalidated.In other words, no data is taken in, the shared line 4 is set to rOJ, and the valid flag 22 is set to rOJ.

(6)共有バスからの読み出し要求でキヤノンユヒ、ト
した場合 要求されたブロックを共有バスに供給する必要がある場
合、すなわち、複数のキャッシュにヒツトシタ場合、フ
ロックを供給するキャッシュを特定する必要が有る。こ
の特定をするため、オーナフラグ24が「lJか否かの
判別を行う(ステップ461)。オーナフラグ24が「
1」ならばブロックの供給を行う。
(6) In the case of a read request from the shared bus If the requested block needs to be supplied to the shared bus, that is, if it is requested to multiple caches, it is necessary to specify the cache that supplies the block. . To make this identification, it is determined whether the owner flag 24 is "lJ" (step 461).
1”, blocks are supplied.

オーナフラグ24がrlJの場合、キャッシュメモリ1
3よりブロックを共有データバス線2上に出力する(ス
テップ462)。また、オーナフラグ24にかかわらず
シェアード線4を「1」にする(ステップ463)。ス
テータスメモリ12のバリ1ドフラグ22、シェアード
フラグ21及びアクセスフラグ20はその時の状態を保
持する(ステップ464)。
If the owner flag 24 is rlJ, the cache memory 1
3 and outputs the block onto the shared data bus line 2 (step 462). Also, the shared line 4 is set to "1" regardless of the owner flag 24 (step 463). The valid flag 22, shared flag 21, and access flag 20 of the status memory 12 retain their current states (step 464).

(7)共有バスからの更新要求にたいしてキャッ/ユが
ヒ、トシない場合、何もしない。
(7) If there is no response to the update request from the shared bus, do nothing.

〔発明の効果〕〔Effect of the invention〕

以上述べたように、本発明によれば他のキャッシュメモ
リにある共有データが書き換えられた際、同じブロック
を持つキャッシュメモリをlFするか無効化するかをプ
ロセッサによるブロックの使用状況をもとに動的に判断
して、この判断に基づいてキャッシュメモリを管理して
いるため、データの特性変化による依存性が低下し、共
有バスの使用効率を向上できる。
As described above, according to the present invention, when shared data in another cache memory is rewritten, whether to IF or invalidate a cache memory that has the same block is determined based on the usage status of the block by the processor. Since the cache memory is dynamically determined and the cache memory is managed based on this determination, dependence due to changes in data characteristics is reduced, and shared bus usage efficiency can be improved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は第2図におけるキャッシュメモリの構成の実施
例を示すプロ・Iり図、第2図は本発明の実施例のスヌ
ーブキヤツシュメモリ制御方式が適用サレる共有バス型
マルチプロセッサシステムの構成図、第3図は第2図に
おけるアドレスの構成例を示す図、第4図は本実施例の
システム動作を示すフローチャートである。 1は共有アドレスバス線、2は共有データバス線、3は
共有バス制御線、4はシェアード線、10はアドレスレ
ジスタ、11はヒツト判定部、12はステータスメモリ
、13はキャッシュメモリ、15はデータレジスタ、1
6はキャッシュ制御部、2oはアクセスフラグ、21は
シエアードフラグ、22はバリッドフラグ、23はダー
ティフラグ、24はオーナフラグである。 特許出願人 工業技術院長 杉油  賢(1)7°叶1
号からの      (2)7°0セ14からの本実施
例の動作70− 第4図(その2) (5)共有へ゛スからの 本実施例の動作71 第4図(その4 (6)共有ハ゛スからの 読み出し要求で A!7ノスヒツトした
Fig. 1 is a schematic diagram showing an embodiment of the cache memory configuration in Fig. 2, and Fig. 2 shows a shared bus type multiprocessor system to which the snub cache memory control method of the embodiment of the present invention is applied. FIG. 3 is a diagram showing an example of the address structure in FIG. 2, and FIG. 4 is a flowchart showing the system operation of this embodiment. 1 is a shared address bus line, 2 is a shared data bus line, 3 is a shared bus control line, 4 is a shared line, 10 is an address register, 11 is a hit determination section, 12 is a status memory, 13 is a cache memory, and 15 is data register, 1
6 is a cache control unit, 2o is an access flag, 21 is a shared flag, 22 is a valid flag, 23 is a dirty flag, and 24 is an owner flag. Patent applicant: Director of the Agency of Industrial Science and Technology Ken Sugiyu (1) 7° Kano 1
(2) Operation 70 of this embodiment from 7°0 set 14 - Figure 4 (Part 2) (5) Operation 71 of this embodiment from the shared space Figure 4 (Part 4 (6) A!7 no hits when requesting to read from shared host

Claims (1)

【特許請求の範囲】 それぞれがキャシュメモリおよびプロセッサを有する複
数の要素プロセッサからなるシステムの各キャシュメモ
リが共有バスを介して共有メモリに接続され、各キャシ
ュメモリが共有バスのトランザクションを監視して当該
キャシュメモリ内の情報を管理するスヌープキャッシュ
制御方式において、 あるキャッシュメモリ内の共有データが書き換えられる
際に、同じ共有データを含むブロックを有する他のキャ
ッシュメモリが、該当するブロックを更新するか無効に
するかの決定をプロセッサによるブロックの使用状況に
より動的に判断する手段を設けて、 ブロックを動的に更新または無効化するように構成した
ことを特徴とするスヌープキャッシュメモリ制御方式。
[Scope of Claims] In a system consisting of a plurality of element processors each having a cache memory and a processor, each cache memory is connected to the shared memory via a shared bus, and each cache memory monitors transactions on the shared bus and processes the relevant transactions. In the snoop cache control method that manages information in cache memory, when shared data in a cache memory is rewritten, other cache memories that have blocks containing the same shared data update or invalidate the corresponding block. What is claimed is: 1. A snoop cache memory control method, characterized in that the snoop cache memory control method is configured to dynamically update or invalidate a block by providing means for dynamically determining whether to update or invalidate the block based on the usage status of the block by a processor.
JP2320914A 1990-11-27 1990-11-27 Snoop cache memory control system Granted JPH04191946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2320914A JPH04191946A (en) 1990-11-27 1990-11-27 Snoop cache memory control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2320914A JPH04191946A (en) 1990-11-27 1990-11-27 Snoop cache memory control system

Publications (2)

Publication Number Publication Date
JPH04191946A true JPH04191946A (en) 1992-07-10
JPH0532776B2 JPH0532776B2 (en) 1993-05-17

Family

ID=18126682

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2320914A Granted JPH04191946A (en) 1990-11-27 1990-11-27 Snoop cache memory control system

Country Status (1)

Country Link
JP (1) JPH04191946A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0784877A (en) * 1993-08-27 1995-03-31 Internatl Business Mach Corp <Ibm> Control device and maintenance method for coherency in multiprocessor system
JPH07152646A (en) * 1993-07-15 1995-06-16 Bull Sa Coherency management system of exchange between memory hierarchy levels
US5923898A (en) * 1997-05-14 1999-07-13 International Business Machines Corporation System for executing I/O request when an I/O request queue entry matches a snoop table entry or executing snoop when not matched
JPH11508375A (en) * 1995-06-26 1999-07-21 ラプラント、パトリック、アール. Fluid pressure pulling and tuning system
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
JP2009122787A (en) * 2007-11-13 2009-06-04 Nec Computertechno Ltd Multiprocessor system
US8489862B2 (en) 2007-06-12 2013-07-16 Panasonic Corporation Multiprocessor control apparatus for controlling a plurality of processors sharing a memory and an internal bus and multiprocessor control method and multiprocessor control circuit for performing the same

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07152646A (en) * 1993-07-15 1995-06-16 Bull Sa Coherency management system of exchange 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
JPH0784877A (en) * 1993-08-27 1995-03-31 Internatl Business Mach Corp <Ibm> Control device and maintenance method for coherency in multiprocessor system
JPH11508375A (en) * 1995-06-26 1999-07-21 ラプラント、パトリック、アール. Fluid pressure pulling and tuning system
US5923898A (en) * 1997-05-14 1999-07-13 International Business Machines Corporation System for executing I/O request when an I/O request queue entry matches a snoop table entry or executing snoop when not matched
US8489862B2 (en) 2007-06-12 2013-07-16 Panasonic Corporation Multiprocessor control apparatus for controlling a plurality of processors sharing a memory and an internal bus and multiprocessor control method and multiprocessor control circuit for performing the same
JP2009122787A (en) * 2007-11-13 2009-06-04 Nec Computertechno Ltd Multiprocessor system

Also Published As

Publication number Publication date
JPH0532776B2 (en) 1993-05-17

Similar Documents

Publication Publication Date Title
US6571322B2 (en) Multiprocessor computer system with sectored cache line mechanism for cache intervention
US6345342B1 (en) Cache coherency protocol employing a read operation including a programmable flag to indicate deallocation of an intervened cache line
US5291442A (en) Method and apparatus for dynamic cache line sectoring in multiprocessor systems
US7032074B2 (en) Method and mechanism to use a cache to translate from a virtual bus to a physical bus
US6502171B1 (en) Multiprocessor system bus with combined snoop responses explicitly informing snoopers to scarf data
US6353875B1 (en) Upgrading of snooper cache state mechanism for system bus with read/castout (RCO) address transactions
US6343344B1 (en) System bus directory snooping mechanism for read/castout (RCO) address transaction
US8700863B2 (en) Computer system having a cache memory and control method of the same
JPH09259036A (en) Write-back cache and method for maintaining consistency in write-back cache
US6321306B1 (en) High performance multiprocessor system with modified-unsolicited cache state
JP3661764B2 (en) Method and system for providing an eviction protocol in a non-uniform memory access computer system
JP2010507160A (en) Processing of write access request to shared memory of data processor
JPH02141845A (en) Reading of data block from main memory with central processing unit for multiprocessor system
JPH0340046A (en) Cache memory control system and information processor
KR100330934B1 (en) Cache coherency protocol including a hovering(h) state having a precise mode and an imprecise mode
US6587922B2 (en) Multiprocessor system
JP5587539B2 (en) Coherent caching of local memory data
US6349367B1 (en) Method and system for communication in which a castout operation is cancelled in response to snoop responses
JPH04230549A (en) Multilevel cache
JPH04191946A (en) Snoop cache memory control system
KR19990072596A (en) Cache coherency protocol including an h_r state
US6385702B1 (en) High performance multiprocessor system with exclusive-deallocate cache state
US6374333B1 (en) Cache coherency protocol in which a load instruction hint bit is employed to indicate deallocation of a modified cache line supplied by intervention
US6484241B2 (en) Multiprocessor computer system with sectored cache line system bus protocol mechanism
US7234028B2 (en) Power/performance optimized cache using memory write prevention through write snarfing

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term