JPS61290555A - Cache system - Google Patents

Cache system

Info

Publication number
JPS61290555A
JPS61290555A JP60133432A JP13343285A JPS61290555A JP S61290555 A JPS61290555 A JP S61290555A JP 60133432 A JP60133432 A JP 60133432A JP 13343285 A JP13343285 A JP 13343285A JP S61290555 A JPS61290555 A JP S61290555A
Authority
JP
Japan
Prior art keywords
lru
cache
memory
value
directory
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
JP60133432A
Other languages
Japanese (ja)
Other versions
JPH0444295B2 (en
Inventor
Koichi Kanamaru
金丸 孝一
Junichi 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.)
Toshiba Corp
Toshiba Computer Engineering Corp
Original Assignee
Toshiba Corp
Toshiba Computer Engineering Corp
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 Toshiba Corp, Toshiba Computer Engineering Corp filed Critical Toshiba Corp
Priority to JP60133432A priority Critical patent/JPS61290555A/en
Priority to KR1019860004008A priority patent/KR900006252B1/en
Priority to EP86107284A priority patent/EP0203601B1/en
Priority to DE8686107284T priority patent/DE3686291T2/en
Priority to US06/867,449 priority patent/US4835686A/en
Priority to EP19910110603 priority patent/EP0452991A3/en
Priority to EP19910110598 priority patent/EP0452989A3/en
Priority to EP19910110599 priority patent/EP0452990A3/en
Publication of JPS61290555A publication Critical patent/JPS61290555A/en
Priority to US07/329,019 priority patent/US4920478A/en
Publication of JPH0444295B2 publication Critical patent/JPH0444295B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

PURPOSE:To obtain a cache system which can control a degree of residence in a cache memory of the data block concerned, by constituting it so that an LRU set value which is applied to initialization or reregistration of an LRU value becomes variable. CONSTITUTION:In case of initializing or reregistering an LRU value, a microprocessor 27 refers to read/write commands from a host system 11 of a buffer memory 30, and decides whether CC2 of its cache control bits CC2-CC0 is '0' or not. In case when the CC2 is '0', a prescribed value is generated by shifting an LRU set value, supplied to a memory 35 through a bus 26, a driver receiver D/R 32, and a bus 31, and registered in an LRU counter field of an entry. In case of a directory searching, in the next time, this LR value is used, and accordingly, if CC1 and CC0 are set to '1' in advance, a degree of residence in a cache memory 33 can be made small, and if they are set to '0' in advance, the degree of residence can be made large. Accordingly, by combining CC1 and CC0, the degree of residence in the cache memory 33 of a data block can be controlled.

Description

【発明の詳細な説明】 [発明の技術分野] この発明は、キャッシュブロックの置換アルゴリズムに
LRU方式を適用するキャッシュシステムに関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a cache system that applies an LRU method to a cache block replacement algorithm.

