JPH0677244B2 - Disk cache device - Google Patents
Disk cache deviceInfo
- Publication number
- JPH0677244B2 JPH0677244B2 JP62226648A JP22664887A JPH0677244B2 JP H0677244 B2 JPH0677244 B2 JP H0677244B2 JP 62226648 A JP62226648 A JP 62226648A JP 22664887 A JP22664887 A JP 22664887A JP H0677244 B2 JPH0677244 B2 JP H0677244B2
- Authority
- JP
- Japan
- Prior art keywords
- track
- counter
- record number
- data slot
- prefetch target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデイスクキヤツシユ装置に係り、特に順次アク
セスの検出方法と順次アクセス検出時のプリフエツチ実
施契期を実現するためのデイスクキヤツシユ装置に関す
るものである。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a disk cache device, and more particularly to a disk access detection method for realizing a sequential access detection method and a prefetch execution timing upon sequential access detection. It is a thing.
プリフエツチ方式は、中央処理装置のアクセスを予測し
て実際に中央処理装置からアクセスがある前にデータを
キヤツシユメモリに入れておくことにより、キヤツシユ
メモリのヒツト率を向上せしめるものであるが、デイス
クキヤツシユ装置および磁気デイスク装置はプリフエツ
チ処理中の間、使用中となつて中央処理装置からのアク
セスを受けることができなくなるため、短時間で効率よ
くプリフエツチ処理を行なうことが望ましい。The prefetch method improves the hit rate of the cache memory by predicting the access of the central processing unit and storing the data in the cache memory before the actual access from the central processing unit. Since the disk cache device and the magnetic disk device cannot be accessed from the central processing unit during the pre-fetching process during use, it is desirable to perform the pre-fetching process efficiently in a short time.
特に、中央処理装置からのアクセスが順次アクセスであ
ることが予測された場合のトラツク間にわたるプリフエ
ツチ方式として、 I)トラツク内のレコードが順次アクセスされ、トラツ
クの最終レコードがアクセスされたとき、次トラツクを
プリフエツチする方式。In particular, as a pre-fetch method that extends between tracks when it is predicted that the access from the central processing unit is sequential access, I) the records in the tracks are sequentially accessed, and when the last record of the tracks is accessed, the next track is accessed. Pre-fetching method.
II)あるトラツクがアクセスされたとき、“ミス”なら
ば、その1つ前のトラツクに関して調査し、トラツク内
のレコードが順次アクセスされ、トラツクの最終レコー
ドがアクセスされていれば、アクセスされたトラツクの
次トラツクをプリフエツチする方式。II) When a certain track is accessed, if it is a "miss", the previous track is investigated, and the records in the track are accessed sequentially, and if the last record of the track is accessed, the accessed track is accessed. A method of pre-fetching the next track.
などがあつた。Etc.
上述したIの方式の場合には、中央処理装置が複数フア
イルを時分割で処理していると、キヤツシユヒツトで処
理される最終レコードをアクセスするまでの間に磁気デ
イスクのヘツドが他のシリンダに移動して、プリフエツ
チを行なうためにシーク動作を必要とし、オーバーヘツ
ドとなる問題点があり、IIの方式の場合には、プリフエ
ツチによりキヤツシユ上に格納されたトラツクへのアク
セスはキヤツシユヒツトとなるため、その次のトラツク
はプリフエツチされないという問題点があつた。In the case of the above method I, if the central processing unit is processing a plurality of files in a time-sharing manner, the head of the magnetic disk moves to another cylinder before the final record processed by the cache unit is accessed. Then, there is a problem that a seek operation is required to perform pre-fetching, and there is a problem of overhead.In the case of method II, access to the track stored on the cache by pre-fetching is a cache hit, so that The next track had the problem that it was not prefetched.
本発明のデイスクキヤツシユ装置は、多数のシリンダを
有しこの各シリンダに複数のトラツクを有しこの各トラ
ツクに複数のレコードを有する磁気デイスク装置を制御
し1トラツク内の全レコードを格納するデータスロツト
を多数有するキヤツシユメモリを備えた磁気デイスクサ
ブシステムにおいて、データスロツト毎にデータスロツ
トに上記磁気デイスク装置のトラツクの全レコードが格
納済であることを表示するフラグを記録する手段と、デ
ータスロツト毎に中央処理装置がアクセスしたレコード
の連続性を判定するためのカウンタとその中央処理装置
が最後にアクセスしたレコード番号を記録するレコード
番号フイールドを設けて、その中央処理装置が所定のレ
コードをアクセスしたときそのカウンタが「0」であれ
ばそのカウンタを「1」とするとともにアクセスされた
レコード番号をレコード番号フイールドに記録し、その
カウンタが「1」以上であればアクセスされたレコード
番号とレコード番号フイールドに記録されているレコー
ド番号の連続性を調べて連続であればそのカウンタを
「1」だけ増加させるとともにアクセスされたレコード
番号をレコード番号フイールドに記録し、非連続であれ
ばそのカウンタを「0」とする手段と、上記中央処理装
置が上記データスロット内のトラックの最終レコードを
アクセスして入出力動作を終了したときに、上記カウン
タがN(N:1以上の整数)以上であればアクセスされた
トラックの次のトラックをプリフェッチ対象トラックと
し、このプリフェッチ対象トラックが上記キャッシュメ
モリ上に存在していなければそのキャッシュメモリ上に
プリフェッチ対象トラック用のデータスロットを確保し
た上で上記磁気ディスク装置のヘッドがプリフェッチ対
象トラックを含むシリンダに位置づけられているか調査
し、位置づけられている場合はデータスロットにプリフ
ェッチ対象トラックの全てのレコードを格納し、位置づ
けられていない場合はデータスロットのレコード番号フ
ィールドに「0」、カウンタにN以上の整数を記録する
手段と、上記調査により上記磁気ディスク装置のヘッド
がプリフェッチ対象トラックを含むシリンダに位置づけ
られていなかったとして上記プリフェッチ対象トラック
用のデータスロットに格納されなかったレコードを上記
中央処理装置がアクセスして入出力動作を終了したとき
に、そのプリフェッチ対象トラックの全てのレコードを
データスロットに格納する処理を行った後、上記カウン
タがN以上であればアクセスされたトラックの次のトラ
ックをプリフェッチ対象トラックとし、このプリフェッ
チ対象トラックが上記キャッシュメモリ上に存在してい
なければそのキャッシュメモリ上にプリフェッチ対象ト
ラック用のデータスロットを確保した上で上記磁気ディ
スク装置のヘッドがプリフェッチ対象トラックを含むシ
リンダに位置づけられているか調査し、位置づけられて
いる場合はデータスロットにプリフェッチ対象トラック
の全てのレコードを格納し、位置づけられていない場合
はデータスロットのレコード番号フィールドに「0」、
該カウンタにN以上の整数を記録する手段とを備えてな
るようにしたものである。The disk cache device of the present invention controls a magnetic disk device having a large number of cylinders, a plurality of tracks in each cylinder, and a plurality of records in each track, and stores a data slot for storing all records in one track. In a magnetic disk subsystem having a cache memory having a large number of cache memory, means for recording a flag indicating that all the records of the tracks of the magnetic disk device have been stored in the data slot for each data slot, and central processing for each data slot. A counter for determining the continuity of records accessed by the device and a record number field for recording the record number last accessed by the central processing unit are provided, and the counter is provided when the central processing unit accesses a predetermined record. If is “0”, the counter is Record the accessed record number in the record number field, and if the counter is 1 or more, check the continuity between the accessed record number and the record number recorded in the record number field. If it is continuous, the counter is incremented by "1" and the accessed record number is recorded in the record number field, and if it is discontinuous, the counter is set to "0", and the central processing unit stores the data. When the last record of the track in the slot is accessed and the input / output operation is terminated, if the above counter is N (N: an integer of 1 or more) or more, the track next to the accessed track is the prefetch target track, If this prefetch target track does not exist in the cache memory, its Secures a data slot for the prefetch target track on the memory and investigates whether the head of the magnetic disk device is positioned in the cylinder containing the prefetch target track. If it is positioned, all of the prefetch target tracks are located in the data slot. Means for storing the record of "0" in the record number field of the data slot, and an integer of N or more in the counter when not positioned, and the head of the magnetic disk device includes the prefetch target track by the above investigation. When the central processing unit accesses the record that was not stored in the data slot for the prefetch target track because it was not positioned in the cylinder, and completed the input / output operation, all the records of the prefetch target track were recorded. If the counter is equal to or more than N after the processing of storing in the data slot, the track next to the accessed track is set as the prefetch target track, and if this prefetch target track does not exist in the cache memory, the cache memory After securing the data slot for the prefetch target track above, investigate whether the head of the magnetic disk device is positioned in the cylinder including the prefetch target track, and if it is positioned, all of the prefetch target tracks in the data slot. Stores the record, and if it is not located, “0” in the record number field of the data slot,
And a means for recording an integer of N or more in the counter.
本発明においては、デイスクキヤツシユ装置のオーバー
ヘツドを最小にとどめながら、順次アクセスの検出およ
びプリフエツチを実行する。In the present invention, sequential access detection and prefetching are performed while minimizing the overhead of the disk cache device.
以下、図面に基づき本発明の実施例を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
第1図は本発明の一実施例を示すブロツク図である。FIG. 1 is a block diagram showing an embodiment of the present invention.
図において、1はデイスクキヤツシユ装置で、このデイ
スクキヤツシユ装置1はマイクロプロセツサ2とキヤツ
シユアダプタ3および1トラツク内の全レコードを格納
するデータスロツトを多数有するキヤツシユメモリ4な
らびにホストアダプタ5とデイスクインタフエースアダ
プタ6とからなる。そして、上位装置としてホストプロ
セツサ(中央処理装置)7が設けられており、このホス
トプロセツサ7はホストアダプタ5と接続されている。
また、多数のシリンダを有しこの各シリンダに複数のト
ラツクを有しこの各トラツクに複数のレコードを有する
磁気デイスク装置81,82,83はデイスクインタフエースア
ダプタ6と接続されている。In the figure, 1 is a disk cache device, and this disk cache device 1 is a microprocessor 2 and a cache adapter 3 and a cache memory 4 and a host adapter 5 having a large number of data slots for storing all the records in one track. It comprises a disk interface adapter 6. A host processor (central processing unit) 7 is provided as a host device, and this host processor 7 is connected to the host adapter 5.
Further, magnetic disk devices 8 1 , 8 2 and 8 3 each having a large number of cylinders, a plurality of tracks in each cylinder, and a plurality of records in each track are connected to the disk interface adapter 6.
そして、マイクロプロセツサ2とキヤツシユメモリ4お
よび磁気デイスク装置81〜83は、データスロツト毎にデ
ータスロツトに磁気デイスク装置81〜83のトラツクの全
レコードが格納済みであることを表示するフラグを記録
する手段を構成している。Then, the microprocessor 2, the cache memory 4, and the magnetic disk devices 8 1 to 8 3 are flags for displaying, for each data slot, that all the records of the tracks of the magnetic disk devices 8 1 to 8 3 have been stored in the data slot. It constitutes a means for recording.
また、マイクロプロセツサ2とキヤツシユメモリ4およ
びホストプロセツサ7は、データスロツト毎に中央処理
装置がアクセスしたレコードの連続性を判定するための
カウンタとその中央処理装置が最後にアクセスしたレコ
ード番号を記録するレコード番号フイールドを設けて、
その中央処理装置が所定のレコードをアクセスしたとき
そのカウンタが「0」であればそのカウンタを「1」と
するとともにアクセスされたレコード番号をレコード番
号フイールドに記録し、そのカウンタが「1」以上であ
ればアクセスされたレコード番号とレコード番号フイー
ルドに記録されているレコード番号の連続性を調べて連
続であればそのカウンタを「1」だけ増加させるととも
にアクセスされたレコード番号をレコード番号フイール
ドに記録し、非連続であればそのカウンタを「0」とす
る手段を構成している。Further, the microprocessor 2, the cache memory 4 and the host processor 7 store a counter for determining the continuity of the record accessed by the central processing unit for each data slot and the record number last accessed by the central processing unit. Provide a record number field to record,
If the counter is "0" when the central processing unit accesses a predetermined record, the counter is set to "1" and the accessed record number is recorded in the record number field, and the counter is "1" or more. If so, the continuity of the record number accessed and the record number recorded in the record number field is checked, and if it is continuous, the counter is incremented by "1" and the accessed record number is recorded in the record number field. If it is discontinuous, a means for setting the counter to "0" is configured.
また、マイクロプロセツサ2とキヤツシユメモリ4およ
びホストプロセツサ7ならびに磁気デイスク装置81〜83
は、中央処理装置がデータスロット内のトラックの最終
レコードをアクセスして入出力動作を終了したときに上
記カウンタがN(N:1以上の整数)以上であればアクセ
スされたトラツクの次のトラツクをプリフエツチ対象ト
ラツクと、このプリフエツチ対象トラツクがキヤツシユ
メモリ4上に存在していなければそのキヤツシユメモリ
4上にプリフエツチ対象トラツク用のデータスロツトを
確保した上で磁気デイスク装置81〜83のヘツドがプリフ
エツチ対象トラツクを含むシリンダに位置づけられてい
るか調査し、位置づけられている場合はデータスロツト
にプリフエツチ対象トラツクの全てのレコードを格納
し、位置づけられていない場合はデータスロツトのレコ
ード番号フイールドに「0」、そのカウンタにN以上の
整数を記録する手段を構成している。Also, the microprocessor 2, the cache memory 4, the host processor 7, and the magnetic disk devices 8 1 to 8 3
Is the next track of the accessed track if the counter is N or more (an integer of 1 or more) when the central processing unit accesses the last record of the track in the data slot and finishes the input / output operation. If the target track for prefetching and the track for prefetching are not present in the cache memory 4, the data slot for the target track for prefetching is secured in the cache memory 4 and the heads of the magnetic disk devices 8 1 to 8 3 are secured. Is checked in the cylinder containing the pre-fetch target track, and if it is, all the records of the pre-fetch target track are stored in the data slot. If it is not, the record number field of the data slot is "0", A means to record an integer of N or more in the counter I am configuring.
つぎにこの第1図に示す実施例の動作を第2図および第
3図を参照して説明する。この第2図および第3図は第
1図の動作説明に供する磁気デイスク装置上のレコード
の説明図および本発明で用いるテーブルの説明図であ
る。The operation of the embodiment shown in FIG. 1 will be described below with reference to FIGS. FIG. 2 and FIG. 3 are explanatory views of records on the magnetic disk device and explanatory tables of tables used in the present invention for explaining the operation of FIG.
第2図は磁気デイスク装置81〜83上のトラツクイメージ
であり、TR1〜TR3はある磁気デイスク装置の同一シリン
ダ内で連続したトラツクを示し、R11,R12……R34は各ト
ラツクTR1〜TR3に記録されているレコードを示してい
る。Fig. 2 is an image of the tracks on the magnetic disk devices 8 1 to 8 3 , where TR 1 to TR 3 show consecutive tracks in the same cylinder of a certain magnetic disk device, and R 11 , R 12 ... R 34 are The records recorded in the respective tracks TR 1 to TR 3 are shown.
キヤツシユメモリ4のメモリ容量は、デイスクキヤツシ
ユ装置1の配下の磁気デイスク装置81〜83の記録容量よ
りかなり少なく、このキヤツシユメモリ4内には、磁気
デイスク装置81〜83内のデータの全てを格納することが
できないため、LRUアルゴリズムなどによりキヤツシユ
メモリ4に格納するデータを選別している。そして、こ
のキヤツシユメモリ4は連続したアドレス空間を持つ半
導体メモリであり、キヤツシユメモリ4内には、Y本の
データバツフアが論理的に割当てられている。The memory capacity of the cache memory 4 is considerably smaller than the recording capacity of the magnetic disk devices 8 1 to 8 3 subordinate to the disk cache device 1, and the memory capacity of the cache memory 4 is equal to that of the magnetic disk devices 8 1 to 8 3 . Since it is not possible to store all of the above data, the data to be stored in the cache memory 4 is selected by the LRU algorithm or the like. The cache memory 4 is a semiconductor memory having a continuous address space, and Y data buffers are logically allocated in the cache memory 4.
第3図はこのデータバツフアのイメージであり、データ
格納エリア34には、磁気デイスク装置81〜83上の1トラ
ツク分のデータが格納される。なお、31はフラグを示
し、32はカウンタ、33はレコード番号を示す。Figure 3 is an image of this the data buffer, the data storage area 34, data for one track portion of the magnetic disk device 8 1-8 3 are stored. Incidentally, 31 indicates a flag, 32 indicates a counter, and 33 indicates a record number.
また、図には示していないが、キヤツシユメモリ4内に
は磁気デイスク装置81〜83上のトラツクとデータバツフ
アを関連づけるデイレクトリ情報が格納されており、マ
イクロプロセツサ2はこのデイレクトリ情報を参照する
ことによつて、あるトラツクに対してデータバツフアが
割当てられている(ヒツト)か、割当てられていない
(ミス)かを知ることができる。また、マイクロプロセ
ツサ2はこのデイレクトリ情報を操作することにより、
適当なデータバツフアを割当てから解放したり、解放中
のデータバツフアを別のトラツクに割当てることができ
る。Although not shown in the figure, the cache memory 4 stores directory information for associating the tracks on the magnetic disk devices 8 1 to 8 3 with the data buffer. The microprocessor 2 refers to this directory information. By doing so, it is possible to know whether the data buffer is assigned (hit) or not (miss) to a certain track. In addition, the microprocessor 2 operates this directory information to
It is possible to deallocate an appropriate data buffer, and to allocate the releasing data buffer to another track.
そして、ホストプロセツサ7があるレコードに対して読
み出しアクセスを要求したとき、マイクロプロセツサ2
はデイレクトリ情報を参照して、ヒット/ミス判定を行
なう。そして、ミスのときマイクロプロセッサ2はLRU
アルゴリズムなどにより適当なデータスロツトを選択し
て割当てから解放し、解放したデータスロツトをアクセ
スされたレコードを含むトラツクに割当てる。このと
き、マイクロプロセツサ2はデータスロツト内のフラグ
31,カウンタ32,レコード番号33(第3図参照)を初期化
して「0」とする。When the host processor 7 requests read access to a certain record, the microprocessor 2
Makes a hit / miss decision by referring to the directory information. And, when there is a mistake, the microprocessor 2 is LRU
An appropriate data slot is selected by an algorithm and released from the allocation, and the released data slot is allocated to the track including the accessed record. At this time, the microprocessor 2 sets the flag in the data slot.
31, counter 32, record number 33 (see Fig. 3) are initialized to "0".
その後、マイクロプロセツサ2は目的のトラツクに磁気
デイスク装置81〜83のヘツドを位置づけて、この磁気デ
イスク装置81〜83から目的のレコードを読み出してホス
トプロセツサ7に送ると同時にデータスロツトにも格納
し、さらに、ホストプロセツサ7の入出力動作が終了し
た後、トラツク上の全レコードをデータスロツトに格納
するまで磁気デイスク装置81〜83からの読み出し動作を
継続し、第3図に示すフラグ31に「1」をセツトするス
テージング処理を行なう。そして、ヒツトのとき、マイ
クロプロセツサ2は該当するデータスロツトのフラグ31
を調査して「1」であればデータスロツト内の目的のレ
コードをホストプロセツサ7に送り、「0」であれば上
記のステージング処理を行なう。After that, the microprocessor 2 locates the heads of the magnetic disk devices 8 1 to 8 3 on the target track, reads the target record from the magnetic disk devices 8 1 to 8 3 and sends it to the host processor 7 and at the same time the data slot. In addition, after the input / output operation of the host processor 7 is completed, the read operation from the magnetic disk devices 8 1 to 8 3 is continued until all the records on the track are stored in the data slot. A staging process for setting "1" to the flag 31 shown in FIG. Then, at the time of hit, the microprocessor 2 causes the flag 31 of the corresponding data slot.
Is checked, the target record in the data slot is sent to the host processor 7, and if it is "0", the staging process is performed.
また、マイクロプロセツサ2はホストプロセツサ7が、
あるレコードをアクセスする毎に第3図に示すレコード
番号33をアクセスされたレコード番号に更新し、カウン
タ32が「0」であればこれを「1」とし、更新前のレコ
ード番号33に「1」を加えた値と更新後のレコード番号
33が一致していればカウンタ32を「1」だけ増加させ、
不一致であればカウンタ32を「0」とする。Also, the microprocessor 2 is the host processor 7,
Each time a certain record is accessed, the record number 33 shown in FIG. 3 is updated to the accessed record number. If the counter 32 is "0", this is set to "1", and the record number 33 before the update is set to "1". "And the record number after update
If 33 match, increment the counter 32 by "1",
If they do not match, the counter 32 is set to "0".
この処理により、例えば、ホストプロセツサ7からの最
初のアクセスが“ミス”であつて、第2図に示すレコー
ドR11,R12,R13の順にアクセスされた場合、レコードR13
のアクセス終了時には第3図に示すカウンタ32はカウン
タ32=「3」となり、レコードR11,R12,R13の順にアク
セスされた場合、レコードR12のアクセス終了時にはカ
ウンタ32=「0」となつてカウンタ32の値によつてホス
トプロセツサ7からのアクセスの順序性を判定すること
ができる。なお、この実施例では、カウンタ32が「3」
以上の場合を順次アクセスと判定している。This process, for example, the first access is "Miss" Der connexion from the host pro-broken 7, record R 11 shown in FIG. 2, R 12, when accessed in the order of R 13, records R 13
At the end of the access, the counter 32 shown in FIG. 3 becomes counter 32 = “3”, and when the records R 11 , R 12 , R 13 are accessed in this order, the counter 32 = “0” at the end of the access of the record R 12. The order of the access from the host processor 7 can be determined by the value of the counter 32. In this embodiment, the counter 32 is "3".
The above cases are determined to be sequential access.
そして、マイクロプロセツサ2はホストプロセツサ7が
第2図に示すトラツクTR1の最終レコード(R14)をアク
セスした後入出力動作を終了したとき、第3図に示すカ
ウンタ32が「3」以上であれば、トラツクTR1の次トラ
ツクであるトラツクTR2をプリフエツチ対象トラツクと
してトラツクTR2のヒツト/ミスを判定する。トラツクT
R2がヒツトであれば、トラツクTR2は当入出力動作以前
にアクセスされていたのであるからトラツクTR2のデー
タスロツトに対しては何ら操作しない。トラツクTR2が
ミスであれば、次の入出力動作で、トラツクTR2がアク
セスされる可能性はさらに高くなる。そして、マイクロ
プロセツサ2はトラツクTR2のデータスロツトを用意し
て、第3図に示すフラグ31,レコード番号33に「0」、
カウンタ32に「3」をセツトする。次に磁気デイスク装
置81〜83のヘツド位置を調査し、シーク動作が必要が否
か判定する。Then, when the host processor 7 finishes the input / output operation after the host processor 7 accesses the final record (R 14 ) of the track TR 1 shown in FIG. 2, the microprocessor 2 sets the counter 32 shown in FIG. 3 to "3". if more determines Hitsuto / miss track TR 2 the track TR 2 is the next track of the track TR 1 as Purifuetsuchi target track. Truck T
If R 2 is a hit, the track TR 2 has been accessed before this input / output operation, so no operation is performed on the data slot of the track TR 2 . If the track TR 2 is miss, the possibility that the track TR 2 will be accessed in the next input / output operation is further increased. Then, the microprocessor 2 prepares the data slot of the track TR 2 , and sets "0" to the flag 31 and the record number 33 shown in FIG.
The counter 32 is set to "3". Next, the head positions of the magnetic disk devices 8 1 to 8 3 are investigated to determine whether or not seek operation is necessary.
そして、ホストプロセツサ7が複数のフアイルを時分割
でアクセスしている場合、磁気デイスク装置81〜83のヘ
ツドはデイスクキヤツシユ装置1が第2図に示すレコー
ドR12,R13,R14をキヤツシユメモリ4上で処理している
間に、トラツクTR1を含むシリンダ以外に移動している
場合がある。When the host processor 7 accesses a plurality of files in a time division manner, the heads of the magnetic disk devices 8 1 to 8 3 are recorded by the disk cache device 1 as records R 12 , R 13 and R shown in FIG. While processing 14 on the cache memory 4, it may be moved to a cylinder other than the cylinder containing the track TR 1 .
マイクロプロセツサ2はシーク動作が不要の場合、直ち
に第2図に示すトラツクTR2の全レコードをトラツクTR2
のデータスロツトに格納し、第3図に示すフラグ31を
「1」とする。これにより、近い従来の入出力動作で予
測通り第2図に示すレコードR21がアクセスされたとき
キヤツシユヒツトとなり、さらに、更新前のレコード番
号(=「0」)+「1」と、更新後のレコード番号(=
「1」)が等しいため、カウンタ32は「1」だけ増加し
て、アクセスの順序性を監視するカウンタ32は依然、入
出力動作が順次アクセスであることを表示することにな
る。When the seek operation is unnecessary, the microprocessor 2 immediately transfers all the records of the track TR 2 shown in FIG. 2 to the track TR 2
And the flag 31 shown in FIG. 3 is set to "1". As a result, when the record R 21 shown in FIG. 2 is accessed as expected in the near conventional input / output operation, a cache hit occurs, and the record number (= “0”) + “1” before update and the record number after update Record number (=
Since "1") is equal, the counter 32 is incremented by "1", and the counter 32 that monitors the order of access still indicates that the input / output operation is sequential access.
また、マイクロプロセツサ2はプリフエツチ対象トラツ
クをプリフエツチするためにシーク動作が必要な場合、
オーバーヘツドをさけるためにプリフエツチを行なわな
いが、第2図に示すトラツクTR2のデータスロツトは前
述の状態で放置しておく。そして、中央処理装置7が近
い将来の入出力動作でレコードR21をアクセスしたと
き、キヤツシユヒツトであるが第3図に示すフラグ31が
レコードを未格納であることを表示しているため、マイ
クロプロセツサ2は磁気デイスク装置81〜83のヘツドを
トラツクTR2に位置づけて、この磁気ディスク装置81〜8
3から目的のレコードを読み出してホストプロセッサ7
に送ると同時にデータスロットにも格納し、さらに、ホ
ストプロセッサ7の入出力動作が終了した後、トラック
上の全レコードをデータスロットに格納するまで磁気デ
ィスク装置81〜83からの読み出し動作を継続し、フラグ
31に「1」をセットするステージング処理を行う。この
ステージング処理の終了時に第3図に示すカウンタ32の
値により第2図に示すトラックTR3に対して、プリフエ
ツチ対象トラツクか否かの判定を行なう。そして、プリ
フエツチ対象トラツクである場合には、シリンダまたが
りの場合、または不良/交替自動リンク動作後の場合を
除いて、シーク動作を必要としないため直ちにプリフエ
ツチが行なわれる。If the microprocessor 2 needs a seek operation to pre-fetch the pre-fetch target track,
No prefetching is performed to avoid overhead, but the data slot of track TR 2 shown in FIG. 2 is left in the above-mentioned state. Then, when the central processing unit 7 accesses the record R 21 in an input / output operation in the near future, it is a cache hit, but the flag 31 shown in FIG. 3 indicates that the record is not stored. Setsusa 2 is positioned head of the magnetic disk device 8 1-8 3 tracks TR 2, the magnetic disk device 8 1-8
The target record is read from 3 and the host processor 7
To the magnetic disk devices 8 1 to 8 3 until all the records on the track are stored in the data slot after the input / output operation of the host processor 7 is completed. Continue and flag
A staging process of setting "1" to 31 is performed. At the end of this staging process, it is determined whether the track TR 3 shown in FIG. 2 is a pre-fetch target track or not based on the value of the counter 32 shown in FIG. If the track is a pre-targeted track, the seek operation is not required except for the case of straddling the cylinder or after the defective / alternate automatic link operation, so that the pre-fetch is immediately performed.
以上説明したように、本発明によれば、デイスクキヤツ
シユ装置のオーバーヘツドを最小にとどめながら、順次
アクセスの検出およびプリフエツチの実行が可能となる
ため、デイスクキヤツシユ装置の性能を向上させること
ができる効果がある。As described above, according to the present invention, sequential access can be detected and prefetching can be executed while minimizing the overhead of the disk cache device, and therefore the performance of the disk cache device can be improved. There is an effect that can be done.
【図面の簡単な説明】 第1図は本発明の一実施例を示すブロツク図、第2図お
よび第3図は第1図の動作説明に供する磁気デイスク装
置上のレコードの説明図および本発明で用いるテーブル
の説明図である。 1……デイスクキヤツシユ装置、2……マイクロプロセ
ツサ、3……キヤツシユアダプタ、4……キヤツシユメ
モリ、5……ホストアダプタ、6……デイスクインタフ
エースアダプタ、7……ホストプロセツサ(中央処理装
置)、81〜83……磁気デイスク装置。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of the present invention, and FIGS. 2 and 3 are explanatory diagrams of a record on a magnetic disk device used for explanation of the operation of FIG. 1 and the present invention. It is an explanatory view of a table used in. 1 ... Disk cache device, 2 ... Microprocessor, 3 ... Cache adapter, 4 ... Cache memory, 5 ... Host adapter, 6 ... Disk interface adapter, 7 ... Host processor ( Central processing unit), 8 1 to 8 3 ... Magnetic disk unit.
Claims (1)
数のトラックを有しこの各トラックに複数のレコードを
有する磁気ディスク装置を制御し1トラック内の全レコ
ードを格納するデータスロットを多数有するキャッシュ
メモリを備えた磁気ディスクサブシステムにおいて、 データスロット毎にデータスロットに前記磁気ディスク
装置のトラックの全レコードが格納済みであることを表
示するフラグを記録する手段と、 データスロット毎に中央処理装置がアクセスしたレコー
ドの連続性を判定するためのカウンタと該中央処理装置
が最後にアクセスしたレコード番号を記録するレコード
番号フィールドを設けて、該中央処理装置が所定のレコ
ードをアクセスしたとき該カウンタが「0」であれば該
カウンタを「1」とするとともにアクセスされたレコー
ド番号をレコード番号フィールドに記録し、該カウンタ
が「1」以上であればアクセスされたレコード番号とレ
コード番号フィールドに記録されているレコード番号の
連続性を調べて連続であれば該カウンタを「1」だけ増
加させるとともにアクセスされたレコード番号をレコー
ド番号フィールドに記録し、非連続であれば該カウンタ
を「0」とする手段と、 前記中央処理装置が前記データスロット内のトラックの
最終レコードをアクセスして入出力動作を終了したとき
に、前記カウンタがN(N:1以上の整数)以上であれば
アクセスされたトラックの次のトラックをプリフェッチ
対象トラックとし、このプリフェッチ対象トラックが前
記キャッシュメモリ上に存在していなければ該キャッシ
ュメモリ上にプリフェッチ対象トラック用のデータスロ
ットを確保した上で前記磁気ディスク装置のヘッドがプ
リフェッチ対象トラックを含むシリンダに位置づけられ
ているか調査し、位置づけられている場合はデータスロ
ットにプリフェッチ対象トラックの全てのレコードを格
納し、位置づけられていない場合はデータスロットのレ
コード番号フィールドに「0」、該カウンタにN以上の
整数を記録する手段と、 前記調査により前記磁気ディスク装置のヘッドがプリフ
ェッチ対象トラックを含むシリンダに位置づけられてい
なかったとして前記プリフェッチ対象トラック用のデー
タスロットに格納されなかったレコードを前記中央処理
装置がアクセスして入出力動作を終了したときに、その
プリフェッチ対象トラックの全てのレコードをデータス
ロットに格納する処理を行った後、前記カウンタがN以
上であればアクセスされたトラックの次のトラックをプ
リフェッチ対象トラックとし、このプリフェッチ対象ト
ラックが前記キャッシュメモリ上に存在していなければ
該キャッシュメモリ上にプリフェッチ対象トラック用の
データスロットを確保した上で前記磁気ディスク装置の
ヘッドがプリフェッチ対象トラックを含むシリンダに位
置づけられているか調査し、位置づけられている場合は
データスロットにプリフェッチ対象トラックの全てのレ
コードを格納し、位置づけられていない場合はデータス
ロットのレコード番号フィールドに「0」、該カウンタ
にN以上の整数を記録する手段と を備えてなることを特徴とするディスクキャッシュ装
置。1. A magnetic disk device having a large number of cylinders, a plurality of tracks on each cylinder, and a plurality of records on each track, and a large number of data slots for storing all the records in one track. In a magnetic disk subsystem provided with a cache memory, means for recording a flag indicating that all the records of the tracks of the magnetic disk device have been stored in the data slot for each data slot, and a central processing unit for each data slot. Is provided with a counter for determining the continuity of records accessed by the central processing unit and a record number field for recording the record number last accessed by the central processing unit, and the counter is set when the central processing unit accesses a predetermined record. If it is "0", the counter is set to "1" and the access The recorded record number is recorded in the record number field, and if the counter is "1" or more, the continuity between the accessed record number and the record number recorded in the record number field is checked, and if it is continuous, the counter is recorded. Is incremented by "1" and the accessed record number is recorded in the record number field, and the counter is set to "0" if the record number field is discontinuous, and the central processing unit is the last of the tracks in the data slot. When the record is accessed and the input / output operation is completed, if the counter is N (N: an integer of 1 or more) or more, the track next to the accessed track is set as the prefetch target track, and this prefetch target track is set as the prefetch target track. If it does not exist in the cache memory, the prefetch target After confirming whether the head of the magnetic disk device is positioned in the cylinder containing the prefetch target track after securing the data slot for the recording, if it is, store all the records of the prefetch target track in the data slot. If it is not positioned, "0" is recorded in the record number field of the data slot, means for recording an integer of N or more in the counter, and the head of the magnetic disk device is positioned in the cylinder containing the track to be prefetched by the investigation. When the central processing unit accesses a record that has not been stored in the data slot for the prefetch target track and ends the input / output operation, all the records of the prefetch target track are stored in the data slot. Perform processing Thereafter, if the counter is N or more, the track next to the accessed track is set as a prefetch target track, and if the prefetch target track does not exist in the cache memory, the data for the prefetch target track is stored in the cache memory. It is investigated whether the head of the magnetic disk device is positioned in the cylinder containing the prefetch target track after securing the slot, and if it is positioned, all the records of the prefetch target track are stored in the data slot and the head is positioned. The disk cache device further comprises means for recording "0" in the record number field of the data slot and an integer of N or more in the counter if there is not.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62226648A JPH0677244B2 (en) | 1987-09-11 | 1987-09-11 | Disk cache device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62226648A JPH0677244B2 (en) | 1987-09-11 | 1987-09-11 | Disk cache device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6470844A JPS6470844A (en) | 1989-03-16 |
| JPH0677244B2 true JPH0677244B2 (en) | 1994-09-28 |
Family
ID=16848474
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62226648A Expired - Fee Related JPH0677244B2 (en) | 1987-09-11 | 1987-09-11 | Disk cache device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0677244B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5381539A (en) * | 1992-06-04 | 1995-01-10 | Emc Corporation | System and method for dynamically controlling cache management |
-
1987
- 1987-09-11 JP JP62226648A patent/JPH0677244B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6470844A (en) | 1989-03-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5809560A (en) | Adaptive read-ahead disk cache | |
| US6880043B1 (en) | Range-based cache control system and method | |
| EP0301211B1 (en) | Cache management for a peripheral data storage subsystem | |
| US6360300B1 (en) | System and method for storing compressed and uncompressed data on a hard disk drive | |
| JP3522527B2 (en) | Input/Output Control Device and Input/Output Control Method | |
| US5596736A (en) | Data transfers to a backing store of a dynamically mapped data storage system in which data has nonsequential logical addresses | |
| JP3175371B2 (en) | Data storage format conversion method, conversion method thereof, access control device, and data access method | |
| EP0415352A2 (en) | Method and system for optimizing data caching in a disk-based computer system | |
| EP0205965A2 (en) | Peripheral subsystem having read/write cache with record access | |
| JP4060506B2 (en) | Disk controller | |
| US5420983A (en) | Method for merging memory blocks, fetching associated disk chunk, merging memory blocks with the disk chunk, and writing the merged data | |
| US6336164B1 (en) | Method and system for preventing deadlock in a log structured array | |
| JPH07334310A (en) | Disk device and buffer storage control method for read data in the same device | |
| US7139874B1 (en) | System and method for providing client-directed staging to improve non-sequential access performance in a caching disk storage system | |
| US5592630A (en) | Data transfer apparatus and method for data processing system | |
| EP0847555B1 (en) | Method for sequential detection in a cache management system | |
| JPH08263380A (en) | Disk cache control method | |
| JPH0115903B2 (en) | ||
| US5761710A (en) | Information apparatus with cache memory for data and data management information | |
| JPH0677244B2 (en) | Disk cache device | |
| JP2774728B2 (en) | Disk array control method | |
| JPH11327802A (en) | Disk system | |
| JPH0415493B2 (en) | ||
| WO1984002016A1 (en) | Dynamic addressing for variable track length cache memory | |
| JPH05257810A (en) | Information recording / reproducing apparatus and information recording method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |