JPH0444295B2 - - Google Patents

Info

Publication number
JPH0444295B2
JPH0444295B2 JP60133432A JP13343285A JPH0444295B2 JP H0444295 B2 JPH0444295 B2 JP H0444295B2 JP 60133432 A JP60133432 A JP 60133432A JP 13343285 A JP13343285 A JP 13343285A JP H0444295 B2 JPH0444295 B2 JP H0444295B2
Authority
JP
Japan
Prior art keywords
lru
cache
memory
value
read
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
Application number
JP60133432A
Other languages
Japanese (ja)
Other versions
JPS61290555A (en
Inventor
Koichi Kanamaru
Junichi Inoe
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 US06/867,449 priority patent/US4835686A/en
Priority to EP19910110603 priority patent/EP0452991A3/en
Priority to EP19910110598 priority patent/EP0452989A3/en
Priority to DE8686107284T priority patent/DE3686291T2/en
Priority to EP19910110599 priority patent/EP0452990A3/en
Priority to EP86107284A priority patent/EP0203601B1/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

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00—Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02—Addressing or allocation; Relocation
    • G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00—Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02—Addressing or allocation; Relocation
    • G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12—Replacement 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)

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.

[発明の技術的背景] この種キヤツシユシスメムでは、リード/ライ
ト要求に対するメモリアクセスに際し、まずデイ
レクトメモリをサーチして目的のデータがキヤツ
シユメモリに存在するか否かを調べる動作が行な
われる。そしてデイレクトリサーチの結果キヤツ
シユヒツト或はミスヒツトとなつた場合、ヒツト
したキヤツシユブロツク或は置換対象となるキヤ
ツシユブロツクに対応するLRU値を固定値例え
ば“0”に初期化或は再登録する動作が行なわれ
る。そして、もしリード要求時のミスヒツトであ
れば、該当するデータブロツクがメモリから読出
されると共に(キヤツシユメモリ内の)置換対象
キヤツシユブロツクに登録される。
[Technical Background of the Invention] In this type of cache system, when accessing memory in response to a read/write request, an operation is first performed to search the direct memory to determine whether or not the target data exists in the cache memory. It will be done. If the direct search results in a cache hit or a miss, the LRU value corresponding to the hit cache block or the cache block to be replaced is initialized to a fixed value, for example "0", or re-registered. It is done. If there is a miss during a read request, the corresponding data block is read from the memory and registered in the replacement target cache block (in the cache memory).

[背景技術の問題点] 上記したように従来のキヤツシユシステムで
は、LRUの説定値はキヤツシユメモリに登録さ
れるデータブロツクに無関係に固定化されてい
た。しかし、キヤツシユブロツクに登録されるデ
ータブロツクの使用頻度は、フアイルの形態によ
つて様々である。そこで本発明者等は、LRUの
設定値が固定化されている従来のキヤツシユシス
テムでは、使用頻度の低いデータブロツクが一旦
キヤツシユブロツクに登録されると、同データブ
ロツクのキヤツシユメモリにおける常駐度が、他
の使用頻度の高いフアイルより大きくなつてしま
い、キヤツシユメモリのヒツト率の低下を招く恐
れがあることを認識するに至つた。
[Problems with the Background Art] As described above, in conventional cache systems, the predetermined value of LRU is fixed regardless of the data blocks registered in the cache memory. However, the frequency of use of data blocks registered in a cache block varies depending on the file format. Therefore, the present inventors discovered that in conventional cache systems in which the LRU setting value is fixed, once a data block that is infrequently used is registered in a cache block, the same data block is I came to realize that this may cause a decrease in the hit rate of the cache memory as the number of files is larger than that of other frequently used files.

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

