JPH05225062A - Disk cache device - Google Patents

Disk cache device

Info

Publication number
JPH05225062A
JPH05225062A JP4026448A JP2644892A JPH05225062A JP H05225062 A JPH05225062 A JP H05225062A JP 4026448 A JP4026448 A JP 4026448A JP 2644892 A JP2644892 A JP 2644892A JP H05225062 A JPH05225062 A JP H05225062A
Authority
JP
Japan
Prior art keywords
cache memory
volume
disk
disk device
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4026448A
Other languages
Japanese (ja)
Inventor
Toru Yao
徹 八尾
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4026448A priority Critical patent/JPH05225062A/en
Publication of JPH05225062A publication Critical patent/JPH05225062A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To keep a high cache hit rate by dividing blocks in a disk device and a cache memory into sets and mapping them in the same set. CONSTITUTION:Each time read or write is requested to a disk device 4000 within a prescribed time, an access frequency detecting circuit 3400 reads the volume number from an address register 3300 and counts the frequency in access to each logical volume and sends the counted result to a disk cache control circuit. A set address generating circuit 3500 internally has a volume-set correspondence table 3510 and takes a logical volume number 3310 of the disk device 4000 as the input and refers to the volume-set correspondence table 3510 to generate a set address. Normally, respective logical volumes of a cache memory 3200 and those of the disk device 4000 correspond to each other in 1:1, but contents of the volume-set correspondence table 3510 are changed by information of the access frequency detecting circuit 3400.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は電子計算機システムにお
いて用いられるディスク・キャッシュ装置に関し、特に
マッピングでセット・アソシアティブ方式を採用するデ
ィスク・キャッシュ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a disk cache device used in an electronic computer system, and more particularly to a disk cache device adopting a set associative method in mapping.

【0002】[0002]

【従来の技術】ディスク装置に対する処理時間を短縮す
るために、主記憶装置とディスク装置との間に高速で小
容量のキャッシュメモリを設けて参照頻度の高いディス
クデータをキャッシュメモリに格納し、平均的なディス
クアクセス時間を短縮しようとするディスク・キャッシ
ュ装置において、その性能を高める上で必要なものの一
つに、アクセスされるデータがキャッシュメモリ上に見
い出される確率(キャッシュヒット率)を高めることお
よびそのデータがキャッシュメモリ上に存在するか否か
を判定する時間を短縮することがあり、ディスク装置の
データの一部をキャッシュメモリにうまく対応づける
(マッピング)方法が重要になる。従来、知られている
マッピングの方法には、フル・アソシアティブ方式とセ
ット・アソシアティブ方式とがある。フル・アソシアテ
ィブ方式はディスクのデータブロック(記録単位)がキ
ャッシュメモリのどのブロックにもマッピングできるよ
うにしたものである。またセット・アソシアティブ方式
はディスク装置を論理的にいくつかの組に分け、キャッ
シュメモリのブロックも対応してセットと呼ばれる一列
のグループに分けておき、分割した各々でマッピングを
行なう。
2. Description of the Related Art In order to reduce the processing time for a disk device, a high-speed, small-capacity cache memory is provided between a main memory device and the disk device to store disk data with high reference frequency in the cache memory, In a disk cache device that seeks to shorten the disk access time, one of the requirements for improving its performance is to increase the probability that the accessed data will be found in the cache memory (cache hit rate). The time for determining whether or not the data exists in the cache memory may be shortened, and a method of mapping a part of the data of the disk device to the cache memory well (mapping) becomes important. Conventionally known mapping methods include a full associative method and a set associative method. The full associative method allows a data block (recording unit) of the disk to be mapped to any block of the cache memory. In the set associative method, the disk device is logically divided into several sets, and the blocks of the cache memory are also divided into groups of one row called sets, and mapping is performed in each divided group.

【0003】またディスク・キャッシュ装置において
は、一般に稼働中電源障害が発生した場合、キャッシュ
メモリのデータの消失のおそれがあるため、データ書込
み時はディスク装置にデータの書込みが完了するまで、
書込みシーケンスを終了と見なさない。よって、データ
書込み時はディスク装置へのアクセスと同じだけの時間
がかかる。
In a disk cache device, generally, when a power failure occurs during operation, there is a risk of data loss in the cache memory. Therefore, at the time of data writing, until data writing to the disk device is completed,
Do not consider the write sequence as finished. Therefore, writing data takes as much time as accessing the disk device.

【0004】[0004]