[発明の技術的背!!4j この種キャッシュシステムでは、リード/ライト要求に
対するメモリアクセスに際し、まずディレクトリサーチ
をサーチして目的のデータがキャッシュメモリに存在す
るか否かを調べる動作が行なわれる。そしてディレクト
リサーチの結果キャッシュピット或はミスヒットタなり
た場合、ヒツトしたキャッシュブロック或は置換対象と
なるキャッシュブロックに対応するLRU値を固定値例
えば“O″に初期化或は再登録する動作が行なわれる。
[Technical background of invention! ! 4j In this type of cache system, when accessing a memory in response to a read/write request, a directory search is first performed to determine whether or not the target data exists in the cache memory. If the directory search results in a cache pit or mishit, an operation is performed to initialize or re-register the LRU value corresponding to the hit cache block or the cache block to be replaced to a fixed value, such as "O". .

そして、もしリード要求時のミスヒツトであれば、該当
するデータ70ツクがメモリがら読出されると共に(キ
ャッシュメモリ内の)置換対象キャッシュブロックに登
録される。
If there is a miss at the time of a read request, the corresponding data 70 pieces are read from the memory and registered in the replacement target cache block (in the cache memory).

[背景技術の問題点] 上記したように従来のキャッシュシステムでは、LRU
の設定値はキャッシュメモリに登録されるデータブロッ
クに無関係に固定化されていた。しかし、キャッシュブ
ロックに登録されるデータブロックの使用頻度は、ファ
イルの形態によって様々である。そこで本発明者等は、
LRUの設定値が固定化されている従来のキャッシュシ
ステムでは、使用頻度の低いデータブロックが−Hキャ
ッシュブロックに登録されると、同データブロックのキ
ャッシュメモリにおける常駐度が、他・の使用頻度の高
いファイルより大きくなってしまい、キャッシュメモリ
のヒツト率の低下を招(恐れがあることを!!!識する
に至った。
[Problems in the background art] As mentioned above, in the conventional cache system, the LRU
The setting value was fixed regardless of the data block registered in the cache memory. However, the usage frequency of data blocks registered in cache blocks varies depending on the file format. Therefore, the present inventors
In a conventional cache system in which the LRU setting value is fixed, when a data block that is infrequently used is registered in a -H cache block, the residency level of the same data block in the cache memory becomes higher than that of other frequently used data blocks. I came to realize that there was a risk that the file would become larger than the high file size, leading to a decrease in the hit rate of the cache memory.

[発明の目的] この発明は上記事情に鑑みてなされたものでその目的は
、LRUIの初期化或は再登録に適用されるLRU設定
値が可変でき、もって該当するデータブロックのキャッ
シュメモリ内常駐度が制御できるキャッシュシステムを
提供することにある。
[Object of the Invention] This invention has been made in view of the above circumstances, and its purpose is to make it possible to change the LRU setting value applied to initialization or re-registration of the LRUI, thereby making it possible to make the corresponding data block resident in the cache memory. The purpose of this invention is to provide a cache system that can control the degree of caching.

[発明の概要] この発明によれば、キャッシュブロックの置換アルゴリ
ズムにLRU方式を適用するキャッシュシステムが適用
される。上記システムには、各エントリにLRUカウン
タフィールドを有するディレクトリメモリと、任意のL
RU設定値が付加されたリード/ライトコマンドを発す
るコマンド発行手段と、ディレクトリサーチ手段と、登
録手段とが設けられる。ディレクトリサーチ手段は、コ
マンド発行手段によりリード/ライトコマンドが発行さ
れると、同コマンドに応じて°ディレクトリメモリをサ
ーチする。登録手段は、ディレクトリサーチ手段のサー
チ結果に応じ、ディレクトリメモリのビットエントリま
たは置換対象キャッシュブロックに対応するエントリの
LRUカウンタフィールドに、リード/ライトコマンド
に付加されているLRU設定値を登録する。
[Summary of the Invention] According to the present invention, a cache system is applied that applies an LRU method to a cache block replacement algorithm. The above system includes a directory memory with an LRU counter field in each entry, and an arbitrary LRU counter field.
A command issuing means for issuing a read/write command to which an RU setting value is added, a directory search means, and a registration means are provided. When a read/write command is issued by the command issuing means, the directory search means searches the directory memory in response to the command. The registration means registers the LRU setting value added to the read/write command in the LRU counter field of the bit entry of the directory memory or the entry corresponding to the cache block to be replaced, according to the search result of the directory search means.

[発明の実施例] 第1図はこの発明の一実施例に係るキャッシュシステム
、例えばディスクキャッシュシステムのブロック構成を
示すもので、20は磁気ディスク制御装置である。磁気
ディスク制御装置20は、磁気ディスク装置10を制御
するハードディスクコントロール回路(以下HDCと称
する)21を有している。HDC21はデータライン2
2およびコントロールライン23から成る第1のバス2
4、ドライバ/レシーバ(以下D/Rと称する)25を
介してホストシステム11と接続されている。HDC2
1は第2のバス26にも接続されている。バス26には
磁気ディスク制御装置20全体を制御するマイクロプロ
せツサ27、マイクロプロセッサ270制御用プログラ
ム(マイクロプログラム)を記憶するプログラムメモリ
28、マイクロプロセッサ21の作業用領域を成すワー
クメモリ29、および磁気ディスク装置10とホストシ
ステム11との間の転送速度の差を吸収するためのバッ
ファメモリ30が接続されている。
[Embodiment of the Invention] FIG. 1 shows a block configuration of a cache system, for example, a disk cache system, according to an embodiment of the invention, and 20 is a magnetic disk control device. The magnetic disk control device 20 has a hard disk control circuit (hereinafter referred to as HDC) 21 that controls the magnetic disk device 10 . HDC21 is data line 2
2 and a first bus 2 consisting of a control line 23
4. Connected to the host system 11 via a driver/receiver (hereinafter referred to as D/R) 25. HDC2
1 is also connected to a second bus 26. The bus 26 includes a microprocessor 27 that controls the entire magnetic disk control device 20, a program memory 28 that stores a program (microprogram) for controlling the microprocessor 270, a work memory 29 that forms a work area for the microprocessor 21, and A buffer memory 30 is connected to absorb the difference in transfer speed between the magnetic disk device 10 and the host system 11.

31は第3のバスである。バス31はD/R(ドライバ
/レシーバ)32を介して第2のバス26に接続されて
いる。バス31にはキャッシュメモリ33の制御を含む
データ転送制御を主として行なうキャッシュコントロー
ル回路34およびディレクトリメモリ35が接続されて
いる。ディレクトリメモリ35の各エントリは、第2図
に示すように、キャッシュメモリ33に登録されている
データブロック(ディスクブロック)の番号を示すディ
スクブロック番号フィールドと、LRU値(8ピツト)
を示すLRUカウンタフィールドとを含んでいる。ディ
レクトリメモリ35のエントリ数はキャッシュメモリ3
3のキャッシュブロック数に一致しており、1カラムに
つき例えば16(16レベル)である。
31 is the third bus. The bus 31 is connected to the second bus 26 via a D/R (driver/receiver) 32. Connected to the bus 31 are a cache control circuit 34 which mainly performs data transfer control including control of the cache memory 33, and a directory memory 35. As shown in FIG. 2, each entry in the directory memory 35 includes a disk block number field indicating the number of the data block (disk block) registered in the cache memory 33, and an LRU value (8 pits).
and an LRU counter field indicating the LRU counter field. The number of entries in the directory memory 35 is the same as the cache memory 3.
3, and for example, 16 (16 levels) per column.

この実施例では、磁気ディスク装置10とキャッシュメ
モリ33とは、64セクタ(1トラック分)を1ブロツ
クとして対応付゛けられる。また磁気ディスク装置!1
0の領域(ディスク領域)は64セクタ(1プOツク)
毎にカラム0とカラム1の2カラムに分割される。した
がってカラム値は、ディスク論理アドレスの最下位より
7番目のビットで示される。またディスクブロック番号
は、ディスク論理アドレスの下位7ビツトを除く残りビ
ットで示される。
In this embodiment, the magnetic disk device 10 and the cache memory 33 are associated with each other with 64 sectors (one track) as one block. Another magnetic disk device! 1
The 0 area (disk area) is 64 sectors (1 disk)
Each column is divided into two columns, column 0 and column 1. Therefore, the column value is indicated by the seventh least significant bit of the disk logical address. Further, the disk block number is indicated by the remaining bits excluding the lower 7 bits of the disk logical address.

第3のバス31には、ディレクトリサーチ時にディレク
トリメモリ35から読出されたLRU値が設定されるL
RUカウンタ(以下、CLRUと称する)36の入力お
よびドライバ37の出力も接続されている。CL Rt
J 36の出力およびドライバ37の入力は、キャッシ
ュコントロール回路34に接続されている。またバス3
1には、レジスタファイル38の入力ポートおよび比較
!139の8入力も接続されている。レジスタファイル
38の出力ポートは比較器39のA入力に接続され、比
較器39の出力ポートはキャッシュコントロール回路3
4に接続されている。
The LRU value read from the directory memory 35 at the time of directory search is set on the third bus 31.
The input of an RU counter (hereinafter referred to as CLRU) 36 and the output of a driver 37 are also connected. CL Rt
The output of J 36 and the input of driver 37 are connected to cache control circuit 34 . Also bus 3
1 includes the input port of the register file 38 and the comparison! 139's 8 inputs are also connected. The output port of the register file 38 is connected to the A input of the comparator 39, and the output port of the comparator 39 is connected to the cache control circuit 3.
Connected to 4.

キャッシュコントロール回路34は、ドライバ37によ
りバス31上に出力されるC L RU 36の内容C
LRU値)のレジスタファイル38への入力を制御する
如く、レジスタファイル38と接続されている。
The cache control circuit 34 outputs the contents of the C L RU 36 onto the bus 31 by the driver 37.
It is connected to the register file 38 so as to control the input of the LRU value) to the register file 38.

ディレクトリメモリ35のアドレスポートAには同メモ
リ35のアドレスを指定するディレクトリメモリアドレ
スカウンタ(以下、CDMAと称する)40の出力が接
続され、CD M A 4Gの入力は第2のバス26に
接続されている。CD M A 40の出力はレジスタ
ファイル41の入力ポートにも接続され、レジスタファ
イル41の出力ポートは第2のバス26に接続されてい
る。またレジスタファイル41には、キャッシュコント
ロール回路34による制御が可能な如く同コントロール
回路34が接続されている。
The output of a directory memory address counter (hereinafter referred to as CDMA) 40 that specifies the address of the directory memory 35 is connected to address port A of the directory memory 35, and the input of CDMA 4G is connected to the second bus 26. ing. The output of CD MA 40 is also connected to the input port of register file 41, and the output port of register file 41 is connected to second bus 26. Further, a control circuit 34 is connected to the register file 41 so that the cache control circuit 34 can control the register file 41 .

次にこの発明の一実施例の動作を説明する。Next, the operation of one embodiment of the present invention will be explained.

ホストシステム50からのディスクアクセス要求である
リード/ライトコマンドはD / R25、ノSス24
を介してHDC21に伝えられ、HDC21内のコマン
ドレジスタ(図示せず)に保持゛される。このリード/
ライトコマンドは、第3図に示すように、リード/ライ
ト等の動作を指定するコマンドコード、論理アドレス2
(MSB)、論理アドレス1および論理アドレス0 (
LSB)から成るディスク論理アドレス、データブロッ
ク数およびキャッシュコントロールピットCC2〜CC
Oの各フィールドを含む6バイトの命令である。
Read/write commands, which are disk access requests from the host system 50, are sent to the D/R 25 and No. 24.
The command is transmitted to the HDC 21 via the HDC 21 and held in a command register (not shown) within the HDC 21. This lead/
As shown in Figure 3, the write command consists of a command code specifying operations such as read/write, and a logical address 2.
(MSB), logical address 1 and logical address 0 (
LSB) disk logical address, number of data blocks, and cache control pits CC2 to CC
It is a 6-byte instruction including each field of O.

コマンドレジスタ内のリード/ライトコマンドはマイク
ロプロセッサ21により読出されワークメモリ29の所
定領域に格納される。マイクロプロセッサ27は、(ホ
ストシステム40からの)リード/ライトコマンドをワ
ークメモリ29に格納すると、同要求に従ってシークコ
マンドを発行しHDC21にセットする。これによりH
DC21は指定されたトラックをシークするように磁気
ディスク装置10を制御する。またマイクロプロセッサ
27は、上記リード/ライトコマンドに従い、アクセス
対象となる磁気ディスク装置10の領域(ディスク領域
)に対応したディスクブロック番号および値がOのLR
U値を、バス2B、D / R32およびバス31経由
でレジスタファイル38にセットする。またマイクロプ
ロセッサ27はディスク論理アドレスの最下位ピットよ
り7番目のピット(第3図に示す論理アドレス0のピッ
ト6)即ちカラム値の示すディレクトリメモリ35の領
域(16個のエントリの領域)の先頭アドレスをCD 
M A 4Gにセットする。しかして以下に示すディレ
クトリサーチサイクルが16回繰返される。
The read/write command in the command register is read by the microprocessor 21 and stored in a predetermined area of the work memory 29. When the microprocessor 27 stores the read/write command (from the host system 40) in the work memory 29, it issues a seek command and sets it in the HDC 21 in accordance with the request. This results in H
The DC 21 controls the magnetic disk device 10 to seek a designated track. Further, in accordance with the read/write command, the microprocessor 27 reads the disk block number corresponding to the area (disk area) of the magnetic disk device 10 to be accessed and the LR whose value is O.
Set the U value in register file 38 via bus 2B, D/R 32 and bus 31. In addition, the microprocessor 27 locates the seventh pit from the lowest pit of the disk logical address (pit 6 of logical address 0 shown in FIG. 3), that is, the beginning of the area of the directory memory 35 (area of 16 entries) indicated by the column value. CD address
Set to M A 4G. Thus, the directory search cycle shown below is repeated 16 times.

このディレクトリサーチサイクルでは、まずCD M 
A 40の示す(ディレクトリメモリ)アドレスがレジ
スタファイル41の第1の所定位置にセットされる。モ
してCD M A 40が順次カウントアツプされる。
In this directory search cycle, first the CD M
The (directory memory) address indicated by A 40 is set in the first predetermined position of the register file 41. Then, the CD MA 40 is sequentially counted up.

これによりCDMA40の示すディレクトリメモリ35
のエントリのディレクトリ情報がバイト単位でバス31
に読出され、比較器39のB入力に供給される。また、
これに同期して、レジスタファイル38の格納情報・が
比較!I39のA入力にバイト単位で供給される。比較
器39はA、B入力内容を比較する。比較器39の結果
、即ちレジスタファイル38からの(ターゲットとして
の)データブロック番号とディレクトリメモリ35から
の(ll録)データブロック番号との゛バイト単位での
一比較結果と、レジスタファイル38からのLRu値と
ディレクトリメモリ35からのLRU値との比較結果と
が、順にキャッシュコントロール回路34に通知される
As a result, the directory memory 35 indicated by CDMA40
The directory information for the entry in bytes is transferred to bus 31.
is read out and supplied to the B input of the comparator 39. Also,
In synchronization with this, the information stored in the register file 38 is compared! It is supplied in bytes to the A input of I39. A comparator 39 compares the input contents of A and B. The result of the comparator 39, that is, the result of a comparison of the data block number (as a target) from the register file 38 and the (ll record) data block number from the directory memory 35 in byte units; The results of the comparison between the LRu value and the LRU value from the directory memory 35 are sequentially notified to the cache control circuit 34.

またディレクトリメモリ35からバス31経由で比較器
39の8人力に供給されるディレクトリ情報のうちのL
RU値は、CLRU3Bにロードされ+1される。
Also, L of the directory information supplied from the directory memory 35 to the eight comparators 39 via the bus 31
The RU value is loaded into CLRU3B and incremented by +1.

キャッシュコントロール回路34は、まず比較器39の
データブロック番号比較結果により、キャツシュヒツト
したか否かを判定する。もしキャッシユヒットしていれ
ば、キャッシュコントa−ル回路34はレジスタファイ
ル41の第1の所定位置にセットされている(ディレク
トリメモリ)アドレス(現ディレクトリサーチサイクル
の該当エントリの先頭位置を示すアドレス)にキャツシ
ュヒツトを示すヒツトフラグを付加して同ファイル41
の第2の所定位置にセットする。次にキャッシュコント
ロール回路34は、比較器39のLRU値比較結果によ
り、その時点における置換対象キャッシュブロック(に
対応するディレクトリメモリ35のエントリ)を決定す
る。もしディレクトリメモリ35からのLRU値がレジ
スタファイル38からのLRU値以上であれば、キャッ
シュコントロール回路34は該当エントリに対応するキ
ャッシュブロックが置換対象キャッシュブロックである
ものとひとまず判断する。この場合、キャッシュコント
ロール回路34はレジスタファイル41の第1の所定位
置にセットされている(ディレクトリメモリ)アドレス
を同ファイル41の第3の所定位置にセットする。
The cache control circuit 34 first determines whether or not a cache hit has been made based on the data block number comparison result of the comparator 39. If there is a cache hit, the cache control circuit 34 checks the (directory memory) address set in the first predetermined location of the register file 41 (the address indicating the starting position of the corresponding entry in the current directory search cycle). ) to the same file 41 by adding a hit flag indicating a hit.
the second predetermined position. Next, the cache control circuit 34 determines (the corresponding entry in the directory memory 35) the cache block to be replaced at that point in time based on the LRU value comparison result of the comparator 39. If the LRU value from the directory memory 35 is greater than or equal to the LRU value from the register file 38, the cache control circuit 34 temporarily determines that the cache block corresponding to the corresponding entry is the replacement target cache block. In this case, the cache control circuit 34 sets the (directory memory) address set in the first predetermined location of the register file 41 to the third predetermined location of the same file 41 .