[発明の概要] この発明によれば、キヤツシユブロツクの置換
アルゴリズムにLRU方式を適用するキヤツシユ
システムが適用される。上記システムには、各エ
ントリにLRUカウンタフイールドを有するデイ
レクトリメモリと、任意のLRU設定値が付加さ
れたリード/ライトコマンドを発するコマンド発
行手段と、デイレクトリサーチ手段と、登録手段
とが設けられる。デイレクトリサーチ手段は、コ
マンド発行手段によりリード/ライトコマンドが
発行されると、同コマンドに応じてデイレクトリ
メモリをサーチする。登録手段は、デヂレクトリ
サーチ手段のサーチ結果に応じ、デイレクトリメ
モリのヒツトエントリまたは置換対象キヤツシユ
ブロツクに対応するエントリの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 is provided with a directory memory having an LRU counter field in each entry, a command issuing means for issuing a read/write command to which an arbitrary LRU setting value is added, a direct search means, and a registration means. When a read/write command is issued by the command issuing means, the direct 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 hit entry in the directory memory or the entry corresponding to the cache block to be replaced, according to the search result of the direct search means. .

[発明の実施例] 第1図はこの発明の一実施例に係るキヤツシユ
システム、例えばデイスクキヤツシユシステムの
ブロツク構成を示すもので、20は磁気デイスク
制御装置である。磁気デイスク制御装置20は、
磁気デイスク装置10を制御するハードデイスク
コントロール回路(以下HDCと称する)21を
有している。HDC21はデータライ22および
コントロールライン23から成る第1のバス2
4、ドライバ/レシーバ(以下D/Rと称する)
25を介してホストシステム11と接続されてい
る。HDC21は第2のバス26にも接続されて
いる。バス26には磁気デイスク制御装置20全
体を制御するマイクロプロセツサ27、マイクロ
プロセツサ27の制御用プログラム(マイクロプ
ログラム)を記憶するプログラムメモリ28、マ
イクロプロセツサ27の作業用領域を成すワーク
メモリ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 present invention, and 20 is a magnetic disk control device. The magnetic disk control device 20 is
It has a hard disk control circuit (hereinafter referred to as HDC) 21 that controls the magnetic disk device 10. The HDC 21 is a first bus 2 consisting of a data line 22 and a control line 23.
4. Driver/Receiver (hereinafter referred to as D/R)
It is connected to the host system 11 via 25. The HDC 21 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 control program (microprogram) for the microprocessor 27, and a work memory 29 that forms a work area for the microprocessor 27. , and a buffer memory 30 for absorbing 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のエントリ
数はキヤツシユメモリ33のキヤツシユブロツク
数に一致しており、1カラムにつき例えば16(16
レベル)である。
31 is the third bus. Bus 31 is D/R
(driver/receiver) 32 to the second bus 26 . 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. Each entry in the directory memory 35 has a disk block number field indicating the number of the data block (disk block) registered in the cache memory 33 and an LRU counter indicating the LRU value (8 bits), as shown in the second figure. Contains a field. The number of entries in the directory memory 35 matches the number of cache blocks in the cache memory 33, for example 16 (16
level).

この実施例では、磁気デイスク装置10とキヤ
ツシユメモリ33とは、64セクタ(1トラツク
分)を1ブロツクとして対応付けられる。また磁
気デイスク装置10の領域(デイスク領域)は64
セクタ(1ブロツク)毎にカラム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. The area (disk area) of the magnetic disk device 10 is 64
Each sector (one block) is divided into two columns, column 0 and column 1. Therefore, the column value is
It is indicated by the 7th bit from the lowest 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値
が設定されるLRUカウンタ(以下、CLRUと称
する)36の入力およびドライバ37の出力も接
続されている。CLRU36の出力およびドライバ
37の入力は、キヤツシユコントロール回路34
に接続されている。またバス31には、レジスタ
フアイル38の入力ポートおよび比較器39のB
入力も接続されている。レジスタフアイル38の
出力ポートは比較器39のA入力に接続され、比
較器39の出力ポートはキヤツシユコントロール
回路34に接続されている。
The input of an LRU counter (hereinafter referred to as CLRU) 36 and the output of a driver 37 are also connected to the third bus 31, to which the LRU value read from the directory memory 35 during direct search is set. The output of the CLRU 36 and the input of the driver 37 are connected to the cache control circuit 34.
It is connected to the. The bus 31 also includes the input port of the register file 38 and the B of the comparator 39.
The input is also connected. The output port of register file 38 is connected to the A input of comparator 39, and the output port of comparator 39 is connected to cache control circuit 34.

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

