JP2000010862A - Cache memory control method - Google Patents

Cache memory control method

Info

Publication number
JP2000010862A
JP2000010862A JP10175473A JP17547398A JP2000010862A JP 2000010862 A JP2000010862 A JP 2000010862A JP 10175473 A JP10175473 A JP 10175473A JP 17547398 A JP17547398 A JP 17547398A JP 2000010862 A JP2000010862 A JP 2000010862A
Authority
JP
Japan
Prior art keywords
cache
memory
block
cache block
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10175473A
Other languages
Japanese (ja)
Inventor
Hidehiko Tanaka
英彦 田中
Mitsuru Sato
充 佐藤
Naoki Inoue
直樹 井上
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co 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 Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP10175473A priority Critical patent/JP2000010862A/en
Publication of JP2000010862A publication Critical patent/JP2000010862A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Multi Processors (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To advance an efficient data processing by sufficiently displaying the function of a cache memory irrelevantly to the properties of memory access by an application program running on a decentralized common memory type parallel computer system. SOLUTION: A cache memory is divided into cache blocks 201 consisting of plural addresses and the update frequencies of the cache blocks 201 are measured, and the cache protocol for maintaining the consistency of data is dynamically switched from a protocol for a update type to a protocol for an invalidation type and vice versa according to the measurement results.

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 control method for efficiently using a cache memory, and more particularly to a distributed shared memory type cache memory control method.

【0002】[0002]

【従来の技術】近年、計算機に対する処理要求は益々高
まり、より高速な計算機が必要とされている。しかし、
このような処理要求を単一プロセッサで行なうには限界
がある。そこで、プロセッサを単体で逐次的に使用する
のではなく、複数のプロセッサを並列に結合し動作させ
る並列計算機システムが注目され、研究されている。
2. Description of the Related Art In recent years, processing demands on computers have increased, and higher-speed computers have been required. But,
There is a limit to performing such a processing request by a single processor. Therefore, a parallel computer system in which a plurality of processors are connected in parallel and operated, instead of using the processors sequentially, has attracted attention and is being studied.

【0003】並列計算機システムでは、単一プロセッサ
の処理限度を大幅に越える計算が可能である。さらに、
要求される計算量に応じ、結合するプロセッサ数を増や
すことで、さらなる算能力の向上が期待できる。このよ
うに、並列計算機システムによれば、莫大な処理要求に
対応できるシステムを構築できる。しかし、プロセッサ
を複数結合することによって単一プロセッサシステムに
なかった問題が生じる。例えば、結合されたプセツサ間
の通信制御、各プロセッサで処理された内容の同期制
御、処理要求を均等に各プロセッサに分配する負荷分散
機構、などの問題である。特に、プロセッサ間の通信制
御は、使用するプロセッサの数が増えるに従って計算機
全体の通信量も増大するため、重要な問題となる。
[0003] Parallel computer systems are capable of performing calculations that greatly exceed the processing limits of a single processor. further,
By increasing the number of processors to be connected in accordance with the required amount of calculation, a further improvement in computational power can be expected. Thus, according to the parallel computer system, it is possible to construct a system capable of responding to a huge processing request. However, combining a plurality of processors creates a problem not found in single processor systems. For example, there are problems such as communication control between coupled processors, synchronization control of the content processed by each processor, and a load distribution mechanism that evenly distributes processing requests to each processor. In particular, communication control between processors is an important problem because the communication amount of the entire computer increases as the number of processors used increases.

【0004】このような特徴を持つ並列計算機システム
において、そのメモリ構成としては、拡張性や汎用性が
高いことから、分散配置された各プロセッサ毎にメモリ
を付属させ、この分散されたメモリを仮想的な同一メモ
リ空間として扱う分散共有メモ型が注目されている。分
散共有メモリ型の並列計算機システムにおいても、通信
遅延が大きな問題である。この通信遅延のほとんどを占
めるのがメモリアクセスである。そこで、メモリアクセ
スによる通信遅延を削減するために様々な手法が研究さ
れている。その中でキャッシュメモリシステムは、動作
させるソフトウェアに依存することなく実装することが
でき、実装が簡単な割に得られる通信延時間の削減効果
が大きい。これらのことから、キャッシュメモリシステ
ムはますます大規模化する並列計算機システムにおい
て、その効果が期待されている。
In a parallel computer system having such features, the memory configuration is high in scalability and versatility. Therefore, a memory is attached to each processor arranged in a distributed manner, and this distributed memory is virtually Distributed shared memos, which are treated as the same memory space, are attracting attention. Even in a distributed shared memory type parallel computer system, communication delay is a major problem. Memory access accounts for most of the communication delay. Therefore, various techniques have been studied to reduce communication delay due to memory access. Among them, the cache memory system can be implemented without depending on the software to be operated, and the effect of reducing the communication delay time which is easy to implement is large. From these facts, the effect of the cache memory system is expected in an increasingly large-scale parallel computer system.

【0005】ところが、並列計算機システムにおけるキ
ャッシュメモリシステムでは、複数のプロセッサのそれ
ぞれにキャッシュメモリが付属しているため、同一デー
タのコピーが複数存在し得る。そこで、複数のプロセッ
サに共有される同一データのコピー間おいてコンシステ
ンシ(一貫性)の管理が必要となる。このコンシステン
シ管理を行なうため、従来から様々なキャッシュプロト
コルが提案されている。
However, in a cache memory system in a parallel computer system, since a plurality of processors are each provided with a cache memory, a plurality of copies of the same data may exist. Therefore, it is necessary to manage consistency between copies of the same data shared by a plurality of processors. Various cache protocols have been conventionally proposed to perform this consistency management.

【0006】これら従来のキャッシュプロトコルは、
(1)複数のプロセッサに共有されるデータに対し書き
込みがあった場合、他のコピーを無効化することで一貫
性を保つ無効化型プロトコル、(2)書き込みの行なわ
れコピーと同じ内容に他のコピーを更新することで一貫
性を保つ更新型プロトコル、とに大別することができ
る。無効化型プロトコルについては、例えば特開平5−
2534号に開示された従来技術がある。
[0006] These conventional cache protocols are:
(1) When a write is made to data shared by a plurality of processors, an invalidation type protocol that maintains consistency by invalidating other copies, and (2) Writes are performed to the same contents as the copy. Update protocols that maintain consistency by updating a copy of the protocol. Regarding the invalidation type protocol, see, for example,
There is a prior art disclosed in US Pat.

【0007】しかしながら、無効化型プロトコルでは、
キャッシュメモリ上からデータが消え易いため、キャッ
シュメモリへのヒット率が低下するという問題がある。
However, in the invalidation type protocol,
Since data easily disappears from the cache memory, there is a problem that the hit rate to the cache memory is reduced.

【0008】一方、更新型プロトコルでは、同一データ
を持つキャッシュメモリが多くなり易く、無効化型プロ
トコルに比べてキャッシュへのヒット率は高くなるもの
の、不要になったデータも更新されてしまうことから、
ネットワークに対する負荷が高まり易いという問題があ
る。
[0008] On the other hand, in the update type protocol, the number of cache memories having the same data tends to increase, and the cache hit rate becomes higher than in the invalidation type protocol. However, unnecessary data is also updated. ,
There is a problem that the load on the network tends to increase.

【0009】従って、動作させるアプリケーションプロ
グラムのメモリアクセスの性質に応じて、無効化型プロ
トコルまたは更新型プロトコルを使い分けるのが効果的
なものと考えられる。
Therefore, it is considered effective to selectively use the invalidation type protocol or the update type protocol depending on the nature of the memory access of the application program to be operated.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、従来に
おける分散共有メモリ型の並列計算機システムおいて
は、キャッシュメモリの一貫性を管理するためのキャッ
シュプロトコルを、無効化型プロトコルまたは更新型プ
ロトコルのいずれかに固定している。このため、その固
定されているプロトコルに適合したメモリアクセスの性
質を持つアプリケーションプログラムを動作させている
場合は効率良く処理を進めることが可能であるが、適合
しないメモリアクセスの性質を持つアプリケーションプ
ログラムを動作させている場合は処理効率が悪くなると
いう問題がある。換言すれば、分散共有メモリ型の並列
計算機において動作させているアプリケーションプログ
ラムのメモリアクセスの性質に依存してヒット率やネッ
トワークに対する負荷が変動してしまうという問題があ
る。
However, in the conventional distributed shared memory type parallel computer system, the cache protocol for managing the coherency of the cache memory is either an invalidation type protocol or an update type protocol. It is fixed to. For this reason, when an application program having the property of memory access conforming to the fixed protocol is operated, it is possible to proceed efficiently. When operating, there is a problem that processing efficiency deteriorates. In other words, there is a problem that the hit ratio and the load on the network fluctuate depending on the nature of the memory access of the application program operated in the distributed shared memory type parallel computer.

【0011】本発明は、このような問題を解決するため
になされたものであり、その目的は、分散共有メモリ型
の並列計算機システムにおいて動作させているアプリケ
ーションプログラムのメモリアクセスの性質に左右され
ることなく、キャッシュメモリの機能を充分に発揮さ
せ、効率的なデータ処理を進めることができるキャッシ
ュメモリ制御方法を提供することにある。
The present invention has been made to solve such a problem, and its object is to be influenced by the nature of memory access of an application program operated in a distributed shared memory type parallel computer system. It is another object of the present invention to provide a cache memory control method that allows the function of the cache memory to be fully exhibited without causing any problem and efficient data processing can be advanced.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、キャッシュメモリを複数アドレスから成
る複数のキャッシュブロックに分割し、各キャッシュブ
ロックの更新頻度を計測し、その計測結果に基づいてデ
ータの一貫性を保つためのキャッシュプロトコルを更新
型から無効化型へ、または無効化型から更新型へ動的に
変化させるようにしたものである。
In order to achieve the above object, the present invention divides a cache memory into a plurality of cache blocks consisting of a plurality of addresses, measures the update frequency of each cache block, and uses the measurement result as a result. The cache protocol for maintaining data consistency is dynamically changed from the update type to the invalidation type or from the invalidation type to the update type based on the data.

【0013】具体的には、プロセッサ、メモリおよびキ
ャッシュメモリをそれぞれ備えた複数のノードを相互結
合網を介して結合し、各ノードのメモリは1つの共有メ
モリ空間で管理される分散共有メモリ型の並列計算機シ
ステムにおいて、各ノードのメモリを所定の管理単位で
複数のメモリブロックに分割すると共に、前記キャッシ
ュメモリを前記メモリと同じ管理単位で複数のキャッシ
ュブロックに分割し、前記メモリブロックには、当該メ
モリブロックのデータの写しが存在するキャッシュブロ
ックを特定する存在場所情報とそのキャッシュブロック
の一斉無効化を行なう上で基準となる閾値Aの格納領域
を付加し、前記キャッシュブロックには、当該キャッシ
ュブロックの更新回数を格納するカウンタ領域を付加
し、同一ノード内のプロセッサによるキャッシュブロッ
クのデータの更新に際して、当該キャッシュブロックの
前記カウンタ領域の更新回数値を更新した後、その更新
回数値と当該キャッシュブロックに対応するメモリブロ
ックの閾値Aとを比較し、更新回数値が閾値A未満であ
れば、当該キャッシュブロックと同じデータの写しを格
納している他のキャッシュブロックの存在場所を前記存
在場所情報によって検出し、その検出したキャッシュブ
ロックのデータを前記プロセッサから更新を受けたキャ
ッシュブロックのデータと同一データに更新し、更新回
数値が閾値A以上であれば、前記プロセッサから更新を
受けたキャッシュブロックのデータのみを更新し、かつ
当該キャッシュブロックと同じデータの写しを格納して
いる他のキャッシュブロックのデータを一斉に無効化す
ると共に、当該キャッシュブロックの元データを格納し
ているメモリブロックの閾値Aを一斉無効化処理が少な
くなる傾向の値に更新する処理を、前記プロセッサによ
るキャッシュブロックのデータの更新操作毎に行ない、
更新型キャッシュプロトコルと一斉無効化型キャッシュ
プロトコルとを各キャッシュブロックへの更新頻度に応
じて動的に切り替えるようにしたことを特徴とする。
More specifically, a plurality of nodes each having a processor, a memory, and a cache memory are connected via an interconnection network, and the memory of each node is a distributed shared memory type managed by one shared memory space. In the parallel computer system, the memory of each node is divided into a plurality of memory blocks in a predetermined management unit, and the cache memory is divided into a plurality of cache blocks in the same management unit as the memory. Location information for specifying a cache block in which a copy of the data of the memory block is present and a storage area for a threshold A serving as a reference for simultaneously invalidating the cache block are added to the cache block. Add a counter area to store the update count of When updating the data of the cache block by the processor, after updating the update count value of the counter area of the cache block, the update count value is compared with the threshold value A of the memory block corresponding to the cache block, and the update count value is calculated. Is smaller than the threshold value A, the location of another cache block storing a copy of the same data as the cache block is detected by the location information, and the data of the detected cache block is updated from the processor. When the update count value is equal to or greater than the threshold value A, only the data of the cache block updated by the processor is updated, and a copy of the same data as the cache block is updated. Other cache block data stored The process of simultaneously invalidating the cache block and updating the threshold A of the memory block storing the original data of the cache block to a value that tends to reduce the simultaneous invalidation process is performed by the processor. Every time,
An update type cache protocol and a simultaneous invalidation type cache protocol are dynamically switched according to the update frequency of each cache block.

【0014】また、キャッシュブロックに当該キャッシ
ュブロックに対する自ノードまたは他ノードのメモリか
らの連続更新回数を格納する第2のカウンタ領域を付加
し、この第2のカウンタ領域の連続更新回数値を自ノー
ドまたは他ノードのメモリからのデータ更新要求毎に更
新した後、その連続更新回数値とメモリブロック別また
は全キャッシュブロック共通に定めた閾値Bと比較し、
参照回数値が閾値B以上であれば、当該キャッシュブロ
ックのデータを自己無効化し、かつ当該キャッシュブロ
ックの元データを格納しているメモリブロックの閾値A
を一斉無効化処理が多くなる傾向の値に更新するように
したことを特徴とする。
Further, a second counter area for storing the number of continuous updates of the cache block from the memory of the own node or another node is added to the cache block, and the value of the number of continuous updates of the second counter area is added to the own node. Or, after updating for each data update request from the memory of another node, the continuous update count value is compared with a threshold value B determined for each memory block or commonly for all cache blocks,
If the reference count value is equal to or greater than the threshold value B, the data of the cache block is self-invalidated, and the threshold value A of the memory block storing the original data of the cache block
Is updated to a value that tends to increase the simultaneous invalidation processing.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて詳細に説明する。図1は、本発明のキャッシ
ュ制御方法を適用した並列計算機システムの実施形態を
示すブロック構成図であり、プロセッサを備えた複数の
ノードを相互結合網によって結合した構成になってい
る。図1では、1つのノード101の詳細構成のみを代
表して示している。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a parallel computer system to which a cache control method according to the present invention is applied, and has a configuration in which a plurality of nodes including processors are connected by an interconnection network. In FIG. 1, only the detailed configuration of one node 101 is shown as a representative.

【0016】図1において、1つのノード101は、プ
ロセッサ102、キャッシュメモリ106を管理するキ
ャッシュコントローラ103、キャッシュメモリ106
およびメモリ108を管理するメモリ制御装置107、
メモリ108、他のノードとのデータのやり取りを相互
結合網105を介して行うネットワークインターフェー
ス104で構成されている。相互結合網105は、各ノ
ード101を接続するネットワークであり、バスやメッ
シュなどの形態がある。また、メモリ108は、他のノ
ードのメモリと1つの共有メモリ空間で管理される分散
共有メモリ型の構成となっている。
In FIG. 1, one node 101 includes a processor 102, a cache controller 103 for managing a cache memory 106, and a cache memory 106.
And a memory control device 107 for managing the memory 108,
It comprises a memory 108 and a network interface 104 for exchanging data with other nodes via an interconnection network 105. The interconnection network 105 is a network that connects the nodes 101 and has a form such as a bus or a mesh. Further, the memory 108 has a configuration of a distributed shared memory type managed by a memory of another node and one shared memory space.

【0017】図2はキャッシュメモリ106の構成、図
3はメモリ108の構成を示す図であり、メモリ108
とキャッシュメモリ106では、複数のワードをアクセ
ス単位とする1つのメモリブロックおよびキャッシュブ
ロックとして扱い、このブロック単位でアクセスを行う
ようになっている。すなわち、メモリ108とキャッシ
ュメモリ106は、データを格納する領域であるワード
302、202の複数個をアクセス単位として複数のメ
モリブロック301、キャッシュブロック201に分割
され、これらのブロック単位でアクセスを行うようにな
っている。ノード間では、このブロック単位のデータが
1つのデータパケットで送受される。
FIG. 2 is a diagram showing the configuration of the cache memory 106, and FIG.
The cache memory 106 treats a plurality of words as one memory block and a cache block having an access unit, and performs access in units of the block. That is, the memory 108 and the cache memory 106 are divided into a plurality of memory blocks 301 and cache blocks 201 using a plurality of words 302 and 202, which are areas for storing data, as access units, and access is performed in units of these blocks. It has become. Between nodes, the data in block units is transmitted and received in one data packet.

【0018】キャッシュメモリ106の1つのキャッシ
ュブロック201は、当該キャッシュブロック201の
状態を表す状態ビット203、当該キャッシュブロック
201に対する自ノード内のプロセッサ102からのデ
ータ更新回数をカウントするためのカウンタA204、
当該キャッシュブロック201に対する自ノードまたは
他ノードのメモリ108からのデータの連続更新回数を
カウントするためのカウンタB205が付加され、さら
に各キャッシュブロック共通に各キャッシュブロック2
01の自己無効化を行なうか否かを判断するときの基準
となる閾値B206を格納する領域が付加されている。
なお、図2には示していないが、キャッシュブロック2
01のそれぞれには、当該キャッシュブロック201の
データのコピー元のメモリアドレスを示すタグが付加さ
れ、プロセッサ102からキャッシュメモリ106をア
クセスした時に、プロセッサ102からのアドレス情報
と前記タグとを比較し、プロセッサ102が指定したア
ドレスのデータがキャッシュブロックのいずれかに存在
するか否か、すなわちキャッシュヒットするか否かを判
定するようになっている。このことについては、キャッ
シュメモリ制御技術において公知であるので、詳しい説
明は省略する。
One cache block 201 of the cache memory 106 includes a status bit 203 indicating the status of the cache block 201, a counter A204 for counting the number of data updates for the cache block 201 from the processor 102 in its own node,
A counter B205 for counting the number of continuous updates of data from the memory 108 of the own node or the other node to the cache block 201 is added, and each cache block 2 is shared by each cache block.
An area for storing a threshold value B206 as a reference when determining whether to perform the self-invalidation of 01 is added.
Although not shown in FIG. 2, the cache block 2
01 is added with a tag indicating the memory address of the copy source of the data of the cache block 201. When the processor 102 accesses the cache memory 106, the address information from the processor 102 is compared with the tag, It is determined whether or not the data at the address specified by the processor 102 exists in any of the cache blocks, that is, whether or not a cache hit occurs. Since this is known in the cache memory control technology, detailed description will be omitted.

【0019】一方、メモリ108の1つのメモリブロッ
ク301は、当該メモリブロック301のデータの写し
(コピー)が存在するキャッシュブロックを特定するた
めのディレクトリ(存在場所情報)303と、データの
写しが存在するキャッシュブロックの一斉無効化を行な
う上で基準となる閾値A304の格納領域が付加されて
いる。
On the other hand, one memory block 301 of the memory 108 has a directory (location information) 303 for specifying a cache block in which a copy of the data of the memory block 301 exists, and a copy of the data exists. A storage area for a threshold value A304, which is a reference for performing simultaneous invalidation of cache blocks to be executed, is added.

【0020】状態ビット203とは、当該キャッシュブ
ロックがいずれかのメモリブロックのデータのコピーを
持つ唯一のキャッシュブロックであるのか、当該キャッ
シュブロックのデータが無効であるのかなどの状態を表
わす情報であり、この実施形態ではM、O、E、S、I
の5つの状態があり、図4に示すように3ビットの情報
で表わされる。M、O、E、S、Iは、Modifie
d、Owned、Exclusive、Shared、
Invalidの頭文字を表わし、Modifiedと
は、コピーを持つキャッシュブロックが他に存在しない
オーナ(Owner)であることを意味し、Owned
とは、同じコピーを持つキャッシュブロックが他に存在
するかもしれないオーナであることを意味し、Excl
usiveとは、コピーを持つキャッシュブロックが他
に存在しないがオーナではないことを意味し、またSh
aredとは、コピーを持つキャッシュブロックが他に
存在するかもしれないがオーナではないことを意味し、
Invalidとは、当該のキャッシュブロックのデー
タが無効であることを意味する。なお、M,O,E,
S,Iの遷移の仕方については後述する。
The status bit 203 is information indicating a status such as whether the cache block is the only cache block having a copy of the data of one of the memory blocks or whether the data of the cache block is invalid. , In this embodiment, M, O, E, S, I
And is represented by 3-bit information as shown in FIG. M, O, E, S, I are Modifier
d, Owned, Exclusive, Shared,
The abbreviation of Invalid is used, and “Modified” means that a cache block having a copy is an owner that does not exist elsewhere, and Owned.
Means that a cache block with the same copy may be the owner of another, and Excl
"usive" means that there is no other cache block with a copy but it is not the owner, and Sh
Ared means that there may be other cache blocks with copies, but they are not the owner,
"Invalid" means that the data of the cache block is invalid. Note that M, O, E,
The manner of transition between S and I will be described later.

【0021】オーナは、メモリ108に対し書き戻しの
責任を持つキャッシュブロックであることを意味する。
本発明においてオーナは、この意味の他に、各キャッシ
ュブロックに対し主に書き込みを行っているキャッシュ
ブロックであるという意味を持つ。このオーナの切り替
わりは、カウンタA204によって自ノード内のプロセ
ッサ102からの連続書き込み回数(更新回数)をカウ
ントし、カウンタA204のカウント値が閾値Aに到達
した時点で行われる。このオーナの切り替わりは、実行
中のアプリケーションプログラムのメモリアクセスパタ
ーンが更新型から無効化型へ切り替わったことを意味す
る。
The owner means a cache block responsible for writing back to the memory 108.
In the present invention, in addition to this meaning, the owner has a meaning that it is a cache block that mainly writes data to each cache block. The switching of the owner is performed when the counter A204 counts the number of continuous writings (the number of updates) from the processor 102 in the own node, and when the count value of the counter A204 reaches the threshold value A. This switching of the owner means that the memory access pattern of the running application program has been switched from the update type to the invalidation type.

【0022】すなわち、キャッシュメモリは、一度参照
されたデータは近いうちに再び参照される確率が高いと
いうメモリアクセスにおける局所性を利用したものであ
る。そのため、キャッシュメモリを有効に利用するため
には一度キャッシュブロックに読込んだデータはできる
だけ長くキャッシュブロック内に残しておき、更新型プ
ロトコルによってキャッシュブロックのデータを更新し
ながら利用する方がヒット率を向上させる上で望まし
い。そこで、本実施形態では、通常は更新型プロトコル
によってキャッシュブロックのデータを更新しながら使
用する。しかし、更新型プロトコルを使用し続けると、
同一データを共有するキャッシュブロックの数が増加
し、相互結合網105を介しての更新パケットの転送量
が増加し、ネットワークトラヒックが増大してしまう。
そこで、1つのキャッシュブロックに対するデータの更
新回数をカウンタA204によってカウントし、そのカ
ウント値が閾値A以上に達した場合には、そのキャッシ
ュブロックにデータの更新権限限を移してオーナに切り
替え、他のキャッシュブロックは一斉に無効化し、同一
データを共有するキャッシュブロックの数を減らし、ネ
ットワークトラヒックの増大を未然に防ぐようにしてい
る。
That is, the cache memory utilizes the locality in memory access, in which data once referenced is likely to be referenced again soon. Therefore, in order to use the cache memory effectively, it is better to leave the data once read into the cache block as long as possible in the cache block, and to use the data while updating the data in the cache block by using the update type protocol to reduce the hit rate. Desirable for improving. Therefore, in this embodiment, the cache block data is normally used while being updated by the update type protocol. However, if you continue to use the updated protocol,
The number of cache blocks sharing the same data increases, the transfer amount of update packets via the interconnection network 105 increases, and network traffic increases.
Therefore, the number of data updates for one cache block is counted by the counter A204, and when the count value reaches the threshold value A or more, the data update authority is transferred to the cache block and switched to the owner. The cache blocks are invalidated all at once, and the number of cache blocks sharing the same data is reduced to prevent an increase in network traffic.

【0023】ここで、オーナ状態であるキャッシュブロ
ックに書き込みの時、またはオーナでない状態のキャッ
シュブロックのカウンタA204が閾値Aに到達してい
ない書き込みの時は、同一データのコピーを持つ他のキ
ャッシュブロックを更新することで、ヒット率を高め
る。
Here, when writing to the cache block in the owner state or when the counter A204 of the cache block in the non-owner state does not reach the threshold value A, another cache block having a copy of the same data is written. To increase the hit rate.

【0024】カウンタA204は、キャッシュの振る舞
いを更新型プロトコルの振る舞いから無効化型プロトコ
ルの振る舞いに移す際の基準となる更新頻度(更新回
数)をカウントするためのものであり、キャッシュブロ
ック201にメモリ108の1つのメモリブロック30
1から1ブロックのデータが読み込まれた時の初期値は
「0」で、自ノード内のプロセッサ102からデータが
書き込まれると「+1」インクリメントされる。また、
メモリ108側からの更新通知を受けた時(詳しくはメ
モリ制御装置107からのメモリ更新通知を受けた時)
には、0クリアされる。このようにすることにより、自
ノード内のプロセッサ102からの連続した書き込み回
数をカウントすることができる。
The counter A 204 is for counting the update frequency (the number of updates) which is a reference when the behavior of the cache is shifted from the behavior of the update type protocol to the behavior of the invalidation type protocol. 108 one memory block 30
The initial value when data of one to one block is read is “0”, and when data is written from the processor 102 in the own node, “+1” is incremented. Also,
When an update notification is received from the memory 108 (specifically, when a memory update notification is received from the memory control device 107).
Is cleared to 0. This makes it possible to count the number of consecutive writes from the processor 102 in the own node.

【0025】カウンタB205は、メモリ108側から
のデータの連続更新回数をカウントするためのものであ
り、メモリ108の1つのメモリブロックからデータが
読み込まれた時の初期値は「0」で、自ノードまたは他
ノードのメモリ108側からのデータ更新通知を受け取
ると「+1」インクリメントされる。また、自ノード内
のプロセッサ102からのデータ読込みまたは書き込み
があると0クリアされる。これによって、プロセッサ1
02からの参照頻度に対する自ノードまたは他ノードの
メモリ108側からの連続更新通知の回数をカウントす
ることができる。
The counter B205 is for counting the number of continuous updates of data from the memory 108 side. When data is read from one memory block of the memory 108, the initial value is "0". When a data update notification is received from the memory 108 side of the node or another node, “+1” is incremented. When data is read or written from the processor 102 in the own node, it is cleared to 0. Thereby, the processor 1
It is possible to count the number of continuous update notifications from the memory 108 of the own node or another node with respect to the reference frequency from 02.

【0026】閾値B206は、メモリ108側からの更
新通知の連続回数をカウンタB205によってカウント
した結果、メモリ108側からの更新通知の連続回数が
多い場合に、そのキャッシュブロックは自ノード内では
参照回数が少なく、既に不要になったものであると見做
し、キャッシュ自身が当該キャッシュブロック201を
自己無効化する時の判断基準になるものである。自己無
効化とは、キャッシュブロック自身が当該キャッシュブ
ロック201を無効化することである。この閾値B20
6は、複数の数キャッシュブロックに共通に設定されて
いる。なお、閾値B206は、各メモリブロック301
で管理し、動的に変更するように構成することも可能で
ある。閾値B206をメモリブロック301に持たせた
場合は、(1)キャッシュブロック201からの読み込
み要求の際に、ブロックデータと共にキャッシュブロッ
ク201に渡す、(2)メモリ側から更新データを送信
する際に、ブロックデータと共にキャッシュブロック2
01に渡す、という方法によって各キャッシュブロック
別に閾値Bを管理することができる。
As a result of counting the number of continuous update notifications from the memory 108 by the counter B205, if the number of continuous update notifications from the memory 108 is large, the threshold value B206 indicates that the cache block And the cache itself is regarded as unnecessary, and serves as a criterion when the cache itself invalidates the cache block 201 itself. The self-invalidation means that the cache block itself invalidates the cache block 201. This threshold B20
6 is set in common for a plurality of cache blocks. Note that the threshold value B206 is determined in each memory block 301.
, And can be configured to change dynamically. When the memory block 301 has the threshold value B206, (1) at the time of a read request from the cache block 201, the block data is transferred to the cache block 201, and (2) when the update data is transmitted from the memory side, Cache block 2 with block data
01, the threshold value B can be managed for each cache block.

【0027】一方、メモリブロック301に設定されて
いる閾値A304は、メモリブロック301のコピーを
持つキャッシュブロックに対し更新通知を送るか、一斉
無効化による無効化通知を送るかの判断に用いるもので
あり、この閾値A304はメモリブロック毎に値を持
ち、一斉無効化、自己無効化によって値が変動する。こ
の実施形態では、いずれかのキャッシュブロックがオー
ナ状態に切り替わって一斉無効化が行われると、閾値A
304を「+1」インクリメントする。すなわち、一斉
無効化によって無効化されたキャッシュブロック201
の一斉無効化が少なくなる傾向の値に更新する。これ
は、一斉無効化によって無効化されたキャッシュブロッ
ク201の元データを格納しているメモリブロック30
1のデータに対するアクセス要求が多いということは、
そのメモリブロック301に対する参照頻度が高いと見
做すことができるので、このメモリブロック301の閾
値Aを高くすることで、次回の一斉無効化をされにくく
することを意味する。逆に、自己無効化が行われると閾
値A304を「−1」デクリメントする。
On the other hand, the threshold value A 304 set in the memory block 301 is used to determine whether to send an update notice to a cache block having a copy of the memory block 301 or to send an invalidation notice by simultaneous invalidation. The threshold A304 has a value for each memory block, and the value fluctuates due to simultaneous invalidation and self-invalidation. In this embodiment, when one of the cache blocks is switched to the owner state and the simultaneous invalidation is performed, the threshold A
304 is incremented by “+1”. That is, the cache block 201 invalidated by the simultaneous invalidation
Is updated to a value that tends to reduce simultaneous invalidation. This is because the memory block 30 storing the original data of the cache block 201 invalidated by the simultaneous invalidation is stored.
The fact that there are many access requests for 1 data means that
Since it can be considered that the frequency of reference to the memory block 301 is high, increasing the threshold A of the memory block 301 means that the next simultaneous invalidation becomes difficult. Conversely, when self-invalidation is performed, the threshold A304 is decremented by "-1".

【0028】自己無効化は、キャッシュブロック201
に対する自ノード内のプロセッサ102からの参照頻度
が少なく、自ノードまたは他ノードのメモリ108側か
らの更新が連続し、閾値B206を超えた場合に行われ
る。そして、このメモリブロック301の閾値A304
を低くすることで一斉無効化をされ易くする値に更新
し、プロセッサ102からの参照回数が少ないキャッシ
ュブロックの無効化を促進する。このようにすることに
より、無効化型プロトコル向きのメモリブロック301
の閾値Aは低く、更新型プロトコル向きのメモリブロッ
ク301の閾値Aは高くなり、メモリブロック301毎
に最適な値Aを動的に持つことになり、どのようなメモ
リアクセスパターンにも対応できる。
The self-invalidation is performed in the cache block 201
This is performed when the reference frequency from the processor 102 in the own node is low, and the update from the memory 108 side of the own node or another node is continuous and exceeds the threshold value B206. Then, the threshold A 304 of the memory block 301
Is updated to a value that facilitates simultaneous invalidation by lowering the value, and invalidation of a cache block with a small number of references from the processor 102 is promoted. By doing so, the memory block 301 for the invalidation type protocol can be used.
Is low, the threshold A of the memory block 301 for the update type protocol is high, and the optimum value A is dynamically provided for each memory block 301, so that any memory access pattern can be handled.

【0029】メモリブロック301のディレクトリ30
3は、当該メモリブロック301のデータの写しが存在
するキャッシュブロックを特定するための情報である
が、ディレクトリ303のデータ形式としては、図5お
よび図6に示すように、フルマップディレクトリ形式、
リミテッドポインタ形式、チェインディレクトリ形式な
ど、公知のデータ形式を用いることができる。
The directory 30 of the memory block 301
Reference numeral 3 denotes information for specifying a cache block in which a copy of the data of the memory block 301 exists. As shown in FIGS. 5 and 6, the data format of the directory 303 is a full map directory format,
Known data formats such as a limited pointer format and a chain directory format can be used.

【0030】フルマップディレクトリ形式とは、図5
(a)に示すように、ディレクトリ303にノードa、
b、……nにそれぞれ対応するビットを設け、メモリブ
ロック301のデータのコピーを持つノードに対応した
ビット位置には“1”、コピーを持たないノードに対応
したビット位置には“0”を設定することにより、コピ
ーを持つキャッシュブロックを特定するものである。リ
ミテッドポインタ形式とは、図5(b)に示すように、
ディレクトリ303内に各ノードを一意に識別するポイ
ンタを設定し、コピーを持つキャッシュブロックを特定
するものである。チェインディレクトリ形式とは、図6
に示すように、ディレクトリ303にコピーを持つ先頭
のポインタを設定し、その先頭のポインタのキャッシュ
ブロックに次のポインタをタグとしてチェーン形式で順
次設定することにより、コピーを持つキャッシュブロッ
クを特定するものである。
FIG. 5 shows the full map directory format.
As shown in (a), a directory a,
Bits corresponding to b,... n are provided, and “1” is set at a bit position corresponding to a node having a copy of data in the memory block 301 and “0” is set at a bit position corresponding to a node having no copy. By setting, a cache block having a copy is specified. The limited pointer format is, as shown in FIG.
A pointer for uniquely identifying each node is set in the directory 303, and a cache block having a copy is specified. Figure 6 shows the chain directory format.
As shown in (1), a cache block having a copy is specified by setting a first pointer having a copy in a directory 303 and sequentially setting a cache block of the first pointer in the form of a chain using the next pointer as a tag. It is.

【0031】以上の構成において、まず、本発明のキャ
ッシュメモリ制御方法の概要について図7を参照して説
明する。
In the above configuration, first, an outline of the cache memory control method of the present invention will be described with reference to FIG.

【0032】まず、キャッシュブロック201に対して
自ノード内のプロセッサ102からデータの書き込み要
求があると、そのキャッシュブロック201の状態ビッ
ト203により当該キャッシュブロック201がオーナ
であるか、ノンオーナであるかを調べ、オーナであれ
ば、書き込み要求を受けたキャッシュブロック201は
当該キャッシュブロック201のデータを更新すると共
に、カウンタA204の値を「+1」し、その元データ
を格納しているメモリブロック301に更新後のデータ
とカウンタA204の値を書き込み要求(Write−
req)として送信する。書き込み要求(Write−
req)を受けたメモリブロック301は、受信したデ
ータにより元データを更新し、さらに受信したカウンタ
Aの値と当該メモリブロック301の閾値Aとを比較
し、カウンタA204のカウント値<閾値Aであれば、
当該メモリブロック301のコピーを持つ他のキャッシ
ュブロック201−1、201−2に対し更新通知(u
pdate)を送る。更新通知を受けた他のキャッシュ
ブロック201−1、201−2は、カウンタAを0ク
リアする。
First, when there is a data write request to the cache block 201 from the processor 102 in the own node, the status bit 203 of the cache block 201 determines whether the cache block 201 is the owner or the non-owner. The cache block 201 having received the write request updates the data of the cache block 201 and increments the value of the counter A 204 by “+1” to update the data to the memory block 301 storing the original data. Write request for the subsequent data and the value of the counter A204 (Write-
req). Write request (Write-
The memory block 301 receiving the req) updates the original data with the received data, compares the received value of the counter A with the threshold A of the memory block 301, and determines that the count value of the counter A204 <the threshold A. If
Update notification (u) to the other cache blocks 201-1 and 201-2 having a copy of the memory block 301.
pdate). The other cache blocks 201-1 and 201-2 that have received the update notification clear the counter A to 0.