またキャッシュコントロール回路34はCL RU a
6の示す(+1された)LRU値をドライバ31よりバ
ス31上に出力せしめ、レジスタファイル38内のLR
U値をバス31上のLRU値に更新する。更にキャッシ
ュコントロール回路34は上記バス31上の(CLRU
36からの)LRU値を、比較器39の比較結果に無関
係にディレクトリメモリ35の対応エントリに書込む。
In addition, the cache control circuit 34
The LRU value indicated by 6 (+1) is output from the driver 31 onto the bus 31, and the LR value in the register file 38 is
Update the U value to the LRU value on bus 31. Further, the cache control circuit 34 is connected to the (CLRU) on the bus 31.
36) is written to the corresponding entry in the directory memory 35, regardless of the comparison result of the comparator 39.

即ち本実施例では、ディレクトリサーチサイクル毎に、
ディレクトリメモリ35の対応エントリ内のLRU値が
1される。
That is, in this embodiment, for each directory search cycle,
The LRU value in the corresponding entry in the directory memory 35 is set to 1.

以上がディレクトリサーチサイクルであり、このサイク
ルが16回(16レベル分)繰返されることにより、リ
ード/ライトコマンドに対応するディレクトリサーチが
終了する。このときレジスタファイル41の第2の所定
位置には、もしキャツシュヒツトしていたならば、該当
キャッシュブロックに対応するディレクトリメモリ35
のエントリの(先頭)アドレスがセットされている。ま
たレジスタファイル41の第3の所定位置には、指定さ
れたカラムの中で最も大きなLRU値を有しているディ
レクトリメモリ35のエントリの(先M)アドレスがセ
ットされている。
The above is the directory search cycle, and by repeating this cycle 16 times (for 16 levels), the directory search corresponding to the read/write command is completed. At this time, if the cache block has been cached, the directory memory 35 corresponding to the cache block is stored in the second predetermined location of the register file 41.
The (starting) address of the entry is set. Further, in the third predetermined position of the register file 41, the (first M) address of the entry in the directory memory 35 having the largest LRU value in the designated column is set.