【発明が解決しようとする課題】前述した従来のマッピ
ング方式で、フル・アソシアティブ方式ではアクセスさ
れるデータがキャッシュメモリ上に存在するか否かを判
定するときにキャッシュの全ブロックまたは非常に多く
のブロックを調べる必要がある。またセット・アソシア
ティブ方式の構成においては、アクセスされるデータが
キャッシュメモリ上に存在するか否かを判定するのに、
限られたブロックのみ調べればよいのでフル・アソシア
ティブ方式に比べ短時間で行なえるが、反面ディスク装
置とキャッシュメモリのセットとの対応が一度設定され
ると固定されてしまうため、計算機システム操作途中、
使用状況によって、ディスク装置の論理的に分割された
特定の領域に対してアクセスが集中するようなことが生
じた場合、その領域に対応するセット以外のキャッシュ
メモリにはデータを格納できないため、高価な高速のメ
モリを有効に使用できないだけでなく、小量の限定され
たセット分のメモリだけでは参照頻度の高いデータを十
分格納しきれなくなり、キャッシュヒット率の低下を招
くおそれがある。また同じく前述した従来のデータ書込
み時のプロセスでは、データ読出し時しかディスク・キ
ャッシュ装置の効果が発揮されないため、ディスク装置
内のデータの変更が多いシステムでは、近年データ転送
速度が向上しているI/0バスの能力を十分生かすこと
もできない。
In the conventional mapping method described above, in the full associative method, when determining whether the data to be accessed exists in the cache memory, all blocks of the cache or a very large number of blocks are cached. You need to look at the block. Also, in the set associative system configuration, to determine whether the data to be accessed exists in the cache memory,
It can be done in a shorter time than the full associative method because only a limited number of blocks need to be checked, but on the other hand, once the correspondence between the disk device and the cache memory set is fixed, it is fixed during operation of the computer system.
If access concentrates on a specific logically divided area of the disk device depending on usage conditions, data cannot be stored in the cache memory other than the set corresponding to that area, which is expensive. In addition to not being able to effectively use such a high-speed memory, a small amount of memory for a limited set cannot sufficiently store frequently-referenced data, which may lead to a decrease in the cache hit rate. Also, in the above-described conventional data writing process, the effect of the disk cache device is exerted only when reading data. Therefore, in a system in which the data in the disk device is frequently changed, the data transfer rate has recently been improved. It is also impossible to make full use of the capabilities of the / 0 bus.

【0005】本発明は、このような従来の問題点を解決
するためになされたもので、アクセスされるデータがキ
ャッシュメモリ上に存在するか否かを短時間に判定し、
しかも限られたキャッシュメモリを効率的に使用し、高
いキャッシュヒット率を維持するとともに、データ書込
み時においても、キャッシュ効果を発揮できる高性能な
ディスク・キャッシュ装置を提供することを目的とす
る。
The present invention has been made in order to solve such a conventional problem, and determines in a short time whether or not the data to be accessed exists in the cache memory,
Moreover, it is an object of the present invention to provide a high-performance disk cache device that can efficiently use a limited cache memory, maintain a high cache hit rate, and exert a cache effect even when writing data.

【0006】[0006]

【課題を解決するための手段】本発明は上記目的を達成
するために、全体が複数のセットに区分され、かつ前記
セットのそれぞれが複数のセットに区分され、かつ前記
セットのそれぞれが複数のブロックに区別された読出し
・書込み自由でかつ不揮発性のキャッシュメモリと、論
理的に前記セット数と同数の論理ボリュームに分割され
たディスク装置を1台または複数台備え、論理ボリュー
ムのそれぞれに対して単位時間あたり上位装置がアクセ
スを要求した回数を検出するアクセス頻度検出手段と、
ディスク装置の各論理ボリュームに、キャッシュメモリ
の各セットを一対一に割り付け、アクセスするためのセ
ットアドレスを生成し、また前記セットと前記ボリュー
ムとの対応情報を有し、アクセス頻度検出手段の検出結
果から前記各論理ボリュームへのアクセスに極端な偏り
が見受けられた場合、アクセス頻度の最も低い論理ボリ
ュームに対するキャッシュメモリのセットの割り付けを
停止し、該セットをアクセス頻度の最も高い論理ボリュ
ームに割り付け、該論理ボリュームに対応するキャッシ
ュメモリを増すことができ、また前記各論理ボリューム
に対して極端な偏りがなくアクセスが行なわれているこ
とがアクセス頻度検出手段によって検出された場合、再
びキャッシュメモリのセットと論理ボリュームを一対一
に割り付けることを可能にしたセットアドレス生成手段
と、このセットアドレス生成手段で生成されたセットア
ドレスで指定されるキャッシュメモリの記録位置に上位
装置から与えられるデータブロックを格納させるように
制御する手段と、キャッシュメモリ内のデータを前記デ
ィスク装置内の対応する記録位置に書き込む手段を備え
た構成を有する。
In order to achieve the above object, the present invention is divided into a plurality of sets as a whole, each of the sets is divided into a plurality of sets, and each of the sets is divided into a plurality of sets. Read / write free and non-volatile cache memory that is divided into blocks, and one or more disk devices that are logically divided into the same number of logical volumes as the set number are provided. Access frequency detecting means for detecting the number of times the upper device requests access per unit time,
Each set of the cache memory is allocated to each logical volume of the disk device in a one-to-one manner, a set address for access is generated, and the correspondence information between the set and the volume is provided. When an extremely biased access to each of the logical volumes is found, the allocation of the cache memory set to the logical volume having the lowest access frequency is stopped, and the set is allocated to the logical volume having the highest access frequency. It is possible to increase the cache memory corresponding to the logical volume, and when the access frequency detecting means detects that the logical volumes are accessed with no extreme bias, the cache memory is set again. Allocating one-to-one logical volumes In the cache memory, a set address generation means that is enabled, a control means that stores a data block given from a higher-level device at a recording position in the cache memory that is designated by the set address generated by the set address generation means, The data is stored in a corresponding recording position in the disk device.

【0007】[0007]

【作用】本発明は以上のような構成によって、計算機シ
ステム操作中、ディスク装置の各論理ボリュームへのア
クセスが適度に分散していれば、セット・アソシアティ
ブ方式の利点で目的とするデータがキャッシュメモリ上
に存在するか否かを短時間で判定でき、また例え特定の
論理ボリュームに対してのアクセスが集中あるいは減少
した場合でも、該論理ボリュームに割り付けるキャッシ
ュメモリのセット数を増したり、あるいはキャッシュメ
モリの割り付けを停止するなど、自動的に調整し、キャ
ッシュメモリを有効に使うことが可能で、キャッシュヒ
ット率を低下させることもない。
According to the present invention, with the above-mentioned configuration, if the access to each logical volume of the disk device is appropriately distributed during the operation of the computer system, the target data is cache memory because of the advantage of the set associative method. It can be determined in a short time whether or not it exists on the upper side, and even when the access to a specific logical volume is concentrated or decreased, the number of sets of cache memory allocated to the logical volume is increased or the cache memory is allocated. It is possible to use cache memory effectively by automatically adjusting it, such as by stopping the allocation of, and without reducing the cache hit rate.

【0008】また電源障害が発生した場合であっても、
キャッシュメモリは不揮発性のため、データが消失する
ことがなく、またキャッシュデータをディスク装置へ書
き込める機能を持っているので、上位装置からのデータ
書込みプロセスをキャッシュメモリへの書込みを完了す
ることで終了できるため、書込み時のアクセス時間も短
縮できる。
Even when a power failure occurs,
Since the cache memory is non-volatile, it does not lose data and has the function of writing cache data to the disk device, so the data writing process from the host device ends when the writing to the cache memory is completed. Therefore, the access time at the time of writing can be shortened.

【0009】[0009]

【実施例】以下、本発明の一実施例を説明する。本発明
が適用される計算機システムを示す図2において、10
00はCPU(上位装置)、2000は主記憶装置、2
100は主記憶装置2000上で動作するOS、211
0はOS2100に含まれるプログラムであるドライ
バ、3000はディスク・キャッシュ装置、4000は
ディスク制御装置を含むディスク装置で、内部は論理的
に複数のボリュームに分割されていて、各ボリュームに
関する情報はOS2100が管理している。3200は
ディスク・キャッシュ装置3000に含まれるディスク
装置4000上のデータを一時的に記憶するためのキャ
ッシュメモリで、読出し・書込みが自由に行なえる不揮
発性の半導体メモリ(例えばEEPROM等)で構成さ
れている。3100はキャッシュメモリ3200にディ
スク装置4000上のどこのデータが入っているか記憶
しているディレクトリで、同じく不揮発性の半導体メモ
リで構成されている。なお、ディスク・キャッシュ装置
3000は装置としても必ずしも独立している必要はな
く、入出力チャネル(入出力インタフェース)やディス
ク制御装置に組込むことも可能である。
EXAMPLE An example of the present invention will be described below. In FIG. 2, which shows a computer system to which the present invention is applied, 10
00 is a CPU (upper device), 2000 is a main storage device, 2
Reference numeral 100 denotes an OS operating on the main storage device 2000, 211
0 is a driver that is a program included in the OS 2100, 3000 is a disk cache device, 4000 is a disk device that includes a disk controller, and the inside is logically divided into a plurality of volumes. Manage. Reference numeral 3200 denotes a cache memory for temporarily storing data on the disk device 4000 included in the disk cache device 3000, which is composed of a non-volatile semiconductor memory (eg, EEPROM) that can be freely read / written. There is. Reference numeral 3100 is a directory for storing which data on the disk device 4000 is stored in the cache memory 3200, which is also composed of a nonvolatile semiconductor memory. The disk cache device 3000 does not necessarily have to be an independent device, and can be incorporated in an input / output channel (input / output interface) or a disk control device.

【0010】次に、基本的な動作について説明する。C
PU1000がディスク装置4000に対して読出し要
求をドライバ2110を使用して発行すると、ディスク
・キャッシュ装置3000はドライバ2110から受け
取った読出し要求のアドレスを用いてディレクトリ31
00を検索し、アクセスしようとしているデータがキャ
ッシュメモリ3200に存在するか否か調べる。もし存
在すれば、そこからデータを読み出し、CPU1000
へ転送する。もし、アクセスされたデータがキャッシュ
メモリ3200上に存在しなければ、そのデータを含む
データブロックを、ディスク装置4000から読み出
し、このブロックをキャッシュメモリ3200の適当な
ブロックに格納し、ディレクトリ3100を更新すると
同時にCPU1000にアクセスされたデータを転送す
る。
Next, the basic operation will be described. C
When the PU 1000 issues a read request to the disk device 4000 by using the driver 2110, the disk cache device 3000 uses the address of the read request received from the driver 2110 in the directory 31.
00 is checked to see if the data to be accessed exists in the cache memory 3200. If it exists, the data is read from it and the CPU 1000
Transfer to. If the accessed data does not exist in the cache memory 3200, a data block including the data is read from the disk device 4000, this block is stored in an appropriate block of the cache memory 3200, and the directory 3100 is updated. At the same time, the accessed data is transferred to the CPU 1000.