【0033】しかし、自ノード内のプロセッサ102か
らデータの書き込み要求があったキャッシュブロック2
01がノンオーナであった場合、当該キャッシュブロッ
ク201のデータを更新した後、カウンタA204の値
を0クリアし、その元データを格納しているメモリブロ
ック301に更新後のデータとカウンタA204の値を
書き込み要求(Write−req)として送信する。
書き込み要求(Write−req)を受けたメモリブ
ロック301は、受信したデータにより元データを更新
し、さらに受信したカウンタAの値と当該メモリブロッ
ク301の閾値Aとを比較し、カウンタA204のカウ
ント値≧閾値Aであれば、プロセッサ102からの書き
込み要求を受けたキャッシュブロック201の状態をノ
ンオーナからオーナに変更した後、そのデータのコピー
を持つ他のキャッシュブロック201−1、201−2
に対し無効化通知(Invalidate)を送る。無
効化通知を受けた他のキャッシュブロック201−1、
201−2は、該当するデータをを無効化し、さらにカ
ウンタA204を0クリアする。
However, the cache block 2 that has received a data write request from the processor 102 in its own node
If 01 is the non-owner, after updating the data of the cache block 201, the value of the counter A204 is cleared to 0, and the updated data and the value of the counter A204 are stored in the memory block 301 storing the original data. It is transmitted as a write request (Write-req).
The memory block 301 that has received the write request (Write-req) updates the original data with the received data, compares the received value of the counter A with the threshold value A of the memory block 301, and counts the count value of the counter A204. If ≧ threshold A, after changing the state of the cache block 201 that has received the write request from the processor 102 from the non-owner to the owner, the other cache blocks 201-1 and 201-2 having a copy of the data
Sends an invalidation notification to the server. Other cache blocks 201-1 that have received the invalidation notification,
201-2 invalidates the corresponding data and clears the counter A204 to 0.