マイクロプロセッサ27では、ディレクトリサーチが終
了すると、レジスタファイル41の第2の所定位置の内
容をバス26経由で読込み、キャツシュヒツト或はミス
ヒツトのいずれであったかを調べる。もしキャツシュヒ
ツトしていたならば、或はミスヒツトであってもリード
動作が指定されていれば、上記読込んだレジスタファイ
ル41の第2の所定位置の内容(ディレクトリアドレス
)によつ°て指定されているディレクトリメモリ35の
エントリ内のLRU値を次に述べるように初期化(或は
再登録)する。
When the directory search is completed, the microprocessor 27 reads the contents of the second predetermined location of the register file 41 via the bus 26, and checks whether it was a cache hit or a miss. If there is a catch hit, or if a read operation is specified even if there is a miss, the read operation is specified by the contents (directory address) of the second predetermined location of the read register file 41. The LRU value in the entry of the directory memory 35 is initialized (or re-registered) as described below.

即ちマイクロプロセッサ27は、LRU値を初期化(或
は再登録)する場合、まずバッフ7メモリ30に保存し
ておいたホストシステム11からのリード/ライトコマ
ンドを参照し、そのキャッシュコントロールビットCG
2〜CGOのCC2が“0”であるか否かを判断する。
That is, when the microprocessor 27 initializes (or re-registers) the LRU value, it first refers to the read/write command from the host system 11 stored in the buffer 7 memory 30, and sets the cache control bit CG.
2 to determine whether CC2 of CGO is "0".

