JPH0363741A - Disk cache device - Google Patents

Disk cache device

Info

Publication number
JPH0363741A
JPH0363741A JP1199794A JP19979489A JPH0363741A JP H0363741 A JPH0363741 A JP H0363741A JP 1199794 A JP1199794 A JP 1199794A JP 19979489 A JP19979489 A JP 19979489A JP H0363741 A JPH0363741 A JP H0363741A
Authority
JP
Japan
Prior art keywords
disk
cache memory
cache
read
access
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
JP1199794A
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 JP1199794A priority Critical patent/JPH0363741A/en
Publication of JPH0363741A publication Critical patent/JPH0363741A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To effectively utilize a disk cache device by automatically adjusting the amount of a cache memory to be used as the disk cache in accordance with an access condition to a disk device. CONSTITUTION:A cache memory 3020 is provided to store the copy of data stored in a disk device 4000, and a directory 3010 is provided to identify whether the copy of the data exists in the cache memory 3020 or not. Then, an access frequency detecting means 3030 is provided to detect the number of times for an access required to the disk device 4000 per unit time, and a ratio between read/write requests. A cache memory control circuit 3070 is provided to make one part of an area on the cache memory 3020 temporarily available as one part of a main memory in an electronic computer system when the access frequency is extremely decreased or the read ratio is extremely lowered. Thus, the cache memory 3020 can be used as one part of the main memory corresponding to the access condition to the disk device 4000 and the memory resource of the disk cache device can be made effective.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、電子計算機システムにおいて用いられるデ
ィスク・キャッシュ装置に関し、特にデータの書き込み
時において、ライト・スルー(ストア・スルー)方式を
採用するディスク・キャッシュ装置に関するものである
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a disk cache device used in a computer system, and in particular to a disk cache device that adopts a write-through (store-through) method when writing data. -Relates to cache devices.

〔従来の技術) 電子計算機システムにおいて、ディスク装置に対する処
理時間を短縮するために、主記憶装置とディスク装置と
の間に高速で小容量のキャッシュ・メモリを設けて参照
頻度の高いディスク・データをキャッシュ・メモリに格
納し、平均的なディスク・アクセス時間を短縮しようと
するディスクキャッシュ装置が従来より一般的に知られ
ている。
[Prior Art] In electronic computer systems, in order to reduce processing time for disk devices, a high-speed, small-capacity cache memory is provided between the main storage device and the disk device to store frequently referenced disk data. Disk cache devices that store information in a cache memory and attempt to shorten average disk access time have been generally known.

ディスク・キャッシュ装置におけるデータの書き込み方
式としては、データをキャンシュ・メモリに書き込むと
同時にディスク装置への書き込みを行うライト・スルー
(ストア・スルー)方式と、データをキャッシュ・メモ
リにのみ書き込み、他のブロックが指定されることによ
り、そのデータが書き込まれたキャッシュ・メモリ上の
ブロックが置換されるときに、ディスク装置に書き込み
を行うライト・バンク(ストア・イン)方式とがあるが
、−Cに電源障害等を考慮して、ライト・スル一方式が
採用されている。
There are two methods for writing data in a disk cache device: a write-through (store-through) method in which data is written to the cache memory and to the disk device at the same time, and a write-through (store-through) method in which data is written only to the cache memory and other There is a write bank (store-in) method in which data is written to the disk device when a block is specified and the block in the cache memory where the data has been written is replaced. In consideration of power failures, etc., a write/through type is adopted.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記に示すディスク・キャッシュ装置においては、ディ
スク・アクセスにおける書き込み比率が高く、また参照
するディスク・データの局所性が高いプログラムによっ
て使用された場合、データ転送の性能が向上する効果が
現れる。
The disk cache device described above has the effect of improving data transfer performance when used by a program that has a high write ratio in disk access and has high locality of referenced disk data.

ところが、あるディスク領域を作業領域として使用する
プログラムによっては、ディスク・キャッシュ装置が使
用されたとしても、ディスク・データのアクセスに局所
性がなく、がつ読み出し比率が低いため、ディスク・キ
ャッシュ装置のデータ転送効率向上の効果が発揮できず
、キャッシュ・メモリを有効に利用できない場合がある
However, depending on the program that uses a certain disk area as a work area, even if a disk cache device is used, there is no locality in disk data access and the read ratio is low, so the disk cache device is not used. The effect of improving data transfer efficiency may not be achieved, and the cache memory may not be used effectively.