【0034】以下、具体的な処理の流れをフローチャー
トを参照して説明する。図8は、いずれかのキャッシュ
ブロック201に対しプロセッサ102から書き込みが
生じた場合のキャッシュコントローラ103の処理手順
を示すフローチャートである。
Hereinafter, a specific processing flow will be described with reference to a flowchart. FIG. 8 is a flowchart illustrating a processing procedure of the cache controller 103 when writing to any of the cache blocks 201 is performed by the processor 102.

【0035】キャッシュブロック201に対しプロセッ
サ102からデータの書き込みが生じると、まず、プロ
セッサ102がアドレス情報で指定したキャッシュブロ
ック内にデータが存在するかチェックする(ステップ8
01)。データが存在せず、ヒットしなければメモリ1
08に対しデータの読み込み要求を行う(ステップ80
2)。
When data is written from the processor 102 to the cache block 201, the processor 102 first checks whether data exists in the cache block specified by the address information (step 8).
01). If there is no data and there is no hit, memory 1
08 is read (step 80).
2).

【0036】この時の処理の流れを図9に示す。まず、
メモリ108に対しアドレス情報で指定される1ブロッ
ク分のデータの読み込み要求を送信し(ステップ90
1)、1ブロック分のデータを受け取り(ステップ90
2)、連続更新回数をカウントするカウンタA204を
0クリアする。そして、メモリ108から読み出した1
ブロック分のデータと同じコピーを持つキャッシュブロ
ック201の数を調べる(ステップ904)。コピーを
持つキャッシュブロックの数は、図5および図6で説明
したディレクトリ303を用いて検出することができ
る。
FIG. 9 shows a processing flow at this time. First,
A request to read one block of data specified by the address information is transmitted to the memory 108 (step 90).
1) Receiving data for one block (step 90)
2) The counter A204 for counting the number of continuous updates is cleared to 0. Then, the 1 read from the memory 108
The number of cache blocks 201 having the same copy as the data of the block is checked (step 904). The number of cache blocks having a copy can be detected using the directory 303 described with reference to FIGS.

【0037】コピー数が1つの場合、即ちプロセッサ1
02が指定したメモリブロック301のコピーを持つキ
ャッシュブロック201が現在のキャッシュブロック2
01のみであれば、そのキャッシュブロック201状態
ビット203をExclusiveに設定する(ステッ
プ905)。しかし、コピー数が2つ以上の場合、即ち
メモリブロック301のコピーを複数のノードのキャッ
シュブロック201が共有しているのであれば、状態ビ
ット203をSharedに設定する。メモリ108か
らの読み込み処理はこれで終了する。
When the number of copies is one, that is, the processor 1
02 is a cache block 201 having a copy of the memory block 301 designated by the current cache block 2
If it is only 01, the cache block 201 status bit 203 is set to Exclusive (step 905). However, if the number of copies is two or more, that is, if the cache block 201 of a plurality of nodes shares a copy of the memory block 301, the status bit 203 is set to Shared. The process of reading from the memory 108 ends here.