本実施例ではcc2−“OITの場合、CC1、cco
がLRU設定用データとして定義されている。マイクロ
プロセッサ27は、CC2−“0”の場合、CC1、c
cOを6ピツト左シフトして第4図に示すようにLRU
設定値ccl  (MSB)、cco 、O,O,0゜
0、O,O(LSB)を作成し、同LRU設定値をバス
26、D / R32およびバス31経由でディレクト
リメモリ35へ供給し、同メモリ35の前記したエント
リのLRUカウンタフィールドに登録する。
In this example, if cc2-“OIT, CC1, cco
is defined as LRU setting data. In the case of CC2-“0”, the microprocessor 27 selects CC1, c
Shift cO to the left by 6 pits to obtain LRU as shown in Figure 4.
Create setting values ccl (MSB), cco, O, O, 0°0, O, O (LSB), supply the same LRU setting values to the directory memory 35 via the bus 26, D/R 32 and bus 31, It is registered in the LRU counter field of the above-mentioned entry in the same memory 35.

次回のディレクトリサーチ(におけるLRU値比較並び
にCLRU36へのセット)には、この新たに登録され
゛たLRU設定値が用いられる。したがって、ccl 
、ccOを“1″に設定しておけば該当データブロック
のキャツシュメモリ33内常駐度を大きくでき、“0”
に設定しておけば同常駐度を小さくできる。即ちcci
 、ccoの組合わせによりデータブロックのキャツシ
