JPH08185272A - Magnetic disk device with disk cache - Google Patents

Magnetic disk device with disk cache

Info

Publication number
JPH08185272A
JPH08185272A JP6326315A JP32631594A JPH08185272A JP H08185272 A JPH08185272 A JP H08185272A JP 6326315 A JP6326315 A JP 6326315A JP 32631594 A JP32631594 A JP 32631594A JP H08185272 A JPH08185272 A JP H08185272A
Authority
JP
Japan
Prior art keywords
address
data
access
cache
disk
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
JP6326315A
Other languages
Japanese (ja)
Inventor
Koji Kato
浩二 加藤
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
Original Assignee
Toshiba 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 filed Critical Toshiba Corp
Priority to JP6326315A priority Critical patent/JPH08185272A/en
Publication of JPH08185272A publication Critical patent/JPH08185272A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To make possible faster access by prereading data on the basis of prepared preread address information. CONSTITUTION: A read command is received first through a host data bus and when an address register 5 is effective (e bit), the length of the address of this command is recorded in a corresponding entry of an address table 3. For the processing of this command, a cache memory 4 is searched through a table managing mechanism 4 and data is transferred from the cache memory 2 when present on the cache or from the disk device 1 when not. Thus, the address and length of this command are recorded in the address register 5, and the address table 5 is searched by using the address of this command as a key to obtain a next access address and length information. Then when the obtained data are effective, the data transfer from the disk device 1 to the cache memory 2 is performed according to the address and length information to make a preread.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ディスクキャッシュを
もつ磁気ディスク装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a magnetic disk device having a disk cache.

【0002】[0002]

【従来の技術】磁気ディスク装置はコンピュータの大容
量外部記憶として頻繁に使用されている。コンピュータ
の高性能化に伴い周辺装置も高速化が進み、ディスクキ
ャッシュを利用することで磁気ディスクの高速アクセス
が可能となる。
2. Description of the Related Art Magnetic disk devices are frequently used as large-capacity external storage for computers. Peripheral devices have become faster as computers have become more sophisticated, and high-speed access to magnetic disks becomes possible by using a disk cache.

【0003】ディスクキャッシュは、予め使用したデー
タを再び使用することを想定して、そのデータを高速ア
クセス可能なメモリ上に保存し、再度要求があった場合
に、ディスク上からではなく、メモリからそのデータを
読むことにより、高速アクセスを行なう方式をいう。
The disk cache stores the data in a memory that can be accessed at high speed on the assumption that the previously used data is reused, and when a request is made again, the data is not stored in the disk but in the memory. By reading the data, it is a method to perform high-speed access.

【0004】このディスクキャッシュの欠点は、アルゴ
リズムにもよるが、ランダムアクセスに対しては比較的
効果が薄い。更に、高いヒット率を得るためにはメモリ
容量を大きくする必要があり、結果的に高価なシステム
となる。
The drawback of this disk cache is that it is relatively ineffective for random access, although it depends on the algorithm. Furthermore, in order to obtain a high hit rate, it is necessary to increase the memory capacity, resulting in an expensive system.

【0005】[0005]

【発明が解決しようとする課題】上述したように、従来
のディスクキャッシュを利用した磁気ディスク装置は、
特殊なシーケンスをもつデータアクセスに対してヒット
率が低下し、所期の目的が達成されない。また、ヒット
率を上げるためには大容量メモリが必要となり、結果的
に高価なシステムになってしまうという欠点を有してい
た。
As described above, the conventional magnetic disk device using the disk cache is
The hit rate decreases for data access with a special sequence, and the intended purpose is not achieved. Further, there is a drawback that a large capacity memory is required to increase the hit rate, resulting in an expensive system.

【0006】本発明は上記実情に鑑みなされたもので、
予め用意された先読みアドレス情報に基づきデータを先
読みすることにより、より一層の高速アクセスを実現す
るディスクキャッシュをもつ磁気ディスク装置を提供す
ることを目的とする。
The present invention has been made in view of the above circumstances,
An object of the present invention is to provide a magnetic disk device having a disk cache that realizes further high-speed access by pre-reading data based on pre-reading address information prepared in advance.

【0007】[0007]