【0038】一方、プロセッサ102がアドレス情報で
指定したキャッシュブロック201上に対象となる1ブ
ロック分のデータが存在した場合と、Invalidで
読み込みが終了した時は、そのキャッシュブロック20
1に対しプロセッサ102が出力しているデータの書き
込みを行い、当該キャッシュブロック201の更新を行
う(ステップ803)。そして、キャッシュブロック2
01の状態ビット203に応じた処理を行う。すなわ
ち、キャッシュブロック201の状態がSharedで
あれば、カウンタA204をインクリメントした後(ス
テップ805)、そのデータの元データを格納している
メモリブロック301に対しデータの書き込み要求を行
う(ステップ808)。
On the other hand, when one block of target data exists in the cache block 201 specified by the address information by the processor 102, and when reading is completed by Invalid, the cache block 20 is deleted.
The data output from the processor 102 is written to the cache block 201, and the cache block 201 is updated (step 803). And cache block 2
A process according to the status bit 203 of 01 is performed. That is, if the state of the cache block 201 is Shared, the counter A 204 is incremented (step 805), and then a data write request is made to the memory block 301 storing the original data of the data (step 808).

【0039】この時の処理の流れを図10に示す。メモ
リブロック301への書き込み要求時は、書き込み対象
の1ブロック分のデータとカウンタA204の値をメモ
リ制御装置107へ送信する(ステップ1001)。書
き込み要求を受けたメモリ制御装置107は、図11に
示す処理を行う(図11の説明は後述する)。
FIG. 10 shows the flow of the processing at this time. When a write request is made to the memory block 301, data for one block to be written and the value of the counter A204 are transmitted to the memory control device 107 (step 1001). Upon receiving the write request, the memory control device 107 performs the process shown in FIG. 11 (the description of FIG. 11 will be described later).

【0040】メモリ108におけるデータの書き込み処
理が終了し、メモリ制御装置107から処理終了通知を
受け取ったならば(ステップ1002)、データ更新対
象となったメモリブロック301への処理内容を確認す
る(ステップ1003)。そして、メモリブロック30
1に対し一斉無効化が行なわれたのであれば、そのコピ
ーを持つキャッシュブロック201は現在処理中のキャ
ッシュブロック201自身であるので、そのキャッシュ
ブロック201の状態ビット203をModified
に設定し、自らが新しいオーナになり、プロセッサ10
2からのデータの書き込み要求の処理を終える。しか
し、一斉無効化が行われなかった場合(更新処理が行な
われた場合)は、状態ビット203を更新せずに図8の
ステップ812に進む。
When the data write processing in the memory 108 is completed and a processing end notification is received from the memory control device 107 (step 1002), the processing contents to the memory block 301 to be updated are confirmed (step 1002). 1003). Then, the memory block 30
If the block 1 has been invalidated at once, since the cache block 201 having the copy is the cache block 201 currently being processed, the status bit 203 of the cache block 201 is modified.
To be the new owner and the processor 10
Then, the processing of the data write request from 2 is completed. However, if the simultaneous invalidation has not been performed (the update processing has been performed), the process proceeds to step 812 in FIG. 8 without updating the status bit 203.

【0041】一方、キャッシュブロック201の状態が
Ownedであった場合は、必ず更新処理が行われるよ
う、カウンタA204を0クリアし(ステップ80
7)、メモリ108に対し書き込み要求を送り(ステッ
プ808)、図10の説明と同様の処理を行なう。
On the other hand, if the state of the cache block 201 is Owned, the counter A 204 is cleared to 0 so that the updating process is always performed (step 80).
7) A write request is sent to the memory 108 (step 808), and the same processing as described in FIG. 10 is performed.

【0042】キャッシュブロック201の状態がMod
fiedであれば(ステップ809)、状態ビット20
3の変更やメモリ108への通知は行わず、当該キャッ
シュブロックに書き込むのみである。キャッシュブロッ
ク201の状態がExclusiveであれば、他にコ
ピーを持つキャッシュブロック201は存在しないの
で、状態ビット203をModifiedに変更し(ス
テップ810)、新しくオーナになる。そして、メモリ
108にキャッシュブロック201の状態が変わったこ
とを通知する(ステップ811)。
The state of the cache block 201 is Mod
If it is “feed” (step 809), the status bit 20
No change of 3 or notification to the memory 108 is made, but only writing to the cache block. If the status of the cache block 201 is Exclusive, there is no other cache block 201 having a copy, so the status bit 203 is changed to Modified (step 810), and the new owner is obtained. Then, the memory 108 is notified that the state of the cache block 201 has changed (step 811).

【0043】キャッシュブロック201の状態別の処理
が終わると、カウンタB205を0クリアする(ステッ
プ812)。なお、カウンタB205はプロセッサ10
2がキャッシュブロック201から読み出した時にも0
クリアされる。以上で、キャッシュブロック201に対
しプロセッサ102からデータの書き込みが生じた場合
の処理を終了する。
When the processing for each state of the cache block 201 is completed, the counter B 205 is cleared to 0 (step 812). Note that the counter B205 is
2 is also 0 when read from the cache block 201
Cleared. Thus, the processing in the case where data is written from the processor 102 to the cache block 201 ends.

【0044】図11にキャッシュブロック201から書
き込み要求を受けたメモリ制御装置107の処理の流れ
を示す。メモリ制御装置107は、キャッシュブロック
201からデータの書き込み要求を受けると、まず対象
となるメモリブロック301をロックし、他のキャッシ
ュブロック201からの要求を受け取らないようにした
後(ステップ1101)、対象のメモリブロック301
の内容を書き込み要求により受信したデータに書き換え
る(ステップ1102)。
FIG. 11 shows a processing flow of the memory control device 107 which has received a write request from the cache block 201. When receiving a data write request from the cache block 201, the memory control device 107 locks the target memory block 301 so as not to receive requests from other cache blocks 201 (step 1101). Memory block 301
Is rewritten to the data received in response to the write request (step 1102).

【0045】次に、キャッシュブロック201から送ら
れたカウンタA204の値と閾値Aを比較する(ステッ
プ1103)。カウンタA204の値が閾値A以上であ
れば、主に書き込みを行っているキャッシュブロック2
01が変わった、即ちメモリ108へのアクセスパター
ンが変わったと判断し、一斉無効化処理を行う(ステッ
プ1104〜1110)。
Next, the value of the counter A 204 sent from the cache block 201 is compared with the threshold value A (step 1103). If the value of the counter A 204 is equal to or larger than the threshold value A, the cache block 2 mainly performing the writing
It is determined that 01 has changed, that is, the access pattern to the memory 108 has changed, and simultaneous invalidation processing is performed (steps 1104 to 1110).

【0046】しかし、カウンタA204の値が閾値A未
満であれば、各キャッシュブロック201上にデータを
残し、キャッシュブロック201へのヒット率を高める
ために、更新処理を行う(ステップ1111〜111
7)。
However, if the value of the counter A 204 is less than the threshold value A, an update process is performed to leave data on each cache block 201 and increase the hit rate to the cache block 201 (steps 1111 to 111).
7).

【0047】一斉無効化処理では、まず、閾値Aをイン
クリメントする(ステップ1104)。これは、一斉無
効化によって無効化されたキャッシュブロック201が
再度同じブロックを参照するようなことがあると、この
ブロックに対する参照頻度が高いということが言えるの
で、閾値Aをインクリメントすることにより、次回の一
斉無効化をされにくくする。
In the simultaneous invalidation processing, first, the threshold value A is incremented (step 1104). This is because when the cache block 201 invalidated by the simultaneous invalidation sometimes refers to the same block again, it can be said that the frequency of reference to this block is high. Makes it hard to be invalidated all at once.

【0048】次に、ディレクトリ303を参照し、コピ
ーを持つキャッシュブロック201に対し無効化通知を
送信する(ステップ1105)。そして、通知を行った
各キャッシュブロック201からの返信を待つ。無効化
通知を受け取ったキャッシュブロック201は、対象と
なるキャッシュブロック201の状態ビット203をI
nvalidに変更し、無効化を行った旨をメモリ制御
装置107に返信する。
Next, referring to the directory 303, an invalidation notice is transmitted to the cache block 201 having a copy (step 1105). Then, it waits for a reply from each cache block 201 that has sent the notification. Upon receiving the invalidation notification, the cache block 201 sets the status bit 203 of the target cache block 201 to I
The setting is changed to nvalid, and the invalidation is returned to the memory control device 107.

【0049】メモリ制御装置107は、キャッシュブロ
ック201からの返信を受け取ると(ステップ110
6)と、ディレクトリ303の中で「無効化を行ったキ
ャッシュブロックの存在場所の情報」を無効にする(ス
テップ1107)。全てのキャッシュブロック201か
ら返信を受け取ると(ステップ1108)と、メモリ1
08に対して書き込み要求を行ったキャッシュブロック
201を、主に書き込みを行っているキャッシュブロッ
ク201であると判断し、新しいオーナに設定する(ス
テップ1109)。そして、このキャッシュブロック2
01に対し、一斉無効化処理が終了した旨の通知を行う
(ステップ1110)。
When the memory control unit 107 receives a reply from the cache block 201 (step 110)
6), and invalidates “information on the location of the invalidated cache block” in the directory 303 (step 1107). Upon receiving replies from all cache blocks 201 (step 1108), the memory 1
It is determined that the cache block 201 that has made a write request to the cache block 08 is the cache block 201 that is mainly writing, and the new owner is set (step 1109). And this cache block 2
01 is notified that the simultaneous invalidation processing has been completed (step 1110).

【0050】一方、データの更新処理では、ディレクト
リ303を参照し、コピーを持つキャッシュブロック2
01に対し更新通知として1ブロック分のデータを送信
する(ステップ1111)。更新通知を受け取ったキャ
ッシュブロック201は、図12に示す処理を行う(図
12の処理内容は後述する)。そして、通知を行った各
キャッシュブロック201からの返信を待つ。メモリ
は、キャッシュブロック201から返信を受け取ると
(ステップ1112)と、返信内容を確認する(ステッ
プ1113)。更新通知を受け取った旨の返信であれ
ば、そのまま他のキャッシュブロック201からの返信
を待つ。キャッシュブロック201から自己無効化を行
った旨の通知が返ってくると、ディレクトリ303の中
で自己無効化を行ったキャッシュブロックの存在場所の
情報を無効にする(ステップ1114)。
On the other hand, in the data update processing, the cache block 2 having a copy is referred to by referring to the directory 303.
One block of data is transmitted to 01 as an update notification (step 1111). The cache block 201 that has received the update notification performs the processing illustrated in FIG. 12 (the processing content of FIG. 12 will be described later). Then, it waits for a reply from each cache block 201 that has sent the notification. Upon receiving the reply from the cache block 201 (step 1112), the memory checks the content of the reply (step 1113). If it is a reply indicating that the update notification has been received, it waits for a reply from another cache block 201 as it is. When the self-invalidating notification is returned from the cache block 201, the information on the location of the self-invalidating cache block in the directory 303 is invalidated (step 1114).

【0051】自己無効化が行われたということはキャッ
シュブロック201に対するプロセッサ102の参照頻
度が低く、不要になってしまったキャッシュブロック2
01に更新通知を送っていたという判断ができるので、
閾値Aをデクリメント(ステップ1115)して一斉無
効化を行われ易くし、不要なキャッシュブロック201
が存在するのを防ぐ。全てのキャッシュブロック201
から返信を受け取る(ステップ1116)と、書き込み
要求を行ったキャッシュブロック201に、更新処理が
終了した旨の通知を行う(ステップ1117)。
The fact that the self-invalidation is performed means that the processor 102 refers to the cache block 201 at a low frequency, and the cache block 2 is no longer needed.
Since it can be determined that the update notification has been sent to 01,
The threshold value A is decremented (step 1115) to make it easy to perform simultaneous invalidation, and unnecessary cache blocks 201 are used.
To prevent the presence of All cache blocks 201
(Step 1116), the cache block 201 that has made the write request is notified that the update processing has been completed (step 1117).

【0052】一斉無効化処理または更新処理が終了する
と、ロックしてあったメモリブロック301をアンロッ
クし(ステップ1118)、キャッシュブロック201
からの書き込み要求に対する処理を終了する。
When the simultaneous invalidation processing or update processing is completed, the locked memory block 301 is unlocked (step 1118), and the cache block 201 is unlocked.
Then, the process for the write request from is terminated.

【0053】図12に自ノードまたは他ノードのメモリ
108側から更新通知を受け取ったキャッシュブロック
201の処理の流れを示す。メモリ108側から更新通
知を受け取るということは、他のキャッシュブロック2
01に書き込みがあったということであるので、自ノー
ド内のプロセッサ102からの連続更新回数をカウント
するためのカウンタA204を0クリアする(ステップ
1201)。そして、カウンタB205をインクリメン
トし(ステップ1202)、カウンタB205の値と閾
値B206とを比較する(ステップ1203)。カウン
タB205の値が閾値B206未満であれば、キャッシ
ュブロック201に対するプロセッサ102の参照が行
われていると判断し、そのキャッシュブロック201の
データの更新を行い(ステップ1204)、更新通知を
受け取った旨をメモリ108に返信する(ステップ12
05)。
FIG. 12 shows a processing flow of the cache block 201 which has received the update notification from the memory 108 of the own node or another node. Receiving an update notification from the memory 108 side means that other cache blocks 2
Since the data has been written to 01, the counter A 204 for counting the number of continuous updates from the processor 102 in the own node is cleared to 0 (step 1201). Then, the counter B205 is incremented (step 1202), and the value of the counter B205 is compared with the threshold value B206 (step 1203). If the value of the counter B205 is less than the threshold value B206, it is determined that the processor 102 refers to the cache block 201, the data of the cache block 201 is updated (step 1204), and the update notification is received. Is returned to the memory 108 (step 12
05).

