JPS61166651A - Replacing system for buffer memory - Google Patents

Replacing system for buffer memory

Info

Publication number
JPS61166651A
JPS61166651A JP60006836A JP683685A JPS61166651A JP S61166651 A JPS61166651 A JP S61166651A JP 60006836 A JP60006836 A JP 60006836A JP 683685 A JP683685 A JP 683685A JP S61166651 A JPS61166651 A JP S61166651A
Authority
JP
Japan
Prior art keywords
buffer memory
mbs
block
lbs
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.)
Granted
Application number
JP60006836A
Other languages
Japanese (ja)
Other versions
JPH0340412B2 (en
Inventor
Noriyuki Toyoki
豊木 則行
Koichi 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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP60006836A priority Critical patent/JPS61166651A/en
Publication of JPS61166651A publication Critical patent/JPS61166651A/en
Publication of JPH0340412B2 publication Critical patent/JPH0340412B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To improve the using efficiency of the 2nd buffer memory by securing a certain type of correlation between both replacement actions of the 1st and 2nd buffer memories. CONSTITUTION:A buffer memory LBS of a high speed and small capacity is provided together with a buffer memory MBS of a medium speed and large capacity. When a certain block is replaced for the memory LBS, the address information on a subject block is transmitted to the memory MBS. Here a comparator 38' is set to the memory MBS to detect whether a certain one of blocks to be replaced in the memory MBS includes a transmitted address or not. Then a block to be replaced is decided in the memory MBS. In this case, the block sent from the memory LBS is replaced if it is detected by the comparator 38'. While a block to be replaced is decided by an LRU memory 35 when no block sent from the memory LBS is detected.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、主記憶装置の一部のコピーを有する第2のバ
ッファメモリ(MBS)と、該第2のバッファメモリ(
MBS)の一部のコピー、又は該第2のバッファメモリ
(MBS)にない主記憶装置の一部のコピーを有する第
1のバッファメモリ(LBS)とを備えた2階層のバッ
ファメモリシステムを有する計算機システムにおける、
上記第2のバッファメモリ(MBS)のりプレイスメン
ト方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention provides a second buffer memory (MBS) having a copy of a portion of a main memory;
a first buffer memory (LBS) having a copy of a part of the main storage (MBS) or a copy of a part of the main storage not in the second buffer memory (MBS); In computer systems,
This relates to the second buffer memory (MBS) glue placement method.

最近の大型の計算機システムにおいては、中央処理装置
(CPU)と主記憶装置(MSU)との間に、容量は小
さいが高速のバッファメモリ(BS)を設けて、主記憶
装置(MSU)に対する平均的なアクセスタイムを短縮
させる方式を採っているのが一般的である。
In recent large-scale computer systems, a small capacity but high-speed buffer memory (BS) is provided between the central processing unit (CPU) and the main storage unit (MSU), and the average Generally, a method is used to shorten the access time.

然して、最近のハードウェアテクノロジの著しい進歩に
伴って、中央処理装置(CPU)の演算部は益々高速化
される動向にあるが、主記憶装置(MSU)の方は大容
量化の方向に進んでいる為、余り高速化されないのが現
状である。
However, with recent remarkable advances in hardware technology, the arithmetic units of central processing units (CPUs) are becoming faster and faster, but the capacity of main storage units (MSUs) is also becoming larger. Currently, the speed cannot be increased much.

そこで、上記バッファメモリ(BS)も、該演算部の速
度に合わせて高速化されると共に大容量化も図られてい
るが、主記憶装置(MS[I)の大容量化に比較すると
、その差は短縮されない状況にある。
Therefore, the buffer memory (BS) has been made faster and has a larger capacity to match the speed of the arithmetic unit, but compared to the larger capacity of the main memory (MS[I), The gap is in a situation where it cannot be shortened.

上記の問題を解決する手段として、中速、大容量のバッ
ファメモリ(BS)を、第2のバッファメモリ (MB
S)として、上記高速、小容量のバッファメモリ(BS
) (これを、第1のバッファメモリ(LBS)と云う
)と主記憶装置(MSU)との間に介在させる、所謂2
階層構成のバッファメモリ方式が知られている。以下、
それぞれを第2のBS、第1のBSと呼ぶことにする。
As a means to solve the above problem, a medium-speed, large-capacity buffer memory (BS) is used as a second buffer memory (MB
S) is the high-speed, small-capacity buffer memory (BS) mentioned above.
) (this is called the first buffer memory (LBS)) and the main storage unit (MSU), so-called 2
BACKGROUND ART Hierarchical buffer memory systems are known. below,
These will be referred to as the second BS and the first BS, respectively.

このようなバッファメモリシステムにおいて、問題とな
るのが、上記第2のBSにおけるリプレイスである。
In such a buffer memory system, the problem is replacement in the second BS.

特に、第2のBSのブロックサイズ〉第1のBSのブロ
ックサイズであって、且つその差が整数倍の時、第1の
BSと、第2のBSのリプレイスブロックの決定を互い
に独立に行うと、主記憶装置(MSU)から、第2のB
Sにムーブインしたデータを使い切らない(具体的には
、第1のBSに転送されない)内に、第2のBSにおい
てリプレイスされてしまう等の問題がある。
In particular, when the block size of the second BS>the block size of the first BS and the difference is an integral multiple, the replacement blocks of the first BS and the second BS are determined independently of each other. and from the main storage unit (MSU), the second B
There is a problem in that the data moved into S is replaced at the second BS before it is used up (specifically, it is not transferred to the first BS).

そこで、第1のBSのリプレイス動作と1.第2のBS
のリプレイス動作との間に、ある相関関係を持たせるよ
うにすることにより、効果的なリプレイス方式が期待で
きる。
Therefore, the first BS replacement operation and 1. 2nd BS
By creating a certain correlation between the replacement operation and the replacement operation, an effective replacement method can be expected.

〔従来の技術〕[Conventional technology]

先ず、第3図によって、一般の2階層のバッファメモリ
(BS)を含む計算機システムの概念を説明する。
First, the concept of a computer system including a general two-layer buffer memory (BS) will be explained with reference to FIG.

本図において、1は演算装置、2は第1のBS (LB
S)、3は第2のBS(MBS)、 4は主記憶装置(
MSU)である。
In this figure, 1 is an arithmetic unit, 2 is a first BS (LB
S), 3 is the second BS (MBS), 4 is the main storage (
MSU).

このような計算機システムにおいて、第1のBS(LB
S) lと、第2のBS(MBS) 2の両方に、演算
装置1が必要とするデータが存在しない時には、主記憶
装置(MSU) 4より第1のBS(LBS) 1と1
第2のBS(MBS) 2の両方に、対応するブロック
分だけデータをブロック転送し、演算装置1には第1の
BS(LBS) 2より必要なデータを転送するように
動作する。
In such a computer system, the first BS (LB
S) When the data required by the arithmetic unit 1 does not exist in both the main storage unit (MSU) 1 and the second BS (MBS) 2, the data required by the arithmetic unit 1 is stored in the first BS (LBS) 1 and 1 from the main storage unit (MSU) 4.
It operates to transfer data in corresponding blocks to both of the second BS (MBS) 2, and to transfer necessary data from the first BS (LBS) 2 to the arithmetic unit 1.

若し、第1のBS(LBS) 2にデータが存在しない
で、第2のBS(MBS) 3にデータが存在する時は
、該第2のBS(MBS) 3から当該データブロック
が第1のBS(LBS) 2にブロック転送され、更に
第1のBS(LBS) 2より演算装置1に必要なデー
タが転送される。  。
If data does not exist in the first BS (LBS) 2 but 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. .

第4図に、2階層のバッファメモリと、主記憶装置(M
SU)からなる3階層のメモリシステムの1構成例を示
す。
Figure 4 shows a two-layer buffer memory and a main memory (M
An example of the configuration of a three-layer memory system consisting of SU) is shown.

本構成例においては、第1のBS(LBS) 2のプロ
ッタサイズは32バイト、第2のBS(MBS) 3の
プロッタサイズは、第1のBS(LBS) 2のブロッ
クサイズの4倍からなる128バイトブロツクであり、
第1のBS(LBS) 2.第2のBS 01BS)共
に、連想度(ウェイ数)はウェイ0〜ウエイ3の4レベ
ルで構成されている。
In this configuration example, the plotter size of the first BS (LBS) 2 is 32 bytes, and the plotter size of the second BS (MBS) 3 is four times the block size of the first BS (LBS) 2. It is a 128 byte block,
First BS (LBS) 2. Both the second BS 01BS) have four levels of association (way number): way 0 to way 3.