この発明の目的は、ディスク・データのアクセスの局所
性が低く、また読み出し比率が低いプログラムを実行す
るときでも、メモリ資源を有効に使用することができる
ディスク・キャッシュ装置を提供するである。
An object of the present invention is to provide a disk cache device that can effectively use memory resources even when executing a program with low locality of disk data access and low read rate.

〔課題を解決するための手段〕[Means to solve the problem]

この発明のディスク・キャッシュ装置は、1台ないし複
数台のディスク装置を備えた電子計算機システムにおい
て用いられる。
The disk cache device of the present invention is used in a computer system equipped with one or more disk devices.

請求項fil記載のディスク・キャッシュ装置は、ディ
スク装置に格納されたデータの写しを格納するためのキ
ャッシュ・メモリと、 ディスク装置に格納されたデータの写しがキャッシュ・
メモリに存在するか否かを識別するためのディレクトリ
と、 ディスク装置に対して単位時間あたりアクセスを要求さ
れた回数と読み出し/書き込み要求の割合を検出するア
クセス頻度検出手段と、アクセス頻度検出手段の検出結
果より、ディスク装置へのアクセス頻度が極端に減少し
たり、読み出し/書き込み要求の割合において読み出し
比率に極端な低下が見受けられた場合、一時的に前記キ
ャッシュ・メモリ上の領域の少なくとも一部を電子計算
機システムの主記憶の一部として使用を可能にするキャ
ッシュ・メモリ制御回路とを備えている。
The disk cache device according to claim fil includes: a cache memory for storing a copy of data stored in the disk device; and a cache memory for storing a copy of data stored in the disk device.
A directory for identifying whether or not it exists in memory, an access frequency detection means for detecting the number of access requests per unit time and the ratio of read/write requests to the disk device, and an access frequency detection means for detecting the number of access requests per unit time and the ratio of read/write requests If the detection results show that the frequency of access to the disk device has decreased significantly, or that the read ratio has significantly decreased in the ratio of read/write requests, at least part of the area on the cache memory and a cache memory control circuit that enables use as part of the main memory of an electronic computer system.

請求項(2)記載のディスク・キャッシュ装置は、電子
計算機システムの主記憶装置の一部の領域を使用して構
成されディスク装置に格納されたデータの写しを格納す
るためのキャッシュ・メモリと、主記憶装置の一部の領
域を使用して構成されディスク装置に格納されたデータ
の写しがキャッシュ・メモリに存在するか否かを識別す
るためのディレクトリと、 ディスク装置に対して単位時間あたりアクセスを要求さ
れた回数と読み出し/書き込み要求の割合を検出するア
クセス頻度検出手段と、アクセス頻度検出手段の検出結
果より、ディスク装置へのアクセス頻度が極端に減少し
たり、読み出し/書き込み要求の割合の読み出し比率が
極端に低下していることが見受けられた場合、一時的に
主記憶装置上のキャッシュ・メモリとして使用できる領
域を縮小して主記憶としての領域を増やすことを可能に
するキャッシュ・メモリ制御回路とを備えている。
The disk cache device according to claim (2) includes a cache memory configured using a part of a main storage device of a computer system and for storing a copy of data stored in the disk device; A directory configured using a part of the main storage area to identify whether a copy of data stored in the disk device exists in the cache memory, and access per unit time to the disk device. The access frequency detection means detects the number of requests and the ratio of read/write requests, and the detection results of the access frequency detection means indicate whether the access frequency to the disk device has decreased significantly or the ratio of read/write requests has decreased. Cache memory that allows you to temporarily reduce the area that can be used as cache memory on the main storage device and increase the area that can be used as main memory if the read ratio is found to be extremely low. It is equipped with a control circuit.

〔作用〕[Effect]

この発明の構成によれば、ディスク装置へのアクセス状
況に応してディスク・キャッシュ装置のキャッシュ・メ
モリのディスク・キャッシュとして使用する量を自動的
に調節し、ディスク・キャッシュとして使用しない部分
を主記憶の一部として使用できるので、ディスクデータ
のアクセスの局所性が低く、また読み出し比率が低いプ
ログラムを実行するときでも、有効にディスク・キャッ
シュ装置のメモリ資源を使用できる。
According to the configuration of the present invention, the amount of cache memory of the disk cache device used as a disk cache is automatically adjusted according to the access status to the disk device, and the portion not used as a disk cache is mainly used. Since it can be used as part of storage, the memory resources of the disk cache device can be used effectively even when a program with low locality of disk data access and low read rate is executed.

〔実施例〕〔Example〕

以下、この発明の実施例を図面を参照しながら説明する
Embodiments of the present invention will be described below with reference to the drawings.