【0054】しかし、カウンタB205の値が閾値B2
06以上であれば、そのキャッシュブロック201に対
するプロセッサ102の参照頻度に比べ、自ノードまた
は他ノードのメモリ108側からの更新頻度の方が高
く、このキャッシュブロック201のデータは既に不要
になったものと見做すことができるので、自己無効化処
理を行ない、対象となるキャッシュブロック201の状
態ビット203をInvalidにし(ステップ120
6)、自己無効化を行ったことをメモリ108側に返信
する(ステップ1207)。これでメモリ側から更新通
知を受け取ったキャッシュブロック201の処理は終了
する。
However, when the value of the counter B205 is equal to the threshold B2
If the value is 06 or more, the update frequency from the memory 108 side of the own node or another node is higher than the reference frequency of the processor 102 with respect to the cache block 201, and the data of the cache block 201 has become unnecessary. Therefore, the self-invalidation process is performed, and the status bit 203 of the target cache block 201 is set to Invalid (step 120).
6), the self-invalidation is returned to the memory 108 side (step 1207). Thus, the processing of the cache block 201 that has received the update notification from the memory side ends.

【0055】以上の図8〜図12に示した流れを繰り返
し、一斉無効化、更新、自己無効化を動的に使い分ける
ことにより、各キャッシュブロック毎にアプリケーショ
ンプログラムのメモリアクセスパターンに適合した閾値
Aを持つようになる。
The above-described flow shown in FIGS. 8 to 12 is repeated, and the simultaneous invalidation, update, and self-invalidation are dynamically used, so that the threshold A suitable for the memory access pattern of the application program is provided for each cache block. To have

【0056】図13ないし図15は、以上説明した処理
を分かり易く図示したものである。
FIGS. 13 to 15 illustrate the above-described processing for easy understanding.

【0057】図13は、キャッシュブロック201に対
して自ノード内のプロセッサ102からのデータの書き
込みが生じ、更新処理が行われる場合の処理を図示した
ものである。なお、( )内の数字(1)、(2)等は
処理の順番号を表わすものである。
FIG. 13 illustrates a process in which data is written to the cache block 201 from the processor 102 in the own node and an update process is performed. The numbers (1), (2) and the like in parentheses indicate the sequence numbers of the processing.

【0058】自ノード内のプロセッサ102からキャッ
シュブロック201に対し書き込みがあると、カウンタ
B205を0クリア、カウンタA204をインクリメン
トし、当該キャッシュブロック201のコピー元のメモ
リブロック301のデータを更新すべく、メモリ108
に対し、プロセッサ102から書き込まれたブロックの
データとカウンタA204の値を書き込み要求として送
信する。メモリ108のメモリブロック301では、書
き込み要求を受け取ると、カウンタA204の値と閾値
A304とを比較する。この例の場合、カウンタA20
4の値は閾値A304よりも小さいので、ディレクトリ
303を参照し、同一ブロックのデータを持つ他のキャ
ッシュブロック201−1、201−2に対し、更新通
知を送る。メモリから更新通知を受け取ったキャッシュ
ブロック201−1、201−2は、カウンタA204
を0クリア、カウンタB205をインクリメントし、カ
ウンタB205の値と閾値B206とを比較する。この
例の場合、更新通知を受け取ったキャッシュブロック2
01−1、201−2のカウンタB205の値は、共に
閾値B206よりも小さいので、当該キャッシュブロッ
クの更新処理を行い、メモリ108のメモリブロック3
01に対し更新通知を受け取ったことを返信する。メモ
リ108のメモリブロック301は更新通知を送った全
てのキャッシュブロック201−1、201−2から返
信があると、書き込み要求を行ったキャッシュブロック
201に処理が完了したことを返信する。
When there is a write from the processor 102 in the own node to the cache block 201, the counter B 205 is cleared to 0, the counter A 204 is incremented, and the data in the memory block 301 of the copy source of the cache block 201 is updated. Memory 108
Then, the data of the block written from the processor 102 and the value of the counter A 204 are transmitted as a write request. Upon receiving the write request, the memory block 301 of the memory 108 compares the value of the counter A204 with the threshold A304. In this example, the counter A20
Since the value of 4 is smaller than the threshold value A304, the update notification is sent to the other cache blocks 201-1 and 201-2 having the data of the same block with reference to the directory 303. The cache blocks 201-1 and 201-2 that have received the update notification from the memory store the counter A204.
Is cleared to 0, the counter B205 is incremented, and the value of the counter B205 is compared with the threshold value B206. In the case of this example, the cache block 2 receiving the update notification
Since the values of the counters B205 of 01-1 and 201-2 are both smaller than the threshold value B206, the cache block is updated and the memory block 3 of the memory 108 is updated.
01 is notified that the update notification has been received. When there is a reply from all the cache blocks 201-1 and 201-2 that have sent the update notification, the memory block 301 of the memory 108 returns that the processing has been completed to the cache block 201 that has made the write request.

【0059】図14は、自ノード内のプロセッサ102
からキャッシュブロック201に対して書き込みが生
じ、さらにそのキャッシュブロックと同じデータのコピ
ーを持つキャッシュブロックの一斉無効化処理が行われ
た場合の処理を図示したものである。自ノード内のプロ
セッサ102からキャッシュブロック201に対し書き
込みがあると、当該キャッシュブロック201ではカウ
ンタB205を0クリア、カウンタA204をインクリ
メントし、さらに当該キャッシュブロック201コピー
元のメモリブロック301のデータを更新すべく、メモ
リ108に対し、プロセッサ102から書き込まれたキ
ャッシュブロック201のデータとカウンタA204の
値とを書き込み要求として送信する。メモリ108のメ
モリブロック301は、書き込み要求を受け取ると、カ
ウンタA204の値と閾値A304を比較する。
FIG. 14 shows the processor 102 in the own node.
2 illustrates a process in which a write occurs to the cache block 201 and a cache block having the same data copy as the cache block is simultaneously invalidated. When there is a write from the processor 102 in its own node to the cache block 201, the cache block 201 clears the counter B205 to 0, increments the counter A204, and updates the data in the memory block 301 of the copy source of the cache block 201. To this end, the data of the cache block 201 written from the processor 102 and the value of the counter A 204 are transmitted to the memory 108 as a write request. Upon receiving the write request, the memory block 301 of the memory 108 compares the value of the counter A204 with the threshold A304.

【0060】この例の場合、カウンタA204の値は閾
値A304以上となっているので、ディレクトリ303
を参照し、同一のデータを持つ他のキャッシュブロック
201−1、201−2に対し、無効化通知を送り、カ
ウンタA204をインクリメントする。これは、無効化
が行われたキャッシュブロック201から再度読み込み
要求があるということは、このブロックに対する参照頻
度が高いといえるので、閾値Aを高くすることで次回の
一斉無効化をされにくくしている。メモリ108のメモ
リブロック301から無効化通知を受け取った他のキャ
ッシュブロック201−1、201−2は、対象のブロ
ックを無効化し、無効化通知を受け取ったことをメモリ
108に返信する。
In this example, since the value of the counter A 204 is equal to or larger than the threshold value A 304,
, An invalidation notification is sent to the other cache blocks 201-1 and 201-2 having the same data, and the counter A204 is incremented. This is because the fact that there is a read request from the cache block 201 that has been invalidated means that the frequency of reference to this block is high. I have. The other cache blocks 201-1 and 201-2 that have received the invalidation notification from the memory block 301 of the memory 108 invalidate the target block, and return to the memory 108 that the invalidation notification has been received.

【0061】メモリ108のメモリブロック301は、
更新通知を送った全てのキャッシュブロック201−
1、201−2から返信があると、書き込み要求を行っ
たキャッシュブロック201に処理が完了したことを返
信する。
The memory block 301 of the memory 108 is
All the cache blocks 201-
When a reply is received from the server 1 or 201-2, the completion of the process is returned to the cache block 201 which has issued the write request.

【0062】図15は、自ノード内のプロセッサ102
からキャッシュブロック201に対して書き込みが生
じ、さらにメモリ108からの更新通知を受信した他の
キャッシュブロック201−2において自己無効化処理
が行われた場合の処理を図示したものである。
FIG. 15 shows the processor 102 in the own node.
5 illustrates a process in which a write occurs to the cache block 201 and a self-invalidation process is performed in another cache block 201-2 that has received an update notification from the memory 108.

【0063】プロセッサ102からキャッシュブロック
201に対し書き込みがあると、当該キャッシュブロッ
ク201ではカウンタB205を0クリア、カウンタA
204をインクリメントし、メモリ108に対し、書き
込まれたブロックのデータとカウンタA204の値を書
き込み要求として送信する。メモリ108のメモリブロ
ック301は、書き込み要求を受け取ると、カウンタA
204の値と閾値A304とを比較する。この例の場
合、カウンタA204の値は閾値A304よりも小さい
ので、ディレクトリ303を参照し、同一のデータを持
つ他のキャッシュブロック201−1、201−2に対
し、更新通知を送る。メモリ108のメモリブロック3
01から更新通知を受け取った他のキャッシュブロック
201−1、201−2は、カウンタA204を0クリ
ア、カウンタB205をインクリメントし、カウンタB
205の値と閾値B206とを比較する。この例の場
合、更新通知を受け取ったキャッシュブロック201−
1のカウンタBの値は、閾値B206よりも小さいの
で、当該キャッシュブロック201−1の更新処理を行
い、メモリ108に対し更新通知を受け取ったことを返
信する。しかし、キャッシュブロック201−2の場
合、そのカウンタB205の値は、閾値B206以上で
あるので、当該キャッシュブロック201−2を自己無
効化し、メモリ108に対した自己無効化通知を返信す
る。メモリ108のメモリブロック301は、自己無効
化通知を受け取った場合は、閾値A304を「−1」す
る。そして、メモリブロック301は更新通知を送った
全てのキャッシュブロック201−1、201−2から
返信があると、書き込み要求を行ったキャッシュブロッ
ク201に処理が完了したことを返信する。
When data is written from the processor 102 to the cache block 201, the counter B 205 is cleared to 0 and the counter A is
204 is incremented, and the data of the written block and the value of the counter A 204 are transmitted to the memory 108 as a write request. Upon receiving the write request, the memory block 301 of the memory 108
The value of 204 is compared with the threshold value A304. In this example, since the value of the counter A204 is smaller than the threshold value A304, the update notification is sent to the other cache blocks 201-1 and 201-2 having the same data by referring to the directory 303. Memory block 3 of the memory 108
The other cache blocks 201-1 and 201-2 that have received the update notification from the counter 01 clear the counter A204 to 0, increment the counter B205, and
The value of 205 and the threshold value B206 are compared. In the case of this example, the cache block 201-
Since the value of the counter B of 1 is smaller than the threshold value B206, the cache block 201-1 is updated, and the memory 108 is notified that the update notification has been received. However, in the case of the cache block 201-2, since the value of the counter B205 is equal to or larger than the threshold value B206, the cache block 201-2 is self-invalidated and a self-invalidation notification is returned to the memory 108. When receiving the self-invalidation notification, the memory block 301 of the memory 108 sets the threshold A 304 to “−1”. When there is a reply from all the cache blocks 201-1 and 201-2 that have sent the update notification, the memory block 301 returns a message indicating that the processing has been completed to the cache block 201 that has made the write request.

【0064】図13〜図15の処理が繰り返されると、
無効化型プロトコル向きブロックの閾値A304は低く
なり一斉無効化が行われ易く、更新型プロトコル向きブ
ロックの閾値A304は高くなり更新処理が行われ易く
なる。すなわち、各キャッシュブロック毎に閾値A30
4は最適な値を自動的に持つようになる。
When the processing of FIGS. 13 to 15 is repeated,
The threshold value A304 of the block for invalidation type protocol becomes low and the simultaneous invalidation is easily performed, and the threshold value A304 of the block for update type protocol becomes high and the update process is easily performed. That is, the threshold A30 is set for each cache block.
4 automatically has the optimal value.

【0065】図16は、キャッシュブロック201の状
態(M,O,E,S,I)別にプロセッサ102からデ
ータの書き込み要求を受けた場合の処理をまとめて示し
た図である。以下、各部分別に説明する。
FIG. 16 is a diagram collectively showing processing when a data write request is received from the processor 102 for each state (M, O, E, S, I) of the cache block 201. Hereinafter, each part will be described.