デイレクトリメモリ35のアドレスポートAに
は同メモリ35のアドレスを指定するデイレクト
リメモリアドレスカウンタ(以下、CDMAと称
する)40の出力が接続され、CDMA40の入
力は第2のバス26に接続されている。CDMA
40の出力はレジスタフアイル41の入力ポート
にも接続され、レジスタフアイル41の出力ポー
ト第2のバス26に接続されている。またレジス
タフアイル41には、キヤツシユコントロール回
路34よる制御が可能な如く同コントロール回路
34が接続されている。
The address port A of the directory memory 35 is connected to the output of a directory memory address counter (hereinafter referred to as CDMA) 40 that specifies the address of the directory memory 35, and the input of the CDMA 40 is connected to the second bus 26. CDMA
The output of 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. A control circuit 34 is also connected to the register file 41 so as to enable control by the cache control circuit 34.

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

ホストシステム50からのデイスクアクセス要
求であるリード/ライトコマンドはD/R25、
バス24を介してHDC21に伝えられ、HDC2
1内のコマドレジスタ(図示せず)に保持され
る。このリード/ライトコマンドは、第3図に示
すように、リード/ライト等の動作を指定するコ
マンドコード、論理アドレス2(MSB)、論理ア
ドレス1および論理アドレス0(LSB)から成る
デイスク論理アドレス、データブロツク数および
キヤツシユコントロールビツトcc2〜cc0の各フイ
ールドを含む6バイトの命令である。
A read/write command, which is a disk access request from the host system 50, is sent to the D/R 25,
It is transmitted to HDC21 via bus 24, and HDC2
The data is held in a command register (not shown) in 1. As shown in FIG. 3, this read/write command includes a command code specifying operations such as read/write, a disk logical address consisting of logical address 2 (MSB), logical address 1, and logical address 0 (LSB); This is a 6-byte instruction that includes fields for data block number and cache control bits cc2 to cc0.

コマンドレジスタ内のリード/ライトコマンド
はマイクロプロセツサ27により読出されワーク
メモリ29の所定領域に格納される。マイクロプ
ロセツサ27は、(ホストシステム40からの)
リード/ライトコマンドをワークメモリ29に格
納すると、同要求に従つてシークコマンドを発行
しHDC21にセツトする。これによりHDC21
は指定されたトラツクをシークするように磁気デ
イスク装置10を制御する。またマイクロプロセ
ツサ27は、上記リード/ライトコマンドに従
い、アクセス対象となる磁気デイスク装置10の
領域(デイスク領域)に対応したデイスクブロツ
ク番号および値が0のLRU値を、バス26、
D/R32およびバス31経由でレジスタフアイ
ル38セツトする。またマイクロプロセツサ27
はデイスク論理アドレスの最下位ビツトより7番
目のビツト(第3図に示す論理アドレス0のビツ
ト6)即ちカラム値の示すデイレクトメモリ35
の領域(16個のエントリの領域)の先頭アドレス
をCDMA40にセツトする。しかして以下に示
すデイレクトリサーチサイクルが16回繰返され
る。
The read/write command in the command register is read by the microprocessor 27 and stored in a predetermined area of the work memory 29. The microprocessor 27 (from the host system 40)
When the read/write command is stored in the work memory 29, a seek command is issued and set in the HDC 21 in accordance with the request. As a result, HDC21
controls the magnetic disk device 10 to seek the specified track. Further, in accordance with the above read/write command, the microprocessor 27 sends the disk block number corresponding to the area (disk area) of the magnetic disk device 10 to be accessed and the LRU value with the value 0 to the bus 26.
Register file 38 is set via D/R 32 and bus 31. Also, the microprocessor 27
is the 7th bit from the least significant bit of the disk logical address (bit 6 of logical address 0 shown in FIG. 3), that is, the direct memory 35 indicated by the column value.
The start address of the area (area of 16 entries) is set in the CDMA 40. Thus, the following direct search cycle is repeated 16 times.