第1図はこの発明が適用される電子計算機システムを示
すものである。第1図(alにおいて、ioo。
FIG. 1 shows an electronic computer system to which the present invention is applied. FIG. 1 (in al, ioo.

はCP U、 2000は主記憶装置(MM) 、20
10は主記憶装置2000上で動作するO3,201)
は032010に含まれるプログラムであるドライバで
ある。
is CPU, 2000 is main memory (MM), 20
10 is O3, 201 which operates on the main storage device 2000)
is a driver which is a program included in 032010.

4000はディスク装置であり、3000はディスク装
置4000の入出力を制御するディスク制御装置である
4000 is a disk device, and 3000 is a disk control device that controls input/output of the disk device 4000.

3020はディスク装置4000上のデータを写しとし
て一時的に記憶するためのキャッシュ・メモリで、30
10はキャッシュ・メモリ3020にディスク装置40
00上のどこのデータが入っているかを記憶しているデ
ィレクトリであり、それぞれディスク制御装置3000
上に存在する。
3020 is a cache memory for temporarily storing data on the disk device 4000 as a copy;
10 is a disk device 40 in the cache memory 3020
This is a directory that stores which data on 00 is stored, and each disk controller 3000
exists above.

しかし、ディレクトリ3010およびキャッシュ・メモ
リ3020は必ずしもディスク制御装置3000上に存
在しなければならないものではなく、多数のディスク装
置を接続するような電子計算機システムにおいては、各
ディスク装置に対して同じキャッシュ・メモリを共有で
きるということで、第1図(blに示すように、主記憶
装置2000の一部の領域をキャッシュ・メモリ302
0およびディレクトリ3010に割り当てることもある
However, the directory 3010 and the cache memory 3020 do not necessarily have to exist on the disk controller 3000; in a computer system in which a large number of disk devices are connected, the same cache memory 3020 is required for each disk device. Since memory can be shared, a part of the main storage device 2000 can be used as a cache memory 302, as shown in FIG.
0 and directory 3010.

つぎに、基本的な動作について説明する。CPU 10
00がディスク装W 4000に対して読み出し要求を
ドライバ201)を使用して発行すると、ディスク制御
装置3000は、ドライバ201)より受は取った読み
出し要求のアドレスを用いてディレクトリ3010を検
索し、アクセスしようとしているデータがキャッシュ・
メモリ3020に存在するか否かを調べる。
Next, the basic operation will be explained. CPU 10
When 00 issues a read request to the disk unit W 4000 using the driver 201), the disk control device 3000 searches the directory 3010 using the address of the read request received from the driver 201) and accesses it. The data you are trying to
Check whether it exists in memory 3020.

もし存在すれば、そこからデータを読み出し、CPU1
00Oへ転送する。もし、アクセスされたデータがキャ
ッシュ・メモリ3020上に存在しなければ、そのデー
タを含むデータブロックをディスク装置4000から読
み出し、このブロックをキャッシュ・メモリ3020の
適当なブロックに格納し、ディレクトリ3010を更新
すると同時にCP UlooOにアクセスされたデータ
を転送する。
If it exists, read the data from it and CPU1
Transfer to 00O. If the accessed data does not exist on the cache memory 3020, the data block containing the data is read from the disk device 4000, this block is stored in an appropriate block of the cache memory 3020, and the directory 3010 is updated. At the same time, the accessed data is transferred to CP UlooO.