若し、第1のBS(LBS) 2.第2のBS(門BS
) 3共に、必要とするデータが存在しない時、最初に
第1のBS(LBS) 21J<要求L7trt432
z’(−()(7)F−91>’・     1・・主
記憶装置(MSU) 4よりブロック転送され、第1の
BS(LBS) 2.第2のBSCMBS) 3の両方
に登録される。この時、登録されるウェイは、第1のB
S (LBS)2.第2のBS(MBS) 3共に同じ
ウェイであることもあるし、別々のウェイになることも
ある。
If the first BS (LBS) 2. Second BS (gate BS
) 3, when the required data does not exist, the first BS (LBS) 21J<request L7trt432
z'(-()(7)F-91>'・1...Block transferred from main storage unit (MSU) 4 and registered in both first BS (LBS) 2. second BSCMBS) 3. Ru. At this time, the way to be registered is the first B
S (LBS)2. The three second BSs (MBS) may be the same way, or may be different ways.

続いて、第2のBS(MBS) 3の128バイトブロ
ツクの内、残りの96バイトが、32バイト×3回に分
割されて、主記憶装置(MSU)4からブロック転送さ
れ、第2のBS(MBS) 3に登録される。
Next, the remaining 96 bytes of the 128-byte block of the second BS (MBS) 3 are divided into 32 bytes x 3 blocks and transferred from the main storage unit (MSU) 4 to the second BS (MBS) 3. (MBS) Registered in 3.

又、第1のBS(LBS) 2にデータがなく、第2の
BS(MBS) 3にデータが存在する場合には、該第
1のBS(LBS) 2が要求している32バイトのデ
ータが、第2のBS(MBS) 3より読み出され、第
1のBS (LBS)2に転送される。
Also, if there is no data in the first BS (LBS) 2 and data exists in the second BS (MBS) 3, the 32-byte data requested by the first BS (LBS) 2 is read from the second BS (MBS) 3 and transferred to the first BS (LBS) 2.