【0011】逆にCPU1000がディスク装置400
0に対して書込み要求を発行した場合、もし書き込もう
とするディスク装置4000の位置のデータが、キャッ
シュメモリ3200上に存在するとき、そのデータを書
き換える。もしデータがキャッシュメモリ3200上に
存在しないとき、書込みデータをキャッシュメモリ32
00の適当なブロックに格納し、ディレクトリ3100
を更新する。
On the contrary, the CPU 1000 is the disk device 400.
When a write request is issued to 0, if the data at the position of the disk device 4000 to be written exists in the cache memory 3200, the data is rewritten. If the data does not exist in the cache memory 3200, the write data is written in the cache memory 32.
00 in an appropriate block, directory 3100
To update.

【0012】本発明は以上の動作において、ディスク装
置上のデータブロックをキャッシュメモリのどの部分に
いかに割り付けるかに関するものであるので、ディスク
・キャッシュ装置3000の内部を示す図1を用いて詳
細に説明する。
Since the present invention relates to how and in which part of the cache memory the data block on the disk device is allocated in the above operation, it will be described in detail with reference to FIG. 1 showing the inside of the disk cache device 3000. To do.

【0013】図1において、3300はディスク装置4
000への読出しまたは書込み要求によって指定される
データのアドレスを格納するアドレスレジスタ、340
0はディスク装置4000の各論理ボリュームに対して
単位時間あたりアクセス要求があった回数を検出するア
クセス頻度検出回路、3500はアクセスするデータの
アドレスとアクセス頻度検出回路3400による情報と
に基づいてセットアドレスを生成するセットアドレス生
成回路、3600はディスク・キャッシュ装置全般の動
作を制御するディスク・キャッシュ制御回路、3700
はディレクトリ3100の内容とアドレスレジスタ33
00の内容とを比較する比較回路、3800はキャッシ
ュメモリのブロックを、新しいデータブロックに置き換
えるなどの処理を行なう書換え処理回路であり、キャッ
シュメモリ3200には入出力バス3900を通してデ
ィスク装置4000と接続されている。
In FIG. 1, reference numeral 3300 is a disk device 4.
Address register 340 for storing the address of data designated by a read or write request to 000
0 is an access frequency detection circuit that detects the number of times an access request is made to each logical volume of the disk device 4000 per unit time; 3500 is a set address based on the address of the data to be accessed and the information from the access frequency detection circuit 3400. A set address generation circuit 3600 for generating a disk cache control circuit 3600 for controlling the overall operation of the disk cache device
Is the contents of the directory 3100 and the address register 33
00 is a rewrite processing circuit for performing processing such as replacing a block of the cache memory with a new data block. The cache memory 3200 is connected to the disk device 4000 through the input / output bus 3900. ing.

【0014】ディスク装置の最小の記憶単位をセクタと
し、その複数倍の大きさのまとまりをブロックとする
と、アクセスするデータのアドレスは、ボリューム番号
3310,ブロックアドレス3320,セクタアドレス
3330に分解される。
When the minimum storage unit of the disk device is a sector and a group having a size multiple thereof is a block, an address of data to be accessed is decomposed into a volume number 3310, a block address 3320, and a sector address 3330.

【0015】キャッシュメモリ3200はセクタ単位で
アドレスできるメモリで全体が複数のブロックからなる
セットに分解されていて、各セット内の同順番目のブロ
ックの集まりをレベルとすると、キャッシュメモリ内の
セクタは、セットアドレス,レベルアドレス、およびブ
ロック内のセクタアドレスによってアクセスできる。
The cache memory 3200 is a memory which can be addressed in sector units, and is decomposed into a set of a plurality of blocks as a whole. If a group of blocks in the same order in each set is taken as a level, a sector in the cache memory is , Set address, level address, and sector address in block.

【0016】ディレクトリ3100はキャッシュメモリ
3200内のブロックに対応したエントリを持つメモリ
で、キャッシュメモリ3200と同様のセット・レベル
の配列をもち、各エントリにはキャッシュメモリ320
0の対応するブロックに格納されているディスク装置4
000のデータブロックのアドレス(ボリューム番号,
ブロックアドレス)が記憶されている。
The directory 3100 is a memory having entries corresponding to blocks in the cache memory 3200, and has a set level array similar to that of the cache memory 3200, and each entry has a cache memory 320.
Disk device 4 stored in the corresponding block of 0
Address of 000 data blocks (volume number,
Block address) is stored.