このデイレクトリサーチサイクルでは、まず
CDMA40の示す(デイレクトリメモリ)アド
レスがレジスタフアイル41の第1の所定位置に
セツトされる。そしてCDMA40が順次アウン
トアツプされる。これによりCDMA40の示す
デイレクトリメモリ35のエントリのデイレクト
リ情報がバイト単位でバス31に読出され、比較
器39のB入力に供給される。また、これに同期
して、レジスタフアイル38の格納情報が比較器
39のA入力にバイト単位で供給される。比較器
39はA,B入力内容を比較する。比較器39の
結果、即ちレジスタフアイル38からの(ターゲ
ツトとしての)データブロツク番号とデイレクト
リメモリ35からの(登録)データブロツク番号
とのバイト単位での比較結果と、レジスタフアイ
ル38からのLRU値とデイレクトメモリ35か
らのLRU値との比較結果とが、順にキヤツシユ
コントロール回路34に通知される。
In this direct research cycle, we first
The (directory memory) address indicated by the CDMA 40 is set in the first predetermined position of the register file 41. Then, the CDMA 40 is sequentially brought out. As a result, the directory information of the entry in the directory memory 35 indicated by the CDMA 40 is read out to the bus 31 in byte units and is supplied to the B input of the comparator 39. Also, in synchronization with this, the information stored in the register file 38 is supplied to the A input of the comparator 39 in byte units. A comparator 39 compares the input contents of A and B. The result of the comparator 39, that is, the comparison result in units of bytes between the data block number (as a target) from the register file 38 and the (registered) data block number from the directory memory 35, and the LRU value from the register file 38. The results of the comparison with the LRU value from the direct memory 35 are sequentially notified to the cache control circuit 34.

またデイレクトリメモリ35からバス31経由
で比較器39のB入力に供給されるデイレクトリ
情報のうちのLRU値は、CLRU36にロードさ
れ+1される。
Also, the LRU value of the directory information supplied from the directory memory 35 to the B input of the comparator 39 via the bus 31 is loaded into the CLRU 36 and incremented by +1.

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

またキヤツシユコントロール回路34CLRU3
6の示す(+1された)LRU値をドライバ37
よりバス31上に出力せしめ、レジスタフアイル
38内のLRU値をバス31上のLRU値に更新す
る。更にキヤツシユコントロール回路34は上記
バス31上の(CLRU36からの)LRU値を、
比較器39の比較結果に無関係デイレクトリメモ
リ35の対応エントリに書込む。即ち本実施例で
は、デイレクトリサーチサイクル毎に、デイレク
トメモリ35の対応エントリ内のLRU値が+1
される。
Also, the cash control circuit 34CLRU3
The LRU value indicated by 6 (+1) is sent to the driver 37.
The LRU value in the register file 38 is updated to the LRU value on the bus 31. Furthermore, the cache control circuit 34 receives the LRU value (from the CLRU 36) on the bus 31,
The comparison result of the comparator 39 is written to the corresponding entry in the irrelevant directory memory 35. That is, in this embodiment, the LRU value in the corresponding entry in the direct memory 35 increases by +1 in each direct search cycle.
be done.

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

マイクロプロセツサ27では、デイレクトリサ
ーチが終了とすると、レジスタフアイル41の第
2の所定位置の内容をバス26経由で読込み、キ
ヤツシユヒツト或はミスヒツトのいずれであつた
かを調べる。もしキヤツシユヒツトしていたなら
ば、上記読込んだレジスタフアイル41の第2の
所定位置の内容(デイレクトリアドレス)によつ
て指定されているデイレクトリメモリ35のエン
トリ内のLRU値を、或はミスヒツトであつても
リード動作が指定されていれば、レジスタフアイ
ル41の第3の所定位置の内容によつて指定され
いるデイレクトリメモリ35エントリ内のLRU
値を、初期化(或は再登録)する。
When the direct 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 it has been cached, the LRU value in the entry in the directory memory 35 specified by the contents (directory address) of the second predetermined location of the register file 41 read above, or if it is a miss, is cached. If a read operation is specified, the LRU in the directory memory 35 entry specified by the contents of the third predetermined location of the register file 41
Initialize (or re-register) the value.