逆に、CP [1000がディスク装置4000に対し
て書き込み要求を発行した場合、書き込みデータをディ
スク装置4000に書き込み、もしディスク装置400
0の書き込まれた場所の前のデータがキャッシュ・メモ
リ3020に存在するとき、そのブロックを無効にする
Conversely, when the CP [1000 issues a write request to the disk device 4000, the write data is written to the disk device 4000, and if the disk device 400
When data before the location where a 0 was written is present in cache memory 3020, that block is invalidated.

この発明はディスク・キャッシュ装置を使用するプログ
ラムに応して、ディスク・キャッシュ装置のキャッシュ
・メモリ3020のディスク・キャッシュとして使用す
る量と主記憶装置2000の一部として使用できる量を
いかに調節するかに関するものであるので、第1図(a
lのような計算機システムの構成においては、ディスク
制御装23000の内部を示す第2図を用いて、また第
1間色)のような構成においては、CP 01000.
主記憶装置2000.ディスク制御装置3000の関係
図である第3図を用いて、それぞれの実施例を詳細に説
明する。
This invention deals with how to adjust the amount of the cache memory 3020 of the disk cache device that can be used as a disk cache and the amount that can be used as part of the main storage device 2000, depending on the program that uses the disk cache device. Figure 1 (a)
In the configuration of a computer system such as CP 01000.1, FIG.
Main storage device 2000. Each embodiment will be described in detail using FIG. 3, which is a relational diagram of the disk control device 3000.

第2図において、3040は読み出し/書き込み要求等
のディスク装24000に対する命令コードを格納する
制御レジスタ、3050はディスク装置4000への読
み出し/書き込み要求により指定されるデータのアドレ
スを格納するアドレスレジスタ、3030はディスク装
W4000に対して単位時間当りアクセス要求があった
回数および読み出し比率を検出するアクセス頻度検出回
路(特許請求の範囲でいうアクセス頻度検出手段) 、
3060はキャッシュ・メモリ3020を主記憶の一部
としてアクセスするためのアドレス・デコーダ、307
0はアクセス頻度検出回路3030の情報に基づいてア
ドレス・デコーダ3060の設定およびディレクトリ3
010の内容を変更するキャッシュ・メモリ制御回路、
3080はディスク・キャッシュ装置全般の動作を制御
するディスク・キャッシュ制御回路、3090はディレ
クトリ3010とアドレスレジスタ3050の内容とを
比較する比較回路、3100はキャッシュ・メモリ30
20のブロックを新しいデータブロックに置き換える等
の処理を行う書き換え処理回路であり、31)0はキャ
ッシュ・メモリ3020に接続されている入出カバソフ
ァである。
In FIG. 2, 3040 is a control register that stores instruction codes for the disk device 24000 such as read/write requests, 3050 is an address register that stores the address of data specified by the read/write request to the disk device 4000, and 3030 is an access frequency detection circuit (access frequency detection means in the claims) that detects the number of access requests per unit time and read ratio for the disk device W4000;
3060 is an address decoder for accessing the cache memory 3020 as part of main memory; 307
0 is the setting of the address decoder 3060 and the directory 3 based on the information of the access frequency detection circuit 3030.
a cache memory control circuit that changes the contents of 010;
3080 is a disk cache control circuit that controls the overall operation of the disk cache device, 3090 is a comparison circuit that compares the contents of the directory 3010 and the address register 3050, and 3100 is the cache memory 30.
This is a rewrite processing circuit that performs processing such as replacing the block No. 20 with a new data block, and 31) 0 is an input/output cover sofa connected to the cache memory 3020.

ディスク装置4000の最小の記憶単位をセクタとし、
その複数倍の大きさのまとまりをブロックとすると、キ
ャッシュ・メモリ3020はセクタ単位でアドレスでき
るメモリで、全体が複数のブロックに分解されていて、
ブロック単位でディスク・データを格納し、セクタ単位
でのアクセスが行われる。
The smallest storage unit of the disk device 4000 is a sector,
If a block is a group of multiple times the size, the cache memory 3020 is a memory that can be addressed in sector units, and the entire cache memory 3020 is divided into multiple blocks.
Disk data is stored in blocks and accessed in sectors.

ディレクトリ3010は、キャッシュ・メモリ3020
内のブロックに対応したエントリを持つメモリで、第4
図に示すように、各エントリにはキャッシュ・メモリ3
020の対応するブロックに格納されているディスク装
置4000のデータブロックのアドレスが記憶されてい
る。
Directory 3010 is cache memory 3020
A memory with entries corresponding to blocks in the fourth block.
As shown in the figure, each entry has a cache memory 3
The address of the data block of the disk device 4000 stored in the block corresponding to 020 is stored.

アクセス頻度検出回路3030は、所定時間中ディスク
装W、4000へ読み出し/書き込みが要求される毎に
その回数をカウントし、ディスク装置4000に対する
アクセス回数および読み出し比率を算出し、その結果を
ディスク・キャッシュ制御回路3080に送る。所定時
間が過ぎると、各カウント値は一度すセフトされ、新た
にカウントし始める。
The access frequency detection circuit 3030 counts the number of times each read/write request is made to the disk device W, 4000 during a predetermined period of time, calculates the number of accesses to the disk device 4000 and the read ratio, and stores the results in the disk cache. It is sent to control circuit 3080. After a predetermined period of time has elapsed, each count value is once shifted and counting begins anew.