ュメモリ33内常駐度が制御できる。
This newly registered LRU setting value is used for the next directory search (LRU value comparison and setting to CLRU 36). Therefore, ccl
, by setting ccO to "1", the degree of residence of the corresponding data block in the cash memory 33 can be increased, and it becomes "0".
By setting it to , you can reduce the degree of co-residency. That is, cci
, cco can control the degree of residence of data blocks in the cache memory 33.

なお、キャツシュヒツト或はミスヒツト時におけるリー
ド/ライトコマンドに対応したキャッシュメモリ33更
には磁気ディスク装置10に対するアクセス動作につい
ては、本発明の要旨に直接関係しないため説明を省略す
る。
Note that the operation of accessing the cache memory 33 and the magnetic disk device 10 in response to a read/write command at the time of a cache hit or miss will not be described because it is not directly related to the gist of the present invention.

以上は磁気ディスクの写しをキャッシュメモリにもつデ
ィスクキャッシュシステムについて説明したが、本発明
は主記憶の写しをキャッシュメモリにもつキャッシュシ
ステムにも適用できる。
Although a disk cache system in which a copy of a magnetic disk is stored in a cache memory has been described above, the present invention can also be applied to a cache system in which a copy of a main memory is stored in a cache memory.

[発明の効果] 以上詳述したようにこの発明によれば、キャツシュヒツ
ト時或はミスヒツト時にディレクトリメモリの該当エン
トリ内のLRUi[を任意のLRLJ設定値に初期化或
は再登録できるので、該当するデータブロックのキャッ
シュメモリ内常駐度を制御でき、キャツシュヒツト率の
向上が図れる。
[Effects of the Invention] As detailed above, according to the present invention, LRUi[ in the corresponding entry in the directory memory can be initialized or re-registered to an arbitrary LRLJ setting value at the time of a cash hit or a miss. The degree of residence of data blocks in the cache memory can be controlled, and the cache hit rate can be improved.

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

第1図はこの発明の一実施例に係るディスクキャッシュ
システムのブロック構成図、第2図は第1図に示すディ
レクトリメモリ35のエントリ構成を示す図、第3図は
第1図のシステムで適用されるリード/ライトコマンド
のフォーマットを示す図、第4図はLRU設定値のフォ
ーマットを示す図である。 10・・・磁気ディスク装置、11−・ホストシステム
、20・・・磁気ディスク1iI1m装置、27・・・
マイクロプロセッサ、33・・・キャッシュメモリ、3
4・・・キャッシュコントロール回路、35・・・ディ
レクトリメモリ、36・・・LRLJカウンタ(CLR
U)、39・・・比較器。 第2図 13図 第4図 手続補正書 1、事件の表示 特願昭60−133432号 2、発明の名称 キャッシュシステム 3、補正をする者 事件との関係  特許出願人 (307)  株式会社 東芝 (ほか1名) 4、代理人 東京都港区虎ノ門1丁目26番5号 第17森ピル6、
補正の対象 7、補正の内容 (1)明細書、の第12頁第9行目にrLRU値が1さ
れる。」とあるをrLRU値が+1される。」と訂正す
る。 ■ 明細書の第13真第6行目、乃至同頁第12行目に
「もし・・・する。」とあるを「もしキャツシュヒツト
していたならば、上記読込んだレジスタファイル41の
第2の所定位置の内容(ディレクトリアドレス)によっ
て指定されているディレクトリメモリ35のエントリ内
のLRU値を、或はミスヒツトであってもリード動作が
指定されていれば、レジスタファイル41の第3の所定
位置の内容によって指定されているディレクトリメモリ
35のエントリ内のLRU値を、初期化(或は再登録)
する。 」と訂正する。 (3明細書の第14頁第13行目に「木き′でき、」と
あるを「小さくでき、Jと訂正する。 (4)明細書の第14頁第14行目に「小さくできる。 」とあるを「大きくできる。」と訂正する。
FIG. 1 is a block configuration diagram of a disk cache system according to an embodiment of the present invention, FIG. 2 is a diagram showing the entry configuration of the directory memory 35 shown in FIG. 1, and FIG. FIG. 4 is a diagram showing the format of the read/write command to be executed, and FIG. 4 is a diagram showing the format of the LRU setting value. DESCRIPTION OF SYMBOLS 10... Magnetic disk device, 11-- Host system, 20... Magnetic disk 1iI1m device, 27...
Microprocessor, 33... Cache memory, 3
4... Cache control circuit, 35... Directory memory, 36... LRLJ counter (CLR
U), 39... Comparator. Figure 2 Figure 13 Figure 4 Written amendment 1, Indication of the case Patent Application No. 1983-133432 2, Name of the invention Cash system 3, Person making the amendment Relationship with the case Patent applicant (307) Toshiba Corporation ( and 1 other person) 4. Agent No. 17 Mori Pill 6, 1-26-5 Toranomon, Minato-ku, Tokyo.
The rLRU value is set to 1 on page 12, line 9 of correction target 7, content of correction (1) specification. ”, the rLRU value is increased by +1. ” he corrected. ■ On the 6th line of the 13th text of the specification, or on the 12th line of the same page, the phrase ``If...'' is replaced with ``If it were, the second register file 41 read above.'' The LRU value in the entry of the directory memory 35 specified by the contents (directory address) of the predetermined position of Initialize (or re-register) the LRU value in the entry in the directory memory 35 specified by the contents of
do. ” he corrected. (3) In the 14th line, page 14, line 13 of the specification, the phrase ``Kiki'deki,'' is corrected to ``It can be made small, J.'' (4) In the 14th line, page 14 of the specification, ``It can be made small.'' ” should be corrected to “It can be made larger.”

Claims (1)

【特許請求の範囲】 キャッシュブロックの置換アルゴリズムに LRU方式を適用するキャッシュシステムにおいて、各
エントリにLRUカウンタフィールドを有するディレク
トリメモリと、任意のLRU設定値が付加されたリード
/ライトコマンドを発するコマンド発行手段と、このコ
マンド発行手段により発行されたリード/ライトコマン
ドに応じて上記ディレクトリメモリをサーチするディレ
クトリサーチ手段と、このディレクトリサーチ手段のサ
ーチ結果に応じ上記ディレクトリメモリのヒットエント
リまたは置換対象キャッシュブロックに対応するエント
リのLRUカウンタフィールドに上記LRU設定値を登
録する登録手段とを具備することを特徴とするキャッシ
ュシステム。
[Claims] In a cache system that applies an LRU method to a cache block replacement algorithm, there is provided a directory memory in which each entry has an LRU counter field, and a command that issues a read/write command to which an arbitrary LRU setting value is added. means, a directory search means for searching the directory memory in response to a read/write command issued by the command issuing means, and search for a hit entry in the directory memory or a cache block to be replaced according to the search result of the directory search means. A cache system comprising: registration means for registering the LRU setting value in an LRU counter field of a corresponding entry.
JP60133432A 1985-05-29 1985-06-19 Cache system Granted JPS61290555A (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP60133432A JPS61290555A (en) 1985-06-19 1985-06-19 Cache system
KR1019860004008A KR900006252B1 (en) 1985-06-19 1986-05-22 Cache system
EP19910110603 EP0452991A3 (en) 1985-05-29 1986-05-28 Cache system adopting an lru system
DE8686107284T DE3686291T2 (en) 1985-05-29 1986-05-28 CACHE ARRANGEMENT WITH LRU METHOD AND MAGNETIC DISC CONTROL DEVICE WITH SUCH AN ARRANGEMENT.
US06/867,449 US4835686A (en) 1985-05-29 1986-05-28 Cache system adopting an LRU system, and magnetic disk controller incorporating it
EP86107284A EP0203601B1 (en) 1985-05-29 1986-05-28 Cache system adopting an lru system, and magnetic disk controller incorporating it
EP19910110598 EP0452989A3 (en) 1985-05-29 1986-05-28 Magnetic disk controller incorporating a cache system adopting an lru system
EP19910110599 EP0452990A3 (en) 1985-05-29 1986-05-28 Cache system adopting an lru system
US07/329,019 US4920478A (en) 1985-05-29 1989-03-24 Cache system used in a magnetic disk controller adopting an LRU system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60133432A JPS61290555A (en) 1985-06-19 1985-06-19 Cache system

Publications (2)

Publication Number Publication Date
JPS61290555A true JPS61290555A (en) 1986-12-20
JPH0444295B2 JPH0444295B2 (en) 1992-07-21

Family

ID=15104634

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60133432A Granted JPS61290555A (en) 1985-05-29 1985-06-19 Cache system

Country Status (2)

Country Link
JP (1) JPS61290555A (en)
KR (1) KR900006252B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6231454A (en) * 1985-08-01 1987-02-10 Panafacom Ltd Disk access control system
WO2005050455A1 (en) * 2003-11-18 2005-06-02 Matsushita Electric Industrial Co., Ltd. Cache memory and control method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6231454A (en) * 1985-08-01 1987-02-10 Panafacom Ltd Disk access control system
WO2005050455A1 (en) * 2003-11-18 2005-06-02 Matsushita Electric Industrial Co., Ltd. Cache memory and control method thereof
KR100801814B1 (en) * 2003-11-18 2008-02-11 마쯔시다덴기산교 가부시키가이샤 Cache memory and control method thereof
US7984243B2 (en) 2003-11-18 2011-07-19 Panasonic Corporation Cache memory and method for cache entry replacement based on modified access order

Also Published As

Publication number Publication date
KR900006252B1 (en) 1990-08-27
JPH0444295B2 (en) 1992-07-21
KR870000644A (en) 1987-02-19

Similar Documents

Publication Publication Date Title
US6377500B1 (en) Memory system with a non-volatile memory, having address translating function
US8683142B2 (en) Technique and apparatus for identifying cache segments for caching data to be written to main memory
JPS619722A (en) Apparatus for rearranging page with track in disc memory
KR20120102923A (en) Storage system for supporting copy and move command and operating method thereof
US20140258591A1 (en) Data storage and retrieval in a hybrid drive
US11372760B2 (en) Storage control device for controlling cache memory based on access frequencies
JPS61290555A (en) Cache system
JPH0773107A (en) Control method for disk system
JPH0540694A (en) Cache memory device
JP2010176305A (en) Information processing apparatus and data storage device
KR900000955B1 (en) Magnetic disk controller
JPS63236150A (en) Disk cache system
JP3335919B2 (en) Disk cache controller
JPS62145445A (en) Cache memory system
JPH07152650A (en) Cache control unit
JPH02188849A (en) Cache memory system
JPH10177786A (en) Semiconductor memory
JP2014137749A (en) Storage device, write control method, and write control program
JPH07334425A (en) Disk cache control system
JPH0883213A (en) Storage device including cache memory
JPH03132844A (en) Cache device
JPH04288647A (en) Substitution controller for cache memory
JPH0689228A (en) Cache memory controller
JP2001034536A (en) Disk drive and recording medium
JPH0863398A (en) Input/output cache