【課題を解決するための手段】本発明は、アクセスコマ
ンドを受信し、必要なデータがキャッシュメモリにあれ
ばキャッュメモリからデータ転送を行ない、なければデ
ィスク装置から必要データを転送するディスクキャッシ
ュをもつ磁気ディスク装置に於いて、個々のデータアク
セス単位に、次にアクセスされるアドレスを記録するア
ドレステーブルと、アクセスコマンド実行直後、上記ア
ドレステーブルをサーチし、そこに記録されたアドレス
をもとに磁気ディスク装置のアクセスを行ないデータを
先き読みしてキャッシュメモリに転送するメモリ制御装
置とを具備することを特徴とする。
According to the present invention, a magnetic disk having a disk cache which receives an access command, transfers data from a cache memory if necessary data is present in a cache memory, and transfers necessary data from a disk device if not. In the disk device, an address table that records the address to be accessed next for each data access unit and the address table that is searched immediately after the access command is executed, and the magnetic disk based on the address recorded there And a memory control device for accessing the device in advance and reading the data in advance and transferring the data to the cache memory.

【0008】[0008]

【作用】本発明は、各ブロック毎に、次にアクセスされ
るアドレスとそのレングスを記録するアドレステーブル
と、リードコマンド実行直後にアドレステーブルをサー
チし、そこに記録された次参照アドレスとレングスをも
とにリード動作を行ないデータを読み出す機構と、先読
みしたデータを蓄えるキャッシュメモリとを備えること
により、メディアアクセス時に、そのアドレスとレング
スをアドレステーブル上の直前にアクセスされたブロッ
クの位置に記録し、メディアアクセスが終了した直後
に、そのスタートアドレスに記録されている次アクセス
アドレスとレングス情報をもとにディスクアクセスを行
ないキャッシュメモリにデータを蓄えておく。このこと
により、特に、リードアクセス時に、あるパターンを持
っている場合、キャッシュのヒット率が飛躍的に向上す
る。
According to the present invention, for each block, the address table for recording the address to be accessed next and its length, and the address table immediately after execution of the read command are searched, and the next reference address and length recorded therein are searched. By providing a mechanism for reading data based on the original read operation and a cache memory for storing prefetched data, the address and length are recorded at the position of the block accessed immediately before on the address table at the time of media access. Immediately after the end of media access, disk access is performed based on the next access address and length information recorded in the start address, and data is stored in the cache memory. As a result, the cache hit rate is dramatically improved especially when a certain pattern is provided during read access.

【0009】[0009]

【実施例】以下図面を参照して本発明の一実施例を説明
する。図1は本発明の一実施例による装置の構成を示す
ブロック図である。図1に於いて、符号1は磁気ディス
ク装置である。この磁気ディスク装置1の磁気ディスク
媒体には、ユーザデータの他にOS(オペレーティング
システム)等の制御情報が格納される。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an apparatus according to an embodiment of the present invention. In FIG. 1, reference numeral 1 is a magnetic disk device. The magnetic disk medium of the magnetic disk device 1 stores control information such as an OS (operating system) in addition to user data.

【0010】符号2はキャッシュメモリであり、リード
データを一時的に蓄えておく高速アクセス可能なメモリ
で構成される。符号3はアドレステーブルである。この
アドレステーブル3を構成する各エントリには、有効ビ
ット(e)、次にアクセスされる可能性の高いアドレス
(ネクストアドレス)、及びレングス情報等が割り付け
られ記憶される。エントリ0〜nはブロックの総数分存
在する。
Reference numeral 2 is a cache memory, which is composed of a high-speed accessible memory for temporarily storing read data. Reference numeral 3 is an address table. A valid bit (e), an address that is likely to be accessed next (next address), length information, and the like are allocated and stored in each entry that constitutes the address table 3. Entries 0 to n exist for the total number of blocks.

【0011】符号4はテーブル管理機構であり、アドレ
ステーブル3に対し、データの更新、及びサーチを行な
うハードウェアである。符号5はアドレスレジスタであ
る。このアドレスレジスタ5はディスクアクセスの毎に
そのアドレスとレングス情報を記録し保持する記憶領域
である。
Reference numeral 4 is a table management mechanism, which is hardware for updating and searching the address table 3. Reference numeral 5 is an address register. The address register 5 is a storage area for recording and holding the address and length information for each disk access.

【0012】図2は本発明の実施例に於ける動作を説明
するためのフローチャートである。図中、Aはアドレス
テーブル3を更新するステップであり、直前の処理ステ
ップBで保持しているアドレスに対応するエントリに本
コマンドのアドレスとレングスを記録する。
FIG. 2 is a flow chart for explaining the operation in the embodiment of the present invention. In the figure, A is a step for updating the address table 3, and the address and length of this command are recorded in the entry corresponding to the address held in the immediately preceding processing step B.

