JPH07104940A - Disk device - Google Patents
Disk deviceInfo
- Publication number
- JPH07104940A JPH07104940A JP24695193A JP24695193A JPH07104940A JP H07104940 A JPH07104940 A JP H07104940A JP 24695193 A JP24695193 A JP 24695193A JP 24695193 A JP24695193 A JP 24695193A JP H07104940 A JPH07104940 A JP H07104940A
- Authority
- JP
- Japan
- Prior art keywords
- data
- read
- read command
- command
- discriminating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 7
- 238000013523 data management Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、ディスク装置に係わ
り、特に、上位装置であるホストシステム(ホスト制御
手段)からディスク装置に対して読み出し要求されるデ
ータを予測し、これらのデータを予めディスク装置内の
記憶手段に保存させるように動作制御されるディスク装
置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a disk device, and more particularly to predicting data requested to be read from the host device (host control means) which is a host device to the disk device, and preliminarily storing these data in the disk device. The present invention relates to a disk device whose operation is controlled so as to be stored in a storage means in the device.
【0002】[0002]
【従来の技術】従来、前述のような動作制御が行われる
ディスク装置、即ち、先読みを行うルックアヘッド制御
ディスク装置においては、ディスク装置からホスト制御
手段に転送させたデータをディスク装置内のキャッシュ
メモリ(記憶手段)に保存させておき、ホスト制御手段
からディスク装置に対してデータの読み出し要求があっ
た場合に、その要求されたデータが前記キャッシュメモ
リ内に保存されているときには、そのキャッシュメモリ
から当該データの読み出しを行ってホスト制御手段に転
送させ、一方、その要求されたデータが前記キャッシュ
メモリに保存されていなかったときには、新たにディス
クから当該データの読み出しを行ってホスト制御手段に
転送させるように動作制御するもの(以下、これを第1
動作制御手段という)、及び、ディスク装置からホスト
制御手段に転送させたデータの次のデータが、次回にホ
スト制御手段からディスク装置に対して読み出し要求さ
れるであろうことを推測し、常時、ホスト制御手段に転
送させたデータの次のデータをディスク装置内のキャッ
シュメモリに保存させるように動作制御するもの(以
下、これを第2動作制御手段という)の2つの動作制御
手段が知られていた。2. Description of the Related Art Conventionally, in a disk device in which the above-mentioned operation control is performed, that is, in a look-ahead control disk device for prefetching, the data transferred from the disk device to the host control means is cached in the disk device. If the host controller issues a data read request to the disk device and the requested data is stored in the cache memory, the data is stored in the cache memory. When the requested data is not stored in the cache memory, the data is read out and transferred to the host control unit. When the requested data is not stored in the cache memory, the data is newly read out from the disk and transferred to the host control unit. To control the operation like
(Referred to as operation control means), and the next data of the data transferred from the disk device to the host control means will be requested to be read from the host control means to the disk device next time. There are known two operation control means for controlling the operation so that the data next to the data transferred by the host control means is stored in the cache memory in the disk device (hereinafter referred to as the second operation control means). It was
【0003】[0003]
【発明が解決しようとする課題】しかしながら、前記既
知の第1動作制御手段及び前記既知の第2動作制御手段
においては、ともに、ディスク装置内のキャッシュメモ
リ(記憶手段)に保存されるべきデータがそれぞれ一義
的に定められるものであるため、ホスト制御手段からデ
ィスク装置に対して読み出し要求されるデータが前記キ
ャッシュメモリ内に保存されている確率(ヒット率)を
ある程度以上に高くすることはできず、そのヒット率に
自ずと限界があるという問題があった。However, in both the known first operation control means and the known second operation control means, the data to be stored in the cache memory (storage means) in the disk device is Since each is uniquely determined, the probability (hit rate) that the data requested to be read from the disk drive from the host control means is stored in the cache memory cannot be increased to a certain level or higher. However, there was a problem that the hit rate was naturally limited.
【0004】本発明は、前述の問題点を除去するもので
あって、その目的は、ホスト制御手段からディスク装置
に対して読み出し要求されるデータが記憶手段内に保存
されている確率(ヒット率)を向上させるようにしたデ
ィスク装置を提供することである。The present invention eliminates the above-mentioned problems, and its object is the probability that the data requested to be read from the disk device by the host control means is stored in the storage means (hit rate). ) Is provided.
【0005】[0005]
【課題を解決するための手段】前記目的を達成するため
に、本発明は、ホスト制御手段から供給される読み出し
コマンドに基づいて、ディスクに記録されたデータを読
み出す読み出し手段と、前記読み出されたデータを前記
ホスト制御手段に転送する転送手段と、前記ホスト制御
手段が次に送出する読み出しコマンドを推測する推測手
段と、この推測手段の出力により前記ディスクに記録さ
れた情報を先読みする先読み手段と、前記先読み手段及
び/または前記読み出し手段によって読み出されたデー
タを記録する記憶手段と、装置全体を制御動作させる制
御手段を有するディスク装置において、前記推測手段
は、前回受信したコマンドと今回受信したコマンドがと
もに読み出しコマンドであるか否かを判別する第1の判
別手段と、前回の読み出しコマンドの終了アドレスと今
回の読み出しコマンドの先頭アドレスとの連続関係を判
別する第2の判別手段とを備えており、この第1の判別
手段及び第2の判別手段の判別結果に基づいて、前記ホ
スト制御手段が次に送出する読み出しコマンド及びその
読み出しコマンドの先頭アドレスの推測を行う手段を備
える。In order to achieve the above object, the present invention provides a read means for reading data recorded on a disk based on a read command supplied from a host control means, and the read means. Transfer means for transferring the stored data to the host control means, a guessing means for guessing a read command to be sent next by the host control means, and a pre-reading means for pre-reading the information recorded on the disk by the output of the guessing means. And a storage device for recording the data read by the prefetching device and / or the reading device, and a control device for controlling the entire device. The first discriminating means for discriminating whether or not both the read commands are read commands and the previous read command. A second discriminating means for discriminating a continuous relationship between the end address of the output command and the head address of the present read command is provided, and based on the discrimination results of the first discriminating means and the second discriminating means, The host control means comprises means for estimating the read command to be sent next and the start address of the read command.
【0006】[0006]
【作用】前記手段によれば、ホスト制御手段からディス
ク装置に供給される次のコマンドの予測を行う際に、デ
ィスク装置は、複数の判別手段による判別を各別に行っ
た後で、前記コマンドの予測を行うようにしているの
で、極め細かなデータ処理、具体的には、連続したデー
タの読み出し要求であるか、非連続な(ランダム/繰返
し)データの読み出し要求であるかの判別を高確度で行
うことができるようになり、ホスト制御手段からディス
ク装置に対して読み出し要求されるデータが記憶手段内
に保存されている確率(ヒット率)を著しく向上させる
ことができるようになる。According to the above-mentioned means, when predicting the next command to be supplied to the disk device from the host control means, the disk device performs the determination by the plurality of determination means separately and then Since the prediction is performed, highly precise data processing, specifically, whether it is a continuous data read request or a non-continuous (random / repeated) data read request, can be accurately determined. It becomes possible to remarkably improve the probability (hit rate) that the data requested to be read from the host control means to the disk device is stored in the storage means.
【0007】[0007]
【実施例】以下、本発明の実施例を図面を用いて詳細に
説明する。Embodiments of the present invention will now be described in detail with reference to the drawings.
【0008】図1は、本発明によるディスク装置の一実
施例の構成を示すブロック構成図である。FIG. 1 is a block diagram showing the configuration of an embodiment of a disk device according to the present invention.
【0009】図1において、1は磁気ディスク装置(H
DA)、2はデータ・バッファとなるキャッシュメモリ
(記憶手段)、3は制御部(制御手段)、4はリード
(読み出し)動作制御部(読み出し手段)、5はホスト
・バッファ間データ転送制御部(転送手段)、6はコマ
ンド解析部(推測手段)、6aはリード(読み出し)コ
マンド判別部(第1の判別手段)、6bはアドレス連続
関係判別部(第2の判別手段)、7はキャッシュデータ
検索部、7aはセグメント判別部(第3の判別手段)、
7bは全データ有無判別部(第4の判別手段)、7cは
サイズ判別部(第5の判別手段)、8はキャッシュデー
タ管理テーブル、9は先読みデータ決定部、10はホス
ト制御システム(ホスト制御手段)である。なお、先読
みは、先読みデータ決定部9にて定められたデータを制
御部3の制御に基づき、リード動作制御部4が行う。即
ち、先読み手段は、制御部3、リード動作制御部4及び
先読みデータ決定部9により構成される。In FIG. 1, reference numeral 1 is a magnetic disk device (H
DA), 2 is a cache memory (storage unit) that serves as a data buffer, 3 is a control unit (control unit), 4 is a read operation control unit (reading unit), and 5 is a host-buffer data transfer control unit. (Transfer means), 6 is a command analysis section (estimation means), 6a is a read (read) command discrimination section (first discrimination means), 6b is an address continuity relation discrimination section (second discrimination means), and 7 is a cache. The data retrieval unit, 7a is a segment discrimination unit (third discrimination unit),
7b is an all-data presence / absence determining unit (fourth determining unit), 7c is a size determining unit (fifth determining unit), 8 is a cache data management table, 9 is a prefetch data determining unit, and 10 is a host control system (host control). Means). The pre-reading is performed by the read operation control unit 4 based on the data determined by the pre-reading data determination unit 9 under the control of the control unit 3. That is, the prefetching unit is composed of the control unit 3, the read operation control unit 4, and the prefetch data determination unit 9.
【0010】そして、磁気ディスク装置1は、データが
記録及び再生される磁気ディスク(図示なし)を備え、
リード動作制御部4の制御によって、前記磁気ディスク
から所定の記録データの読み出しが行われる。キャッシ
ュメモリ2は、後で詳しく述べるように、複数のセグメ
ントに分割されており、その分割セグメント数及び各セ
グメントサイズ(容量)が変更できるものであって、前
記磁気ディスクから読み出されたデータが一時的に蓄積
され、ホスト・バッファ間データ転送制御部5の制御に
よって、前記一時蓄積データがホスト制御システム10
に転送される。The magnetic disk device 1 includes a magnetic disk (not shown) on which data is recorded and reproduced.
Under the control of the read operation control unit 4, predetermined recording data is read from the magnetic disk. As will be described later in detail, the cache memory 2 is divided into a plurality of segments, the number of divided segments and the size (capacity) of each segment can be changed, and the data read from the magnetic disk is The temporary storage data is temporarily stored, and the temporary storage data is stored under the control of the host-buffer data transfer control unit 5.
Transferred to.
【0011】また、コマンド解析部6は、リードコマン
ド判別部6a、アドレス連続関係判別部6bを備えてお
り、ホスト制御システム10からのコマンドの解析を行
う機能と、リードコマンド判別部6a及びアドレス連続
関係判別部6bの判別結果に基づいて、ホスト制御シス
テム10から前回受信したリードコマンドに続いて次も
リードコマンドを受信することを推測する機能を有す
る。ここで、前記リードコマンド判別部6aは、前回受
信したコマンドと今回受信したコマンドがともにリード
コマンドであるか否かの判別を行い、前記アドレス連続
関係判別部6bは、前回のリードコマンドの終了アドレ
スと今回のリードコマンドの先頭アドレスとの連続関係
があるか否かを判別する。キャッシュデータ検索部7
は、セグメント判別部7a、全データ有無判別部7b、
サイズ判別部7cを備え、キャッシュデータ管理テーブ
ル8と協動して、前記セグメント判別部7aは、今回の
リードコマンドの先頭アドレスがキャッシュメモリ2の
いずれかのセグメントにあるかを判別し、前記全データ
有無判別部7bは、今回のリードコマンドにより読み出
しが要求された全セクタ数のデータがセグメント内に蓄
積されているデータでカバーできるか否かを判別し、前
記サイズ判別部7cは、前記セグメント判別部7aの判
別結果に係りなく、今回のリードコマンドにより読み出
しが要求された全セクタ数のデータのサイズと分割され
たセグメントサイズとを比較判別する。Further, the command analysis section 6 is provided with a read command discrimination section 6a and an address continuity relation discrimination section 6b, and has a function of analyzing a command from the host control system 10 and a read command discrimination section 6a and an address continuation section. It has a function of estimating that the next read command will be received subsequent to the read command previously received from the host control system 10, based on the determination result of the relationship determining unit 6b. Here, the read command determination unit 6a determines whether the previously received command and the command received this time are both read commands, and the address continuity determination unit 6b determines the end address of the previous read command. It is determined whether or not there is a continuous relationship with the start address of this read command. Cache data search unit 7
Is a segment discriminator 7a, an all data presence / absence discriminator 7b
The segment discriminating unit 7a is provided with a size discriminating unit 7c, and in cooperation with the cache data management table 8, the segment discriminating unit 7a discriminates which segment of the cache memory 2 the head address of the read command of this time is. The data presence / absence discriminating unit 7b discriminates whether or not the data of all the sectors requested to be read by the present read command can be covered by the data accumulated in the segment, and the size discriminating unit 7c makes the segment discriminator Regardless of the determination result of the determination unit 7a, the size of the data of the total number of sectors requested to be read by the current read command and the divided segment size are compared and determined.
【0012】さらに、先読みデータ決定部9は、コマン
ド解析部6で行われた前記リードコマンドの到来の推測
に基づいて、リード動作制御部4を介して前記磁気ディ
スクに記憶されているデータの先読みを行い、その先読
みデータをキャッシュメモリ2に転送させる。制御部3
は、このディスク装置の全体的な動作制御を受け持つも
のである。Further, the prefetch data determination unit 9 prefetches the data stored in the magnetic disk via the read operation control unit 4 based on the estimation of the arrival of the read command performed by the command analysis unit 6. Then, the prefetched data is transferred to the cache memory 2. Control unit 3
Is responsible for the overall operation control of this disk device.
【0013】続く、図2は、キャッシュメモリ2におけ
るセグメント分割状態の一例を示す説明図であって、
(a)はセグメント分割例、(b)はセグメント数/サ
イズ変更例を示している。Next, FIG. 2 is an explanatory diagram showing an example of a segment division state in the cache memory 2.
(A) shows an example of segment division, and (b) shows an example of segment number / size change.
【0014】図2(a)に示すように、キャッシュメモ
リ2は、例えば、バッファサイズ256KB(キロバイ
ト)がセグメント管理されており、それぞれサイズ64
KBの4つのセグメントSEG.0乃至SEG.3に分
割されて、各セグメントSEG.0乃至SEG.3がそ
れぞれ一単位となってリードキャッシュ/ルックアヘッ
ドに割り当てられる。ディスク装置は、ホスト制御シス
テム10からセットフューチャ(Set Features)コマンド
を受けると、制御部3の制御に基づき、図2(b)に示
すように、そのコマンドの内容に応じてキャッシュメモ
リ2のセグメント数/セグメントサイズ(容量)が適宜
変更されるが、ホスト制御システム10から図2(b)
に示すセグメント数以外の数の指定があったときには、
キャッシュメモリ2は、そのセグメント数の変更要求を
拒否し、現状のセグメント数を保持し続ける。As shown in FIG. 2A, the cache memory 2 is segment-managed, for example, with a buffer size of 256 KB (kilobytes), each of which has a size of 64.
KB four segments SEG. 0 to SEG. 3 and each segment SEG. 0 to SEG. Each 3 is assigned as a unit to the read cache / look ahead. When the disk device receives a Set Features command from the host control system 10, it is controlled by the control unit 3 and, as shown in FIG. The number / segment size (capacity) is changed appropriately, but from the host control system 10 to FIG.
When a number other than the number of segments shown in is specified,
The cache memory 2 rejects the request for changing the number of segments and keeps the current number of segments.
【0015】なお、セグメント分割状態は、当然、キャ
ッシュデータ管理テーブル8へもその情報が送られるよ
うになっている。It should be noted that the segment division state is naturally sent to the cache data management table 8 as well.
【0016】また、キャッシュメモリ2は、以下に述べ
るようないくつかの規則に従って運用される。第1に、
ホスト制御システム10からのリードコマンドで指定さ
れたデータブロック数(要求された全セクタのデータサ
イズ)が、キャッシュメモリ2のセグメントサイズを越
えているときは、2つ以上のセグメントが使用されるこ
とはなく、1つのセグメントがリングバッファ形式で使
用される。第2に、各セグメント内容は、常時、古いも
のから順に破棄される(LRU方式)。第3に、リード
キャッシュ/ルックアヘッドが破棄される条件は、.
リセット時、.コマンドによりセグメント数が変更さ
れたとき、.コマンド等によりルックアヘッドが禁止
されたとき、.リードロング(Read Long)、ライトロ
ング(Write Long)、フォーマット(Format)、ライトバッ
ファ(Write Buffer)コマンド実行時、.診断(Diagnos
tec )コマンド実行時、.ライト(Write)コマンドの指
定アドレスがバッファ内データアドレスと重なったとき
であって、この内、前記乃至の場合は全セグメント
が破棄され、前記の場合は該当セグメントのみが破棄
される。The cache memory 2 is operated according to some rules as described below. First,
When the number of data blocks specified by the read command from the host control system 10 (data size of all requested sectors) exceeds the segment size of the cache memory 2, two or more segments are used. Rather, one segment is used in the ring buffer format. Secondly, the contents of each segment are always discarded in chronological order (LRU method). Third, the conditions under which the read cache / lookahead are discarded are:
At reset ,. When the number of segments is changed by the command ,. When look ahead is prohibited by a command, etc.,. When executing Read Long, Write Long, Format, Format, Write Buffer command ,. Diagnos
tec) command execution ,. When the specified address of the write command overlaps with the data address in the buffer. In the above cases, all segments are discarded, and in the above case, only the corresponding segment is discarded.
【0017】次に、図3及び図4は、本実施例のディス
ク装置において実行される各種の判別機能を示すフロー
チャートであって、図3はその一部であり、図4はその
残りの一部である。なお、このフローチャートは、図3
及び図4に図示のように、2つの図面に分割されている
が、実際は図3に図示の矢印及び二重矢印の部分が図4
に図示の矢印及び二重矢印の部分にそれぞれ接続される
ものである。Next, FIGS. 3 and 4 are flow charts showing various discriminating functions executed in the disk apparatus of this embodiment, FIG. 3 is a part thereof, and FIG. 4 is the remaining one. It is a department. Note that this flowchart is shown in FIG.
4 is divided into two drawings as shown in FIG. 4, but in reality, the portions indicated by arrows and double arrows in FIG.
Are respectively connected to the portions shown by arrows and double arrows.
【0018】ここで、図3及び図4に図示されたフロー
チャートに基づいて、本実施例のディスク装置の全体的
な動作について説明するが、ここでは、ディスク装置が
ホスト制御システム10から前回のコマンドを受信して
おり、ディスク装置は、そのコマンドに対応したデータ
処理を行った後に、ホスト制御システム10から引き続
いて今回再びコマンドを受信したものとして説明を行
う。The overall operation of the disk device of this embodiment will now be described with reference to the flow charts shown in FIGS. 3 and 4. Here, the disk device causes the host control system 10 to issue the previous command. The disk device will be described as assuming that it has received the command and then received the command again from the host control system 10 after performing the data processing corresponding to the command.
【0019】まず、ステップS1において、コマンド解
析部6は、今回受信したコマンドがリードコマンドであ
るか否かを判断し、リードコマンドであると判断した
(Y)ときには、次のステップS2に移行し、リードコ
マンド以外のコマンドであると判断した(N)ときに
は、そのコマンドの内容に従ったデータ処理等が行われ
る。First, in step S1, the command analysis section 6 determines whether or not the command received this time is a read command. When it is determined that the command is a read command (Y), the process proceeds to the next step S2. If it is determined that the command is a command other than the read command (N), data processing according to the content of the command is performed.
【0020】次に、ステップS2において、リードコマ
ンド判別部6aは、前回受信したコマンドが今回受信し
たコマンドと同様のリードコマンドであるか否かを判断
し、リードコマンドであると判断した(Y)ときには、
次のステップS3に移行し、リードコマンド以外のコマ
ンドであると判断した(N)ときには、別のステップS
7に移行する。Next, in step S2, the read command determination unit 6a determines whether the previously received command is the same read command as the command received this time, and determines that it is a read command (Y). Sometimes
When it is determined that the command is a command other than the read command (N), the process proceeds to the next step S3, and another step S3 is executed.
Move to 7.
【0021】続く、ステップS3において、アドレス連
続関係判別部6bは、前回受信したリードコマンドの終
了アドレスと今回受信したリードコマンドの先頭アドレ
スとの間が連続(シーケンシャル)関係であるか否かを
判断し、連続関係であると判断した(Y)ときには、次
のステップS4に移行し、連続関係がないと判断した
(N)ときには、前記別のステップS7に移行する。In the next step S3, the address continuity relation judging unit 6b judges whether or not the end address of the read command received last time and the start address of the read command received this time have a continuous (sequential) relationship. If it is determined that there is a continuous relationship (Y), the process proceeds to the next step S4, and if it is determined that there is no continuous relationship (N), the process proceeds to another step S7.
【0022】次いで、ステップS4において、セグメン
ト判別部7aは、今回受信したリードコマンドの先頭ア
ドレスがキャッシュメモリ2内のいずれかのキャッシュ
セグメントにヒットしているか否かを判断し、前記先頭
アドレスがいずれかのキャッシュセグメントにヒットし
ていると判断した(Y)ときには、次のステップS5に
移行し、前記先頭アドレスがいずれのキャッシュセグメ
ントにもヒットしていないと判断した(N)ときには、
以下に挙げる第4のデータ処理が行われる。Next, in step S4, the segment discriminating unit 7a determines whether or not the start address of the read command received this time hits any of the cache segments in the cache memory 2, and the start address is determined. When it is determined that the cache segment is hit (Y), the process proceeds to the next step S5, and when it is determined that the start address does not hit any of the cache segments (N),
The following fourth data processing is performed.
【0023】続いて、ステップS5において、全データ
有無判別部7bは、今回受信したリードコマンドにより
読み出し要求された全セクタ数のデータが既にキャッシ
ュセグメント内に蓄積されているデータでカバーできる
か否かを判断し、全セクタ数のデータが一つのセグメン
ト内に蓄積されているデータでカバーできると判断した
(Y)ときには、次のステップS6に移行し、セグメン
ト内に蓄積されているデータでカバーできないと判断し
た(N)ときには、以下に挙げる第3のデータ処理が行
われる。Subsequently, in step S5, the all-data presence / absence discriminating unit 7b determines whether the data of all the sectors requested to be read by the read command received this time can be covered by the data already stored in the cache segment. If it is determined that the data of all the sectors can be covered by the data stored in one segment (Y), the process proceeds to the next step S6, and the data stored in the segment cannot be covered. If it is determined (N), the following third data processing is performed.
【0024】続く、ステップS6において、サイズ判別
部7cは、今回受信したリードコマンドにより読み出し
要求された全セクタ数のデータのサイズが分割されたセ
グメントサイズよりも少ないか否かを判断し、全セクタ
数のデータサイズがセグメントサイズよりも少ないと判
断した(Y)ときには、以下に述べる第1のデータ処理
が行われ、全セクタ数のデータサイズがセグメントサイ
ズに等しいと判断した(N)ときには、以下に挙げる第
2のデータ処理が行われる。In the next step S6, the size discriminator 7c determines whether or not the size of the data of the total number of sectors requested to be read by the read command received this time is smaller than the divided segment size, and the total size of all sectors is determined. When it is determined that the number data size is smaller than the segment size (Y), the first data processing described below is performed, and when it is determined that the data size of all sectors is equal to the segment size (N), The second data processing described in (1) is performed.
【0025】また、前記別のステップS7において、セ
グメント判別部7aは、今回受信したリードコマンドの
先頭アドレスがキャッシュメモリ2内のいずれかのキャ
ッシュセグメントにヒットしているか否かを判断し、前
記先頭アドレスがいずれかのキャッシュセグメントにヒ
ットしていると判断した(Y)ときには、次のステップ
S8に移行し、前記先頭アドレスがいずれのキャッシュ
セグメントにもヒットしていないと判断した(N)とき
には、他のステップS11に移行する。In step S7, the segment discriminator 7a determines whether or not the start address of the read command received this time hits any one of the cache segments in the cache memory 2, and the start address is determined. When it is determined that the address hits any cache segment (Y), the process proceeds to the next step S8, and when it is determined that the leading address does not hit any cache segment (N), The process moves to another step S11.
【0026】続いて、ステップS8において、全データ
有無判別部7bは、今回受信したリードコマンドにより
要求された全セクタ数のデータが既にキャッシュセグメ
ント内に蓄積されているデータでカバーできるか否かを
判断し、全セクタ数のデータが一つのセグメント内に蓄
積されているデータでカバーできると判断した(Y)と
きには、次のステップS9に移行し、セグメント内に蓄
積されているデータでカバーできないと判断した(N)
ときには、他のステップS10に移行する。Then, in step S8, the all data presence / absence determining unit 7b determines whether or not the data of all the sectors requested by the read command received this time can be covered by the data already stored in the cache segment. If it is determined that the data of all the sectors can be covered by the data stored in one segment (Y), the process proceeds to the next step S9, and the data stored in the segment cannot be covered. Judged (N)
At times, the process proceeds to another step S10.
【0027】続く、ステップS9において、サイズ判別
部7cは、今回受信したリードコマンドにより要求され
た全セクタ数のデータのサイズが分割されたセグメント
サイズよりも少ないか否かを判断し、全セクタ数のデー
タサイズがセグメントサイズよりも少ないと判断した
(Y)ときには、以下に挙げる第5のデータ処理が行わ
れ、全セクタ数のデータサイズがセグメントサイズに等
しいと判断した(N)ときには、以下に挙げる第6のデ
ータ処理が行われる。In the next step S9, the size discriminating unit 7c determines whether or not the size of the data of the total number of sectors requested by the read command received this time is smaller than the segment size of the divided sectors, and the total number of sectors is determined. When it is determined that the data size of is smaller than the segment size (Y), the following fifth data processing is performed, and when it is determined that the data size of all the sectors is equal to the segment size (N), the following data processing is performed. The sixth data processing to be described is performed.
【0028】さらに、前記他のステップS10におい
て、サイズ判別部7cは、今回受信したリードコマンド
により要求された全セクタ数のデータのサイズと分割さ
れたセグメントサイズとの比較を行い、その比較の結
果、全セクタ数のデータサイズがセグメントサイズより
少ないときには、以下に挙げる第7のデータ処理が行わ
れ、全セクタ数のデータサイズがセグメントサイズに等
しいときには、以下に挙げる第8のデータ処理が行わ
れ、全セクタ数のデータサイズがセグメントサイズより
大きいときには、以下に挙げる第9のデータ処理が行わ
れる。Further, in the other step S10, the size discriminating unit 7c compares the data size of the total number of sectors requested by the read command received this time with the divided segment size, and the result of the comparison. When the data size of all sectors is smaller than the segment size, the following seventh data processing is performed, and when the data size of all sectors is equal to the segment size, the eighth data processing described below is performed. If the data size of the total number of sectors is larger than the segment size, the ninth data processing described below is performed.
【0029】最後に、前記他のステップS11におい
て、サイズ判別部7cは、今回受信したリードコマンド
により要求された全セクタ数のデータのサイズと分割さ
れたセグメントサイズとの比較を行い、その比較の結
果、全セクタ数のデータサイズがセグメントサイズより
少ないときには、以下に挙げる第10のデータ処理が行
われ、全セクタ数のデータサイズがセグメントサイズに
等しいときには、以下に挙げる第11のデータ処理が行
われ、全セクタ数のデータサイズがセグメントサイズよ
り大きいときには、以下に挙げる第12のデータ処理が
行われる。Finally, in the other step S11, the size discriminator 7c compares the size of the data of the total number of sectors requested by the read command received this time with the segment size, and the comparison is made. As a result, when the data size of all sectors is smaller than the segment size, the following tenth data processing is performed, and when the data size of all sectors is equal to the segment size, the eleventh data processing described below is performed. If the data size of the total number of sectors is larger than the segment size, the twelfth data process described below is performed.
【0030】ここにおいて、前記第1乃至第12の各デ
ータ処理について説明する。Here, each of the first to twelfth data processing will be described.
【0031】始めに、前記第1のデータ処理は、今回受
信したコマンドが前回受信したコマンドと同様にリード
コマンドであり、前回受信したリードコマンドの終了ア
ドレスと今回受信したリードコマンドの先頭アドレスと
の間に連続(シーケンシャル)関係があり、今回受信し
たリードコマンドの先頭アドレスがキャッシュメモリ2
内のいずれかのキャッシュにヒットしており、今回受信
したリードコマンドにより読み出し要求された全セクタ
数のデータが既にセグメント内に蓄積されているデータ
でカバーでき、しかも、今回受信したリードコマンドに
より読み出し要求された全セクタ数のデータサイズが分
割されたセグメントサイズよりも少ない場合であって、
この場合にはリードコマンドの開始アドレスから終了ア
ドレスまでがヒットした完全ヒット状態になり、ホスト
・バッファ間データ転送制御部5は、このヒットデータ
をキャッシュメモリ2から読み出し、ホスト制御システ
ム10側に転送する。このとき、前記リードコマンドは
連続関係にあるので、リードコマンドに基づきデータを
ホスト制御システム10側に転送しながら、セグメント
内の格納済(LAH済)のキャッシュ終了位置からコマ
ンド終了位置(リード要求終了位置)までを追加ルック
アヘッド(LAH)する。First, in the first data processing, the command received this time is a read command like the command received last time, and the end address of the read command received last time and the start address of the read command received this time are set. There is a continuous (sequential) relationship between them, and the start address of the read command received this time is the cache memory 2
One of the caches in the cache has been hit, and the data for all sectors requested to be read by the read command received this time can be covered by the data already stored in the segment, and read by the read command received this time. When the data size of the requested total number of sectors is smaller than the segment size divided,
In this case, the read command starts from the start address to the end address, resulting in a complete hit state, and the host-buffer data transfer control unit 5 reads this hit data from the cache memory 2 and transfers it to the host control system 10 side. To do. At this time, since the read commands are in a continuous relationship, while transferring data to the host control system 10 side based on the read command, from the cache end position of the stored (LAH) end in the segment to the command end position (read request end). Additional look ahead (LAH) up to the position).
【0032】この第1のデータ処理におけるセグメント
内の格納データの状態の一例を図6に示す。図6
(a)、(b)はそれぞれデータ転送前と後の状態であ
り、図中、Sはキャッシュの開始ポインタを示し、Rは
今回のリードコマンドで要求のあったデータの格納され
ている領域を示す。この例では、Sを開始点として、1
セグメント全体にわたって、キャッシュデータが格納さ
れており、開始ポインタSとリードコマンドで要求のあ
った開始アドレスが位置Aで一致しており、位置Bが終
了アドレス(コマンド終了位置)である。ホスト・バッ
ファ間データ転送制御部5は、位置Aから位置Bまでの
ヒットデータをホスト制御システム10側に転送しなが
ら、キャッシュ終了位置を示す位置Aから位置Bまでを
追加LAHする。このとき、開始ポインタSは、位置A
から位置Bに移される。なお、開始ポインタSの位置
は、キャッシュデータ管理テーブル8で管理されてい
る。FIG. 6 shows an example of the state of the stored data in the segment in the first data processing. Figure 6
(A) and (b) are the states before and after data transfer, respectively, in the figure, S indicates the start pointer of the cache, and R indicates the area where the data requested by the read command this time is stored. Show. In this example, starting from S, 1
Cache data is stored over the entire segment, the start pointer S and the start address requested by the read command match at position A, and position B is the end address (command end position). The host-buffer data transfer control unit 5 adds LAH from the position A to the position B indicating the cache end position while transferring the hit data from the position A to the position B to the host control system 10. At this time, the start pointer S is at the position A
To position B from. The position of the start pointer S is managed by the cache data management table 8.
【0033】次いで、前記第2のデータ処理は、今回受
信したコマンドが前回受信したコマンドと同様にリード
コマンドであり、前回受信したリードコマンドの終了ア
ドレスと今回受信したリードコマンドの先頭アドレスと
の間に連続関係があり、今回受信したリードコマンドの
先頭アドレスがキャッシュメモリ2内のいずれかのキャ
ッシュにヒットしており、今回受信したリードコマンド
により読み出し要求された全セクタ数のデータが既にセ
グメント内に蓄積されているデータでカバーでき、しか
も、今回受信したリードコマンドにより読み出し要求さ
れた全セクタ数のデータサイズが分割されたセグメント
サイズに等しい場合であって、この場合にも、リードコ
マンドの開始アドレスから終了アドレスまでがヒットし
た完全ヒット状態になり、ホスト・バッファ間データ転
送制御部5は、このヒットデータをキャッシュメモリ2
から読み出し、ホスト制御システム10側に転送する。
このとき、前記リードコマンドが連続関係にあるので、
リードコマンドに基づきデータをホスト制御システム1
0側に転送しながら、セグメント内のキャッシュ終了位
置からコマンド終了位置までのセグメントサイズ分を追
加ルックアヘッド(LAH)する。なお、このとき、要
求された全セクタ数のデータサイズとセグメントサイズ
が等しいため、開始ポインタSの位置に変化はない。Next, in the second data processing, the command received this time is a read command like the command received last time, and between the end address of the read command received last time and the start address of the read command received this time. , The head address of the read command received this time hits one of the caches in the cache memory 2, and the data of all sectors requested to be read by the read command received this time is already in the segment. When the data size of the total number of sectors requested to be read by the read command received this time is equal to the divided segment size, even in this case, the start address of the read command can be covered. Complete hit state from the end address to the end address Will, between the host buffer data transfer controller 5, the cache memory 2 of this hit data
Read out and transferred to the host control system 10 side.
At this time, since the read commands have a continuous relationship,
Host control system 1 for data based on read command
While transferring to the 0 side, additional look-ahead (LAH) is performed for the segment size from the cache end position to the command end position in the segment. At this time, since the data size of the requested total number of sectors is equal to the segment size, the position of the start pointer S does not change.
【0034】続く、前記第3のデータ処理は、今回受信
したコマンドが前回受信したコマンドと同様にリードコ
マンドであり、前回受信したリードコマンドの終了アド
レスと今回受信したリードコマンドの先頭アドレスとの
間に連続関係があり、今回受信したリードコマンドの先
頭アドレスがキャッシュメモリ2内のいずれかのキャッ
シュにヒットしているが、今回受信したリードコマンド
により読み出し要求された全セクタ数のデータサイズが
既にセグメント内に蓄積されているデータでカバーでき
ない場合であって、この場合には、リードコマンドの開
始から途中までがヒットした前半ヒット状態になり、ホ
スト・バッファ間データ転送制御部5は、このヒットし
ている部分のデータをキャッシュメモリ2から読み出
し、ホスト制御システム10側に転送しながら、リード
動作制御部4は、ヒットしていない残りのデータを磁気
ディスク装置1から個別に読み出し、セグメント内のデ
ータにリングバッファ形式で追加しながらホスト制御シ
ステム10側に転送する。このときは、ホスト制御シス
テム10側にデータを転送した後に、コマンド終了位置
を始点として次の先頭ブロック(セクタ)から始まるデ
ータの1セグメント分をルックアヘッド(LAH)す
る。In the subsequent third data processing, the command received this time is a read command as well as the command received last time, and between the end address of the read command received last time and the start address of the read command received this time. The read command received this time has a start address hitting one of the caches in the cache memory 2, but the data size of all sectors requested to be read by the read command received this time is already a segment. In the case where the data stored in the area cannot be covered, in this case, the first half hit state in which the read command is hit from the start to the middle becomes a hit state, and the host-buffer data transfer control unit 5 makes this hit. Read the data in the cache memory from the cache memory 2 and The read operation control unit 4 individually reads the remaining unhit data from the magnetic disk device 1 while transferring the data to the system 10 side, and adds the data in the segment in the ring buffer format to the host control system 10 side. Forward. At this time, after the data is transferred to the host control system 10, one segment of the data starting from the next head block (sector) is look ahead (LAH) starting from the command end position.
【0035】次いで、前記第4のデータ処理は、今回受
信したコマンドが前回受信したコマンドと同様にリード
コマンドであり、前回受信したリードコマンドの終了ア
ドレスと今回受信したリードコマンドの先頭アドレスと
の間に連続関係があるが、今回受信したリードコマンド
の先頭アドレスがキャッシュメモリ2内のいずれかのキ
ャッシュにヒットしていない場合であって、この場合に
は、仮に、リードコマンドの中間部分がヒットしていて
もコマンドの開始からヒットしないノーヒット状態と判
定し、LRU方式により最も古いデータが格納されてい
るセグメント(セグメント内データ)が破棄され、リー
ド動作制御部4は、要求のあったヒットしていないデー
タを磁気ディスク装置1から前記データの破棄されたセ
グメント内に読み込みながら、ホスト制御システム10
側に転送する。このとき、ホスト制御システム10側に
データを転送させた後は、次の先頭ブロックから1つの
セグメント全領域をルックアヘッド(LAH)する。Next, in the fourth data processing, the command received this time is a read command like the command received last time, and between the end address of the read command received last time and the start address of the read command received this time. However, if the start address of the read command received this time does not hit any of the caches in the cache memory 2, and in this case, the middle part of the read command is hit. Even if there is a hit, it is determined that there is no hit from the start of the command, the segment in which the oldest data is stored (data in the segment) is discarded by the LRU method, and the read operation control unit 4 has made a hit request. Read the missing data from the magnetic disk unit 1 into the discarded segment of the data. While watching, the host control system 10
Transfer to the side. At this time, after the data is transferred to the host control system 10, the entire area of one segment is look ahead (LAH) from the next head block.
【0036】続いて、前記第5のデータ処理は、前回受
信したコマンドが今回受信したコマンドと同じリードコ
マンドでないかまたは前回受信したリードコマンドの終
了アドレスと今回受信したリードコマンドの先頭アドレ
スとの間に連続関係でない、即ち、ランダムもしくはリ
ピート関係を有しており、今回受信したリードコマンド
の先頭アドレスがキャッシュメモリ2内のいずれかのキ
ャッシュにヒットしており、今回受信したリードコマン
ドにより読み出し要求された全セクタ数のデータが既に
セグメント内に蓄積されているデータでカバーでき、し
かも、今回受信したリードコマンドにより読み出し要求
された全セクタ数のデータサイズが分割されたセグメン
トサイズよりも少ない場合であって、この場合にはリー
ドコマンドの開始から終了までがヒットした完全ヒット
状態になり、ホスト・バッファ間データ転送制御部5
は、このヒットデータをキャッシュメモリ2から読み出
し、ホスト制御システム10側に転送する。ただし、こ
のときは転送したデータをセグメント内に残しておき、
ルックアヘッド(LAH)しない。これはディスク装置
の性能を評価するために、次も同じ先頭アドレスと終了
アドレスでリードコマンドをホスト制御システム10が
送出するコアテストと呼ばれるテストを、ホスト制御シ
ステム10が行っている可能性が高いためである。Next, in the fifth data processing, the command received last time is not the same read command as the command received this time, or the end address of the read command received last time and the start address of the read command received this time are set. Is not continuous, that is, has a random or repeat relationship, and the start address of the read command received this time hits any cache in the cache memory 2, and a read request is issued by the read command received this time. The data of all sectors can be covered by the data already stored in the segment, and the data size of all sectors requested to be read by the read command received this time is smaller than the divided segment size. And in this case the start of the read command Become fully hit status until et termination is hit, between the host buffer the data transfer control unit 5
Reads this hit data from the cache memory 2 and transfers it to the host control system 10 side. However, at this time, leave the transferred data in the segment,
Do not look ahead (LAH). In order to evaluate the performance of the disk device, there is a high possibility that the host control system 10 performs a test called a core test in which the host control system 10 sends a read command with the same start address and end address next time. This is because.
【0037】次に、前記第6のデータ処理は、前回受信
したコマンドが今回受信したコマンドと同じリードコマ
ンドでないかまたは前回受信したリードコマンドの終了
アドレスと今回受信したリードコマンドの先頭アドレス
との間に連続関係でない、即ち、ランダムもしくはリピ
ート関係を有しており、今回受信したリードコマンドの
先頭アドレスがキャッシュメモリ2内のいずれかのキャ
ッシュにヒットしており、今回受信したリードコマンド
により読み出し要求された全セクタ数のデータが既にセ
グメント内に蓄積されているデータでカバーでき、その
上に、今回受信したリードコマンドにより読み出し要求
された全セクタ数のデータサイズが分割されたセグメン
トサイズに等しい場合であって、この場合には、前記第
5のデータ処理と同様に、リードコマンドの開始から終
了までがヒットした完全ヒット状態になり、ホスト・バ
ッファ間データ転送制御部5は、このヒットデータをキ
ャッシュメモリ2から読み出し、ホスト制御システム1
0側に転送する。ただし、このときもコアテストの可能
性が高いため、転送したデータをセグメントに残してお
き、ルックアヘッド(LAH)しない。Next, in the sixth data processing, the command received last time is not the same read command as the command received this time, or the end address of the read command received last time and the start address of the read command received this time are set. Is not continuous, that is, has a random or repeat relationship, and the start address of the read command received this time hits any cache in the cache memory 2, and a read request is issued by the read command received this time. When the data of all sectors can be covered by the data already stored in the segment and the data size of all sectors requested to be read by the read command received this time is equal to the divided segment size. So, in this case, with the fifth data processing As, become fully hit state until completion of hits from the start of the read command, between the host buffer the data transfer control unit 5 reads the hit data from the cache memory 2, the host control system 1
Transfer to 0 side. However, at this time as well, there is a high possibility of a core test, so the transferred data is left in the segment and not look ahead (LAH).
【0038】続く、前記第7のデータ処理は、前回受信
したコマンドが今回受信したコマンドと同じリードコマ
ンドでないかまたは前回受信したリードコマンドの終了
アドレスと今回受信したリードコマンドの先頭アドレス
との間に連続関係でない、即ち、ランダムもしくはリピ
ート関係を有しており、今回受信したリードコマンドの
先頭アドレスがキャッシュメモリ2内のいずれかのキャ
ッシュにヒットしているが、今回受信したリードコマン
ドにより読み出し要求された全セクタ数のデータが既に
セグメント内に蓄積されているデータでカバーできず、
しかも、今回受信したリードコマンドにより読み出し要
求された全セクタ数のデータサイズが分割されたセグメ
ントサイズより少ない場合であって、この場合には、リ
ードコマンドの開始から途中までがヒットした前半ヒッ
ト状態になり、ホスト・バッファ間データ転送制御部5
は、このヒットしている部分のデータをキャッシュメモ
リ2から読み出し、ホスト制御システム10側に転送
し、また、リード動作制御部4は、ヒットしていない残
りのデータを磁気ディスク装置1から個別に読み出し、
セグメント内のデータにリングバッファ形式で追加しな
がらホスト制御システム10側に転送する。このとき
は、コマンドサイズ(リードコマンドにより要求のあっ
た全データ)の全てをキャッシュ化し、セグメント内の
他の領域にルックアヘッド(LAH)する。即ち、前半
ヒット部分及びホスト制御システム10側に転送するた
めに追加したデータをセグメント内にキャッシュとして
残し、LAHの量をセグメント内の残りのサイズ分とす
る。In the following seventh data processing, the command received last time is not the same read command as the command received this time, or between the end address of the read command received last time and the start address of the read command received this time. The read command is not continuous, that is, has a random or repeat relationship, and the start address of the read command received this time hits any cache in the cache memory 2, but a read request is issued by the read command received this time. The data of all sectors cannot be covered by the data already stored in the segment,
Moreover, when the data size of the total number of sectors requested to be read by the read command received this time is smaller than the divided segment size, in this case, the first half hit state in which the read command is hit from the start to the middle is hit. Data transfer control unit 5 between host and buffer
Reads the hit data from the cache memory 2 and transfers it to the host control system 10 side, and the read operation control unit 4 individually reads the remaining non-hit data from the magnetic disk device 1. reading,
The data is transferred to the host control system 10 side while being added to the data in the segment in the ring buffer format. At this time, all of the command size (all data requested by the read command) is cached and look ahead (LAH) to another area in the segment. That is, the first half hit portion and the data added for transfer to the host control system 10 side are left in the segment as a cache, and the amount of LAH is set to the remaining size in the segment.
【0039】次に、前記第8のデータ処理は、前回受信
したコマンドが今回受信したコマンドと同じリードコマ
ンドでないかまたは前回受信したリードコマンドの終了
アドレスと今回受信したリードコマンドの先頭アドレス
との間に連続関係でない、即ち、ランダムもしくはリピ
ート関係を有しており、今回受信したリードコマンドの
先頭アドレスがキャッシュメモリ2内のいずれかのキャ
ッシュにヒットしているが、今回受信したリードコマン
ドにより読み出し要求された全セクタ数のデータが既に
セグメント内に蓄積されているデータでカバーできず、
しかも、今回受信したリードコマンドにより読み出し要
求された全セクタ数のデータサイズが分割されたセグメ
ントサイズに等しい場合であって、この場合にも、リー
ドコマンドの開始から途中までがヒットした前半ヒット
状態になり、ホスト・バッファ間データ転送制御部5
は、このヒットしている部分のデータをキャッシュメモ
リ2から読み出し、ホスト制御システム10側に転送
し、また、リード動作制御部4は、ヒットしていない残
りのデータを磁気ディスク装置1から個別に読み出し、
セグメント内のデータにリングバッファ形式で追加しな
がらホスト制御システム10側に転送する。ただし、こ
のときはルックアヘッド(LAH)しない。これは、前
半ヒット部分とホスト制御システム10側に転送するた
めに追加したデータをキャッシュとして、セグメント内
に残すと、セグメント内に空き領域がなくなるためであ
る。Next, in the eighth data processing, the command received last time is not the same read command as the command received this time or the end address of the read command received last time and the start address of the read command received this time are set. However, the read command received this time receives a read request because the start address of the read command received this time hits one of the caches in the cache memory 2. The data of the total number of sectors created cannot be covered by the data already stored in the segment,
Moreover, in the case where the data size of the total number of sectors requested to be read by the read command received this time is equal to the segment size, and in this case as well, the first half hit state in which the read command is hit halfway up to the middle Data transfer control unit 5 between host and buffer
Reads the hit data from the cache memory 2 and transfers it to the host control system 10 side, and the read operation control unit 4 individually reads the remaining non-hit data from the magnetic disk device 1. reading,
The data is transferred to the host control system 10 side while being added to the data in the segment in the ring buffer format. However, at this time, look ahead (LAH) is not performed. This is because if the first half hit portion and the data added for transfer to the host control system 10 side are left in the segment as a cache, there will be no free area in the segment.
【0040】次いで、前記第9のデータ処理は、前回受
信したコマンドが今回受信したコマンドと同じリードコ
マンドでないかまたは前回受信したリードコマンドの終
了アドレスと今回受信したリードコマンドの先頭アドレ
スとの間に連続関係でない、即ち、ランダムもしくはリ
ピート関係を有しており、今回受信したリードコマンド
の先頭アドレスがキャッシュメモリ2内のいずれかのキ
ャッシュにヒットしているが、今回受信したリードコマ
ンドにより読み出し要求された全セクタ数のデータが既
にセグメント内に蓄積されているデータでカバーでき
ず、しかも、今回受信したリードコマンドにより読み出
し要求された全セクタ数のデータサイズが分割されたセ
グメントサイズよりも大きい場合であって、この場合に
は、前記第3のデータ処理と同様に、リードコマンドの
開始から途中までがヒットした前半ヒット状態になり、
ホスト・バッファ間データ転送制御部5は、このヒット
している部分のデータをキャッシュメモリ2から読み出
し、ホスト制御システム10側に転送しながら、リード
動作制御部4は、ヒットしていない残りのデータを磁気
ディスク装置1から個別に読み出し、セグメント内のデ
ータにリングバッファ形式で追加しながらホスト制御シ
ステム10側に転送する。このときは、ホスト制御シス
テム10側にデータを転送した後に、コマンド終了位置
に相当するセグメントの位置を始点とし、次の先頭ブロ
ック(セクタ)から1セグメント分をルックアヘッド
(LAH)する。Next, in the ninth data processing, the command received last time is not the same read command as the command received this time, or between the end address of the read command received last time and the start address of the read command received this time. The read command is not continuous, that is, has a random or repeat relationship, and the start address of the read command received this time hits any cache in the cache memory 2, but a read request is issued by the read command received this time. If the data of all sectors cannot be covered by the data already stored in the segment and the data size of all sectors requested to be read by the read command received this time is larger than the segment size of the divided segments. Yes, in this case, the third day In the same manner as the processing, becomes the first half hit state that up to the middle from the start of the read command has been hit,
The host-buffer data transfer control unit 5 reads the hit data from the cache memory 2 and transfers it to the host control system 10 side, while the read operation control unit 4 reads the remaining unhit data. Are individually read from the magnetic disk device 1 and transferred to the host control system 10 side while being added to the data in the segment in the ring buffer format. At this time, after the data is transferred to the host control system 10, the position of the segment corresponding to the command end position is used as the starting point, and one segment from the next head block (sector) is look ahead (LAH).
【0041】続く、前記第10のデータ処理は、前回受
信したコマンドが今回受信したコマンドと同じリードコ
マンドでないかまたは前回受信したリードコマンドの終
了アドレスと今回受信したリードコマンドの先頭アドレ
スとの間に連続関係でない、即ち、ランダムもしくはリ
ピート関係を有しており、今回受信したリードコマンド
の先頭アドレスがキャッシュメモリ2内のいずれのキャ
ッシュにもヒットしておらず、しかも、今回受信したリ
ードコマンドにより読み出し要求された全セクタ数のデ
ータサイズが分割されたセグメントサイズより少ない場
合であって、この場合には、仮に、リードコマンドの中
間部分がヒットしていてもコマンドの開始からヒットし
ないノーヒット状態とし、LRU方式によりセグメント
は最も古いデータが格納されているものから破棄され、
リード動作制御部4は、要求のあったヒットしていない
データを磁気ディスク装置1から前記データの破棄され
たセグメント内に読み込ながら、ホスト制御システム1
0側に転送する。このとき、コマンドサイズを全てキャ
ッシュ化するためにホスト制御システム10側に転送さ
せたデータをセグメント内に残し、セグメント内の他の
領域をルックアヘッド(LAH)する。In the following tenth data processing, the command received last time is not the same read command as the command received this time, or between the end address of the read command received last time and the start address of the read command received this time. It does not have a continuous relationship, that is, it has a random or repeat relationship, the start address of the read command received this time does not hit any cache in the cache memory 2, and furthermore, it is read by the read command received this time. In the case where the data size of the requested total number of sectors is smaller than the divided segment size, in this case, even if the middle part of the read command is hit, a no-hit state where no hit occurs from the start of the command, Segment is the oldest data by LRU method It is discarded from being stored,
The read operation control unit 4 reads the requested non-hit data from the magnetic disk device 1 into the discarded segment of the data while the host control system 1
Transfer to 0 side. At this time, the data transferred to the host control system 10 side in order to cache all command sizes is left in the segment, and another area in the segment is look ahead (LAH).
【0042】続いて、前記第11のデータ処理は、前回
受信したコマンドが今回受信したコマンドと同じリード
コマンドでないかまたは前回受信したリードコマンドの
終了アドレスと今回受信したリードコマンドの先頭アド
レスとの間に連続関係でない、即ち、ランダムもしくは
リピート関係を有しており、今回受信したリードコマン
ドの先頭アドレスがキャッシュメモリ2内のいずれのキ
ャッシュにもヒットしておらず、しかも、今回受信した
リードコマンドにより読み出し要求された全セクタ数の
データサイズが分割されたセグメントサイズに等しい場
合であって、この場合には、前記第10のデータ処理と
同様に、コマンドの開始からヒットしないノーヒット状
態になり、LRU方式によりセグメントは最も古いデー
タが格納されているものから破棄され、リード動作制御
部4は、要求のあったヒットしていないデータを磁気デ
ィスク装置1から前記データの破棄されたセグメント内
に読み込みながら、ホスト制御システム10側に転送す
る。ただし、このときはホスト制御システム10側に転
送したデータをキャッシュとしてセグメント内に残すた
めに、ルックアヘッド(LAH)しない。Next, in the eleventh data processing, the command received last time is not the same read command as the command received this time, or between the end address of the read command received last time and the start address of the read command received this time. Is not continuous, that is, has a random or repeat relationship, the start address of the read command received this time does not hit any cache in the cache memory 2, and the read command received this time In the case where the data size of the total number of read-requested sectors is equal to the divided segment size, in this case, as in the tenth data process, there is no hit from the start of the command, and the LRU Depending on the method, the segment stores the oldest data. Is discarded from the ones, the read operation control unit 4, while data that is not hit has been requested from the magnetic disk device 1 reads in the discarded segments of the data are transferred to the host control system 10 side. However, at this time, since the data transferred to the host control system 10 side is left in the segment as a cache, look ahead (LAH) is not performed.
【0043】さらに、前記第12のデータ処理は、前回
受信したコマンドが今回受信したコマンドと同じリード
コマンドでないかまたは前回受信したリードコマンドの
終了アドレスと今回受信したリードコマンドの先頭アド
レスとの間に連続関係でない、即ち、ランダムもしくは
リピート関係を有しており、今回受信したリードコマン
ドの先頭アドレスがキャッシュメモリ2内のいずれのキ
ャッシュにもヒットしておらず、しかも、今回受信した
リードコマンドにより読み出し要求された全セクタ数の
データサイズが分割されたセグメントサイズよりも大き
い場合であって、この場合にも、前記第4のデータ処理
と同様に、コマンドの開始からヒットしないノーヒット
状態になり、LRU方式によりセグメントは最も古いデ
ータがが格納されているものから破棄され、リード動作
制御部4は、要求のあったヒットしていないデータを磁
気ディスク装置1から前記データの破棄されたセグメン
ト内に読み込みながら、ホスト制御システム10側に転
送する。このとき、ホスト制御システム10側にデータ
を転送させた後は、次の先頭ブロックから1つのセグメ
ント全領域をルックアヘッド(LAH)する。なお、前
記第7、第8、第10及び第11のデータ処理におい
て、要求データ転送後に、セグメント内にその転送デー
タをキャッシュとして残しておく理由は、第5及び第6
のデータ処理と同様に、コアテストに備えるためであ
る。Further, in the twelfth data processing, the command received last time is not the same read command as the command received this time, or between the end address of the read command received last time and the start address of the read command received this time. It does not have a continuous relationship, that is, it has a random or repeat relationship, the start address of the read command received this time does not hit any cache in the cache memory 2, and furthermore, it is read by the read command received this time. In the case where the data size of the requested total number of sectors is larger than the divided segment size, in this case as well, as in the case of the fourth data processing, there is no hit from the start of the command, and the LRU Depending on the method, the segment stores the oldest data Discarded from what are, read operation control unit 4, while data that is not hit has been requested from the magnetic disk device 1 reads in the discarded segments of the data are transferred to the host control system 10 side. At this time, after the data is transferred to the host control system 10, the entire area of one segment is look ahead (LAH) from the next head block. In the seventh, eighth, tenth, and eleventh data processing, the reason why the transferred data is left as a cache in the segment after the requested data is transferred is the fifth and sixth.
This is to prepare for the core test, as in the data processing of.
【0044】図5は、以上の第1乃至第12のデータ処
理を一覧表にまとめたキャッシュ/ルックアヘッド動作
マトリクスを示す説明図である。FIG. 5 is an explanatory diagram showing a cache / look ahead operation matrix in which the above first to twelfth data processes are summarized in a list.
【0045】図5において、丸内に示されている数字
は、それぞれ、第1乃至第12のデータ処理を示してい
る。In FIG. 5, the numbers shown in circles respectively indicate the first to twelfth data processing.
【0046】なお、前記第1乃至第12のデータ処理に
おいて、前記ノーヒットの中には、リードコマンドの全
てがヒットしないものだけでなく、リードコマンドの途
中がヒットしている中間ヒット状態、リードコマンドの
途中から終了までヒットしている後半ヒット状態も含ま
れるものである。このようにノーヒットを扱うことによ
り、ヒットの判断は先頭アドレスだけで済むので、効率
的な処理が可能となり、結果的に処理時間の短縮を計る
ことができる。In the first to twelfth data processing, not only all of the read commands do not hit among the no hits, but also the intermediate hit state in which the read command is hit midway, the read command It also includes the latter half of the hit state where the game is hit from the middle to the end. By handling no hits in this way, it is only necessary to determine the hit address by the start address, so that efficient processing is possible and, as a result, the processing time can be shortened.
【0047】このように、本実施例によれば、ホスト制
御システム1からディスク装置に供給される次のコマン
ドの予測を行う際に、ディスク装置は、複数の各別の判
別を行った後で、前記コマンドの予測を行うようにして
いるので、前回のリードコマンドに基づくデータに対し
て連続関係にあるデータの読み出し要求であるか、コア
テストのような非連続な(ランダム/繰返し)データの
読み出し要求であるかの判別を確度よく行うことがで
き、ホスト制御システム1からディスク装置に対して読
み出し要求されるデータがキャッシュメモリ2内に保存
されている確率(ヒット率)を著しく向上させることが
できる。As described above, according to the present embodiment, when predicting the next command to be supplied from the host control system 1 to the disk device, the disk device will make a plurality of different judgments, and then perform the judgment. Since the command is predicted, it is a read request for data that has a continuous relationship with the data based on the previous read command, or a non-continuous (random / repeated) data such as a core test. It is possible to accurately determine whether it is a read request, and to significantly improve the probability (hit rate) that the data requested to be read from the host control system 1 to the disk device is stored in the cache memory 2. You can
【0048】[0048]
【発明の効果】以上説明したように、本発明によれば、
ホスト制御手段からディスク装置に供給される次のコマ
ンドの予測を行う際に、ディスク装置は、第1乃至第2
の判別手段、好ましくは、第1乃至第5の判別手段によ
る各別の判別を行った後に、前記コマンドの予測を行う
ようにしているので、前回のリードコマンドに基づくデ
ータに対して連続関係にあるデータの読み出し要求であ
るか、非連続な(ランダム/繰返し)データの読み出し
要求であるかの判別の確度を高めることができ、ホスト
制御手段からディスク装置に対して読み出し要求される
データが記憶手段内に保存されている確率(ヒット率)
を著しく向上させることができるという効果がある。As described above, according to the present invention,
When predicting the next command to be supplied from the host control means to the disk device, the disk device will be
The determination means, preferably the first to fifth determination means, makes the respective determinations, and then the command is predicted, so that the data based on the previous read command has a continuous relationship. It is possible to increase the accuracy of determination as to whether it is a read request for certain data or a read request for non-continuous (random / repeated) data, and the data requested to be read from the disk drive from the host control means is stored. Probability of being stored in the means (hit rate)
There is an effect that it can be remarkably improved.
【図1】本発明によるディスク装置の一実施例の構成を
示すブロック構成図である。FIG. 1 is a block configuration diagram showing a configuration of an embodiment of a disk device according to the present invention.
【図2】キャッシュメモリ2におけるセグメント分割状
態の一例を示す説明図である。FIG. 2 is an explanatory diagram showing an example of a segment division state in a cache memory 2.
【図3】本実施例のディスク装置において実行される各
種の判別機能を示すフローチャートの一部である。FIG. 3 is a part of a flowchart showing various determination functions executed in the disk device of this embodiment.
【図4】本実施例のディスク装置において実行される各
種の判別機能を示すフローチャートの残りの一部であ
る。FIG. 4 is the remaining part of the flowchart showing various determination functions executed in the disk device of this embodiment.
【図5】本実施例の各データ処理を一覧表にまとめたキ
ャッシュ/ルックアヘッド動作マトリクスを示す説明図
である。FIG. 5 is an explanatory diagram showing a cache / look-ahead operation matrix in which each data processing of the present embodiment is summarized in a list.
【図6】本実施例の第1のデータ処理におけるセグメン
ト内の格納データの一例を示す説明図である。FIG. 6 is an explanatory diagram showing an example of stored data in a segment in the first data processing of the present embodiment.
1 磁気ディスク装置 2 データ・バッファとなるキャッシュメモリ(記憶手
段) 3 制御部(制御手段) 4 リード(読み出し)動作制御部(読み出し手段) 5 ホスト・バッファ間データ転送制御部(転送手段) 6 コマンド解析部(推測手段) 6a リード(読み出し)コマンド判別部(第1の判別
手段) 6b アドレス連続関係判別部(第2の判別手段) 7 キャッシュデータ検索部 7a セグメント判別部(第3の判別手段) 7b 全データ有無判別部(第4の判別手段) 7c サイズ判別部(第5の判別手段) 8 キャッシュデータ管理テーブル 9 先読みデータ決定部 10 ホスト制御システム(ホスト制御手段)DESCRIPTION OF SYMBOLS 1 magnetic disk device 2 cache memory serving as data buffer (storage unit) 3 control unit (control unit) 4 read (read) operation control unit (reading unit) 5 host-buffer data transfer control unit (transfer unit) 6 command Analysis unit (estimation unit) 6a Read (read) command determination unit (first determination unit) 6b Address continuity relationship determination unit (second determination unit) 7 Cache data search unit 7a Segment determination unit (third determination unit) 7b All Data Existence Discrimination Unit (Fourth Discrimination Means) 7c Size Discrimination Unit (Fifth Discrimination Means) 8 Cache Data Management Table 9 Prefetch Data Determination Unit 10 Host Control System (Host Control Means)
───────────────────────────────────────────────────── フロントページの続き (72)発明者 味田 広二 東京都大田区雪谷大塚町1番7号 アルプ ス電気株式会社内 (72)発明者 鈴木 勝二 東京都大田区雪谷大塚町1番7号 アルプ ス電気株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Koji Amita, No.7 Yukiya Otsuka-cho, Ota-ku, Tokyo Alps Electric Co., Ltd. No. Alps Electric Co., Ltd.
Claims (5)
コマンドに基づいて、ディスクに記録されたデータを読
み出す読み出し手段と、前記読み出されたデータを前記
ホスト制御手段に転送する転送手段と、前記ホスト制御
手段が次に送出する読み出しコマンドを推測する推測手
段と、この推測手段の出力により前記ディスクに記録さ
れた情報を先読みする先読み手段と、前記先読み手段及
び/または前記読み出し手段によって読み出されたデー
タを記録する記憶手段と、装置全体を制御動作させる制
御手段を有するディスク装置において、前記推測手段
は、前回受信したコマンドと今回受信したコマンドがと
もに読み出しコマンドであるか否かを判別する第1の判
別手段と、前回の読み出しコマンドの終了アドレスと今
回の読み出しコマンドの先頭アドレスとの連続関係を判
別する第2の判別手段とを備えており、この第1の判別
手段及び第2の判別手段の判別結果に基づいて、前記ホ
スト制御手段が次に送出する読み出しコマンド及びその
読み出しコマンドの先頭アドレスの推測を行うことを特
徴とするディスク装置。1. A read unit for reading data recorded on a disk based on a read command supplied from the host control unit, a transfer unit for transferring the read data to the host control unit, and the host. Estimating means for estimating the read command to be sent next by the control means, pre-reading means for pre-reading the information recorded on the disk by the output of this estimating means, and read-out means by the pre-reading means and / or the reading means. In a disk device having a storage unit for recording data and a control unit for controlling the entire device, the estimating unit determines whether the command received last time and the command received this time are both read commands. Determination means, the end address of the previous read command and this read command And a second discriminating means for discriminating a continuous relationship with the leading address of the first discriminating means. Based on the discriminating results of the first discriminating means and the second discriminating means, the host control means sends the read data next. A disk device which estimates the start address of a command and its read command.
分割セグメントによって構成されていることを特徴とす
る請求項1記載のディスク装置。2. The disk device according to claim 1, wherein the storage means is composed of at least one or more divided segments.
マンドの先頭アドレスが、前記記憶手段のいずれかの分
割セグメントにヒットするものであるか否かを判別する
第3の判別手段を含むことを特徴とする請求項2記載の
ディスク装置。3. The disk device includes a third discriminating means for discriminating whether or not the start address of the read command this time hits any one of the divided segments of the storage means. The disk device according to claim 2.
マンドにより読み出し要求された全セクタ数のデータに
ついて、分割セグメント内に蓄積されているデータによ
りカバーできるか否かを判別する第4の判別手段を含む
ことを特徴とする請求項3記載のディスク装置。4. The fourth discriminating means for discriminating whether or not the data of all the sectors requested to be read by the present read command can be covered by the data accumulated in the divided segment. The disk device according to claim 3, further comprising:
マンドにより読み出し要求された全セクタ数のデータの
サイズと分割セグメントサイズとを比較判別する第5の
判別手段を含むことを特徴とする請求項2記載のディス
ク装置。5. The disk device includes a fifth discriminating means for discriminating and discriminating between the size of the data of the total number of sectors requested to be read by the present read command and the divided segment size. The disk device described.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP05246951A JP3080521B2 (en) | 1993-10-01 | 1993-10-01 | Disk unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP05246951A JP3080521B2 (en) | 1993-10-01 | 1993-10-01 | Disk unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH07104940A true JPH07104940A (en) | 1995-04-21 |
JP3080521B2 JP3080521B2 (en) | 2000-08-28 |
Family
ID=17156166
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP05246951A Expired - Fee Related JP3080521B2 (en) | 1993-10-01 | 1993-10-01 | Disk unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3080521B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6449696B2 (en) | 1998-03-27 | 2002-09-10 | Fujitsu Limited | Device and method for input/output control of a computer system for efficient prefetching of data based on lists of data read requests for different computers and time between access requests |
JP2006227688A (en) * | 2005-02-15 | 2006-08-31 | Hitachi Ltd | Storage system |
JP2009211217A (en) * | 2008-03-01 | 2009-09-17 | Toshiba Corp | Memory system |
-
1993
- 1993-10-01 JP JP05246951A patent/JP3080521B2/en not_active Expired - Fee Related
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6449696B2 (en) | 1998-03-27 | 2002-09-10 | Fujitsu Limited | Device and method for input/output control of a computer system for efficient prefetching of data based on lists of data read requests for different computers and time between access requests |
JP2006227688A (en) * | 2005-02-15 | 2006-08-31 | Hitachi Ltd | Storage system |
US8612716B2 (en) | 2005-02-15 | 2013-12-17 | Hitachi, Ltd. | Storage system having partition size set in accordance with drive type |
US8832380B2 (en) | 2005-02-15 | 2014-09-09 | Hitachi, Ltd. | Storage system having cache partition size set based on drive type |
JP2009211217A (en) * | 2008-03-01 | 2009-09-17 | Toshiba Corp | Memory system |
US8225047B2 (en) | 2008-03-01 | 2012-07-17 | Kabushiki Kaisha Toshiba | Memory system with pre-fetch operation |
Also Published As
Publication number | Publication date |
---|---|
JP3080521B2 (en) | 2000-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5253351A (en) | Memory controller with a cache memory and control method of cache memory including steps of determining memory access threshold values | |
EP0415352B1 (en) | Method and system for optimizing data caching in a disk-based computer system | |
US5729718A (en) | System for determining lead time latency as function of head switch, seek, and rotational latencies and utilizing embedded disk drive controller for command queue reordering | |
EP0080876B1 (en) | Cache control method and apparatus | |
US6374327B2 (en) | Method of data migration | |
JP3254429B2 (en) | Data transfer / management system and method | |
JP2007304691A (en) | Pre-reading control method for disk device and rotary storage device | |
JP2002342037A (en) | Disk unit | |
JPH06289999A (en) | Disk control system | |
US7000077B2 (en) | Device/host coordinated prefetching storage system | |
JPH07104940A (en) | Disk device | |
JP3566319B2 (en) | Information storage device | |
JPH11506238A (en) | System and method for sequentiality detection in a cache management system | |
JPH04259048A (en) | Pre-read data control method using statistical information | |
JP4104283B2 (en) | Storage subsystem and information processing system | |
JPH11212733A (en) | External storage system | |
JPH0944315A (en) | Memory device and its method | |
JP3122702B2 (en) | Disk device write-back control method | |
JP3407428B2 (en) | Disk cache device | |
JP3468762B2 (en) | Data loading method and apparatus | |
KR100385238B1 (en) | Method for realizing segment cash buffer for group adaptation type | |
JP3043631B2 (en) | File look-ahead system and method | |
JP2000030419A (en) | Record medium controller and method as well as access controller | |
JP2567903B2 (en) | Data transfer method | |
JP2007011661A (en) | Disk device and cache memory control method for disk device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20000606 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080623 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090623 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090623 Year of fee payment: 9 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090623 Year of fee payment: 9 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090623 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090623 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090623 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100623 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110623 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120623 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120623 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130623 Year of fee payment: 13 |
|
LAPS | Cancellation because of no payment of annual fees |