つぎに、第1図(al 、第2図においての基本的な動
作について説明する。CP UlooOより読み出し要
求がある場合、ドライバ201)は指定されたディスク
装置4000のデータのアドレスをアドレスレジスタ3
050に格納し、また読み出し要求の命令コードを制御
レジスタ3040に格納する。そして、比較回路309
0はディレクトリ3010の内容とアドレスレジスタ3
050の内容とを比較し、もし一致すれば、このエント
リに対応するキャッシュ・メモリ3020のブロックに
、アクセスしようとするデータが格納されていて、該デ
ータがCP UlooOに送られる。
Next, the basic operation in FIGS. 1 and 2 will be explained. When there is a read request from the CP UlooO, the driver 201) stores the address of the data in the specified disk device 4000 in the address register 3.
050, and the instruction code of the read request is stored in the control register 3040. And comparison circuit 309
0 is the contents of directory 3010 and address register 3
050, and if they match, the data to be accessed is stored in the block of cache memory 3020 corresponding to this entry, and the data is sent to CP UlooO.

もし比較が一致しなければ、書き換え処理回路3100
により、キャッシュ・メモリ3020より空ブロックを
取り出す。もし空きブロックが存在しないときは、公知
のアルゴリズム、例えばLRU(Least Rece
ntly Used)のように、使用中のブロックの中
から最後に参照された時点が最も古いブロックを使用頻
度が最も低いとみなし、置換ブロックとして選択する。
If the comparison does not match, the rewriting processing circuit 3100
As a result, an empty block is taken out from the cache memory 3020. If there is no free block, a known algorithm, for example LRU (Least Receive
ntly Used), the block that was last referenced the oldest among the blocks in use is considered to be the least frequently used block, and is selected as the replacement block.

そして、そのブロックに相当するディレクトリ3010
のエントリにアクセスしようとしているデータブロック
のアドレスが書き込まれる。つぎに、書き換え処理回路
3100により選択されたキャッシュ・メモリ3020
のブロックに、ディスク装置4000からアドレスレジ
スタ3050に示すアドレスのブロックが読み込まれ、
また同時にCP UlooOへも送られる。
And the directory 3010 corresponding to that block
The address of the data block being accessed is written to the entry. Next, the cache memory 3020 selected by the rewrite processing circuit 3100
The block at the address indicated in the address register 3050 is read from the disk device 4000 into the block, and
It is also sent to CP UlooO at the same time.

ディスク・キャッシュ装置の基本動作に続いて、この発
明の特徴であるアクセス頻度検出回路3030とキャッ
シュ・メモリ制御回路3070の作用について説明する
Following the basic operation of the disk cache device, the functions of the access frequency detection circuit 3030 and cache memory control circuit 3070, which are the features of the present invention, will be explained.

アクセス頻度検出回路3030は、制御レジスタ304
0の中の命令コードにより、所定時間(例えば1分間)
におけるディスク装24000に対する読み出し/書き
込み要求回数をカウントし、また読み出し比率を算出し
、その情報をディスク・キャッシュ制御回路3080お
よびキャッシュ・メモリ制御回路3070に送る。ここ
で、ディスク・キャッシュ装置を使用しているプログラ
ムにおいて、ディスク装置4000へのアクセス回数お
よび読み出し比率が所定の基準を下まわれば、キャッシ
ュ・メモリ制御回路3070はアドレス・デコーダ30
60およびディレクトリ301Oを操作してキャッシュ
・メモリ3020の一部を主記憶の一部として割り当て
、アクセスを可能とする。例えば、ディレクトリ301
0の各エントリに第4図に示すように、現在そのエント
リに対応するキャッシュ・メモリ3020のブロックが
ディスク・キャッシュとして使用されているか、主記憶
の一部として使用されているかを示すキャッシュ有効フ
ラグとキャッシュ・メモリ3020中のブロックの置換
優先1頓位を示す置換優先度指示カウンタを持たせてお
けば、キャッシュ・メモリ制御回路3070はまずディ
レクトリ3010中の置換優先度指示カウンタを検索し
、置換優先度の最も高いブロックから主記憶の一部とし
て割り付けるため、キャッシュ有効フラグを無効にし、
アドレス・デコーダ3060を起動させ、キャッシュ・
メモリ3020のブロックをアクセスするため設定を行
なう、なお、キャッシュ・メモリ3020の主記憶への
割り当てはブロック単位で行い、その数はアクセス頻度
検出回路3030によって算出された読み出し比率等の
情報に応してキャッシュ・メモリ制御回路3070によ
って決定される。
The access frequency detection circuit 3030 controls the control register 304
Depending on the instruction code in 0, a predetermined time (for example, 1 minute)
It counts the number of read/write requests made to the disk device 24000, calculates the read ratio, and sends the information to the disk cache control circuit 3080 and the cache memory control circuit 3070. Here, in a program using a disk cache device, if the number of accesses and read ratio to the disk device 4000 are below a predetermined standard, the cache memory control circuit 3070
60 and directory 301O to allocate a part of cache memory 3020 as part of main memory and make it accessible. For example, directory 301
As shown in FIG. 4, each entry of 0 has a cache valid flag indicating whether the block of the cache memory 3020 corresponding to that entry is currently being used as a disk cache or as part of main memory. If the cache memory control circuit 3070 first searches for the replacement priority indication counter in the directory 3010 and performs replacement, In order to allocate the block with the highest priority as part of main memory, disable the cache enable flag,
Activate address decoder 3060 and cache
Settings are made in order to access blocks of the memory 3020. Note that allocation of the cache memory 3020 to the main memory is done in units of blocks, and the number of blocks is determined according to information such as the read ratio calculated by the access frequency detection circuit 3030. is determined by the cache memory control circuit 3070.