【0017】アクセス頻度検出回路3400は所定時間
中ディスク装置4000への読出し,書込みが要求され
るごと、アドレスレジスタ3300からボリューム番号
を読み、各論理ボリュームに対するアクセス回路をカウ
ントし、その結果をディスク・キャッシュ制御回路に送
る。所定時間が過ぎると各カウント値は一度リセットさ
れ、新たにカウントし始める。
The access frequency detection circuit 3400 reads the volume number from the address register 3300 each time a read / write operation to the disk device 4000 is requested for a predetermined time, counts the access circuit for each logical volume, and outputs the result to the disk drive. Send to cache control circuit. After the lapse of a predetermined time, each count value is reset once and a new count is started.

【0018】セットアドレス生成回路3500は、内部
にボリューム・セット対応テーブル3510をもち、デ
ィスク装置4000の論理ボリューム番号3310を入
力としボリューム・セット対応テーブル3510を参照
し、セットアドレスを生成する。通常、キャッシュメモ
リ3200と、ディスク装置4000の各論理ボリュー
ムは一対一に対応させておくが、アクセス頻度検出回路
3400の情報によって、ボリューム・セット対応テー
ブル3510の内容の変更も行なう。
The set address generation circuit 3500 has a volume / set correspondence table 3510 therein, and receives the logical volume number 3310 of the disk device 4000 as an input to refer to the volume / set correspondence table 3510 to generate a set address. Normally, the cache memory 3200 and the respective logical volumes of the disk device 4000 are made to correspond one-to-one, but the contents of the volume / set correspondence table 3510 are also changed according to the information of the access frequency detection circuit 3400.

【0019】次に図1,図2を参照して、本発明の一実
施例の動作について説明する。CPU1000から読出
し要求がある場合、ドライバ2110は指定されたディ
スク装置4000のデータのアドレスをアドレスレジス
タ3300に格納する。セットアドレス生成回路350
0はアドレスレジスタ3300の内容によってセットア
ドレスを生成し、生成されたセットアドレスに従いディ
レクトリ3100内の1つのセットが選択される。比較
回路3700は前記セット内のディレクトリ・エントリ
内容とアドレスレジスタ3300内の内容とを一つずつ
レベル順に比較する。この比較動作は選択されたセット
内のみで行なうので短時間で処理できる。もし比較があ
るレベルで一致すれば、このエントリに対応するキャッ
シュメモリ3200のブロックに、アクセスするセクタ
が格納されていて、そのセットアドレスがセットアドレ
ス生成回路3500から、また一致したレベルアドレス
は比較回路から、それぞれキャッシュメモリ3200に
伝えられ、そのブロックが指定される。そしてアドレス
レジスタ3300内のキャッシュメモリのセットが割り
付けられるが、計算機システム操作途中、アクセス頻度
検出回路3400によって、所定時間(例えば1分間)
におけるディスク装置4000内の各論理ボリュームに
対するアクセス回数がカウントされ、その情報がディス
ク・キャッシュ制御回路3600に送られる。ここで、
もし論理ボリューム、ボリューム#0へのアクセスが集
中し、アクセス回数が所定の回数を越え、かつ最もアク
セス頻度の低い論理ボリューム、ボリューム#2とのア
クセス回数との差が基準を越えれば、ディスク・キャッ
シュ制御回路3600は、書換え制御回路3800を起
動してボリューム#2に対応するキャッシュメモリのセ
ット(セット番号2)の全ブロックのデータと該ブロッ
クに対応したディレクトリのエントリを無効化する。ま
た同時に、ディスク・キャッシュ制御回路3600は、
セットアドレス生成回路3500にボリューム・セット
対応テーブル3510のセット番号2に対応するボリュ
ーム番号のエントリを2から0に変更するように指示す
る。
Next, the operation of the embodiment of the present invention will be described with reference to FIGS. When there is a read request from the CPU 1000, the driver 2110 stores the specified data address of the disk device 4000 in the address register 3300. Set address generation circuit 350
0 generates a set address according to the contents of the address register 3300, and one set in the directory 3100 is selected according to the generated set address. The comparison circuit 3700 compares the directory entry contents in the set and the contents in the address register 3300 one by one in order of level. Since this comparison operation is performed only within the selected set, it can be processed in a short time. If the comparison matches at a certain level, the sector to be accessed is stored in the block of the cache memory 3200 corresponding to this entry, its set address is from the set address generation circuit 3500, and the matched level address is the comparison circuit. Are transmitted to the cache memory 3200 and the blocks are designated. Then, the cache memory set in the address register 3300 is allocated, but during the operation of the computer system, the access frequency detection circuit 3400 sets a predetermined time (for example, 1 minute).
The number of accesses to each logical volume in the disk device 4000 is counted and the information is sent to the disk cache control circuit 3600. here,
If the accesses to the logical volume and volume # 0 are concentrated, the number of accesses exceeds a predetermined number, and the difference between the number of accesses to the logical volume and volume # 2 with the least access frequency exceeds the standard, the disk The cache control circuit 3600 activates the rewrite control circuit 3800 to invalidate the data of all blocks of the set (set number 2) of the cache memory corresponding to volume # 2 and the directory entry corresponding to the block. At the same time, the disk cache control circuit 3600
The set address generation circuit 3500 is instructed to change the entry of the volume number corresponding to the set number 2 of the volume / set correspondence table 3510 from 2 to 0.

