JPH0340412B2 - - Google Patents
Info
- Publication number
- JPH0340412B2 JPH0340412B2 JP60006836A JP683685A JPH0340412B2 JP H0340412 B2 JPH0340412 B2 JP H0340412B2 JP 60006836 A JP60006836 A JP 60006836A JP 683685 A JP683685 A JP 683685A JP H0340412 B2 JPH0340412 B2 JP H0340412B2
- Authority
- JP
- Japan
- Prior art keywords
- buffer memory
- mbs
- block
- data
- lbs
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
〔産業上の利用分野〕
本発明は、主記憶装置の一部のコピーを有する
第2のバツフアメモリ(MBS)と、該第2のバ
ツフアメモリ(MBS)の一部のコピー、又は該
第2のバツフアメモリ(MBS)にない主記憶装
置の一部のコピーを有する第1のバツフアメモリ
(LBS)とを備えた2階層のバツフアメモリシス
テムを有する計算機システムにおける、上記第2
のバツフアメモリ(MBS)のリプレイスメント
方式に関する。
最近の大型の計算機システムにおいては、中央
処理装置(CPU)と主記憶装置(MSU)との間
に、容量は小さいが高速のバツフアメモリ(BS)
を設けて、主記憶装置(MSU)に対する平均的
なアクセスタイムを短縮させる方式を採つている
のが一般的である。
然して、最近のハードウエアテクノロジの著し
い進歩に伴つて、中央処理装置(CPU)の演算
部は益々高速化される動向にあるが、主記憶装置
(MSU)の方は大容量化の方向に進んでいる為、
余り高速化されないのが現状である。
そこで、上記バツフアメモリ(BS)も、該演
算部の速度に合わせて高速化されると共に大容量
化も図られているが、主記憶装置(MSU)の大
容量化に比較すると、その差は短縮されない状況
にある。
上記の問題を解決する手段として、中速、大容
量のバツフアメモリ(BS)を、第2のバツフア
メモリ(MBS)として、上記高速、小容量のバ
ツフアメモリ(BS){これを、第1のバツフアメ
モリ(LBS)と云う}と主記憶装置(MSU)と
の間に介在させる、所謂2階層構成のバツフアメ
モリ方式が知られている。以下、それぞれを第2
のBS、第1のBSと呼ぶことにする。
このようなバツフアメモリシステムにおいて、
問題となるのが、上記第2のBSにおけるリプレ
イスである。
特に、第2のBSのブロツクサイズ>第1のBS
のブロツクサイズであつて、且つその差が整数倍
の時、第1のBSと、第2のBSのリプレイスブロ
ツクの決定を互いに独立に行うと、主記憶装置
(MSU)から、第2のBSにムーブインしたデー
タを使い切らない(具体的には、第1のBSに転
送されない)内に、第2のBSにおいてリプレイ
スされてしまう等の問題がある。
そこで、第1のBSのリプレイス動作と、第2
のBSのリプレイス動作との間に、ある相関関係
を持たせるようにすることにより、効果的なリプ
レイス方式が期待できる。
〔従来の技術〕
先ず、第3図によつて、一般の2階層のバツフ
アメモリ(BS)を含む計算機システムの概念を
説明する。
本図において、1は演算装置、2は第1のBS
(LBS)、3は第2のBS(MBS)、4は主記憶装置
(MSU)である。
このような計算機システムにおいて、第1の
BS(LBS)1と、第2のBS(MBS)2の両方に、
演算装置1が必要とするデータが存在しない時に
は、主記憶装置(MSU)4より第1のBS(LBS)
1と、第2のBS(MBS)2の両方に、対応する
ブロツク分だけデータをブロツク転送し、演算装
置1には第1のBS(LBS)2より必要なデータを
転送するように動作する。
若し、第1のBS(LBS)2のデータが存在しな
いで、第2のBS(MBS)3にデータが存在する
時は、該第2のBS(MBS)3から当該データブ
ロツクが第1のBS(LBS)2にブロツク転送さ
れ、更に第1のBS(LBS)2より演算装置1に必
要なデータが転送される。
第4図に、2階層のバツフアメモリと、主記憶
装置(MSU)からなる3階層のメモリシステム
の1構成例を示す。
本構成例においては、第1のBS(LBS)2のブ
ロツクサイズは32バイト、第2のBS(MBS)3
のブロツクサイズは、第1のBS(LBS)2のブロ
ツクサイズの4倍からなる128バイトブロツクで
あり、第1のBS(LBS)2、第2のBS(MBS)
共に、連想度(ウエイ数)はウエイ0〜ウエイ3
の4レベルで構成されている。
若し、第1のBS(LBS)2、第2のBS(MBS)
3共に、必要とするデータが存在しない時、最初
に第1のBS(LBS)2が要求している32バイトの
データが、主記憶装置(MSU)4よりブロツク
転送され、第1のBS(LBS)2、第2のBS
(MBS)3の両方に登録される。この時、登録さ
れるウエイは、第1のBS(LBS)2、第2のBS
(MBS)3共に同じウエイであることもあるし、
別々のウエイになることもある。
続いて、第2のBS(MBS)3の128バイトブロ
ツクの内、残りの96バイトが、32バイト×3回に
分割されて、主記憶装置(MSU)4からブロツ
ク転送され、第2のBS(MBS)3に登録される。
又、第1のBS(LBS)2にデータがなく、第2
のBS(MBS)3にデータが存在する場合には、
該第1のBS(LBS)2が要求している32バイトの
データが、第2のBS(MBS)3より読み出され、
第1のBS(LBS)2に転送される。
このような、従来の2階層のバツフアメモリシ
ステムにおいて、上記データ転送(ムーブイン)
が行われる時、最も古いデータブロツクを追い出
す所謂LRU方式を、第1のBS(LBS)2、第2
のBS(LBS)3において、それぞれ独自に行つて
いた。
〔発明が解決しようとする問題点〕
従つて、従来方式においては、例えば第1の
BS(LBS)2よりリプレイスされたブロツクを、
第2のBS(MBS)3のブロツクが含んでいる場
合でも、該ブロツクが第2のBS(MBS)3より
リプレイスされなかつたり、逆に主記憶装置
(MSU)4から第2のBS(MBS)3にムーブイ
ンされたデータブロツクを、第1のBS(LBS)2
が使い切らない内に、当該第2のBS(MBS)3
においてリプレイスされてしまうことがあり、第
2のBS(MBS)3の使用効率が悪くなる場合が
多かつた。
本発明は上記従来の欠点に鑑み、プログラム実
行時のアドレス分布の局所性に着目し、記憶装置
に対するアクセスは、ある連続したエリアに対し
て、時間的にも、ある程度連続して発生すると云
う特徴を考慮し、第1のBS(LBS)2におけるリ
プレイス動作と、第2のBS(MBS)3における
リプレイス動作にある相関をもたせるようにし
て、第2のBS(MBS)3での使用効率を向上さ
せるリプレイス方式を提供することを目的とする
ものである。
〔問題点を解決するための手段〕
この目的は、
第2のバツフアメモリ(MBS)に、該バツ
フアメモリのブロツクを第1のバツフアメモリ
(LBS)のブロツクサイズに分割した各サブブ
ロツクの内容が、第1のバツフアメモリ
(LBS)に転送されたことを示すnビツトのコ
ピービツトを、第2のバツフアメモリ(MBS)
の各ブロツク毎に設け、第2のバツフアメモリ
(MBS)にリプレイスの必要が生じた時、該リ
プレイスの候補となるm個(mは、第2のバツ
フアメモリの連想レベル数)のブロツクの内
で、上記コピービツトを参照して、該ブロツク
の総てのサブブロツクの内容が、上記第1のバ
ツフアメモリ(LBS)に転送されたことを示
すものがあれば、優先的にそのブロツクをリプ
レイスの対象とするように制御する。
第1のバツフアメモリ(LBS)から、ある
ブロツクをリプレイスする時には、該リプレイ
スの対象ブロツクのアドレス情報を第2のバツ
フアメモリ(MBS)に送信する手段を設け、
上記第2のバツフアメモリ(MBS)にもデー
タがなくて、該第2のバツフアメモリ(MBS)
でのリプレイス対象となるブロツクの内、何れ
か1つのブロツクが、上記送信されたアドレス
を含んでいるかどうかを検出する比較器を、該
第2のバツフアメモリ(MBS)制御回路に設
け、該第2のバツフアメモリ(MBS)のリプ
レイスブロツクを決定する際に、上記第1のバ
ツフアメモリ(LBS)から送信されてきたア
ドレスを含むブロツクが、上記比較器で検出さ
れた時には、該ブロツクをリプレイスし、該送
信されてきたアドレスを含むブロツクが検出さ
れなかつた時には、LRU方式によつてリプレ
イスすべきブロツクを決定する。
本発明のバツフアメモリにおけるリプレイス方
式によつて達成される。
〔作用〕
即ち、本発明によれば、第1のBS(LBS)の記
憶容量<第2のBS(MBS)の記憶容量で、第2
のBS(MBS)のブロツクサイズが、第1のBS
(LBS)のブロツクサイズの整数倍となつてい
る、2階層のバツフアメモリシステムを備えた計
算機システムにおいて、
(1) 第2のBS(MBS)から第1のBS(LBS)に
コピーされたサブブロツクを記憶するコピーメ
モリを設け、第2のBS(MBS)においてリプ
レイスが必要になつた時、第1のBS(LBS)に
総てのサブブロツクがコピーされたブロツクを
優先的にリプレイスする。
(2) 第1のBS(LBS)におけるリプレイスアドレ
ス(サブブロツクアドレス)を記憶しておき、
第2のBS(MBS)でリプレイスが必要になつ
た時、上記サブブロツクを含むブロツクがある
と、当該ブロツクを優先的にリプレイスする。
(3) (1)、(2)の条件が成立しない時には、公知の
LRU方式によつて選択されたブロツクをリプ
レイスする。
ようにしたものであるので、第2のBS(MBS)
における使用効率を向上させ、計算機システム全
体のパーフオマンスを向上させる効果がある。
〔実施例〕
以下本発明の実施例を図面によつて詳述する。
第1図は本発明の一実施例をブロツク図で示した
図であり、第2図は本発明の他の実施例をブロツ
ク図で示した図である。尚、全図を通して同じ符
号は同じ対象物を示すものとする。
第1図において、aは、例えば、第2のBS
(MBS)3のタグ部内に設けられているコピービ
ツトの構成例を示したものでありbは該第2の
BS(MBS)3の構成例を示したものである。
先ず、本図のaによつて、本発明の主眼となる
コピービツトに対する動作を説明する。
本図aにおいて、320が第2のBS(MBS)3内
のタグ部32の各エントリー内に設けられている
コピービツトで、当該第2のBS(MBS)3のブ
ロツク内のサブブロツクの数、つまり4ビツト宛
が各エントリー毎に設けられている。330は該
第2のBS(MBS)3の1ブロツク128バイトが示
されており、第1のBS(LBS)2の1ブロツク2
20に対して、1サブブロツク(32バイト)が転
送される毎に、対応するコピービツト320の1ビ
ツトが‘1'にセツトされるように動作し、本図に
おいては、3個のサブブロツクが第1のBS
(LBS)2に転送されたことを示している。
次に、bによつて、本発明によるリプレイス動
作を説明する。
先ず、要求されるデータのアドレスがアドレス
レジスタ(以下、ARと云う)31にセツトさ
れ、その下位アドレスで、タグ部(TAG)32、
データ部33、LRUメモリ35が参照される。
続いて、タグ部(TAG)32内の上位アドレ
スと、AR31の上位アドレスとが比較器(C)
34において比較され、ノア回路(NOR)38
を通して、求めるデータが当該第2のBS(MBS)
3に存在しないこと(即ち、ラインミツシング)
が検出されると、当該ブロツクを主記憶装置
(MSU)(図示せず)からムーブインする為、
AR31のアドレスがMSAR31′を経由して、
該主記憶装置(MSU)に送出され、一定時間後
に当該ムーブインデータが第2のBS(MBS)3
に転送されてくる。
該ムーブインデータ書き込み先として、リプレ
イスブロツクを決定する必要があるが、通常は、
下位アドレスによつて、各ウエイ毎に決定され
る、合計4つのブロツクから、LRUメモリ35
において、最も古いブロツクがリプレイスブロツ
クとして選択される。
本発明においては、上記LRUメモリ35から
の情報の他に、タグ部(TAG)32に記憶され
ているコピービツト320の論理積信号を出力する
アンド回路(AND)36からの情報を用いて、
該リプレイスブロツクを決定する所に特徴があ
る。
即ち、各ウエイ毎の上記アンド回路(AND)
36の出力ACPYO〜3(ここで、0〜3がウエ
イ0〜3に対応する)の内、‘1'のブロツク(ウ
エイ)は既に、その全内容が、第1のBS(LBS)
2に転送されているので、該ウエイを優先的にリ
プレイスの対象ブロツクとするのである。
つまり、リプレイス候補である各ウエイ毎の、
合計4つのブロツクの内、対応するACPYO〜3
に‘1'のものが1つだけあれば、そのブロツクを
LRUメモリ35からの情報に関係なくリプレイ
スの対象とする。
若し、各ウエイに対応するACPYO〜3に‘1'
であるブロツク(ウエイ)が複数個あれば、その
中から上記LRUメモリ35からの情報に基づき、
最も古いブロツクをリプレイスの対象とする。
従つて、対応するACPYO〜3に、‘1'である
ブロツクが1つもなければ、従来通りLRUメモ
リ35からの情報に基づいて、最も古いブロツク
をリプレイスの対象とする。
下表は、該LRUメモリ35の情報が、
ウエイ0ウエイ1ウエイ2ウエイ3
の順に古く使用されていることを示している場合
に、上記ACPYO〜3の値によつて、リプレイス
決定回路37で選択されるリプレイスブロツクを
示したものである。
[Industrial Application Field] The present invention relates to a second buffer memory (MBS) having a copy of a part of a main storage device, a copy of a part of the second buffer memory (MBS), or a second buffer memory (MBS) having a copy of a part of the main memory. In a computer system having a two-layer buffer memory system including a first buffer memory (LBS) having a copy of a part of the main memory that is not in the main memory (MBS),
This paper relates to a buffer memory (MBS) replacement method. In recent large-scale computer systems, a small capacity but high-speed buffer memory (BS) is installed between the central processing unit (CPU) and the main storage unit (MSU).
Generally, a method is adopted in which the average access time to the main storage unit (MSU) is shortened by providing a main storage unit (MSU). However, with recent remarkable advances in hardware technology, the arithmetic units of central processing units (CPUs) are becoming faster and faster, but main storage units (MSUs) are becoming larger in capacity. In order to be
The current situation is that the speed cannot be increased much. Therefore, the buffer memory (BS) mentioned above has been made faster and has a larger capacity to match the speed of the arithmetic unit, but compared to the increase in the capacity of the main storage unit (MSU), the difference is smaller. I am in a situation where I am not allowed to do so. As a means to solve the above problem, a medium-speed, large-capacity buffer memory (BS) is used as a second buffer memory (MBS). ) and a main storage unit (MSU), a so-called two-layer buffer memory system is known. Below, each
This BS will be referred to as the first BS. In such a buffer memory system,
The problem is the replacement in the second BS. In particular, block size of second BS > first BS
When the block size is , and the difference is an integer multiple, if the replacement blocks for the first BS and the second BS are determined independently, the second BS is transferred from the main storage unit (MSU). There is a problem that the data moved in to the first BS may be replaced at the second BS before it is used up (specifically, it is not transferred to the first BS). Therefore, the first BS replacement operation and the second
By creating a certain correlation between the BS replacement operation and the BS replacement operation, an effective replacement method can be expected. [Prior Art] First, the concept of a computer system including a general two-layer buffer memory (BS) will be explained with reference to FIG. In this figure, 1 is the arithmetic unit, 2 is the first BS
(LBS), 3 is the second BS (MBS), and 4 is the main storage unit (MSU). In such a computer system, the first
Both BS (LBS) 1 and second BS (MBS) 2,
When the data required by the arithmetic unit 1 does not exist, the data is stored in the first BS (LBS) from the main storage unit (MSU) 4.
1 and the second BS (MBS) 2 for the corresponding blocks, and the necessary data is transferred from the first BS (LBS) 2 to the arithmetic unit 1. . If data does not exist in the first BS (LBS) 2 and data exists in the second BS (MBS) 3, the data block is transferred from the second BS (MBS) 3 to the first BS (MBS) 3. The block is transferred to the first BS (LBS) 2, and necessary data is further transferred from the first BS (LBS) 2 to the arithmetic unit 1. FIG. 4 shows an example of the configuration of a three-layer memory system consisting of a two-layer buffer memory and a main storage unit (MSU). In this configuration example, the block size of the first BS (LBS) 2 is 32 bytes, and the block size of the second BS (MBS) 3 is 32 bytes.
The block size of is a 128-byte block, which is 4 times the block size of the first BS (LBS) 2, and the block size of the first BS (LBS) 2, the second BS (MBS)
In both cases, the degree of association (number of ways) is way 0 to way 3.
It consists of four levels. If the first BS (LBS) 2, the second BS (MBS)
In both cases, when the required data does not exist, the 32-byte data requested by the first BS (LBS) 2 is block transferred from the main storage unit (MSU) 4, and then transferred to the first BS (LBS). LBS) 2, second BS
(MBS) Registered in both 3. At this time, the ways to be registered are the first BS (LBS) 2, the second BS
(MBS) Sometimes all three are the same way,
It may be a different way. Next, the remaining 96 bytes of the 128-byte block of the second BS (MBS) 3 are divided into 32 bytes x 3 blocks, transferred from the main storage unit (MSU) 4, and transferred to the second BS (MBS) 3. (MBS) Registered in 3. Also, there is no data in the first BS (LBS) 2, and the second
If data exists in BS (MBS) 3,
The 32-byte data requested by the first BS (LBS) 2 is read from the second BS (MBS) 3,
It is forwarded to the first BS (LBS) 2. In such a conventional two-layer buffer memory system, the above data transfer (move-in)
When the first BS (LBS) 2 and the second BS (LBS) 2
Each of the BS (LBS) 3 was doing it independently. [Problem to be solved by the invention] Therefore, in the conventional system, for example, the first
Blocks replaced from BS (LBS) 2,
Even if the second BS (MBS) 3 contains a block, the block may not be replaced by the second BS (MBS) 3, or conversely, the second BS (MBS) 3 may not be replaced from the main storage unit (MSU) 4. ) 3 to the first BS (LBS) 2.
2nd BS (MBS) 3 before it is used up.
In many cases, the second BS (MBS) 3 is used less efficiently. In view of the above-mentioned drawbacks of the conventional art, the present invention focuses on the locality of address distribution during program execution, and takes advantage of the feature that accesses to a storage device occur sequentially to some extent in time to a certain continuous area. Taking into account, the usage efficiency of the second BS (MBS) 3 can be improved by creating a certain correlation between the replacement operation in the first BS (LBS) 2 and the replacement operation in the second BS (MBS) 3. The purpose of the present invention is to provide a replacement method that improves the performance. [Means for solving the problem] This purpose is to create a system in which the contents of each sub-block obtained by dividing a block of the buffer memory into the block size of the first buffer memory (LBS) are stored in the second buffer memory (MBS). The n-bit copy bits indicating that the data has been transferred to the buffer memory (LBS) are transferred to the second buffer memory (MBS).
When the second buffer memory (MBS) needs to be replaced, among the m blocks (m is the number of associative levels of the second buffer memory) that are candidates for replacement, Referring to the copy bits above, if there is anything that indicates that the contents of all subblocks of the block have been transferred to the first buffer memory (LBS), that block will be prioritized for replacement. control. When replacing a certain block from the first buffer memory (LBS), means is provided for transmitting address information of the block to be replaced to the second buffer memory (MBS),
There is no data in the second buffer memory (MBS), so the second buffer memory (MBS)
The second buffer memory (MBS) control circuit is provided with a comparator for detecting whether any one of the blocks to be replaced includes the transmitted address. When determining a replacement block for the first buffer memory (MBS), if the comparator detects a block containing the address transmitted from the first buffer memory (MBS), the block is replaced and the first buffer memory (MBS) is replaced. If a block containing the address that has been replaced is not detected, the block to be replaced is determined using the LRU method. This is achieved by the replacement method in the buffer memory of the present invention. [Operation] That is, according to the present invention, the storage capacity of the first BS (LBS)<the storage capacity of the second BS (MBS), and the storage capacity of the second BS (MBS)
The block size of BS (MBS) is the first BS
In a computer system equipped with a two-layer buffer memory system whose block size is an integral multiple of the block size of (LBS), (1) data copied from the second BS (MBS) to the first BS (LBS) A copy memory for storing sub-blocks is provided, and when replacement is required in a second BS (MBS), a block in which all sub-blocks have been copied to the first BS (LBS) is preferentially replaced. (2) Memorize the replacement address (subblock address) in the first BS (LBS),
When replacement is required in the second BS (MBS), if there is a block that includes the above sub-block, that block will be replaced preferentially. (3) If conditions (1) and (2) are not met, publicly known
Replace the block selected by LRU method. Therefore, the second BS (MBS)
This has the effect of improving the usage efficiency of the computer and improving the performance of the entire computer system. [Examples] Examples of the present invention will be described in detail below with reference to the drawings.
FIG. 1 is a block diagram showing one embodiment of the invention, and FIG. 2 is a block diagram showing another embodiment of the invention. Note that the same reference numerals indicate the same objects throughout the figures. In FIG. 1, a is, for example, the second BS
(MBS) 3 shows an example of the configuration of the copy bit provided in the tag part, and b is the second copy bit.
This shows an example of the configuration of BS (MBS) 3. First, referring to a in the figure, the operation for copy bits, which is the main focus of the present invention, will be explained. In this figure a, 320 is a copy bit provided in each entry of the tag part 32 in the second BS (MBS) 3, and the number of subblocks in the block of the second BS (MBS) 3, that is, A 4-bit address is provided for each entry. 330 indicates one block of 128 bytes of the second BS (MBS) 3, and one block of 128 bytes of the first BS (LBS) 2.
20, each time one subblock (32 bytes) is transferred, one bit of the corresponding copy bit 320 is set to '1', and in this figure, three subblocks are BS
(LBS) 2. Next, the replace operation according to the present invention will be explained using b. First, the address of the requested data is set in the address register (hereinafter referred to as AR) 31, and at its lower address, the tag part (TAG) 32,
The data section 33 and LRU memory 35 are referenced. Next, the high-order address in the tag section (TAG) 32 and the high-order address of the AR31 are connected to a comparator (C).
Compared in 34, NOR circuit (NOR) 38
Through this process, the required data is transferred to the second BS (MBS)
Not present in 3 (i.e. line missing)
is detected, the block is moved in from the main storage unit (MSU) (not shown).
The address of AR31 goes through MSAR31',
The move-in data is sent to the main storage unit (MSU), and after a certain period of time, the move-in data is sent to the second BS (MBS) 3.
will be forwarded to. It is necessary to determine the replacement block as the write destination for the move-in data, but usually,
The LRU memory 35 is selected from a total of four blocks determined for each way by the lower address.
At , the oldest block is selected as the replacement block. In the present invention, in addition to the information from the LRU memory 35, information from an AND circuit (AND) 36 that outputs an AND signal of the copy bits 320 stored in the tag section (TAG) 32 is used to
The feature lies in determining the replacement block. In other words, the above AND circuit (AND) for each way
Among the 36 outputs ACPYO~3 (here, 0~3 correspond to ways 0~3), the block (way) '1' has already had its entire contents transferred to the first BS (LBS).
Since the way has been transferred to No. 2, this way is given priority as the block to be replaced. In other words, for each way that is a replacement candidate,
Of the total 4 blocks, the corresponding ACPYO~3
If there is only one '1' in the block,
The information is to be replaced regardless of the information from the LRU memory 35. If ACPYO~3 corresponding to each way is '1'
If there are multiple blocks (ways), select one of them based on the information from the LRU memory 35,
Target the oldest block for replacement. Therefore, if there is no block that is ``1'' in the corresponding ACPYO~3, the oldest block is targeted for replacement based on the information from the LRU memory 35 as before. The table below shows that when the information in the LRU memory 35 indicates that the information is used in the order of Way 0 Way 1 Way 2 Way 3, the replacement decision circuit 37 uses the value of ACPYO~3 above. This shows the replacement block to be selected.
【表】【table】
以上、詳細に説明したように、本発明のバツフ
アメモリにおけるリプレイス方式は、第1のBS
(LBS)の記憶容量<第2のBS(MBS)の記憶容
量で、第2のBS(MBS)のブロツクサイズが、
第1のBS(LBS)のブロツクサイズの整数倍とな
つている、2階層のバツフアメモリシステムを備
えた計算機システムにおいて、
(1) 第2のBS(MBS)から第1のBS(LBS)に
コピーされたサブブロツクを記録するコピーメ
モリを設け、第2のBS(MBS)においてリプ
レイスが必要になつた時、第1のBS(LBS)に
総てのサブブロツクがコピーされたブロツクを
優先的にリプレイスする。
(2) 第1のBS(LBS)におけるリプレイスアドレ
ス(サブブロツクアドレス)を記憶しておき、
第2のBS(MBS)でリプレイスが必要になつ
た時、上記サブブロツクを含むブロツクがある
と、当該ブロツクを優先的にリプレイスする。
(3) (1)、(2)の条件が成立しない時には、公知の
LRU方式によつて選択されたブロツクをリプ
レイスする。
ようにしたものであるので、第2のBS(MBS)
における使用効率を向上させ、計算機システム全
体のパーフオマンスを向上させる効果がある。
As explained above in detail, the replacement method in the buffer memory of the present invention is based on the first BS.
(LBS) storage capacity < Second BS (MBS) storage capacity, and the block size of the second BS (MBS) is
In a computer system equipped with a two-layer buffer memory system whose block size is an integral multiple of the block size of the first BS (LBS), (1) from the second BS (MBS) to the first BS (LBS); A copy memory is provided to record the sub-blocks copied to the first BS (MBS), and when replacement is required in the second BS (MBS), the block whose all sub-blocks have been copied to the first BS (LBS) is given priority. Replace. (2) Memorize the replacement address (subblock address) in the first BS (LBS),
When replacement is required in the second BS (MBS), if there is a block that includes the above sub-block, that block will be replaced preferentially. (3) If conditions (1) and (2) are not met, publicly known
Replace the block selected by LRU method. Therefore, the second BS (MBS)
This has the effect of improving the usage efficiency of the computer and improving the performance of the entire computer system.
第1図は本発明の一実施例をブロツク図で示し
た図、第2図は本発明の他の実施例をブロツク図
で示した図、第3図は2階層のバツフアメモリを
備えた情報処理システムの構成例を示した図、第
4図は3階層メモリシステムの構成例を示した
図、である。
図面において、1は演算装置、2は第1のBS
(LBS)、3は第2のBS(MBS)、4は主記憶装置
(MSU)、21はアドレスレジスタ(LBAR)、2
2はタグ部(TAG)、23はデータ部、24は比
較器(C、LC1〜LC4)、25はLRUメモリ、2
7′はLRU決定回路1、28′はHIT/NON−
HIT検出回路−1、29はPBAR、31はアド
レスレジスタ(AR、MBAR)、32はタグ部
(TAG)、33はデータ部、34は比較器(C、
MC1〜MC4)、34′は比較器(PBC1〜PBC4)、
35はLRUメモリ、37はリプレイス決定回路、
37′はLRU決定回路2、38′はHIT/NON−
HIT検出回路−2、をそれぞれ示す。
Fig. 1 is a block diagram showing one embodiment of the present invention, Fig. 2 is a block diagram showing another embodiment of the invention, and Fig. 3 is an information processing system equipped with a two-layer buffer memory. FIG. 4 is a diagram showing an example of the configuration of the system. FIG. 4 is a diagram showing an example of the configuration of a three-layer memory system. In the drawing, 1 is an arithmetic unit, 2 is a first BS
(LBS), 3 is the second BS (MBS), 4 is the main storage unit (MSU), 21 is the address register (LBAR), 2
2 is a tag section (TAG), 23 is a data section, 24 is a comparator (C, LC1 to LC4), 25 is an LRU memory, 2
7' is LRU determination circuit 1, 28' is HIT/NON-
HIT detection circuit-1, 29 is PBAR, 31 is address register (AR, MBAR), 32 is tag section (TAG), 33 is data section, 34 is comparator (C,
MC1 to MC4), 34' is a comparator (PBC1 to PBC4),
35 is an LRU memory, 37 is a replacement decision circuit,
37' is LRU determination circuit 2, 38' is HIT/NON-
HIT detection circuit-2 is shown.
Claims (1)
あつて、第1のバツフアメモリ(LBS)上に所
望のデータがある場合は、第1のバツフアメモリ
(LBS)よりデータを読み出し、データが存在し
ない場合には第2のバツフアメモリ(MBS)を
参照し、該第2のバツフアメモリ(MBS)にデ
ータがある場合には、該第2のバツフアメモリ
(MBS)より第1のバツフアメモリ(LBS)へデ
ータをブロツク転送し、第2のバツフアメモリ
(MBS)にもデータがない場合には、主記憶装置
より、上記第1のバツフアメモリ(LBS)と、
第2のバツフアメモリ(MBS)の両方に、デー
タをブロツク転送するように制御されており、上
記第2のバツフアメモリ(MBS)のブロツクサ
イズが、第1のバツフアメモリ(LBS)のブロ
ツクサイズのn倍(n≧2)で構成され、更に両
バツフアメモリ(BS)に対するデータリプレイ
スアルゴリズムは、最も古いブロツクをリプレイ
スするLRU方式をとつている2階層よりなるバ
ツフアメモリシステムを備えた計算機システムに
おいて、上記第2のバツフアメモリ(MBS)に、
該バツフアメモリのブロツクを第1のバツフアメ
モリ(LBS)のブロツクサイズに分割した各サ
ブブロツクの内容が、第1のバツフアメモリ
(LBS)に転送されたことを示すnビツトのコピ
ービツトを、第2のバツフアメモリ(MBS)の
各ブロツク毎に設け、第2のバツフアメモリ
(MBS)にリプレイスの必要が生じた時、該リプ
レイスの候補となるm個(mは、第2のバツフア
メモリ(MBS)の連想レベル数)のブロツクの
内で、上記コピービツトを参照して、該ブロツク
の総てのサブブロツクの内容が、上記第1のバツ
フアメモリ(LBS)に転送されたことを示すも
のがあれば、優先的にそのブロツクをリプレイス
の対象とするように制御することを特徴とするバ
ツフアメモリにおけるリプレイス方式。 2 セツトアソシアテイブ型のバツフアメモリで
あつて、第1のバツフアメモリ(LBS)上に所
望のデータがある場合は、第1のバツフアメモリ
(LBS)よりデータを読み出し、データが存在し
ない場合には第2のバツフアメモリ(MBS)を
参照し、該第2のバツフアメモリ(MBS)にデ
ータがある場合には、該第2のバツフアメモリ
(MBS)より第1のバツフアメモリ(LBS)へデ
ータをブロツク転送し、第2のバツフアメモリ
(MBS)にもデータがない場合には、主記憶装置
より、上記第1のバツフアメモリ(LBS)と、
第2のバツフアメモリ(MBS)の両方に、デー
タをブロツク転送するように制御されており、上
記第2のバツフアメモリ(MBS)のブロツクサ
イズが、第1のバツフアメモリ(LBS)のブロ
ツクサイズのn倍(n≧2)で構成され、更に両
バツフアメモリ(BS)に対するデータリプレイ
スアルゴリズムは、最も古いブロツクをリプレイ
スするLRU方式をとつている2階層よりなるバ
ツフアメモリシステムを備えた計算機システムに
おいて、上記第1のバツフアメモリ(LBS)か
ら、あるブロツクをリプレイスする時には、該リ
プレイスの対象ブロツクのアドレス情報を第2の
バツフアメモリ(MBS)に送信する手段を設け、
上記第2のバツフアメモリ(MBS)にもデータ
がなくて、該第2のバツフアメモリ(MBS)で
のリプレイス対象となるブロツク内、何れか1つ
のブロツクが、上記送信されたアドレスを含んで
いるかどうかを検出する比較器を、該第2のバツ
フアメモリ(MBS)制御回路に設け、該第2の
バツフアメモリ(MBS)のリプレイスブロツク
を決定する際に、上記第1のバツフアメモリ
(LBS)から送信されてきたアドレスを含むブロ
ツクが、上記比較器で検出された時には、該ブロ
ツクをリプレイスし、該送信されてきたアドレス
を含むブロツクが検出されなかつた時には、上記
LRU方式によつてリプレイスすべきブロツクを
決定するように制御することを特徴とするバツフ
アメモリにおけるリプレイス方式。[Claims] 1. In a set associative type buffer memory, if desired data is present on the first buffer memory (LBS), the data is read from the first buffer memory (LBS) and the data exists. If not, refer to the second buffer memory (MBS), and if there is data in the second buffer memory (MBS), transfer the data from the second buffer memory (MBS) to the first buffer memory (LBS). When a block is transferred and there is no data in the second buffer memory (MBS), the data is transferred from the main memory to the first buffer memory (LBS).
The data is controlled to be transferred in blocks to both of the second buffer memories (MBS), and the block size of the second buffer memory (MBS) is n times the block size of the first buffer memory (LBS). In a computer system equipped with a two-layer buffer memory system that uses the LRU method to replace the oldest block, the data replacement algorithm for both buffer memories (BS) is based on the second buffer memory system. buffer memory (MBS),
A copy bit of n bits indicating that the contents of each sub-block obtained by dividing the block of the buffer memory into the block size of the first buffer memory (LBS) is transferred to the first buffer memory (LBS) is transferred to the second buffer memory (MBS). ), and when the need for replacement arises in the second buffer memory (MBS), m blocks (m is the number of associative levels of the second buffer memory (MBS)) are provided as candidates for the replacement. Among them, if there is one that indicates that the contents of all subblocks of the block have been transferred to the first buffer memory (LBS) by referring to the copy bits, that block is preferentially replaced. A replacement method in a buffer memory characterized by controlling the target. 2 In a set associative type buffer memory, if the desired data exists on the first buffer memory (LBS), the data is read from the first buffer memory (LBS), and if the data does not exist, the data is read from the second buffer memory (LBS). If there is data in the second buffer memory (MBS), block transfer the data from the second buffer memory (MBS) to the first buffer memory (LBS), and then transfer the data to the second buffer memory (MBS). If there is no data in the first buffer memory (MBS), the data is transferred from the main memory to the first buffer memory (LBS).
The data is controlled to be transferred in blocks to both of the second buffer memories (MBS), and the block size of the second buffer memory (MBS) is n times the block size of the first buffer memory (LBS). n ≥ 2), and the data replacement algorithm for both buffer memories (BS) is the first one described above in a computer system equipped with a two-layer buffer memory system that uses the LRU method to replace the oldest block. When replacing a certain block from the second buffer memory (LBS), a means is provided for transmitting the address information of the block to be replaced to the second buffer memory (MBS),
Since there is no data in the second buffer memory (MBS), check whether any one of the blocks to be replaced in the second buffer memory (MBS) includes the transmitted address. A detecting comparator is provided in the second buffer memory (MBS) control circuit, and when determining a replacement block for the second buffer memory (MBS), the address transmitted from the first buffer memory (LBS) is determined. When a block containing the transmitted address is detected by the comparator, the block is replaced, and when a block containing the transmitted address is not detected, the comparator replaces the block.
A replacement method in a buffer memory characterized by controlling to determine a block to be replaced by an LRU method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60006836A JPS61166651A (en) | 1985-01-18 | 1985-01-18 | Replacing system for buffer memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60006836A JPS61166651A (en) | 1985-01-18 | 1985-01-18 | Replacing system for buffer memory |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS61166651A JPS61166651A (en) | 1986-07-28 |
| JPH0340412B2 true JPH0340412B2 (en) | 1991-06-18 |
Family
ID=11649318
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60006836A Granted JPS61166651A (en) | 1985-01-18 | 1985-01-18 | Replacing system for buffer memory |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS61166651A (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06149669A (en) * | 1992-11-04 | 1994-05-31 | Fujitsu Ltd | System and device for transferring cache data |
| JP2009252165A (en) * | 2008-04-10 | 2009-10-29 | Toshiba Corp | Multi-processor system |
| JP5404433B2 (en) * | 2010-01-08 | 2014-01-29 | 株式会社東芝 | Multi-core system |
-
1985
- 1985-01-18 JP JP60006836A patent/JPS61166651A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS61166651A (en) | 1986-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7552286B2 (en) | Performance of a cache by detecting cache lines that have been reused | |
| JP5440067B2 (en) | Cache memory control device and cache memory control method | |
| US5778434A (en) | System and method for processing multiple requests and out of order returns | |
| US6766424B1 (en) | Computer architecture with dynamic sub-page placement | |
| CN1093961C (en) | Enhanced memory performace of processor by elimination of outdated lines in second-level cathe | |
| US8151058B2 (en) | Vector computer system with cache memory and operation method thereof | |
| CN101639812A (en) | Cache memory and cache memory control apparatus | |
| US6449698B1 (en) | Method and system for bypass prefetch data path | |
| US8549227B2 (en) | Multiprocessor system and operating method of multiprocessor system | |
| KR100395768B1 (en) | Multi-level cache system | |
| JP4574712B2 (en) | Arithmetic processing apparatus, information processing apparatus and control method | |
| JP2008512758A (en) | Virtual address cache and method for sharing data stored in virtual address cache | |
| US5555379A (en) | Cache controller index address generator | |
| JPH0340412B2 (en) | ||
| US7543113B2 (en) | Cache memory system and method capable of adaptively accommodating various memory line sizes | |
| US7805572B2 (en) | Cache pollution avoidance | |
| US20050198438A1 (en) | Shared-memory multiprocessor | |
| JP2001290704A (en) | Device and method for controlling multiprocess | |
| JP3516326B2 (en) | Memory controller having shared cache memory and computer system having the same | |
| JP2000047942A (en) | Device and method for controlling cache memory | |
| JPH06139147A (en) | Cache memory system | |
| JP2009151457A (en) | Cache memory system and cache memory control method | |
| JP3082684B2 (en) | Cache memory | |
| JP2002251322A (en) | Storage device control system | |
| JPH1055308A (en) | Cache memory |