【0066】(1)プロセッサ102から書き込み要求
を受けたキャッシュブロックの説明 プロセッサ102から書き込み要求を受けたキャッシュ
ブロックは、キャッシュブロックがヒットしている(M
odified、Owned、Exclusive、Shared)か、いない
(Invalid)かを判断する。キャッシュブロックがヒッ
トしていない場合は、メモリ108から1ブロック分の
データを読み込み、その後、読み込んだ時の状態に応じ
た処理を行う。
(1) Write request from processor 102
Description of the received cache block The cache block that has received the write request from the processor 102 has a cache block hit (M
odified, Owned, Exclusive, Shared, or not (Invalid). If the cache block has not been hit, one block of data is read from the memory 108, and then processing is performed according to the state at the time of reading.

【0067】キャッシュブロックがヒットしていない状
態でメモリからデータを読み込んだ後、またはキャッシ
ュブロックがヒットしている場合は下記の処理を行う。
After data is read from the memory in a state where the cache block has not been hit, or when the cache block has been hit, the following processing is performed.

【0068】(1−1)キャッシュブロックの状態に関
わらず、カウンタB205の値を0クリアする。
(1-1) Regardless of the state of the cache block, the value of the counter B205 is cleared to zero.

【0069】(1−2)キャッシュブロックの状態=M
odifiedの場合は、コピーの数が1つで、オーナである
状態なので、状態の遷移は行なわない。キャッシュブロ
ックへの書き込みが終わると処理を終える。
(1-2) State of cache block = M
In the case of odified, since the number of copies is one and the state is the owner, no state transition is performed. When the writing to the cache block is completed, the process ends.

【0070】(1−3)キャッシュブロックの状態=O
wnedの場合は、コピーの数が複数でオーナである状態で
あるので、更新処理を行うため、カウンタA204を0
クリアし、書き込んだデータとカウンタA204の値を
メモリ108に書き込み要求として送信し、メモリ10
8からの返信を待つ。カウンタA204を0クリアする
こにより、メモリ108側でカウンタA204と閾値A
304を比較した時、必ずカウンタA204の値は閾値
Aの値よりも小さくなる。
(1-3) State of cache block = O
In the case of wned, the number of copies is multiple and the owner is in the state.
The data that has been cleared and written and the value of the counter A 204 are transmitted to the memory 108 as a write request.
Wait for a reply from 8. By clearing the counter A204 to 0, the counter A204 and the threshold A
When comparing 304, the value of the counter A204 is always smaller than the value of the threshold value A.

【0071】(1−4)キャッシュブロックの状態=E
xclusiveの場合は、コピーの数が1つでオーナでない状
態にあるので、自らのキャッシュブロックが新しいオー
ナとなり、メモリ108にオーナになったことを通知
し、処理を終える。
(1-4) State of cache block = E
In the case of xclusive, since the number of copies is one and the owner is not the owner, the own cache block becomes the new owner, notifies the memory 108 that the owner has become the owner, and ends the processing.

【0072】(1−5)キャッシュブロックの状態=S
haredの場合は、コピーの数が複数でオーナでない状態
であるので、更新処理を行うか、一斉無効化処理を行う
かはメモリ108が判断する。そのため、カウンタA2
04をインクリメントし、書き込んだデータとカウンタ
A204の値をメモリ108に書き込み要求として送信
し、メモリ108からの返信を待つ。
(1-5) State of cache block = S
In the case of hared, since the number of copies is plural and not the owner, the memory 108 determines whether to perform the update process or the simultaneous invalidation process. Therefore, the counter A2
04 is incremented, the written data and the value of the counter A204 are transmitted to the memory 108 as a write request, and a reply from the memory 108 is waited for.

【0073】(2)キャッシュブロックから書き込み要
求を受けたメモリの説明 (2−1)キャッシュブロックから書き込み要求を受け
たメモリ108は、受信したカウンタA204の値と閾
値Aの値とを比較し、更新処理を行うか、一斉無効化処
理を行うか判断する。
(2) Writing is required from the cache block
Description of the Requested Memory (2-1) The memory 108, which has received the write request from the cache block, compares the received value of the counter A204 with the value of the threshold value A, and performs update processing or simultaneous invalidation processing. Judge whether to do.

【0074】(2−2)カウンタA204<閾値Aの場
合は、閾値Aは変更せず、更新処理を行う。
(2-2) When the counter A 204 <the threshold A, the threshold A is not changed and the updating process is performed.

【0075】(2−3)カウンタA204≧閾値Aの場
合は、書き込み要求を行ったキャッシュブロックが、主
に書き込みを行っているキャッシュブロックであると判
断し、このキャッシュブロックを新しいオーナにする。
このオーナの切り替わりに伴い、メモリアクセスパター
ンが変わったと判断できるので、コピーを持つ他のキャ
ッシュブロックを一斉無効化することで、不要なキャッ
シュブロックの共有を防ぐ。
(2-3) When the counter A204 ≧ the threshold value A, it is determined that the cache block that has made the write request is the cache block that is mainly performing the write, and the cache block is set as a new owner.
Since it is possible to judge that the memory access pattern has changed in accordance with the change of the owner, the sharing of unnecessary cache blocks is prevented by invalidating other cache blocks having a copy at the same time.

【0076】(3)メモリ108から更新通知を受け取
ったキャッシュブロックの説明 メモリ108から更新通知を受け取るということは、コ
ピーを持つキャッシュブロックの数が複数ある場合であ
るので、更新通知を受け取ったキャッシュブロックの状
態はOwnedまたは、Sharedである。
(3) Receive update notification from memory 108
Receiving an update notification from the memory block 108 means that there are a plurality of cache blocks having copies, and the status of the cache block that has received the update notification is Owned or Shared.

【0077】(3−1)カウンタA204を0クリアす
る。
(3-1) The counter A204 is cleared to 0.

【0078】(3−2)更新通知を受け取ったキャッシ
ュブロックは、カウンタB205をインクリメントし、
閾値B206と比較する。
(3-2) Upon receiving the update notification, the cache block increments the counter B205,
Compare with threshold value B206.

【0079】(3−3)カウンタB<閾値Bの場合は、
プロセッサ102からの参照頻度がまだあると判断でき
るので、キャッシュブロックの状態は変更せず、更新デ
ータを受け取り、メモリ108に更新完了通知を送る。
(3-3) When Counter B <Threshold B,
Since it can be determined that there is still a reference frequency from the processor 102, the state of the cache block is not changed, the update data is received, and an update completion notification is sent to the memory 108.

【0080】(3−2)カウンタB≧閾値Bの場合は、
プロセッサ102からの参照頻度が低くなっていると判
断できるので、キャッシュブロックを自己無効化(状態
をInvalidにする)し、メモリ108に自己無効化通知
を送る。
(3-2) If counter B ≧ threshold B,
Since it can be determined that the reference frequency from the processor 102 is low, the cache block is self-invalidated (the state is set to Invalid) and a self-invalidation notification is sent to the memory 108.

【0081】(4)メモリから無効化通知を受け取った
キャッシュブロックの説明 メモリから無効化通知を受け取るということは、コピー
を持つキャッシュブロックの数が複数ある場合なので、
前記(3)の場合と同じく、更新通知を受け取ったキャ
ッシュの状態はOwnedまたはSharedである。
(4) Invalidation notification received from memory
Cache block description Receiving an invalidation notification from memory means that there are multiple cache blocks with copies,
As in the case of (3) above, the status of the cache that has received the update notification is Owned or Shared.

【0082】(4−1)無効化通知を受け取ったキャッ
シュブロックは、当該キャッシュブロックを無効化(状
態をInvalidにする)し、メモリ108に無効化完了通
知を送る。
(4-1) The cache block that has received the invalidation notification invalidates the cache block (changes the state to Invalid) and sends an invalidation completion notification to the memory 108.

【0083】(5)キャッシュブロックから返信を受け
取ったメモリの説明 (5−1)各キャッシュブロックからの返信内容に応じ
て閾値Aをデクリメントするか判断する。
(5) Receiving a reply from the cache block
Description of the memory taken (5-1) It is determined whether or not the threshold value A is decremented according to the contents of a reply from each cache block.

【0084】(5−2)返信内容が無効化完了通知の場
合、閾値Aは変更しない。
(5-2) If the reply content is an invalidation completion notification, the threshold value A is not changed.

【0085】(5−3)返信内容が更新完了通知の場
合、閾値Aは更新しない。
(5-3) When the reply content is an update completion notification, the threshold A is not updated.

【0086】(5−4)返信内容が自己無効化通知の場
合、プロセッサ102からの参照頻度は低く、不要にな
ったキャッシュブロックが更新されていたということで
ある。そこで閾値Aをデクリメントし、一斉無効化をさ
れ易くする。
(5-4) If the reply content is a self-invalidation notification, it means that the reference frequency from the processor 102 is low and unnecessary cache blocks have been updated. Therefore, the threshold value A is decremented to make it easy to invalidate all at once.

【0087】(6)メモリから返信を受け取ったキャッ
シュブロックの説明 メモリ108へ書き込み要求を行うキャッシュブロック
201の状態はOwnedかSharedなので、メモリ108
からの返信を受け取るキャッシュブロックの状態もOwn
edかSharedとなる。
(6) The cache receiving the reply from the memory
Description of shblock Since the state of the cache block 201 that issues a write request to the memory 108 is Owned or Shared,
The status of the cache block that receives the reply from the owner is also Own.
It becomes ed or Shared.

【0088】(6−1)処理前の状態がOwnedの場合、
書き込み要求を送信する時、カウンタA204を0にし
てあるので、メモリ108から一斉無効化終了通知を受
け取るということはありえない。メモリ108から更新
終了通知を受け取ると処理を終える。
(6-1) When the state before the processing is Owned,
Since the counter A 204 is set to 0 when transmitting the write request, it is impossible to receive the simultaneous invalidation end notification from the memory 108. When the update completion notification is received from the memory 108, the process ends.

【0089】(6−2)処理前の状態がSharedで、メ
モリ108から一斉無効化終了通知を受け取った場合、
メモリ108側でオーナの切り替わりを判断したという
ことなので、このキャッシュブロックが新しいオーナ
(Modified)になり、処理を終える。
(6-2) When the state before the processing is Shared and the simultaneous invalidation end notification is received from the memory 108,
Since the change of the owner is determined on the memory 108 side, this cache block becomes the new owner (Modified), and the processing is completed.

【0090】(6−3)処理前の状態がSharedで、メ
モリ108から更新終了通知を受け取った場合、状態の
変更は無く、処理を終える。
(6-3) When the state before the processing is Shared and the update completion notification is received from the memory 108, the state is not changed, and the processing ends.

【0091】図17は、図16で説明した処理の中でキ
ャッシュブロックの状態M,O,E,S,Iの遷移のみ
を注目して図示したものであり、図中の実線矢印は、プ
ロセッサ102からの書き込みまたは読み出し要求、点
線矢印はネットワーク(相互結合網)を介したデータ更
新要求を示している。
FIG. 17 shows only the transitions of the states M, O, E, S, and I of the cache block in the processing described with reference to FIG. 16, and the solid arrows in FIG. A write or read request from 102 and a dotted arrow indicate a data update request via a network (interconnection network).

【0092】以上説明したように、本実施形態において
は、分散共有メモリ型の並列計算機システムにおいて、
各ノード101のメモリ108を所定の管理単位で複数
のメモリブロック301に分割すると共に、キャッシュ
メモリ106をメモリ108と同じ管理単位で複数のキ
ャッシュブロック201に分割し、メモリブロック30
1には、当該メモリブロック301のデータの写しが存
在するキャッシュブロック201を特定するディレクト
リ303とそのキャッシュブロック201の一斉無効化
を行なう上で基準となる閾値A304の格納領域を付加
し、キャッシュブロック201には、当該キャッシュブ
ロック201の更新回数を格納するカウンタA204を
付加し、同一ノード内のプロセッサ102によるキャッ
シュブロック201のデータの更新に際して、当該キャ
ッシュブロック201のカウンタA204の更新回数値
を更新した後、その更新回数値と当該キャッシュブロッ
ク201に対応するメモリブロック301の閾値A30
4とを比較し、更新回数値が閾値A304未満であれ
ば、当該キャッシュブロック201と同じデータの写し
を格納している他のキャッシュブロックの存在場所をデ
ィレクトリ303によって検出し、その検出したキャッ
シュブロックのデータをプロセッサ102から更新を受
けたキャッシュブロック201のデータと同一データに
更新し、更新回数値が閾値A304以上であれば、プロ
セッサ102から更新を受けたキャッシュブロック20
1のデータのみを更新し、かつ当該キャッシュブロック
201と同じデータの写しを格納している他のキャッシ
ュブロックのデータを一斉に無効化すると共に、当該キ
ャッシュブロック201の元データを格納しているメモ
リブロック301の閾値A304を一斉無効化処理が少
なくなる傾向の値に更新する処理を、プロセッサ102
によるキャッシュブロックのデータの更新操作毎に行な
い、更新型キャッシュプロトコルと一斉無効化型キャッ
シュプロトコルとを各キャッシュブロックへの更新頻度
に応じて動的に切り替えるようにしたため、更新型キャ
ッシュプロトコル向きのアプリケーションプログラムを
動作させた場合は、更新型キャッシュプロトコルが継続
し、無効化型キャッシュプロトコル向きのアプリケーシ
ョンプログラムを動作させた場合は、無効化型キャッシ
ュプロトコルが継続する。この結果、分散共有メモリ型
の並列計算機システムにおいて動作させているアプリケ
ーションプログラムのメモリアクセスの性質に左右され
ることなく、キャッシュメモリ106の機能を充分に発
揮させ、効率的なデータ処理を進めることができる。
As described above, in this embodiment, in the distributed shared memory type parallel computer system,
The memory 108 of each node 101 is divided into a plurality of memory blocks 301 in a predetermined management unit, and the cache memory 106 is divided into a plurality of cache blocks 201 in the same management unit as the memory 108.
1, a directory 303 for specifying a cache block 201 in which a copy of the data of the memory block 301 is present and a storage area for a threshold A 304 serving as a reference for simultaneously invalidating the cache block 201 are added. 201, a counter A204 for storing the number of updates of the cache block 201 is added, and when the processor 102 in the same node updates the data of the cache block 201, the update count value of the counter A204 of the cache block 201 is updated. Then, the update count value and the threshold value A30 of the memory block 301 corresponding to the cache block 201 are updated.
If the update count value is less than the threshold value A304, the directory 303 detects the location of another cache block storing a copy of the same data as the cache block 201, and the detected cache block Is updated to the same data as the data of the cache block 201 updated from the processor 102, and if the update count value is equal to or larger than the threshold value A304, the cache block 20 updated from the processor 102 is updated.
A memory that updates only one data, invalidates data of other cache blocks storing a copy of the same data as the cache block 201 at the same time, and stores original data of the cache block 201. The processor 102 updates the threshold value A304 of the block 301 to a value that tends to reduce the simultaneous invalidation processing.
Is performed for each update operation of data in the cache block, and the update cache protocol and the simultaneous invalidation cache protocol are dynamically switched according to the update frequency of each cache block. When the program is operated, the update cache protocol is continued, and when the application program for the invalidated cache protocol is operated, the invalidated cache protocol is continued. As a result, the function of the cache memory 106 can be fully exhibited and efficient data processing can be advanced without being affected by the nature of memory access of an application program operated in the distributed shared memory type parallel computer system. it can.

【0093】さらに、キャッシュブロック201のそれ
ぞれに当該キャッシュブロック201に対する自ノード
または他ノードのメモリ108からの連続更新回数を格
納するカウンタB205を付加し、このカウンタB20
5の連続更新回数値を自ノードまたは他ノードのメモリ
108からのデータ更新要求毎に更新した後、その連続
更新回数値とキャッシュブロック共通に定めた閾値B2
06と比較し、連続更新回数値が閾値B206以上であ
れば、当該キャッシュブロック201の元データを格納
しているメモリブロック301の閾値A304を一斉無
効化処理が多くなる傾向の値に更新するようにしたた
め、更新型キャッシュプロトコルで動作が継続していた
としても、プロセッサ102からの更新頻度が少なくな
れば、閾値Aがデクレメントされ、無効化型プロトコル
向きの振る舞いに戻るようになり、最終的には、アプリ
ケーションプログラムのメモリアクセスの状態に適した
キャッシュプロトコルで動作するようになる。
Further, a counter B205 for storing the number of continuous updates from the memory 108 of the own node or another node to the cache block 201 is added to each of the cache blocks 201.
5 is updated for each data update request from the memory 108 of the own node or another node, and the continuous update count value and a threshold value B2 commonly set for the cache block.
Compared to 06, if the continuous update count value is equal to or greater than the threshold B206, the threshold A304 of the memory block 301 storing the original data of the cache block 201 is updated to a value that tends to increase the number of simultaneous invalidation processes. Therefore, even if the operation is continued with the update type cache protocol, if the update frequency from the processor 102 decreases, the threshold value A is decremented, and the behavior returns to the invalidation type protocol. In this case, an operation is performed using a cache protocol suitable for the state of memory access of the application program.

【0094】また、プロセッサからの参照回数が少なく
なったキャッシュブロックが増加するのが防止され、更
新パケットの送受に伴うネットワーク負荷を軽減するこ
とが可能になる。
Further, it is possible to prevent an increase in the number of cache blocks in which the number of references from the processor has been reduced, and to reduce the network load involved in sending and receiving update packets.

【0095】なお、上記実施形態においては、閾値Bを
複数のキャッシュブロックに共通して設定しているが、
キャッシュブロック別に設定するようにしてもよい。こ
のようにすることにより、アプリケーションプログラム
のメモリアクセスの性質にさらに適したキャッシュプロ
トコルで動作させることが可能になる。
In the above embodiment, the threshold value B is set in common for a plurality of cache blocks.
It may be set for each cache block. This makes it possible to operate with a cache protocol that is more suitable for the nature of memory access of the application program.

【0096】また、キャッシュブロックの更新回数を格
納するカウンタA204は、各キャッシュブロック20
1内に設けているが、メモリブロック301内に設ける
ことができる。カウンタA204をメモリブロック30
1内に設ける場合、書き込みを行なっているキャッシュ
を判別するためのポインタを付加する。図18は、カウ
ンタA204をメモリブロック301内に設けた場合の
動作の概要を示す図であり、プロセッサ102からキャ
ッシュブロック201にデータの書き込み要求があった
場合、キャッシュブロック201の当該データを更新す
ると共に、当該キャッシュブロック201に対応するメ
モリブロック301には、更新されたデータのみを書き
込み要求として送る。これに対し、書き込み要求を受け
たメモリブロック301は、書き込み要求を行なったキ
ャッシュブロック201がポインタ305に格納されて
いるキャッシュブロックと同じであるか否かをチェック
し、同じである場合は、ポインタ305の内容をそのま
まにしておき、カウンタA306をインクリメント
(「+1」)し、閾値Aと比較する。しかし、ポインタ
305に格納されているキャッシュブロックと書き込み
要求を行なったキャッシュブロックとが異なっている場
合は、ポインタ305の内容を書き込み要求を行なった
キャッシュブロックの識別子に変更し、カウンタA30
6を「0」クリアしてから「1」にインクリメントし、
閾値A304と比較する。ここで、カウンタA306
は、直接「1」にインクリメントしても構わない。ま
た、ポインタ305は、どのキャッシュブロックがコピ
ーデータを持つかを示す存在場所情報(ディレクトリ)
に含ませても構わない。
The counter A 204 for storing the number of updates of the cache block is stored in each cache block 20.
1, but can be provided in the memory block 301. The counter A204 is stored in the memory block 30.
In the case where it is provided in 1, a pointer for determining the cache that is performing writing is added. FIG. 18 is a diagram showing an outline of the operation when the counter A 204 is provided in the memory block 301. When the processor 102 issues a data write request to the cache block 201, the data in the cache block 201 is updated. At the same time, only the updated data is sent to the memory block 301 corresponding to the cache block 201 as a write request. On the other hand, the memory block 301 that has received the write request checks whether the cache block 201 that has issued the write request is the same as the cache block stored in the pointer 305. The content of 305 is left as it is, and the counter A 306 is incremented (“+1”) and compared with the threshold value A. However, if the cache block stored in the pointer 305 is different from the cache block that made the write request, the contents of the pointer 305 are changed to the identifier of the cache block that made the write request, and the counter A30 is changed.
6 is cleared to "0" and then incremented to "1".
Compare with threshold A304. Here, the counter A306
May be directly incremented to “1”. The pointer 305 indicates location information (directory) indicating which cache block has copy data.
May be included.

【0097】一方、前述の実施形態において、閾値Aは
一斉無効化を行なうタイミング(カウンタA≧閾値Aの
条件成立時)でインクリメントし、次回の一斉無効化を
行われにくくしている。これは、一斉無効化されたキャ
ッシュブロックが再度同一メモリブロックに対して参照
要求を行なうことは、このメモリブロックに対する参照
頻度が高いと推定しているからである。しかし、一斉無
効化されたキャッシュブロックが再度同一メモリブロッ
クを参照した場合でも、初めて参照要求を行なったキャ
ッシュブロックの場合でも、同じように閾値Aはインク
リメントされてしまう。そこで、一斉無効化が行われた
キャッシュブロックが参照要求を行なった場合にのみ、
閾値Aをインクリメントし、参照頻度の高いキャッシュ
ブロックからの参照要求とその他のキャッシュブロック
からの参照要求とを区別して扱う必要がある。
On the other hand, in the above-described embodiment, the threshold value A is incremented at the timing of performing the simultaneous invalidation (when the condition of the counter A ≧ the threshold value A is satisfied), thereby making it difficult to perform the next simultaneous invalidation. This is because, when a cache block that has been invalidated simultaneously makes a reference request to the same memory block again, it is estimated that the frequency of reference to this memory block is high. However, the threshold value A is similarly incremented whether the simultaneously invalidated cache block refers to the same memory block again or the cache block for which the reference request has been made for the first time. Therefore, only when the cache block that has been invalidated makes a reference request,
It is necessary to increment the threshold value A so that a reference request from a cache block with high reference frequency and a reference request from another cache block are handled separately.

【0098】図19および図20は、そのための方法を
示す概要図である。まず、図19(a)に示すように、
メモリブロック301には当該メモリブロック301の
データ1901のコピーを持つキャッシュブロックのデ
ィレクトリ1902が設けられ、さらに、このディレク
トリ1902の複製1903と閾値A304の格納領域
が設けられている。
FIGS. 19 and 20 are schematic diagrams showing a method for that. First, as shown in FIG.
The memory block 301 is provided with a cache block directory 1902 having a copy of the data 1901 of the memory block 301, and further provided with a copy 1903 of the directory 1902 and a storage area for the threshold value A304.

【0099】図19(a)の状態は、メモリブロック3
01のデータ1901のコピーをキャッシュブロック2
01−1と201−3とが持っていることをディレクト
リ1902で示している。この状態で、一斉無効化が行
われた場合、図19(b)に示すように、キャッシュブ
ロック201−1と201−3のコピーデータは無効化
される。この時、ディレクトリ1902の内容をディレ
クトリ複製1903にコピーしておく。すなわち、一斉
無効化が行われると、ディレクトリ1902がクリアさ
れてしまい、どのキャッシュブロックがコピーを持って
いたかが分からなくなってしまうため、一斉無効化を行
なった際に、ディレクトリ1902のコピーをディレク
トリ複製1903として作成しておく。
FIG. 19A shows the state of the memory block 3
01 is copied to cache block 2
The directory 1902 indicates that the files 01-1 and 201-3 have. When the simultaneous invalidation is performed in this state, the copy data of the cache blocks 201-1 and 201-3 is invalidated as shown in FIG. At this time, the contents of the directory 1902 are copied to the directory copy 1903. That is, when the simultaneous invalidation is performed, the directory 1902 is cleared, and it becomes impossible to know which cache block has the copy. Therefore, when the simultaneous invalidation is performed, the copy of the directory 1902 is copied to the directory copy 1903. Create it as

【0100】この状態で、いずれかのキャッシュブロッ
クが図19(b)のメモリブロック301に対し参照要
求を出した場合、ディレクトリ複製1903を参照し、
参照要求を出したキャッシュブロックが前回コピーを持
っていないキャッシュブロックであれば、ディレクトリ
複製1903および閾値Aはそのままにしておく。図2
0(a)に前回コピーを持っていないキャッシュブロッ
ク201−2が参照要求を出した場合を示している。し
かし、一斉無効化処理の後に参照要求を行なったキャッ
シュブロックが前回コピーを持っていたキャッシュブロ
ックであった場合(図19の例では、キャッシュブロッ
ク201−1または201−3であった場合)、図20
(b)に示すように閾値A304をインクリメントして
「2」に更新し、さらにディレクトリ1902を更新し
た後、ディレクトリ複製1903をクリアする。このよ
うにすることによって、参照頻度の高いキャッシュブロ
ックからの参照要求がある場合のみ、閾値A304を上
げることができる。
In this state, if any cache block issues a reference request to the memory block 301 in FIG.
If the cache block that issued the reference request is a cache block having no previous copy, the directory copy 1903 and the threshold A are left as they are. FIG.
0 (a) shows a case where the cache block 201-2 which has no previous copy has issued a reference request. However, if the cache block that made the reference request after the simultaneous invalidation processing is the cache block having the previous copy (in the example of FIG. 19, it is the cache block 201-1 or 201-3) FIG.
As shown in (b), the threshold A 304 is incremented and updated to “2”, and after the directory 1902 is updated, the directory copy 1903 is cleared. By doing so, the threshold A304 can be increased only when there is a reference request from a cache block with a high reference frequency.

【0101】[0101]

【発明の効果】本発明は、以上説明したように、キャッ
シュメモリを複数アドレスから成る複数のキャッシュブ
ロックに分割し、各キャッシュブロックの更新頻度をカ
ウントし、そのカウント結果に基づいてデータの一貫性
を保つためのキャッシュプロトコルを更新型向きから無
効化型向きへ、または無効化型向きから更新型向きへ動
的に変化させるように動的にキャッシュプロトコルを切
り替えるようにしたため、更新型キャッシュプロトコル
向きのアプリケーションプログラムを動作させた場合
は、更新型キャッシュプロトコルが継続し、無効化型キ
ャッシュプロトコル向きのアプリケーションプログラム
を動作させた場合は、無効化型キャッシュプロトコルが
継続する。この結果、分散共有メモリ型の並列計算機シ
ステムにおいて動作させているアプリケーションプログ
ラムのメモリアクセスの性質に左右されることなく、キ
ャッシュメモリの機能を充分に発揮させ、効率的なデー
タ処理を進めることができる。
As described above, according to the present invention, the cache memory is divided into a plurality of cache blocks each having a plurality of addresses, the update frequency of each cache block is counted, and the data consistency is determined based on the count result. Cache protocol to dynamically change the cache protocol to keep the cache protocol from the update type to the invalidation type or from the invalidation type to the update type dynamically. When the application program is operated, the update cache protocol is continued, and when the application program suitable for the invalidation cache protocol is operated, the invalidation cache protocol is continued. As a result, the function of the cache memory can be fully exhibited and efficient data processing can be advanced without being affected by the nature of the memory access of the application program operated in the distributed shared memory type parallel computer system. .

【0102】また、更新型キャッシュプロトコルで動作
が継続していたとしても、プロセッサからの更新頻度が
少なくなれば、閾値Aがデクレメントされ、無効化型プ
ロトコル向きの振る舞いに戻るようになり、最終的に
は、アプリケーションプログラムのメモリアクセスの状
態に適したキャッシュプロトコルで動作するようにな
り、プロセッサからの参照回数が少なくなったキャッシ
ュブロックが増加するのが防止され、更新パケットの送
受に伴うネットワーク負荷を軽減することが可能になる
などの効果が得られる。
Even if the operation is continued by the update type cache protocol, if the update frequency from the processor decreases, the threshold value A is decremented, and the behavior returns to the invalidation type protocol. Specifically, it operates with a cache protocol suitable for the memory access state of the application program, prevents an increase in the number of cache blocks whose number of references from the processor has been reduced, and reduces the network load associated with sending and receiving update packets. The effect that it becomes possible to reduce is obtained.

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

【図1】本発明のキャッシュ制御方法を適用した並列計
算機システムの実施形態を示すブロック構成図である。
FIG. 1 is a block diagram showing an embodiment of a parallel computer system to which a cache control method of the present invention is applied.

【図2】本発明で用いられるキャッシュメモリの構成を
示す図である。
FIG. 2 is a diagram showing a configuration of a cache memory used in the present invention.

【図3】本発明で用いられるメモリの構成を示す図であ
る。
FIG. 3 is a diagram showing a configuration of a memory used in the present invention.

【図4】キャッシュブロックの状態ビットとキャッシュ
ブロックの状態の関係を示す図である。
FIG. 4 is a diagram illustrating a relationship between a cache block status bit and a cache block status;

【図5】メモリブロックのディレクトリの構成の例を示
す図である。
FIG. 5 is a diagram illustrating an example of a configuration of a directory of a memory block.

【図6】メモリブロックのディレクトリの構成の他の例
を示す図である。
FIG. 6 is a diagram showing another example of the configuration of the directory of the memory block.

【図7】本発明のキャッシュメモリ制御方法の概要を説
明する図である。
FIG. 7 is a diagram illustrating an overview of a cache memory control method according to the present invention.

【図8】キャッシュブロックに対しプロセッサから書き
込み要求が発生したときの処理の流れを示すフローチャ
ートである。
FIG. 8 is a flowchart showing a processing flow when a write request is issued from a processor to a cache block.

【図9】キャッシュブロックに対しプロセッサから読み
込み要求が発生したときの処理の流れを示すフローチャ
ートである。
FIG. 9 is a flowchart showing a processing flow when a read request is issued from a processor to a cache block;

【図10】メモリに対するキャッシュブロックからの書
き込みの処理の流れを示すフローチャートである。
FIG. 10 is a flowchart showing a flow of processing of writing from a cache block to a memory.

【図11】キャッシュブロックからの書き込み要求を受
けたメモリの処理の流れを示すフローチャートである。
FIG. 11 is a flowchart showing the flow of processing of a memory that has received a write request from a cache block.

【図12】メモリから更新通知を受けたキャッシュブロ
ックの処理の流れを示すフローチャートである。
FIG. 12 is a flowchart illustrating a flow of processing of a cache block that has received an update notification from a memory;

【図13】キャッシュブロックに対しデータの書き込み
要求が生じた場合の更新処理の概要を示す説明図であ
る。
FIG. 13 is an explanatory diagram showing an outline of an update process when a data write request is issued to a cache block.

【図14】キャッシュブロックに書き込みが生じ、メモ
リからの一斉無効化処理が行なわれた場合の説明図であ
る。
FIG. 14 is a diagram illustrating a case where a write occurs in a cache block and a simultaneous invalidation process from a memory is performed;

【図15】メモリからの更新通知を受けた場合にキャッ
シュブロックの自己無効化処理が行われる場合の説明図
である。
FIG. 15 is an explanatory diagram of a case where a cache block self-invalidation process is performed when an update notification is received from a memory;

【図16】キャッシュメモリの状態別の動作をまとめて
示した図である。
FIG. 16 is a diagram collectively showing the operation of each state of the cache memory.

【図17】キャッシュメモリの状態遷移を示す図であ
る。
FIG. 17 is a diagram showing a state transition of the cache memory.

【図18】カウンタAをメモリブロック内に設ける場合
の説明図である。
FIG. 18 is an explanatory diagram when a counter A is provided in a memory block.

【図19】閾値Aの更新の仕方の他の例を示す説明図で
ある。
FIG. 19 is an explanatory diagram showing another example of how to update the threshold value A.

【図20】図19の続きを示す説明図である。FIG. 20 is an explanatory view showing a continuation of FIG. 19;

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

101…ノード、102…プロセッサ、103…キャッ
シュコントローラ、104…ネットワークインターフェ
ース、105…相互結合網、106…キャッシュメモ
リ、107…メモリ制御装置、108…メモリ、201
…キャッシュブロック、202…ワード、203…状態
ビット、204…カウンタA、205…カウンタB、2
06…閾値B、301…メモリブロック、303…ディ
レクトリ、304…閾値A。
101: node, 102: processor, 103: cache controller, 104: network interface, 105: interconnection network, 106: cache memory, 107: memory controller, 108: memory, 201
... Cache block, 202 ... Word, 203 ... Status bit, 204 ... Counter A, 205 ... Counter B, 2
06: threshold B, 301: memory block, 303: directory, 304: threshold A

───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐藤 充 東京都足立区千住4丁目29番地13号 山本 荘8号室 (72)発明者 井上 直樹 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウェアエンジニアリング株式会 社内 Fターム(参考) 5B005 JJ13 KK02 KK13 KK22 MM01 NN31 NN43 NN45 PP21 UU41 VV02 VV21 5B045 DD02 DD12 DD13  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Mitsuru Sato 4-29-13 Senju, Adachi-ku, Tokyo Room 8 Room Sozo Yamamoto Room (72) Inventor Naoki 6-81 Onoecho, Naka-ku, Yokohama City, Kanagawa Prefecture Hitachi Software, Inc. Engineering Stock Association In-house F-term (reference) 5B005 JJ13 KK02 KK13 KK22 MM01 NN31 NN43 NN45 PP21 UU41 VV02 VV21 5B045 DD02 DD12 DD13

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサ、メモリおよびキャッシュメ
モリをそれぞれ備えた複数のノードを相互結合網を介し
て結合し、各ノードのメモリは1つの共有メモリ空間で
管理される分散共有メモリ型の並列計算機システムにお
けるキャッシュメモリ制御方法であって、 前記メモリを所定の管理単位で複数のメモリブロックに
分割すると共に、前記キャッシュメモリを前記メモリと
同じ管理単位で複数のキャッシュブロックに分割し、 前記メモリブロックには、当該メモリブロックのデータ
の写しが存在するキャッシュブロックを特定する存在場
所情報とそのキャッシュブロックの一斉無効化を行なう
上で基準となる閾値Aの格納領域を付加し、 前記キャッシュブロックには、当該キャッシュブロック
の更新回数を格納するカウンタ領域を付加し、 同一ノード内のプロセッサによるキャッシュブロックの
データの更新に際して、当該キャッシュブロックの前記
カウンタ領域の更新回数値を更新した後、その更新回数
値と当該キャッシュブロックに対応するメモリブロック
の閾値Aとを比較し、 更新回数値が閾値A未満であれば、当該キャッシュブロ
ックと同じデータの写しを格納している他のキャッシュ
ブロックの存在場所を前記存在場所情報によって検出
し、その検出したキャッシュブロックのデータを前記プ
ロセッサから更新を受けたキャッシュブロックのデータ
と同一データに更新し、 更新回数値が閾値A以上であれば、前記プロセッサから
更新を受けたキャッシュブロックのデータのみを更新
し、かつ当該キャッシュブロックと同じデータの写しを
格納している他のキャッシュブロックのデータを一斉に
無効化すると共に、当該キャッシュブロックの元データ
を格納しているメモリブロックの閾値Aを一斉無効化処
理が少なくなる傾向の値に更新する処理を、前記プロセ
ッサによるキャッシュブロックのデータの更新操作毎に
行ない、更新型キャッシュプロトコルと一斉無効化型キ
ャッシュプロトコルとを各キャッシュブロックへの更新
頻度に応じて動的に切り替えることを特徴とするキャッ
シュメモリ制御方法。
1. A distributed shared memory type parallel computer system in which a plurality of nodes each having a processor, a memory, and a cache memory are connected via an interconnection network, and the memory of each node is managed by one shared memory space. Wherein the memory is divided into a plurality of memory blocks in a predetermined management unit, and the cache memory is divided into a plurality of cache blocks in the same management unit as the memory. A location area for specifying a cache block in which a copy of the data of the memory block exists, and a storage area for a threshold value A serving as a reference for simultaneously invalidating the cache block; Added a counter area to store the number of cache block updates When updating the data of the cache block by the processor in the same node, after updating the update count value of the counter area of the cache block, the update count value is compared with the threshold value A of the memory block corresponding to the cache block. If the update count value is less than the threshold value A, the location of another cache block storing a copy of the same data as that of the cache block is detected based on the location information, and the data of the detected cache block is detected. When the update count value is equal to or greater than the threshold value A, only the data of the cache block updated from the processor is updated, and the cache block is updated to the same data as the data of the cache block updated from the processor. Other caches containing a copy of the same data The process of simultaneously invalidating the data of the block and updating the threshold value A of the memory block storing the original data of the cache block to a value that tends to reduce the simultaneous invalidation process is performed by the processor. A cache memory control method which is performed for each data update operation and dynamically switches between an update cache protocol and a simultaneous invalidation cache protocol in accordance with the update frequency of each cache block.
【請求項2】 前記キャッシュブロックに当該キャッシ
ュブロックに対する自ノードまたは他ノードのメモリか
らの連続更新回数を格納する第2のカウンタ領域を付加
し、この第2のカウンタ領域の連続更新回数値を自ノー
ドまたは他ノードのメモリからのデータ更新要求毎に更
新した後、その連続更新回数値とメモリブロック別また
は全キャッシュブロック共通に定めた閾値Bと比較し、
参照回数値が閾値B以上であれば、当該キャッシュブロ
ックのデータを自己無効化し、かつ当該キャッシュブロ
ックの元データを格納しているメモリブロックの閾値A
を一斉無効化処理が多くなる傾向の値に更新することを
特徴とする請求項1記載のキャッシュメモリ制御方法。
2. A second counter area for storing the number of continuous updates of the cache block from the memory of the own node or another node is added to the cache block. After updating for each data update request from the memory of the node or another node, the continuous update count value is compared with a threshold value B defined for each memory block or common to all cache blocks,
If the reference count value is equal to or larger than the threshold value B, the data of the cache block is self-invalidated, and the threshold value A of the memory block storing the original data of the cache block is stored.
2. The cache memory control method according to claim 1, wherein is updated to a value that tends to increase the simultaneous invalidation processing.
【請求項3】 前記カウンタ領域の更新回数値を同一ノ
ードおよび他のノードからの更新要求を受けた場合にク
リアすることを特徴とする請求項1または2記載のキャ
ッシュメモリ制御方法。
3. The cache memory control method according to claim 1, wherein the update count value of the counter area is cleared when an update request is received from the same node and another node.
【請求項4】 一斉無効化されたキャッシュブロックが
再び同一メモブロックに対して参照要求を行なった場合
にも、当該キャッシュブロックの元データを格納してい
るメモリブロックの閾値Aを一斉無効化処理が少なくな
る傾向の値に更新することを特徴とする請求項1〜3記
載のいずれかのキャッシュメモリ制御方法。
4. A process for simultaneously invalidating a threshold value A of a memory block storing original data of the cache block even when the simultaneously invalidated cache block makes a reference request to the same memo block again. 4. The cache memory control method according to claim 1, wherein the cache memory is updated to a value that tends to decrease.
【請求項5】 前記キャッシュブロックの更新回数を格
納するカウンタ領域を、当該キャッシュブロックに対応
するメモリブロックに設けることを特徴とする請求項1
〜4記載のいずれかのキャッシュメモリ制御方法。
5. The memory device according to claim 1, wherein a counter area for storing the number of updates of the cache block is provided in a memory block corresponding to the cache block.
5. The cache memory control method according to any one of claims 4 to 4.
【請求項6】 前記第2のカウンタ領域の連続更新回数
値を、自ノードのプロセッサからの参照要求時にクリア
することを特徴とする請求項2記載のキャッシュメモリ
制御方法。
6. The cache memory control method according to claim 2, wherein the continuous update count value of the second counter area is cleared upon a reference request from a processor of the own node.
JP10175473A 1998-06-23 1998-06-23 Cache memory control method Pending JP2000010862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10175473A JP2000010862A (en) 1998-06-23 1998-06-23 Cache memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10175473A JP2000010862A (en) 1998-06-23 1998-06-23 Cache memory control method

Publications (1)

Publication Number Publication Date
JP2000010862A true JP2000010862A (en) 2000-01-14

Family

ID=15996681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10175473A Pending JP2000010862A (en) 1998-06-23 1998-06-23 Cache memory control method

Country Status (1)

Country Link
JP (1) JP2000010862A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011078014A1 (en) * 2009-12-21 2011-06-30 ソニー株式会社 Cache memory and cache memory control device
WO2014019133A1 (en) * 2012-07-31 2014-02-06 Empire Technology Development Llc Parting data to improve system performance

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011078014A1 (en) * 2009-12-21 2011-06-30 ソニー株式会社 Cache memory and cache memory control device
CN102667737A (en) * 2009-12-21 2012-09-12 索尼公司 Cache memory and cache memory control device
US9535841B2 (en) 2009-12-21 2017-01-03 Sony Corporation Cache memory and cache memory control unit
US10102132B2 (en) 2009-12-21 2018-10-16 Sony Corporation Data transfer in a multiprocessor using a shared cache memory
WO2014019133A1 (en) * 2012-07-31 2014-02-06 Empire Technology Development Llc Parting data to improve system performance
CN104508636A (en) * 2012-07-31 2015-04-08 英派尔科技开发有限公司 Parting data to improve system performance
US9792313B2 (en) 2012-07-31 2017-10-17 Empire Technology Development Llc Parting data to improve system performance
CN104508636B (en) * 2012-07-31 2017-10-31 英派尔科技开发有限公司 Data management apparatus, system and method

Similar Documents

Publication Publication Date Title
KR100548908B1 (en) Method and apparatus for centralized snoop filtering
EP1316019B1 (en) Managing replacement of data in a cache on a node based on caches of other nodes
US7032078B2 (en) Shared memory multiprocessing system employing mixed broadcast snooping and directory based coherency protocols
US5604882A (en) System and method for empty notification from peer cache units to global storage control unit in a multiprocessor data processing system
US8402225B2 (en) Method for performing cache coherency in a computer system
KR100324975B1 (en) Non-uniform memory access(numa) data processing system that buffers potential third node transactions to decrease communication latency
AU2001289180A1 (en) Managing replacement of data in a cache on a node based on caches of other nodes
JPH1185710A (en) Server device and file management method
US20090094418A1 (en) System and method for achieving cache coherency within multiprocessor computer system
US9465743B2 (en) Method for accessing cache and pseudo cache agent
US20210224189A1 (en) Data prefetching method and apparatus
US7174437B2 (en) Memory access management in a shared memory multi-processor system
US20050120134A1 (en) Methods and structures for a caching to router in iSCSI storage systems
US7725660B2 (en) Directory for multi-node coherent bus
US7669013B2 (en) Directory for multi-node coherent bus
TWI753093B (en) Forwarding responses to snoop requests
JP2000010862A (en) Cache memory control method
JP7328742B2 (en) Responding to Snoop Requests
US20230100746A1 (en) Multi-level partitioned snoop filter
US6859863B1 (en) Method and system for managing data at an input/output interface for a multiprocessor system
KR100431511B1 (en) Global buffer management method capable of distributing loads in cluster systems
US9110853B2 (en) Computer system with multiple classes of device IDs
JP2000172656A (en) Data consistency maintenance control method for multiprocessor system
JPH06149672A (en) Coherence control system for cache