即ちマイクロプロセツサ27は、LRU値を初
期化(或は再登録)する場合、まずバツフアメモ
リ30に保存しておいたホストシステム11から
のリード/ライトコマンドを参照し、そのキヤツ
シユコントロールビツトcc2〜cc0のcc2が“0”
であるか否かを判断する。本実施例ではcc2=
“0”の場合、cc1、cc0がLRU設定用データとし
て定義されている。マイクロプロセツサ27は、
cc2=“0”の場合、cc1、cc0を6ビツト左シフト
して第4図に示すようにLRU設定値cc1(MSB)、
cc0,0,0,0,0,0,0(LSB)を作成し、
同LRU設定値をバス26、D/R32およびバ
ス31経由でデイレクトリメモリ35へ供給し、
同メモリ35前記したエントリのLRUカウンタ
フイールドに登録する。
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 memory 30 and sets the cache control bits cc2 to cc2. cc2 of cc0 is “0”
Determine whether or not. In this example, cc2=
In the case of “0”, cc1 and cc0 are defined as LRU setting data. The microprocessor 27 is
When cc2="0", cc1 and cc0 are shifted to the left by 6 bits to obtain the LRU setting value cc1 (MSB), as shown in Figure 4.
Create cc0,0,0,0,0,0,0 (LSB),
The same LRU setting value is supplied 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設定値が用いられる。した
がつて、cc1,cc0を“1”に設定しておけば該当
データブロツクのキヤツシユメモリ33内常駐度
を小さくでき、“0”に設定しておけば同常駐度
を大きくできる。即ちcc1,cc0の組合わせにより
データブロツクのキヤツシユメモリ33内常駐度
が制御できる。
This newly registered LRU setting value will be used for the next direct search (LRU value comparison and setting to CLRU 36). Therefore, by setting cc1 and cc0 to "1", the degree of residence of the corresponding data block in the cache memory 33 can be reduced, and by setting them to "0", the degree of residence can be increased. That is, the degree of residence of data blocks in the cache memory 33 can be controlled by the combination of cc1 and cc0.

なお、キヤツシユヒツト或はミスヒツト時にお
けるリード/ライトコマンドに対応したキヤツシ
ユメモリ33更には磁気デイスク装置10に対す
るアクセス動作については、本発明の要旨に直接
関係しないため説明を省略する。
Note that the access operation to the cache memory 33 and further to the magnetic disk device 10 in response to a read/write command in the event of a cache hit or miss will not be described since 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.

[発明の効果] 以上詳述したようにこの発明によれば、キヤツ
シユヒツト時或はミスヒツト時にデイレクトリメ
モリの該当エントリ内のLRU値を任意のLRU設
定値に初期化或は再登録できるので、該当するデ
ータブロツクのキヤツシユメモリ内常駐度を制御
でき、キヤツシユヒツト率の向上が図れる。
[Effects of the Invention] As detailed above, according to the present invention, the LRU value in the corresponding entry in the directory memory can be initialized or re-registered to an arbitrary LRU setting value at the time of cache hit or 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 drawings]

第1図はこの発明の一実施例に係るデイスクキ
ヤツシユシステムのブロツク構成図、第2図は第
1図に示すデイレクトメモリ35のエントリ構成
を示す図、第3図は第1図のシステムで適用され
るリード/ライトコマンドのフオーマツトを示す
図、第4図はLRU設定値のフオーマツトを示す
図である。 10……磁気デイスク装置、11……ホストシ
ステム、20……磁気デイスク制御装置、27…
…マイクロプロセツサ、33……キヤツシユメモ
リ、34……キヤツシユコントロール回路、35
……デイレクトリメモリ、36……LRUカウン
タ(CLRU)、39……比較器。
FIG. 1 is a block 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 direct memory 35 shown in FIG. 1, and FIG. 3 is a block diagram of the system of FIG. 1. FIG. 4 is a diagram showing the format of the read/write commands applied in , and FIG. 4 is a diagram showing the format of the LRU setting value. 10...Magnetic disk device, 11...Host system, 20...Magnetic disk control device, 27...
...Microprocessor, 33...Cache memory, 34...Cash control circuit, 35
...Directory memory, 36...LRU counter (CLRU), 39...Comparator.

Claims (1)