【0013】Bはスタートアドレスを保持するステップ
であり、アドレスとレングスを次のアドレステーブル3
の更新のために保持する。Cはアドレステーブル3をサ
ーチするステップであり、スタートアドレスをインデッ
クスとしてテーブル内の次アクセスアドレスとレングス
を取得する。
B is a step of holding the start address, and the address and length are stored in the next address table 3
Keep for updates. C is a step of searching the address table 3, and acquires the next access address and length in the table by using the start address as an index.

【0014】Dは先き読みするステップであり、ステッ
プCで得られる情報をもとにディスク装置1からキャッ
シュメモリ2へデータを先き読みする。以下、図面を参
照して本発明の実施例に於ける動作を説明する。
D is a step of pre-reading, and the data is pre-read from the disk device 1 to the cache memory 2 based on the information obtained in step C. The operation of the embodiment of the present invention will be described below with reference to the drawings.

【0015】まず、キャッシュメモリ2、アドレスレジ
スタ5、及びアドレステーブル3を初期化する。次にホ
ストデータバスを介してリードコマンドを受信し、アド
レスレジスタ5が有効(eビット)ならば該当するアド
レステーブル3のエントリに本コマンドのアドレスとレ
ングスを記録する。
First, the cache memory 2, the address register 5, and the address table 3 are initialized. Next, a read command is received via the host data bus, and if the address register 5 is valid (e bit), the address and length of this command are recorded in the corresponding entry of the address table 3.

【0016】そして、本コマンドの処理としてデーブル
管理機構4を経由してキャッシュメモリ2をサーチし、
データがキャッシュ上にあればキャッシュメモリ2か
ら、なければディスク装置1から転送する。
Then, as the processing of this command, the cache memory 2 is searched through the table management mechanism 4,
If the data is on the cache, it is transferred from the cache memory 2, and if not, it is transferred from the disk device 1.

【0017】そして図示せぬホスト装置に対し本コマン
ドの終了報告を行なう。本発明の特徴は、本コマンドの
アドレスとレングスをアドレスレジスタ5に記録し、本
コマンドのアドレスをキーとしてアドレステーブル3を
サーチし、次アクセスアドレスとレングス情報を取得す
ることである。
Then, the end of this command is reported to a host device (not shown). A feature of the present invention is to record the address and length of this command in the address register 5, search the address table 3 using the address of this command as a key, and obtain the next access address and length information.

【0018】取得したデータが有効ならばそのアドレス
とレングス情報に従いディスク装置1からキャッシュメ
モリ2へデータ転送を行ない、先読みを実行するもので
ある。
If the acquired data is valid, the data is transferred from the disk device 1 to the cache memory 2 according to the address and the length information, and the prefetch is executed.

【0019】以下、初期化処理を除き、リードコマンド
受信処理以降の動作を繰り返し説明する。尚、上述した
実施例は、リードコマンドを主として説明したが、アド
レステーブル3に次アクセスアドレスを書き込む場合に
は、その直前のアクセスがリード以外のメディアアクセ
スコマンド(例えばライト)であっても有効である。例
えば、ライト、リード、ライト、リード……と繰り返さ
れるアクセスの場合、あるライトを行なった次に行われ
るであろうリードアクセスを予め実行し、キャッシュメ
モリ2にデータを蓄えておくという方法も効果がある。
Hereinafter, except for the initialization process, the operations after the read command reception process will be repeatedly described. In the above-described embodiment, the read command is mainly described, but when the next access address is written in the address table 3, it is valid even if the access immediately before is a media access command other than read (for example, write). is there. For example, in the case of repeated accesses such as write, read, write, read ..., a method of performing a read access that will be performed after a certain write in advance and storing data in the cache memory 2 is also effective. There is.

【0020】アドレステーブル3の初期化に於いては、
全てのエントリを無効にしてしまう方法もあるが、例え
ば、毎回アドレステーブル3をディスクメディア上に保
存しておき、初期化の際にはその保存されたテーブルを
読み出して利用する方法も考えられる。
In the initialization of the address table 3,
There is also a method of invalidating all the entries, but for example, a method of storing the address table 3 on the disk medium every time and reading out the stored table at the time of initialization can be considered.