【0020】以上の作用によって図4に示すように、ボ
リューム#2に割り付けられていたキャッシュメモリの
セット(セット番号2)がボリューム#0に割り付けら
れるようになる。したがってボリューム#0に対してア
クセス要求があった場合、まずディレクトリ内のセット
番号0のセットのエントリを検索し、アドレスレジスタ
の内容と一致するエントリがなければ、次にセット番号
2のセットのエントリを検索することになる。なお論理
ボリュームへのアクセスにおいて偏りが発生しているか
どうかを判別する単位時間あたりの各論理ボリュームへ
のアクセス回路の基準値は、論理ボリュームの数やキャ
ッシュメモリの容量、計算システムの構成等によって、
最高値を自由に設定できるようになっている。
By the above operation, as shown in FIG. 4, the set of cache memory (set number 2) which has been allocated to volume # 2 is allocated to volume # 0. Therefore, when there is an access request to the volume # 0, the entry of the set of set number 0 is searched first in the directory, and if there is no entry that matches the contents of the address register, then the entry of the set of set number 2 is searched. Will be searched. The reference value of the access circuit to each logical volume per unit time to determine whether there is a bias in accessing the logical volume depends on the number of logical volumes, the capacity of cache memory, the configuration of the calculation system, etc.
The maximum value can be set freely.

【0021】またボリューム#2に対してアクセス要求
が生じた場合、ボリューム#2に対してキャッシュメモ
リが割り付けられていないため、ディレクトリを検索す
ることなく、直接ディスク装置をアクセスすることにな
るが、計算機システム操作途中、各論理ボリュームへの
アクセスが分散し、ボリューム#0へのアクセスが減
り、ボリューム#2へのアクセスが増え、アクセス頻度
検出回路3400の検出結果からボリューム#0とボリ
ューム#2への単位時間あたりのアクセス回数の差が基
準値以内になるか、ボリューム#0への単位時間あたり
のアクセス回数が基準値以内になった場合、上述した同
じ作用でボリューム#0に対して割り付けられていたキ
ャッシュメモリのセット(セット番号2または0)が再
びボリューム#2に割り付けられ、図3の状態になる。
しかし、なおボリューム#0に対する単位時間あたりの
アクセス回数が基準値を越え、ボリューム#0とボリュ
ーム#2へ対する単位時間あたりのアクセス回数の差は
基準値以内であるが、ボリューム#1に対するアクセス
頻度が最も低くなり、ボリューム#0との単位時間あた
りのアクセス回数の差が基準値を越えたと仮定すると、
上述した同じ作用でボリューム#1に対して割り付けら
れていたキャッシュメモリのセット(セット番号1)
が、図に示すようにボリューム#2に割り付けられるこ
とになり、ボリューム#1,#2ともボリューム#0と
の単位時間あたりのアクセス回数の差が、基準値を越え
た場合、図6に示すようにキャッシュメモリのセットが
割り付けられる。
When an access request is issued to the volume # 2, since the cache memory is not allocated to the volume # 2, the disk device is directly accessed without searching the directory. During the operation of the computer system, the access to each logical volume is distributed, the access to the volume # 0 is reduced, the access to the volume # 2 is increased, and the detection result of the access frequency detection circuit 3400 is applied to the volumes # 0 and # 2. If the difference in the number of access times per unit time of is within the reference value or the number of access to volume # 0 within the reference value, it is assigned to volume # 0 by the same operation as described above. The set of cache memory (set number 2 or 0) that was previously used is again in volume # 2. Ri attached, a state of FIG.
However, the number of accesses to the volume # 0 per unit time exceeds the reference value, and the difference in the number of accesses to the volume # 0 and the volume # 2 per unit time is within the reference value. Assuming that the difference between the number of accesses to volume # 0 per unit time exceeds the reference value,
The cache memory set that was allocated to volume # 1 by the same operation as described above (set number 1)
Is allocated to the volume # 2 as shown in the figure, and when the difference in the number of accesses per unit time between the volumes # 1 and # 2 and the volume # 0 exceeds the reference value, it is shown in FIG. A set of cache memory is allocated as follows.

【0022】このように本実施例によると、計算機シス
テム操作中、以上のような動作を繰り返すことによっ
て、限られたキャッシュメモリを有効かつ効率的に使用
できる。
As described above, according to this embodiment, the limited cache memory can be used effectively and efficiently by repeating the above-mentioned operations during the operation of the computer system.

【0023】なお、上記の実施例では、セクタを記録単
位としたディスクを1台接続した場合を想定して説明し
たが、本発明はセクタ方式以外のディスク装置に対して
も適用でき、1台だけでなく複数台接続した構成も可能
である。
Although the above embodiment has been described assuming that one disk having sectors as recording units is connected, the present invention can be applied to disk devices other than the sector system. Not only is it possible to connect multiple units.

【0024】[0024]