また、ディスク・キャッシュ装置を使用するプログラム
が代わった場合、キャッシュ・メモリ制御回路3070
はディレクトリ301Oのキャッシュ有効フラグを有効
にし、主記憶の一部として割り付けられていたキャッシ
ュ・メモリ3020を再びディスク・キャッシュとして
使用できるようにするが、この時もしキャッシュ・メモ
リ3020の主記憶の一部として割り付けられていた部
分に格納されているデータの保存が必要な場合はディス
ク装?1f4000に書き込むなり、主記憶装置200
0に移す等032010が適当な処理を行なう。
Additionally, when the program that uses the disk cache device is changed, the cache memory control circuit 3070
enables the cache enable flag of the directory 301O and makes the cache memory 3020 allocated as part of the main memory usable again as a disk cache, but at this time, if part of the main memory of the cache memory 3020 If you need to save the data stored in the part that was allocated as a part, what about disk storage? As soon as you write to 1f4000, the main storage device 200
032010 performs appropriate processing such as moving it to 0.

つぎに、第1図(blのような計算機システムの構成に
おける実施例を第3図を用いて説明する。第3図におい
て、上述した実施例と異なる点は、ディレクトリ301
0.キャッシュ・メモリ3020およびキャッシュ・メ
モリ制御回路3070によって設定されるアドレス・デ
コーダ3060が主記憶装置2000上に存在すること
である。動作については、CPU1000は、ディスク
・データをアクセスしようとする毎に制御レジスタ30
40に命令コードを書き込むと同時に主記憶装置200
0内のディレクトリ3010を検索し、アクセスしよう
としているディスク・データがキャッシュ・メモリ30
20内に存在するかどうかを調べ、存在すればキャッシ
ュ・メモリ3020より該データを読み出し、もし存在
しなければ、c p uioooはアドレスレジスタ3
050にディスク・データのアドレスを書き込み、ディ
スク制御装置3000はディスク装W 4000をアク
セスする。
Next, an embodiment in the configuration of a computer system such as that shown in FIG. 1 (bl) will be explained using FIG. 3. In FIG.
0. An address decoder 3060 configured by cache memory 3020 and cache memory control circuit 3070 is present on main memory 2000. In operation, the CPU 1000 registers the control register 30 each time it attempts to access disk data.
At the same time as writing the instruction code to 40, main memory 200
0, and the disk data you are trying to access is in the cache memory 30.
If the data exists, it is read from the cache memory 3020, and if it does not exist, c p uioooo reads the data from the address register 3020.
The disk control device 3000 writes the address of the disk data in 050 and accesses the disk device W 4000.

以上の操作は032010の中のプログラムドライバ2
01)によって行われる。
The above operations are performed using program driver 2 in 032010.
01).

ここで、前述の実施例と同様、アクセス頻度検出回路3
030は、制御レジスタ3040の中の命令コードによ
り、所定時間(例えば1分間)におけるディスク装置4
000に対する読み出し/書き込み要求回数をカウント
し、また読み出し比率を算出し、その情報をディスク・
キャッシュ制御回路3080およびキャッシュ・メモリ
制御回路3070に送る。そして、ディスク・キャッシ
ュ装置を使用するプログラムにおいて、ディスク装置1
4000へのアクセス回数および読み出し比率が所定の
基準を下まわれば、キャンシュ・メモリ制御回路307
0はアドレス・デコーダ3060.ディレクトリ301
0およびキャッシュ・メモリ3020の一部を主記憶の
一部として割り当て、アクセスを可能にする。
Here, as in the above embodiment, the access frequency detection circuit 3
030 is an instruction code in the control register 3040 to control the disk device 4 for a predetermined period of time (for example, one minute).
Counts the number of read/write requests for 000, calculates the read ratio, and stores the information on the disk.
The data is sent to cache control circuit 3080 and cache memory control circuit 3070. In a program that uses a disk cache device, disk device 1
If the number of accesses to 4000 and the read ratio are below a predetermined standard, the cache memory control circuit 307
0 is address decoder 3060. Directory 301
0 and a portion of cache memory 3020 are allocated as part of main memory and made accessible.