【0021】アドレステーブルに必要なメモリサイズは
以下のようになる。 (1)エントリサイズ=(有効ビットに必要なバイト
数)×(アドレス保持に必要なバイト数)×(レングス
保持に必要なバイト数) (2)必要なメモリサイズ=ディスク装置の総ブロック
数×エントリサイズ 当然ながら、エントリサイズは、2のベキ乗にしたほう
がサーチ速度の点で有利である。
The memory size required for the address table is as follows. (1) Entry size = (Number of bytes required for valid bits) x (Number of bytes required to hold address) x (Number of bytes required to hold length) (2) Required memory size = Total number of blocks in disk device x Entry size Of course, it is advantageous in terms of search speed to make the entry size a power of two.

【0022】尚、アドレステーブル3は多重化させるこ
ともできる。例えば、A+B+C、A+B´+C、A+
B+C、A+B´+C……とアクセスする場合を考える
と、BのデータとB´のデータが交互に読み出されるた
めに、Aを読んだときに次にBを読むと、次のアクセス
では絶対にヒットしないことになる。このとき、Aに対
する先読み情報を多重化させ、BとB´を交互に指し示
すようにすればヒット率が向上する。また、先読み情報
のキーとして、1つ前でなく、2つ前までの情報を用い
ることも考えられる。例えば、A+Bとアクセスしたら
次にCを読み、一方、A+B´とアクセスしたら次はD
を読むようにする。更に究極の先読み情報としてアドレ
ステーブル3をリングバッファで構成し、ある区間での
アクセスパターンをそれ以前のアクセスパターンの中か
ら探してそこに戻るという方法も考えられる。最近はデ
ィスク装置を二重化することも多々あり、この場合、デ
ィスクへのアクセスを交互に切り替えてやると先読みの
ためのオーバヘッドが減る。
The address table 3 can be multiplexed. For example, A + B + C, A + B '+ C, A +
Considering the case of accessing B + C, A + B ′ + C, etc., the data of B and the data of B ′ are read alternately. Therefore, if B is read next when A is read, the next access will never occur. Will not hit. At this time, if the prefetch information for A is multiplexed and B and B ′ are alternately pointed, the hit rate is improved. It is also conceivable to use the information of not more than one as the key of the read-ahead information, but not the information before two. For example, if you access A + B, read C next, and if you access A + B ', next read D.
Try to read. Further, a method may be considered in which the address table 3 is composed of a ring buffer as the ultimate read-ahead information, and the access pattern in a certain section is searched from the access patterns before that and returned there. Recently, it is often the case that the disk device is duplicated. In this case, if the access to the disk is alternately switched, the overhead for prefetching is reduced.

【0023】[0023]

【発明の効果】以上詳記したように本発明によれば、メ
ディアアクセス時に、そのアドレスとレングスをアドレ
ステーブル上の直前にアクセスされたブロックの位置に
記録し、メディアアクセスが終了した直後に、そのスタ
ートアドレスに記録されている次アクセスアドレスとレ
ングス情報をもとにディスクアクセスを行ないキャッシ
ュメモリにデータをデータを蓄えておくことを特徴とす
るものであり、このことにより、特に、リードアクセス
時にあるパターンを持っている場合、キャッシュのヒッ
ト率が飛躍的に向上し、高速処理に一段と貢献する。
As described above in detail, according to the present invention, when a medium is accessed, its address and length are recorded at the position of the block accessed immediately before on the address table, and immediately after the end of the medium access. It is characterized by performing disk access based on the next access address and length information recorded in the start address and storing the data in the cache memory. If you have a certain pattern, the hit rate of the cache will be dramatically improved, which will further contribute to high-speed processing.

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

【図1】本発明の一実施例の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】上記実施例の処理手順を示すフローチャート。FIG. 2 is a flowchart showing a processing procedure of the above embodiment.

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