【発明の効果】以上説明した実施例から明らかなよう
に、本発明によると、ディスク装置とキャッシュメモリ
のブロックをセットに分割し、同じセット内でマッピン
グを行なうセット・アソシアティブ方式を採用すること
で、アクセスされたデータブロックがキャッシュメモリ
上に存在するか否かの判定を容易にかつ短時間で行な
え、また計算機システム操作中に特定のディスク装置あ
るいはディスク装置の特定の領域に対してアクセスが集
中あるいは減少したり、故障などで使用不可能になる状
況が生じても、そのディスク装置領域に割り付けられる
キャッシュメモリのセットを自動的に調整することで、
量に限りある高価な高速のメモリを有効に使用でき、キ
ャッシュヒット率も低下させることなく維持できる効果
があり、それにキャッシュメモリに不揮発性メモリを用
いることで、電源障害時にも消失することがないため信
頼性が高まり、キャッシュメモリへのみデータを書き込
むだけで、書込みシーケンスを終了できるため、書込み
命令時もディスク・キャッシュ効果が発揮できるディス
ク・キャッシュ装置を提供できる。
As is apparent from the embodiments described above, according to the present invention, the set associative method is adopted in which blocks of the disk device and the cache memory are divided into sets and mapping is performed within the same set. , It is easy to judge whether the accessed data block exists in the cache memory in a short time, and the access is concentrated on a specific disk device or a specific area of the disk device during computer system operation. Alternatively, even if the situation becomes unusable due to a decrease or a failure, by automatically adjusting the set of cache memory allocated to the disk device area,
Expensive high-speed memory with limited amount can be effectively used, and the cache hit rate can be maintained without lowering it. Also, by using non-volatile memory for cache memory, it does not disappear even when power failure occurs. Therefore, the reliability is improved, and the write sequence can be ended by writing the data only to the cache memory, so that it is possible to provide the disk cache device which can exert the disk cache effect even at the time of the write command.

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

【図1】本発明のディスク・キャッシュ装置の一構成例
を示す構成ブロック図
FIG. 1 is a block diagram showing a configuration example of a disk cache device according to the present invention.

【図2】本発明の適用される計算機システムの構成図FIG. 2 is a configuration diagram of a computer system to which the present invention is applied.

【図3】キャッシュメモリのセットをディスク装置に割
り付ける動作を説明する動作説明模式図
FIG. 3 is an operation explanatory schematic diagram illustrating an operation of allocating a set of cache memory to a disk device.

【図4】キャッシュメモリのセットをディスク装置に割
り付ける動作を説明する動作説明模式図
FIG. 4 is an operation explanatory schematic diagram illustrating an operation of allocating a set of cache memory to a disk device.

【図5】キャッシュメモリのセットをディスク装置に割
り付ける動作を説明する動作説明模式図
FIG. 5 is an operation explanatory schematic diagram illustrating an operation of allocating a set of cache memory to a disk device.

【図6】キャッシュメモリのセットをディスク装置に割
り付ける動作を説明する動作説明模式図
FIG. 6 is an operation explanatory schematic diagram illustrating an operation of allocating a set of cache memory to a disk device.

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

3200 キャッシュメモリ 4000 ディスク装置 3300 アドレスレジスタ 3400 アクセス頻度検出回路 3500 セットアドレス生成回路 3600 ディスクキャッシュ制御回路 3700 比較回路 3800 書換え処理回路 3900 入出力バス 3200 cache memory 4000 disk device 3300 address register 3400 access frequency detection circuit 3500 set address generation circuit 3600 disk cache control circuit 3700 comparison circuit 3800 rewrite processing circuit 3900 input / output bus

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 全体が複数のセットに区分され、前記セ
ットをそれぞれ複数のブロックに区分されたキャッシュ
メモリと、論理的に、前記セット数と同数の論理ボリュ
ームに分割されたディスク装置を1台または複数台備
え、前記論理ボリュームのそれぞれに対して単位時間あ
たりアクセスを要求された回数を検出するアクセス頻度
検出手段と、前記キャッシュメモリの各セットを一対一
に前記ディスク装置の各論理ボリュームに割り付け、ア
クセスするためのセットアドレスを生成し、また前記セ
ットと前記ボリュームとの対応情報を有し、前記アクセ
ス頻度検出手段の検出結果から前記各論理ボリュームへ
のアクセスに極端な偏りが見受けられた場合、アクセス
頻度の最も低い論理ボリュームに対するキャッシュメモ
リのセットの割り付けを停止し、該セットをアクセス頻
度の最も高い論理ボリュームに割り付け、該論理ボリュ
ームに対応するキャッシュメモリを増すことができ、ま
た前記各論理ボリュームに対して極端な偏りがなくアク
セスが行なわれていることが前記アクセス頻度検出手段
によって検出された場合、再び前記キャッシュメモリの
セットと前記論理ボリュームを一対一に割り付けること
を可能にしたセットアドレス生成手段と、前記セットア
ドレス生成手段で生成されたセットアドレスで指定され
る前記キャッシュメモリの記録位置にアクセス要求のあ
ったデータブロックを格納させるように制御する手段
と、前記キャッシュメモリ内のデータをそれに対応した
前記ディスク装置内の位置に書き込む手段を備えたディ
スク・キャッシュ装置。
1. A cache memory which is wholly divided into a plurality of sets, each of which is divided into a plurality of blocks, and one disk device which is logically divided into the same number of logical volumes as the number of sets. Alternatively, a plurality of units are provided, and access frequency detection means for detecting the number of times each logical volume is requested to be accessed per unit time, and each set of the cache memory are allocated to each logical volume of the disk device in a one-to-one relationship. When a set address for access is generated, and there is correspondence information between the set and the volume, and there is an extreme bias in the access to each logical volume from the detection result of the access frequency detection means. , Allocation of cache memory set to the least accessed logical volume Can be stopped, the set can be allocated to the logical volume with the highest access frequency, the cache memory corresponding to the logical volume can be increased, and the logical volumes are accessed without any extreme bias. Is detected by the access frequency detecting means, a set address generating means capable of allocating a set of the cache memory and the logical volume one-to-one again, and a set address generated by the set address generating means And a means for controlling to store the data block for which an access request is made in the recording position of the cache memory specified by 1., and a means for writing the data in the cache memory to the corresponding position in the disk device. Disk cache device.
【請求項2】 キャッシュメモリは読み書き可能な不揮
発性メモリである請求項1記載のディスク・キャッシュ
装置。
2. The disk cache device according to claim 1, wherein the cache memory is a readable / writable non-volatile memory.
JP4026448A 1992-02-13 1992-02-13 Disk cache device Pending JPH05225062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4026448A JPH05225062A (en) 1992-02-13 1992-02-13 Disk cache device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4026448A JPH05225062A (en) 1992-02-13 1992-02-13 Disk cache device