以上のような制御によって、ディスク・データのアクセ
スに局所性がなく、かつ読み出し比率が低いプログラム
を実行するときでも、ディスク・キャッシュ装置を有効
に使用できる。
By controlling as described above, the disk cache device can be used effectively even when executing a program in which there is no locality in disk data access and the read rate is low.

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

この発明によれば、ディスク・キャッシュ装置を使用す
るプログラムのディスク装置へのアクセス状況に応じて
、ディスク・キャッシュ装置のキャッシュ・メモリのデ
ィスク・キャンシュとして使用する量を自動的に調節し
、ディスク・キャッシュとして使用しない部分を主記憶
の一部として割り当てることで、ディスクデータのアク
セスの局所性が低く、また読み出し比率が低いプログラ
ムを実行するときでも、ディスク・キャンシュ装置を有
効に使用できるという効果がある。
According to this invention, the amount of the cache memory of the disk cache device to be used as disk cache is automatically adjusted according to the access status to the disk device of a program using the disk cache device, and the amount of cache memory of the disk cache device is automatically adjusted. By allocating the portion that is not used as cache as part of main memory, the disk cache device can be used effectively even when executing programs with low disk data access locality and low read ratio. be.

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

第1図fa+、 (blはこの発明が適用される計算機
システムの構成を示すブロック図、第2図および第3図
はこの発明のディスク・キャンシュ装置の実施例の構成
を示すブロック図、第4図はディレクトリのフォーマッ
トを示す構成図である。 1000・・・CP U、 2000・・・主記憶装置
、2010・・・OS。
1 fa+, (bl is a block diagram showing the configuration of a computer system to which this invention is applied; FIGS. 2 and 3 are block diagrams showing the configuration of an embodiment of the disk cache device of this invention; The figure is a configuration diagram showing the format of a directory.1000...CPU, 2000...Main storage device, 2010...OS.

Claims (2)

【特許請求の範囲】[Claims] (1)二次記憶装置としてデータを格納するための1台
ないし複数台のディスク装置を備えた電子計算機システ
ムに用いられるディスク・キャッシュ装置であって、 前記ディスク装置に格納されたデータの写しを格納する
ためのキャッシュ・メモリと、 前記ディスク装置に格納されたデータの写しが前記キャ
ッシュ・メモリに存在するか否かを識別するためのディ
レクトリと、 前記ディスク装置に対して単位時間あたりアクセスを要
求された回数と読み出し/書き込み要求の割合を検出す
るアクセス頻度検出手段と、前記アクセス頻度検出手段
の検出結果より、前記ディスク装置へのアクセス頻度が
極端に減少したり、読み出し/書き込み要求の割合にお
いて読み出し比率に極端な低下が見受けられた場合、一
時的に前記キャッシュ・メモリ上の領域の少なくとも一
部を前記電子計算機システムの主記憶の一部として使用
することを可能にするキャッシュ・メモリ制御回路とを
備えたディスク・キャッシュ装置。
(1) A disk cache device used in a computer system equipped with one or more disk devices for storing data as a secondary storage device, which stores a copy of the data stored in the disk device. a cache memory for storing data; a directory for identifying whether a copy of data stored in the disk device exists in the cache memory; and a directory for requesting access per unit time to the disk device. An access frequency detection means detects the number of times the disk device has been accessed and the ratio of read/write requests, and the detection results of the access frequency detection means indicate that the frequency of accesses to the disk device has decreased extremely or that the ratio of read/write requests has decreased significantly. a cache memory control circuit that allows at least a part of the area on the cache memory to be temporarily used as part of the main memory of the computer system when an extreme drop in the read ratio is observed; A disk cache device with
(2)二次記憶装置としてデータを格納するための1台
ないし複数台のディスク装置を備えた電子計算機システ
ムに用いられるディスク・キャッシュ装置であって、 前記電子計算機システムの主記憶装置の一部の領域を使
用して構成され前記ディスク装置に格納されたデータの
写しを格納するためのキャッシュ・メモリと、 前記主記憶装置の一部の領域を使用して構成され前記デ
ィスク装置に格納されたデータの写しが前記キャッシュ
・メモリに存在するか否かを識別するためのディレクト
リと、 前記ディスク装置に対して単位時間あたりアクセスを要
求された回数と読み出し/書き込み要求の割合を検出す
るアクセス頻度検出手段と、前記アクセス頻度検出手段
の検出結果より、前記ディスク装置へのアクセス頻度が
極端に減少したり、読み出し/書き込み要求の割合の読
み出し比率が極端に低下していることが見受けられた場
合、一時的に前記主記憶装置上の前記キャッシュ・メモ
リとして使用できる領域を縮小して主記憶としての領域
を増やすことを可能にするキャッシュ・メモリ制御回路
とを備えたディスク・キャッシュ装置。
(2) A disk cache device used in a computer system equipped with one or more disk devices for storing data as a secondary storage device, which is part of the main storage device of the computer system. a cache memory for storing a copy of data stored in the disk device, configured using an area of the main storage device; and a cache memory configured using a part of the area of the main storage device and stored in the disk device. a directory for identifying whether a copy of data exists in the cache memory; and an access frequency detection unit for detecting the number of access requests per unit time and the ratio of read/write requests to the disk device. and if it is found from the detection result of the access frequency detection means that the frequency of access to the disk device is extremely reduced or the read ratio of read/write requests is extremely reduced, A disk cache device comprising: a cache memory control circuit that makes it possible to temporarily reduce the area on the main storage device that can be used as the cache memory to increase the area that can be used as the main memory.
JP1199794A 1989-07-31 1989-07-31 Disk cache device Pending JPH0363741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1199794A JPH0363741A (en) 1989-07-31 1989-07-31 Disk cache device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1199794A JPH0363741A (en) 1989-07-31 1989-07-31 Disk cache device

Publications (1)

Publication Number Publication Date
JPH0363741A true JPH0363741A (en) 1991-03-19

Family

ID=16413731

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1199794A Pending JPH0363741A (en) 1989-07-31 1989-07-31 Disk cache device

Country Status (1)

Country Link
JP (1) JPH0363741A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7017548B2 (en) 2001-11-30 2006-03-28 Yamaha Hatsudoki Kabushiki Kaisha Engine controller
JP2009251713A (en) * 2008-04-02 2009-10-29 Toshiba Corp Cache memory control unit
WO2015132877A1 (en) * 2014-03-04 2015-09-11 株式会社日立製作所 Computer and memory control method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7017548B2 (en) 2001-11-30 2006-03-28 Yamaha Hatsudoki Kabushiki Kaisha Engine controller
JP2009251713A (en) * 2008-04-02 2009-10-29 Toshiba Corp Cache memory control unit
WO2015132877A1 (en) * 2014-03-04 2015-09-11 株式会社日立製作所 Computer and memory control method
US9588896B2 (en) 2014-03-04 2017-03-07 Hitachi, Ltd. Computer and memory control method
JPWO2015132877A1 (en) * 2014-03-04 2017-03-30 株式会社日立製作所 Computer and memory control method

Similar Documents

Publication Publication Date Title
CN109791523B (en) Memory management supporting megapages
US6795897B2 (en) Selective memory controller access path for directory caching
US5530941A (en) System and method for prefetching data from a main computer memory into a cache memory
KR100240912B1 (en) Stream filter
US8688951B2 (en) Operating system virtual memory management for hardware transactional memory
US6457104B1 (en) System and method for recycling stale memory content in compressed memory systems
US7461209B2 (en) Transient cache storage with discard function for disposable data
EP3414665B1 (en) Profiling cache replacement
CN105917319B (en) Memory cell and method
JP7340326B2 (en) Perform maintenance operations
US20100318742A1 (en) Partitioned Replacement For Cache Memory
JP2000242558A (en) Cache system and its operating method
US6098153A (en) Method and a system for determining an appropriate amount of data to cache
US20070079070A1 (en) Cache controller
US7809889B2 (en) High performance multilevel cache hierarchy
US7197605B2 (en) Allocating cache lines
US20030093622A1 (en) Caching memory contents into cache partitions baesed on memory locations
KR101893966B1 (en) Memory management method and device, and memory controller
KR20010050796A (en) Write buffer with burst capability
US5287512A (en) Computer memory system and method for cleaning data elements
US5835945A (en) Memory system with write buffer, prefetch and internal caches
JPH0363741A (en) Disk cache device
JP4792065B2 (en) Data storage method
JP3503480B2 (en) Cache memory control method and device
JP3061001B2 (en) Memory allocation method in computer system