1…ディスク装置、2…キャッシュメモリ、3…アドレ
ステーブル、4…テーブル管理機構、5…アドレスレジ
スタ。
1 ... Disk device, 2 ... Cache memory, 3 ... Address table, 4 ... Table management mechanism, 5 ... Address register.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 アクセスコマンドを受信し、必要なデー
タがキャッシュメモリにあればキャッュメモリからデー
タ転送を行ない、必要なデータがキャッシュメモリにな
ければディスク装置から必要なデータを転送するディス
クキャッシュをもつ磁気ディスク装置に於いて、個々の
データアクセス単位に、次にアクセスされるアドレスを
記録するアドレステーブルと、アクセスコマンド実行直
後に上記アドレステーブルをサーチし、同テーブルに記
録されたアドレスをもとに磁気ディスク装置のアクセス
を行ないデータを先き読みしてキャッシュメモリに転送
するメモリ制御装置とを具備することを特徴とするディ
スクキャッシュをもつ磁気ディスク装置。
1. A magnetic device having a disk cache which receives an access command, transfers data from the cache memory when necessary data is present in the cache memory, and transfers necessary data from a disk device when necessary data is not present in the cache memory. In the disk device, the address table that records the address to be accessed next for each data access unit and the address table that is searched immediately after the access command is executed, and the magnetic field is recorded based on the address recorded in the table. A magnetic disk device having a disk cache, comprising: a memory controller for accessing the disk device in advance to read data and transferring the data to a cache memory.
【請求項2】 個々のデータアクセス単位に、以前にア
クセスされたアドレスとレングス情報を記録することを
特徴とする請求項1記載のディスクキャッシュをもつ磁
気ディスク装置。
2. A magnetic disk device having a disk cache according to claim 1, wherein the previously accessed address and length information are recorded in each data access unit.
【請求項3】 メディアアクセス時に、そのアドレスと
レングスをアドレステーブル上の直前にアクセスされた
ブロックの位置に記録し、メディアアクセスが終了した
直後に、そのスタートアドレスに記録されている次アク
セスアドレスとレングス情報をもとにディスクアクセス
を行ないキャッシュメモリにデータを蓄えておくことを
特徴とするディスクキャッシュをもつ磁気ディスク装
置。
3. At the time of media access, the address and length are recorded at the position of the block accessed immediately before on the address table, and immediately after the media access is completed, the next access address recorded at the start address is recorded. A magnetic disk device having a disk cache characterized in that disk access is performed based on length information and data is stored in a cache memory.
【請求項4】 個々のデータアクセス単位に、次にアク
セスされるアドレスを記録するアドレステーブルをリン
グバッファで構成し、ある区間でのアクセスパターンを
それ以前のアクセスパターンの中から探し、そこに戻る
ことを特徴とする請求項3記載のディスクキャッシュを
もつ磁気ディスク装置。
4. An address table for recording an address to be accessed next is configured by a ring buffer for each data access unit, an access pattern in a certain section is searched from access patterns before that, and the process returns to that. 4. A magnetic disk device having a disk cache according to claim 3.
JP6326315A 1994-12-27 1994-12-27 Magnetic disk device with disk cache Pending JPH08185272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6326315A JPH08185272A (en) 1994-12-27 1994-12-27 Magnetic disk device with disk cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6326315A JPH08185272A (en) 1994-12-27 1994-12-27 Magnetic disk device with disk cache

Publications (1)

Publication Number Publication Date
JPH08185272A true JPH08185272A (en) 1996-07-16

Family

ID=18186396

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6326315A Pending JPH08185272A (en) 1994-12-27 1994-12-27 Magnetic disk device with disk cache

Country Status (1)

Country Link
JP (1) JPH08185272A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009230417A (en) * 2008-03-21 2009-10-08 Fujitsu Ltd Disk drive and data prior reading method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009230417A (en) * 2008-03-21 2009-10-08 Fujitsu Ltd Disk drive and data prior reading method

Similar Documents

Publication Publication Date Title
JP3898782B2 (en) Information recording / reproducing device
US6941423B2 (en) Non-volatile mass storage cache coherency apparatus
US5983319A (en) Information recording and reproduction apparatus and a method of data caching including read-ahead capability
JP2804115B2 (en) Disk file system
JPS5876956A (en) Peripheral system with buffer memory
JP3568110B2 (en) Cache memory control method, computer system, hard disk drive, and hard disk controller
JP2004502237A (en) Non-volatile cache integrated in mass storage devices
JPS63186348A (en) Apparatus for heightening utility of single writing/multiple reading memory medium
JP2001195197A (en) Digital data sub-system including directory to efficiently provide format information about stored record
JP3969809B2 (en) Data buffer management method in storage device
JPH08185272A (en) Magnetic disk device with disk cache
JPH01303547A (en) Control system for information memory
JPH11327802A (en) Disk system
JPH0460730A (en) Cache control system
JPS59501999A (en) Dynamic addressing for variable track length cache memory
JP2665180B2 (en) Disk cache buffer allocation method
JP2854668B2 (en) Disk cache control method
JP2531538B2 (en) Cache memory data write-back method and disk cache control device
JPH05257810A (en) Information recording and reproducing device and information recording method
JPH0612328A (en) Method for storing data in cache memory
JPH0250743A (en) External storage subsystem
JPS63291145A (en) Method for managing file
JPH10232838A (en) Disk storage system
JPH05342152A (en) Buffer control system
JP2001034536A (en) Disk drive and recording medium