このような、従来の2階層のバッファメモリシステムに
おいて、上記データ転送(ムーブイン)が行われる時、
最も古いデータブロックを追い出す所謂LRU方式を、
第1のBS(LBS) 2.第2のBS (LBS) 
3において、それぞれ独自に行っていた。
In such a conventional two-layer buffer memory system, when the above data transfer (move-in) is performed,
The so-called LRU method, which removes the oldest data block,
First BS (LBS) 2. Second BS (LBS)
3, each did it independently.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従って、従来方式においては、例えば第1のBS(LB
S) 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の使用効
率が悪くなる場合が多かった。
Therefore, in the conventional system, for example, the first BS (LB
S) The block replaced from 2 is transferred to the second BS.
(MBS) 3, even if the block is included in the second BS (MBS) 3, the block may not be replaced from the second BS (MBS) 3, or conversely, it may not be moved in from the main storage unit (MSU) 4 to the second BS (MBS) 3. The second BS (MBS) 3 may replace the data blocks before the first BS (LBS) 2 uses them up, and the usage efficiency of the second BS (MBS) 3 may be reduced. It often got worse.

本発明は上記従来の欠点に鑑み、プログラム実行時のア
ドレス分布の局所性に着目し、記憶装置に対するアクセ
スは、ある連続したエリアに対して、時間的にも、ある
程度連続して発生すると云う特徴を考慮し、第1のBS
(LBS) 2におけるリプレイス動作と、第2のBS
(MBS) 3におけるリプレイス動作にある相関をも
たせるようにして、第2のBS(MBS) 3での使用
効率を向上させるリプレイス方式を提供することを目的
とするものである。
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. Considering, the first BS
(LBS) Replace operation in 2 and second BS
It is an object of the present invention to provide a replacement method that improves the efficiency of use in a second BS (MBS) 3 by providing a certain correlation to the replacement operations in the second BS (MBS) 3.

〔問題点を解決する為の手段〕[Means for solving problems]

この目的は、 ■第2のバッファメモリ(MBS)に、8亥八′ソファ
メモリのブロックを第1のバッファメモリ(LBS)の
ブロックサイズに分割した各サブブロックの内容が、第
1のバッファメモリ(LBS)に転送されたことを示す
nビットのコピービットを、第2のバッファメモリ(M
BS)の各ブロック毎に設け、第2のバッファメモリ(
MBS)にリプレイスの必要が生じた時、該リプレイス
の候補となるm個(mは、第2のバッファメモリの連想
レベル数)のブロックの内で、上記コピービットを参照
して、該ブロックの総てのサブブロックの内容が、上記
第1のバッファメモリ(LBS)に転送されたことを示
すものがあれば、優先的にそのブロックをリプレイスの
対象とするように制御する。
The purpose of this is: ■ The contents of each sub-block obtained by dividing the block of 8x8' sofa 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 they have been transferred to the second buffer memory (M
A second buffer memory (
When it becomes necessary to replace the block (MBS), the copy bits are referred to and the block is If there is any indication that the contents of all sub-blocks have been transferred to the first buffer memory (LBS), control is given so that that block is preferentially targeted for replacement.

■第1のバッファメモリ(LBS)から、あるブロック
をリプレイスする時には、該リプレイスの対象ブロック
のアドレス情報を第2のバッファメモリ(MBS)に送
信する手段を設け、上記第2のバッファメモリ(MBS
)にもデータがなくて、該第2のバッファメモリ(MB
S)でのリプレイス対象となるブロックの内、何れか1
つのブロックが、上記送信されたアドレスを含んでいる
かどうかを検出する比較器を・該第2のバッファメモリ
(MBS)制御回路に設け、該第2のバッファメモリ(
MBS)のリプレイスブロックを決定する際に、上記第
1のバッファメモリ(LBS)から送信されてきたアド
レスを含むブロックが、上記比較器で検出された時には
、該ブロックをリプレイスし、該送信されてきたアドレ
スを含むブロックが検出されなかった時には、LRU方
式によってリプレイスすべきブロックを決定する。
■When replacing a certain block from the first buffer memory (LBS), a means is provided for transmitting the address information of the block to be replaced to the second buffer memory (MBS), and the second buffer memory (MBS)
) also has no data, and the second buffer memory (MB
Any one of the blocks to be replaced in S)
a comparator for detecting whether or not one block contains the transmitted address;
When determining a replacement block for the first buffer memory (LBS), if the comparator detects a block including the address transmitted from the first buffer memory (LBS), replace the block and replace the transmitted address. If a block containing the address that was previously 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.

〔作用〕[Effect]

即ち、本発明によれば、第1のBS (LBS)の記憶
容量〈第2 (7)BS(MBS) (7)記憶容量で
、第2(7)BS(MBS)のブロックサイズが、第1
のBS (LBS)のブロックサイズの整数倍となって
いる、2階層のバッフ″′”)>:l′″″″@(!I
tf:計■′肘”96    1・いて、 (1)第2のBS (MBS)から第1のBS (LB
S)にコピーされたサブブロックを記憶するコピーメモ
リを設け、第2のBS (MBS)においてリプレイス
が必要になった時、第1のBS (LBS)に総てのサ
ブブロックがコピーされたブロックを優先的にリプレイ
スする。
That is, according to the present invention, the block size of the second (7) BS (MBS) is equal to 1
A two-layer buffer whose block size is an integer multiple of the block size of the BS (LBS)
tf: Total ■'Elbow"96 1. (1) From the second BS (MBS) to the first BS (LB
A copy memory is provided to store the copied sub-blocks in S), and when replacement is required in the second BS (MBS), the block with all the sub-blocks copied to the first BS (LBS) is provided. Replace with priority.

(2)第1のBS (LBS)におけるリプレイスアド
レス(サブブロックアドレス)を記憶しておき、第2の
BS (MBS)でリプレイスが必要になった時、上記
サブブロックを含むブロックがあると、当該ブロックを
優先的にリプレイスする。
(2) Memorize the replacement address (subblock address) in the first BS (LBS), and when replacement is required in the second BS (MBS), if there is a block containing the above subblock, Replace the block with priority.