【特許請求の範囲】 1 キヤツシユブロツクの置換アルゴリズムに
LRU方式を適用するキヤツシユシステムにおい
て、 各エントリにLRU値が設定されるLRUカウン
タフイールドを有するデイレクトリメモリと、 任意のLRU設定値が付加されたリード/ライ
トコマンドを発行するコマンド発行手段と、 このコマンド発行手段により発行されたリー
ド/ライトコマンドに応じて上記デイレクトリメ
モリをサーチするサイクルを実行するデイレクト
リサーチ手段と、 このデイレクトリサーチ手段によるデイレクト
リサーチサイクル毎に、上記各エントリのLRU
カウンタフイールドのLRU値を一定値だけ更新
する更新手段と、 上記デイレクトリサーチ手段のサーチ結果に応
じ上記デイレクトリメモリのヒツトエントリまた
は上記LRU値の大小で決定される置換対象キヤ
ツシユブロツクに対応するエントリのLRUカウ
ンタフイールドに上記リード/ライトコマンドに
付加されたLRU設定値を登録する登録手段と、 を具備することを特徴とするキヤツシユシステ
ム。
[Claims] 1. Cache block replacement algorithm
A cache system that applies the LRU method includes: a directory memory having an LRU counter field in which an LRU value is set for each entry; a command issuing means for issuing a read/write command to which an arbitrary LRU setting value is added; a direct search means that executes a cycle of searching the directory memory in response to a read/write command issued by the command issuing means; and an LRU of each entry for each direct search cycle by the direct search means.
updating means for updating the LRU value of the counter field by a certain value; and updating means for updating the LRU value of the counter field by a certain value; A cache system comprising: a registration means for registering an LRU setting value added to the above read/write command in an LRU counter field;
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 Cat Shoe System
DE8686107284T DE3686291T2 (en) 1985-05-29 1986-05-28 CACHE ARRANGEMENT WITH LRU METHOD AND MAGNETIC DISC CONTROL DEVICE WITH SUCH AN ARRANGEMENT.
EP19910110603 EP0452991A3 (en) 1985-05-29 1986-05-28 Cache system adopting an lru system
EP19910110598 EP0452989A3 (en) 1985-05-29 1986-05-28 Magnetic disk controller incorporating a cache system adopting an lru system
US06/867,449 US4835686A (en) 1985-05-29 1986-05-28 Cache system adopting an LRU system, and magnetic disk controller incorporating it
EP19910110599 EP0452990A3 (en) 1985-05-29 1986-05-28 Cache system adopting an lru system
EP86107284A EP0203601B1 (en) 1985-05-29 1986-05-28 Cache system adopting an lru system, and magnetic disk controller incorporating it
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 JPS61290555A (en) 1986-12-20
JPH0444295B2 true 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)

Families Citing this family (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
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
JPS61290555A (en) 1986-12-20
KR870000644A (en) 1987-02-19

Similar Documents

Publication Publication Date Title
JP3183993B2 (en) Disk control system
US4920478A (en) Cache system used in a magnetic disk controller adopting an LRU system
JP2571342B2 (en) System and method for storing data in cache memory
US4575827A (en) Self-archiving data recording
JPH0417525B2 (en)
US5293618A (en) Method for controlling access to a shared file and apparatus therefor
JP2007011523A (en) Data prefetching method and computer system
JP3358795B2 (en) Disk drive device and control method therefor
EP0173909B1 (en) Look-aside buffer least recently used marker controller
JPH0115903B2 (en)
JP2943896B2 (en) Computer system and disk data control method
KR900006252B1 (en) Cat Shoe System
JP3335919B2 (en) Disk cache controller
KR900000955B1 (en) Magnetic disk controller
EP0250876B1 (en) Apparatus and method for page replacement in a data-processing system having a virtual memory
JP2854667B2 (en) Disk cache control method
JPH10232838A (en) Disk storage system
JP2636746B2 (en) Input/Output Cache
JPS63236150A (en) Disk cache system
JPH0219942A (en) Cache subsystem
JPH02188849A (en) Cache memory system
JPS6367213B2 (en)
JPH0689228A (en) Cache memory controller
JPH05314008A (en) Information processing equipment
JPH04148256A (en) Cache controller