Publications (1)

Publication Number Publication Date
JPH05225062A true JPH05225062A (en) 1993-09-03

Family

ID=12193788

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4026448A Pending JPH05225062A (en) 1992-02-13 1992-02-13 Disk cache device

Country Status (1)

Country Link
JP (1) JPH05225062A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263379A (en) * 1995-03-22 1996-10-11 Nec Ibaraki Ltd Disk cache
US7636807B2 (en) 2006-02-24 2009-12-22 Samsung Electronics Co., Ltd. Storage apparatus using nonvolatile memory as cache and mapping information recovering method for the storage apparatus
JP2014167798A (en) * 2014-03-24 2014-09-11 ▲ホア▼▲ウェイ▼技術有限公司 Method for controlling buffer mapping and buffer system
CN110990302A (en) * 2019-11-22 2020-04-10 北京云宽志业网络技术有限公司 Data caching method and device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263379A (en) * 1995-03-22 1996-10-11 Nec Ibaraki Ltd Disk cache
US7636807B2 (en) 2006-02-24 2009-12-22 Samsung Electronics Co., Ltd. Storage apparatus using nonvolatile memory as cache and mapping information recovering method for the storage apparatus
JP2014167798A (en) * 2014-03-24 2014-09-11 ▲ホア▼▲ウェイ▼技術有限公司 Method for controlling buffer mapping and buffer system
CN110990302A (en) * 2019-11-22 2020-04-10 北京云宽志业网络技术有限公司 Data caching method and device, electronic equipment and storage medium
CN110990302B (en) * 2019-11-22 2021-11-02 北京云宽志业网络技术有限公司 Data caching method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US4490782A (en) I/O Storage controller cache system with prefetch determined by requested record's position within data block
US4489378A (en) Automatic adjustment of the quantity of prefetch data in a disk cache operation
US6012106A (en) Prefetch management for DMA read transactions depending upon past history of actual transfer lengths
US4875155A (en) Peripheral subsystem having read/write cache with record access
US7610438B2 (en) Flash-memory card for caching a hard disk drive with data-area toggling of pointers stored in a RAM lookup table
KR101300657B1 (en) Memory system having nonvolatile memory and buffer memory and data read method thereof
JP2784440B2 (en) Data page transfer control method
EP0077453B1 (en) Storage subsystems with arrangements for limiting data occupancy in caches thereof
US20100100664A1 (en) Storage system
US20180275899A1 (en) Hardware based map acceleration using forward and reverse cache tables
US20150347310A1 (en) Storage Controller and Method for Managing Metadata in a Cache Store
US20070276995A1 (en) Hybrid solid state disk drive with controller
JP2017151982A (en) System and method for caching in data storage subsystem
JPH0458051B2 (en)
US20140013025A1 (en) Hybrid memory with associative cache
EP0066766B1 (en) I/o controller with a dynamically adjustable cache memory
US20170228191A1 (en) Systems and methods for suppressing latency in non-volatile solid state devices
JP2003131946A (en) Method and device for controlling cache memory
JP6323445B2 (en) Storage apparatus, method and program
US11016889B1 (en) Storage device with enhanced time to ready performance
JP2020191055A (en) Recovery processing method and device from instantaneous interruption, and computer readable storage medium
EP0114944B1 (en) Method and apparatus for controlling a single physical cache memory to provide multiple virtual caches
US6324633B1 (en) Division of memory into non-binary sized cache and non-cache areas
JPH05225062A (en) Disk cache device
US20040255076A1 (en) Flash memory controller, memory control circuit, flash memory system, and method for controlling data exchange between host computer and flash memory