(3m、(2)の条件が成立しない時には、公知のLR
U方式によって選択されたブロックをリプレイスする。
(3m, if the condition (2) is not met, the known LR
Replace the block selected by the U method.

ようにしたものであるので、第2のBS (?IBS)
における使用効率を向上させ、計算機システム全体のパ
ーフォマンスを向上させる効果がある。
Therefore, the second BS (?IBS)
This has the effect of improving the usage efficiency of the computer system and improving the performance of the entire computer system.

〔実施例〕〔Example〕

以下本発明の実施例を図面によって詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は本発明の一実施例をプロ・7り図で示した図で
あり、第2図は本発明の他の実施例をブロック図で示し
た図である。尚、全図を通して同じ符号は同じ対象物を
示すものとする。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG. 2 is a block diagram showing another embodiment of the present invention. Note that the same reference numerals indicate the same objects throughout the figures.

第1図において、(a)は、例えば、第2のBS (M
BS) 3のタグ部内に設けられているコピービットの
構成例を示したものであり、(b)は該第2のBS(M
BS) 3の構成例を示したものである。
In FIG. 1, (a) is, for example, the second BS (M
BS) 3 shows an example of the configuration of the copy bit provided in the tag section, and (b) shows an example of the configuration of the copy bit provided in the tag part of the second BS (M
BS) 3 is shown.

先ず、本図の(a)によって、本発明の主眼となるコピ
ービットに対する動作を説明する。
First, referring to (a) in this figure, the operation for copy bits, which is the main focus of the present invention, will be explained.

本図(a)において、320が第2のBS(MBS) 
3内のタグ部32の各エントリー内に設けられているコ
ピービットで、当1亥第2のBS(MBS) 3のプロ
・ツク内のサブブロックの数、つまり4ビツト宛が各エ
ントリー毎に設けられている。330は該第2のBS(
MBS) 3の1ブロツク128バイトが示されており
、第1のBS(LBS) 2の1ブロツク220に対し
て、1サブブロツク(32バイト)が転送される毎に、
対応するコピービット320の1ビ・ノドが1′にセン
トされるように動作し、本図においては、3個のサブブ
ロックが第1のBS(LBS) 2に転送されたことを
示している。
In this figure (a), 320 is the second BS (MBS)
The number of sub-blocks in the program of the second BS (MBS) 3, that is, 4 bits, is specified for each entry by the copy bit provided in each entry of the tag section 32 in It is provided. 330 is the second BS (
One block (128 bytes) of MBS) 3 is shown, and each time one subblock (32 bytes) is transferred for one block 220 of first BS (LBS) 2,
The 1-bit node of the corresponding copy bit 320 is set to 1', and this figure shows that three sub-blocks have been transferred to the first BS (LBS) 2. .

次に、(b)によって、本発明によるリプレイス動作を
説明する。
Next, the replace operation according to the present invention will be explained with reference to (b).

先ず、要求されるデータのアドレスがアドレスレジスタ
 (以下、ARと云う)31にセットされ、その下位ア
ドレスで、タグ部(TAG) 32.データ部33、 
LRIIメモリ35が参照される。
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 section (TAG) 32. data section 33,
LRII memory 35 is referenced.

続いて、タグ部(TAG) 32内の上位アドレスと。Next, the upper address in the tag section (TAG) 32.

AR31の上位アドレスとが比較器(C) 34におい
て比較され、ノア回路(NOR) 38を通して、求め
るデータが当該第2のBS(MBS) 3に存在しない
こと(即ち、ラインミ・ノシング)が検出されると、当
該ブロックを主記憶装置(MSU)  (図示せず)か
らムーブインする為、AR31のアドレスがMSAR3
1’を経由して、該主記憶装置(MSU)に送出され、
一定時間後に当該ムーブインデータが第2の85 (M
BS)3に転送されてくる。
The comparator (C) 34 compares the upper address of the AR 31 and detects through a NOR circuit (NOR) 38 that the desired data does not exist in the second BS (MBS) 3 (that is, line missing). Then, in order to move in the block from the main storage unit (MSU) (not shown), the address of AR31 is changed to MSAR3.
1' to the main storage unit (MSU),
After a certain period of time, the move-in data is transferred to the second 85 (M
It will be forwarded to BS) 3.

該ムーブインデータの書き込み先として、リプレイスブ
ロックを決定する必要があるが、通常は、下位アドレス
によって、各ウェイ毎に決定される、合計4つのブロッ
クから、LRUメモリ35において、最も古いブロック
がリプレイスブロックとして選択される。
It is necessary to determine a replacement block as the writing destination of the move-in data, but normally, from a total of four blocks determined for each way based on the lower address, the oldest block in the LRU memory 35 is replaced. Selected as a block.

本発明においては、上記LR1lメモリ35からの情報
の他に、タグ部(TAG) 32に記憶されているコピ
ービット320の論理積信号を出力するアンド回路(A
ND) 36からの情報を用いて、該リプレイスプロッ
タを決定する所に特徴がある。
In the present invention, in addition to the information from the LR1l memory 35, an AND circuit (A
The feature is that the information from ND) 36 is used to determine the replacement plotter.

即ち、各ウェイ毎の上記アンド回路(AND) 36の
出力ACPYO〜3(ここで、0〜3がウェイO〜3に
対応する)の内、 “1′のブロック (ウェイ)は既
に、その全内容が、第1のBS(LBS) 2に転送さ
れているので、該ウェイを優先的にリプレイスの対象ブ
ロックとするのである。
That is, among the outputs ACPYO to 3 of the AND circuit (AND) 36 for each way (here, 0 to 3 correspond to ways O to 3), the block (way) "1' has already been fully loaded. Since the contents have been transferred to the first BS (LBS) 2, this way is preferentially set as the target block for replacement.

つまり、リプレイス候補である各ウェイ毎の。In other words, for each way that is a replacement candidate.

合計4つのブロックの内、対応する^cpyo〜3に“
1′のものが1つだけあれば、そのブロックをLRUメ
モリ35からの情報に関係なくリプレイスの対象とする
Out of the total 4 blocks, the corresponding ^cpyo~3 “
If only one block is 1', that block is to be replaced regardless of the information from the LRU memory 35.

若し、各ウェイに対応するAにPYO〜3に“1°で 
    I(あるブロック (ウェイ)が複数個あれば
、その中から上記LRUメモリ35からの情報に基づき
、最も古いブロックをリプレイスの対象とする。
If PYO~3 is set to A corresponding to each way,
If there are a plurality of I (blocks (ways)), the oldest block is selected for replacement based on the information from the LRU memory 35.

従って、対応する^CPYO〜3に、1”であるブロッ
クが1つもなければ、従来通りLRυメモリ35からの
情報に基づいて、最も古いブロックをリプレイスの対象
とする。
Therefore, if there is no block that is 1'' in the corresponding ^CPYO~3, the oldest block is targeted for replacement based on the information from the LRυ memory 35 as before.

下表は、該LRυメモリ35の情報が、ウェイ06=ウ
エイ1c=ウエイ26=ウエイ3の順に古く使用されて
いることを示している場合に、上記ACPYO〜3の値
によって、リプレイス決定回路37で選択されるリプレ
イスブロックを示したものである。
The table below shows that when the information in the LRυ memory 35 indicates that the information in the LRυ memory 35 is used in the order of way 06 = way 1c = way 26 = way 3, the replacement determination circuit 37 This shows the replacement block selected in .

上記の如く、本発明により、第2のBS(MBS) 3
の不必要なブロックを、優先的にリプレイスすることに
より、ヒント率を向上させることができ、メモリシステ
ムの能力を向上させることができる。
As mentioned above, according to the present invention, the second BS (MBS) 3
By replacing unnecessary blocks with priority, the hint rate can be improved and the capacity of the memory system can be improved.

次に、第2図によって2本発明の他の実施例について説
明する。最初に概略動作を説明する。
Next, two other embodiments of the present invention will be described with reference to FIG. First, the general operation will be explained.

タグ部(TAG) 22.32は要求データアドレスが
、当該バッファメモリのどのウェイに存在するかを検出
する為に備えられている。
A tag section (TAG) 22.32 is provided to detect in which way of the buffer memory the requested data address exists.

即ち、要求データアドレスの下位アドレスがタグ部(T
AG) 22.32のアクセス用アドレスとして、アド
レスレジスタ(LBAR) 21.(MBAR) 31
にセントされ、下位アドレスによりウェイO〜3のエン
トリーを同時に読み出し、登録されているアドレスと要
求データアドレスの上位アドレスとを比較回路(C) 
24.34で比較し、一致したものがあれば、該バッフ
ァメモリに所望のデータが存在すると認識する。どのウ
ェイにデータが有るかは旧T/N0N−HIT検出回路
−128’、1(IT/N0N−[T検出回路−238
′で検出され、ウェイセレクト信号がデータ部23等に
送出され、該当データが読み出されるように機能する。
That is, the lower address of the requested data address is the tag part (T
AG) 22. Address register (LBAR) as the access address of 32 21. (MBAR) 31
The circuit (C) reads out the entries of ways O to 3 at the same time based on the lower address, and compares the registered address with the higher address of the requested data address.
24.34, and if there is a match, it is recognized that the desired data exists in the buffer memory. Which way has data is determined by the old T/N0N-HIT detection circuit-128', 1(IT/N0N-[T detection circuit-238
', a way select signal is sent to the data section 23, etc., and the corresponding data is read out.

LRUメそり25.35には、タグ部(TAG)アクセ
スアドレス毎に対応して、ウェイ0〜3のどのウェイが
、次にリプレイスする対象になるかを示す内容がパター
ン化されて登録されている。
In the LRU memory 25.35, contents indicating which way among ways 0 to 3 will be replaced next are registered in a pattern corresponding to each tag part (TAG) access address. There is.

バッファメモリをアクセスして、所望のデータが存在し
た(HITした)時には、どのウェイが)IITしたか
により、上記LRUメモリの内容を更新し、その時点で
、最も古く使用された内容が、次にリプレイスするウェ
イとなるように制御される。
When the buffer memory is accessed and the desired data exists (HIT), the contents of the LRU memory are updated depending on which way did the IIT, and at that point, the oldest used contents are It is controlled so that it becomes the way to replace it.

上記動作で所望のデータが存在しない(NON−HIT
)の時には、上記LRUメモリ25.35よりパターン
化された情報を読み出し、リプレイスするウェイをLR
U決定回路127’、LRU決定回路237”で決定す
る。該LRUメモリ25.35をアクセスするアドレス
は、タグ部(TAG) 22.32をアクセスするアド
レスと同じアドレスが使用される。
The desired data does not exist in the above operation (NON-HIT)
), the patterned information is read from the LRU memory 25.35 and the way to be replaced is set to LR.
This is determined by the U determining circuit 127' and the LRU determining circuit 237''. The address used to access the LRU memory 25.35 is the same as the address used to access the tag section (TAG) 22.32.

次に、第1のBS(LBS) 2.第2のBS(MBS
) 3共にデータがなく、第1のBS(LBS) 2の
リプレイスプ     l(」 ロックに対応したアドレスが、第2のBS(MBS) 
3のリプレイス対象となるブロックアドレスのウェイ0
〜3の何れかに含まれている場合の動作を、以下に説明
する。
Next, the first BS (LBS) 2. Second BS (MBS
) There is no data in both 3, and the address corresponding to the lock is the 2nd BS (MBS).
Way 0 of the block address to be replaced with 3
The operation when any of the items 3 to 3 is included will be described below.

■ 第1のBS(LBS) 2にデータがな(、リプレ
イスブロックは、例えば、“ウェイ3”とLRU決定回
路127゛ により判定したとする。
(2) If there is no data in the first BS (LBS) 2, it is assumed that the replacement block is determined by the LRU determination circuit 127 to be "way 3", for example.

■ LBAR21のアドレスが第2のBS(MBS) 
3のMBAR31にセットされ、そのタグ部(TAG)
 32がアクセスされる。同時に、第1のBS(LBS
) 2のPBAR29に、上記リプレイスブロック(ウ
ェイ)3に対応した旧アドレスが、第1のBS(LBS
) 2のタグ部(TAG) 22のウェイ3から読み出
されているアドレスと、上記LBAR21からの下位ア
ドレスとにより生成されセットされる。
■ Address of LBAR21 is second BS (MBS)
It is set in MBAR31 of 3, and its tag part (TAG)
32 are accessed. At the same time, the first BS (LBS
) 2, the old address corresponding to the above-mentioned replace block (way) 3 is stored in the 1st BS (LBS
) Tag section (TAG) 2 is generated and set based on the address read from way 3 of 22 and the lower address from the LBAR 21 mentioned above.

■ 第2のBS(MBS) 3のタグ部(TAG) 3
2のウェイ0〜3から読み出されたアドレスが、比較器
(MC1〜MC4) 34によって、MBAR31の上
位アドレスと比較される。
■ Second BS (MBS) 3 tag section (TAG) 3
The addresses read from ways 0 to 3 of No. 2 are compared with the upper address of MBAR 31 by comparators (MC1 to MC4) 34.

同時に、第1のBS(LBS) 2の、PBAR29よ
り送出されるアドレスも、MBAR31の下位アドレス
とタグ部(TAG) 32のウェイO〜3から読み出し
たアドレスとによって生成されるウェイO〜3に対応す
るアドレスと比較器(PBCI〜PBC4) 34’ 
により比較される。
At the same time, the address sent from the PBAR 29 of the first BS (LBS) 2 is also transferred to the ways O to 3 generated by the lower address of the MBAR 31 and the address read from the ways O to 3 of the tag section (TAG) 32. Corresponding address and comparator (PBCI to PBC4) 34'
compared by.

ここで、HIT/N0N−HIT検出回路−238”に
より第2のBS(MBS) 3にも所望のデータがない
ことが検出された場合、該第1のBS(LBS) 2で
のLRU決定と同じようにしてLRU決定回路−237
゛によりリプレイスするウェイを決定するが、上記比較
器(PBC1〜PBC4) 34’ の何れか1つから
一致信号が出力された場合には、LRUメモリ35から
の情報に基づくリプレイスブロックの決定を抑止し、該
比較器(PBCI〜PBC4) 34’ で−散出力を
得たウェイをLRU決定回路−237°においてリプレ
イスウェイとするように機能する。
Here, if the HIT/N0N-HIT detection circuit 238'' detects that there is no desired data in the second BS (MBS) 3, the LRU determination at the first BS (LBS) 2 is performed. In the same way, LRU determination circuit-237
However, if a match signal is output from any one of the comparators (PBC1 to PBC4) 34', determination of the replacement block based on the information from the LRU memory 35 is suppressed. The comparator (PBCI to PBC4) 34' functions to set the way that has obtained the -dispersed output as a replacement way in the LRU determination circuit -237°.

若し、上記比較器(PBCI〜PBC4) 34’ か
らの一致信号が得られない時には、LRU央定回定回路
37゜においては、LRUメモリ35からの情報に基づ
いてリプレイス対象のウェイを決定する。
If no matching signal is obtained from the comparators (PBCI to PBC4) 34', the LRU central constant rotation circuit 37 determines the way to be replaced based on the information from the LRU memory 35. .

以上から明らかなように、本発明においては、第1のB
S(LBS) 2.第2のBS(MBS) 3の何れに
も所望のデータがなく、第1のBS(LBS) 2での
リプレイスブロックに対応する旧アドレスを、第2のB
S(MBS) 3のリプレイス対象ブロックが含んでい
る時には、第2のBS(MBS) 3においても、第1
のBS(LBS) 2のリプレイスブロックを含むブロ
ックをリプレイスすることができ、第2のBS(Mis
) 3の使用効率を高めることができると云う特徴があ
る。
As is clear from the above, in the present invention, the first B
S (LBS) 2. There is no desired data in any of the second BS (MBS) 3, and the old address corresponding to the replacement block in the first BS (LBS) 2 is transferred to the second BS (MBS) 3.
When the replacement target block of S(MBS) 3 is included, the first
BS (LBS) 2 blocks can be replaced, including the 2nd BS (Mis
) It has the characteristic that it can increase the usage efficiency of 3.

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

以上、詳細に説明したように、本発明のバッファメモリ
におけるリプレイス方式は、第1のBS(LBS)の記
憶容量〈第2のBS(にBS)の記憶容量で、第2のB
S (MBS)のブロックサイズが、第1のBS (L
BS)のブロックサイズの整数倍となっている、2階層
のバッファメモリシステムを備えた計算機システムにお
いて、 fl)第2のBS (MBS)から第1のBS (LB
S)にコピーされたサブブロックを記憶するコピーメモ
リを設け、第2のBS (MBS)においてリプレイス
が必要になった時、第1のBS (LBS)に総てのサ
ブブロックがコピーされたブロックを優先的にリプレイ
スする。
As explained above in detail, the replacement method in the buffer memory of the present invention is such that the storage capacity of the first BS (LBS) <the storage capacity of the second BS (BS),
The block size of S (MBS) is the same as that of the first BS (L
In a computer system equipped with a two-layer buffer memory system whose block size is an integer multiple of the block size of fl) the second BS (MBS) to the first BS (LB
A copy memory is provided to store the copied sub-blocks in S), and when replacement is required in the second BS (MBS), the block with all the sub-blocks copied to the first BS (LBS) is provided. Replace with priority.

(2)第1のBS (LBS)におけるリプレイスアド
レス(サブブロックアドレス)を記憶しておき、第2の
BS (MBS)でリプレイスが必要になった時、上記
サブブロックを含乙゛ブロックがあると、当該ブロック
を優先的にリプレイスする。
(2) Memorize the replacement address (subblock address) in the first BS (LBS), and when replacement is required in the second BS (MBS), there is a second block containing the above subblock. , the block is replaced preferentially.

(31(11,(21の条件が成立しない時には、公知
のLRt1方式によって選択されたブロックをリプレイ
スする。
(31 (11, (When the conditions of (21) are not satisfied, the block selected by the known LRt1 method is replaced.

ようにしたものであるので、第2のBS (MBS)に
おける使用効率を向上させ、計算機システム全体のパー
フォマンスを向上させる効果がある。
This has the effect of improving the usage efficiency of the second BS (MBS) and improving the performance of the entire computer system.

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

第1図は本発明の一実施例をブロック図で示した図。 第2図は本発明の他の実施例をブロック図で示した図。 第3図は2111層のバッファメモリを備えた情報処理
システムの構成例を示した図、          1
・第4図は3階層メモリシステムの構成例を示した図。 である。 図面において、 1は演算装置、    2は第1 ノBS (LBS)
 。 3は第2ノBS(MBs)、4ハ主記憶装置(MSU)
。 21はアドレスレジスタ(LBAR) 。 22はタグ部(TAG)、    23はデータ部。 24は比較器(C,LCI 〜LC4) 。 25はLRUメそり。 27′はLRu決定回路回路 28′ はHIT/N0N−HIT検出回路−1゜29
はPBAR。 31はアドレスレジスタ(AR,MBAR) 。 32はタグ部(TAG)、    33はデータ部。 34ハ比較H(C,MCI 〜MC4) 。 34゛ は比較器(PBCI 〜PBC4)。 35はLRUメモリ、37はリプレイス決定回路。 37′  はLRU決定回路2゜ 38°はHIT/N0N−)IIT検出回路−2゜をそ
れぞれ示す。 t−tstへ
FIG. 1 is a block diagram showing an embodiment of the present invention. FIG. 2 is a block diagram showing another embodiment of the present invention. Figure 3 is a diagram showing an example of the configuration of an information processing system equipped with 2111 layers of buffer memory.
- FIG. 4 is a diagram showing an example of the configuration of a three-layer memory system. It is. In the drawings, 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 an address register (LBAR). 22 is a tag section (TAG), and 23 is a data section. 24 is a comparator (C, LCI to LC4). 25 is LRU Mesori. 27' is an LRu determination circuit 28' is a HIT/N0N-HIT detection circuit -1°29
is PBAR. 31 is an address register (AR, MBAR). 32 is a tag section (TAG), and 33 is a data section. 34 C comparison H (C, MCI to MC4). 34゛ is a comparator (PBCI to PBC4). 35 is an LRU memory, and 37 is a replacement determination circuit. 37' indicates the LRU determination circuit 2°, and 38° indicates the HIT/N0N-)IIT detection circuit-2°, respectively. to t-tst

Claims (2)

【特許請求の範囲】[Claims] (1)セットアソシアティブ型のバッファメモリであっ
て、第1のバッファメモリ(LBS)上に所望のデータ
がある場合は、第1のバッファメモリ(LBS)よりデ
ータを読み出し、データが存在しない場合には第2のバ
ッファメモリ(MBS)を参照し、該第2のバッファメ
モリ(MBS)にデータがある場合には、該第2のバッ
ファメモリ(MBS)より第1のバッファメモリ(LB
S)へデータをブロック転送し、第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)に転送されたことを
示すものがあれば、優先的にそのブロックをリプレイス
の対象とするように制御することを特徴とするバッファ
メモリにおけるリプレイス方式。
(1) In a set associative type buffer memory, if the desired data exists on the first buffer memory (LBS), read the data from the first buffer memory (LBS), and if the data does not exist, read the data from the first buffer memory (LBS). refers to the second buffer memory (MBS), and if there is data in the second buffer memory (MBS), the data is transferred from the second buffer memory (MBS) to the first buffer memory (LB).
When a block of data is transferred to S) 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) and the second buffer memory (MBS). The block size of the second buffer memory (MBS) is n times the block size of the first buffer memory (LBS) (n≧2). In a computer system equipped with a two-layer buffer memory system that uses an LRU method to replace the oldest block, the data replacement algorithm for both buffer memories (MBS) ), an n-bit copy bit 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) have been transferred to the first buffer memory (LBS). is provided for each block of the second buffer memory (MBS), and the second buffer memory (MBS)
When the need for replacement arises, among the m blocks (m is the number of associative levels of the second buffer memory (MBS)) that are candidates for replacement, the copy bit is referred to and the block is replaced. If there is an indication that the contents of all the sub-blocks have been transferred to the first buffer memory (LBS), control is performed so that that block is preferentially targeted for replacement. Replacement method for buffer memory.
(2)セットアソシアティブ型のバッファメモリであっ
て、第1のバッファメモリ(LBS)上に所望のデータ
がある場合は、第1のバッファメモリ(LBS)よりデ
ータを読み出し、データが存在しない場合には第2のバ
ッファメモリ(MBS)を参照し、該第2のバッファメ
モリ(MBS)にデータがある場合には、該第2のバッ
ファメモリ(MBS)より第1のバッファメモリ(LB
S)へデータをブロック転送し、第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のバッファメモリ(M
BS)制御回路に設け、該第2のバッファメモリ(MB
S)のリプレイスブロックを決定する際に、上記第1の
バッファメモリ(LBS)から送信されてきたアドレス
を含むブロックが、上記比較器で検出された時には、該
ブロックをリプレイスし、該送信されてきたアドレスを
含むブロックが検出されなかった時には、上記LRU方
式によってリプレイスすべきブロックを決定するように
制御することを特徴とするバッファメモリにおけるリプ
レイス方式。
(2) In a set associative type buffer memory, if the desired data exists on the first buffer memory (LBS), read the data from the first buffer memory (LBS), and if the data does not exist, read the data from the first buffer memory (LBS). refers to the second buffer memory (MBS), and if there is data in the second buffer memory (MBS), the data is transferred from the second buffer memory (MBS) to the first buffer memory (LB).
When a block of data is transferred to S) 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) and the second buffer memory (MBS). The block size of the second buffer memory (MBS) is n times the block size of the first buffer memory (LBS) (n≧2). In a computer system equipped with a two-layer buffer memory system that uses an LRU method to replace the oldest block, the data replacement algorithm for both buffer memories (BS) is configured such that the first buffer memory (LBS) ), when replacing a certain block, a means is provided for transmitting the address information of the block to be replaced to the second buffer memory (MBS), and if there is no data in the second buffer memory (MBS), The second buffer memory (MBS)
The second buffer memory (M
BS) control circuit, and the second buffer memory (MB
When determining the replacement block of S), if the comparator detects a block including the address transmitted from the first buffer memory (LBS), replace the block and replace the transmitted address. 1. A replacement method in a buffer memory, characterized in that when a block containing an address is not detected, the LRU method is used to determine a block to be replaced.
JP60006836A 1985-01-18 1985-01-18 Replacing system for buffer memory Granted JPS61166651A (en)

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 true JPS61166651A (en) 1986-07-28
JPH0340412B2 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5704056A (en) * 1992-11-04 1997-12-30 Fujitsu Limited Cache-data transfer system
JP2009252165A (en) * 2008-04-10 2009-10-29 Toshiba Corp Multi-processor system
JP2011141831A (en) * 2010-01-08 2011-07-21 Toshiba Corp Multicore system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5704056A (en) * 1992-11-04 1997-12-30 Fujitsu Limited Cache-data transfer system
JP2009252165A (en) * 2008-04-10 2009-10-29 Toshiba Corp Multi-processor system
JP2011141831A (en) * 2010-01-08 2011-07-21 Toshiba Corp Multicore system

Also Published As

Publication number Publication date
JPH0340412B2 (en) 1991-06-18

Similar Documents

Publication Publication Date Title
JP5440067B2 (en) Cache memory control device and cache memory control method
US7552286B2 (en) Performance of a cache by detecting cache lines that have been reused
US6446171B1 (en) Method and apparatus for tracking and update of LRU algorithm using vectors
US20040260880A1 (en) Method, system, and apparatus for an hierarchical cache line replacement
KR19980079433A (en) Method and system for implementing cache coherency mechanism for use in non-cache cache hierarchy
JPH03142644A (en) Cache memory control system
JP6009688B2 (en) Memory management using dynamically allocated dirty mask space
JP2000010860A (en) Cache memory control circuit, processor, processor system, and parallel processor system
WO2007099598A1 (en) Processor having prefetch function
US6240489B1 (en) Method for implementing a pseudo least recent used (LRU) mechanism in a four-way cache memory within a data processing system
US6449698B1 (en) Method and system for bypass prefetch data path
US5361342A (en) Tag control system in a hierarchical memory control system
US7555610B2 (en) Cache memory and control method thereof
US7007135B2 (en) Multi-level cache system with simplified miss/replacement control
US20050198438A1 (en) Shared-memory multiprocessor
JPS61166651A (en) Replacing system for buffer memory
US6397298B1 (en) Cache memory having a programmable cache replacement scheme
US7805572B2 (en) Cache pollution avoidance
JPH044617B2 (en)
JPH05216765A (en) Hierarchical buffer storage device
JPS6194159A (en) Memory
JPH06139147A (en) Cache memory system
JP2000047942A (en) Device and method for controlling cache memory
US9304917B2 (en) Flush control apparatus, flush control method and cache memory apparatus
US7370154B2 (en) Method and apparatus for maintaining coherence information in multi-cache systems