JPH096676A - Control method for magnetic disk cache - Google Patents

Control method for magnetic disk cache

Info

Publication number
JPH096676A
JPH096676A JP7154894A JP15489495A JPH096676A JP H096676 A JPH096676 A JP H096676A JP 7154894 A JP7154894 A JP 7154894A JP 15489495 A JP15489495 A JP 15489495A JP H096676 A JPH096676 A JP H096676A
Authority
JP
Japan
Prior art keywords
magnetic disk
data
cache memory
write
processing
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
Application number
JP7154894A
Other languages
Japanese (ja)
Other versions
JP2704138B2 (en
Inventor
Masumi Takiyanagi
真澄 滝柳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Software Shikoku Ltd
Original Assignee
NEC Software Shikoku Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Software Shikoku Ltd filed Critical NEC Software Shikoku Ltd
Priority to JP7154894A priority Critical patent/JP2704138B2/en
Publication of JPH096676A publication Critical patent/JPH096676A/en
Application granted granted Critical
Publication of JP2704138B2 publication Critical patent/JP2704138B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE: To shorten the processing time needed for the irregular writing operations in a cache control method which applies the store-in-write processing (fast write processing). CONSTITUTION: If the data at the position where the data should be written by a host device are not stored in a cache memory (S11), an instruction is produced to move the head of a magnetic disk to a target position (S12). The target position is searched while the data are read out of a magnetic disk medium (S13), and the track position of the data stored in the cache memory is registered on a cache memory control table (S14). The write data are stored in the cache memory (S15). Then the processing is started to write the write data stored in the cache memory into a magnetic disk device right before a series of instruction string processing are finished (S16), and the end of the write processing instruction string is reported to the host device (S17).

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、磁気ディスクキャッシ
ュの制御方法に関し、特にキャッシュメモリを有し高速
書き込み処理を行う磁気ディスクキャッシュの制御方法
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for controlling a magnetic disk cache, and more particularly to a method for controlling a magnetic disk cache having a cache memory and performing high speed write processing.

【0002】[0002]

【従来の技術】近年、コンピュータのCPUの高速化が
進むなかで、外部記憶装置に対する入出力速度がコンピ
ュータ処理の弊害になるケースが多く、外部記憶装置の
入出力処理の高速化が特に望まれている。このため、代
表的な外部記憶装置である磁気ディスク装置の分野にお
いては、入出力の高速度化をはかる方法として、キャッ
シュメモリを搭載する方法が一般的に知られている。
2. Description of the Related Art In recent years, as the CPU speed of computers has increased, the input / output speed to / from an external storage device often adversely affects the computer processing, and it is particularly desirable to increase the input / output processing speed of the external storage device. ing. Therefore, in the field of a magnetic disk device which is a typical external storage device, a method of mounting a cache memory is generally known as a method of increasing the speed of input / output.

【0003】この方法は、磁気ディスク装置からデータ
を読み出す際は、読み出したデータをホスト装置に転送
するのと同時にディスク制御部内のキャッシュメモリに
も格納しておき、ホスト装置から再度同一部分の読み出
し指示があったときに、実際に磁気ディスク装置からデ
ータを読み出すことなく、キャッシュメモリに格納して
いたデータをホスト装置に転送する。
According to this method, when data is read from the magnetic disk device, the read data is transferred to the host device and at the same time stored in the cache memory in the disk control unit so that the same part is read again from the host device. When instructed, the data stored in the cache memory is transferred to the host device without actually reading the data from the magnetic disk device.

【0004】また、磁気ディスク装置にデータを書き込
む場合には、ホスト装置から送られたデータを磁気ディ
スク装置には書き込まず、半導体記憶素子からなるキャ
ッシュメモリに書き込み、ホスト装置には書き込み命令
の終了報告を行う。そして、キャッシュメモリ内の書き
込みデータは、一定時間経過後もしくはキャッシュメモ
リにある一定の書き込みデータが蓄えられたときに、キ
ャッシュメモリから磁気ディスク装置へデータを書き込
まれる。このようなキャッシュを使用した書き込み処理
を、ストア・イン・ライト(Store in Write)処理、また
は高速書き込み処理と呼んでいる。
Further, when writing data to the magnetic disk device, the data sent from the host device is not written to the magnetic disk device but is written to the cache memory composed of semiconductor memory elements, and the write command is terminated to the host device. Make a report. Then, the write data in the cache memory is written from the cache memory to the magnetic disk device after a lapse of a certain time or when a certain amount of write data is stored in the cache memory. Write processing using such a cache is called store-in-write processing or high-speed write processing.

【0005】一般に、これからアクセスする位置のデー
タがキャッシュメモリ上に存在する場合、この状態をキ
ャッシュヒットと呼び、また反対に、これからアクセス
する位置のデータがキャッシュメモリ上に存在しない場
合、この状態をキャッシュミスとんでいる。磁気ディス
ク媒体への書き込み・読み出し動作においては、磁気デ
ィスク装置のヘッドを移動させてアクセス位置を確定す
るため、磁気ヘッドを磁気ディスク媒体上の目的トラッ
クに移動させるシーク動作、および磁気ディスク媒体上
の実際のアクセス位置を探すためのサーチ動作の後にデ
ータの書き込み・読み出しを行う。
Generally, when the data at the position to be accessed is present in the cache memory, this state is called a cache hit, and conversely, when the data at the position to be accessed is not present in the cache memory, this state is called. I'm missing a cache miss. In the write / read operation to / from the magnetic disk medium, the head of the magnetic disk device is moved to determine the access position. Therefore, the seek operation of moving the magnetic head to a target track on the magnetic disk medium and the magnetic disk medium Data writing / reading is performed after a search operation for searching for an actual access position.

【0006】キャッシュヒットの場合、これらの動作は
メモリアクセスのみで実行可能であり短時間で完了する
が、キャッシュミスの場合は、磁気ディスク装置の物理
的動作を伴うため、キャッシュメモリのアクセスに比べ
はるかに長時間を要する。このように、キャッシュメモ
リは半導体記憶素子による高速動作を利用することによ
って、磁気ディスク装置の入出力処理の速度をホスト装
置からの見かけ上高速化することができる。
In the case of a cache hit, these operations can be executed only by accessing the memory and are completed in a short time. In the case of a cache miss, however, the physical operation of the magnetic disk device is involved, and therefore, compared to the access to the cache memory. It takes much longer. As described above, the cache memory utilizes the high-speed operation of the semiconductor memory element, so that the input / output processing speed of the magnetic disk device can be apparently increased from the host device.

【0007】[0007]

【発明が解決しようとする課題】上述した従来の高速書
き込み処理においては、ホスト装置がアクセスする磁気
ディスク媒体上の位置が不規則で疎らな場合、高速書き
込みの効果が十分に得られないばかりでなく、磁気ディ
スク装置の動作占有時間の増加により、応答性能を逆に
悪化させる場合がある。
In the above-described conventional high-speed writing process, the effect of high-speed writing cannot be sufficiently obtained when the position on the magnetic disk medium accessed by the host device is irregular and sparse. However, the response performance may be adversely deteriorated due to the increase in the operation occupation time of the magnetic disk device.

【0008】さらに、目的の位置のデータがキャッシュ
メモリ上に存在する確率が低下してキャッシュミスとな
り、目的の書き込み位置を探すために、実際に磁気ディ
スク媒体上のデータを読み出した後、ホスト装置からの
書き込みデータがキャッシュメモリに格納され、この時
点でホスト装置に書き込み処理の終了報告が行われるに
続いて、ホスト装置から同一磁気ディスク媒体上の別の
位置へのアクセスがある場合、キャッシュメモリ上にそ
のデータ存在する可能性が低いために、磁気ヘッドが新
たなアクセス位置に移動してしまう。
Further, the probability of the data at the target position existing in the cache memory is reduced, resulting in a cache miss. After actually reading the data on the magnetic disk medium, the host device is searched for the target write position. If the host device accesses another position on the same magnetic disk medium after the write data from the host is stored in the cache memory and the host device is notified of the completion of the write processing at this point, the cache memory The magnetic head is moved to a new access position because it is unlikely that the data exists above.

【0009】従って、この後に初めにキャッシュメモリ
上に残したデータを読み出して、磁気ディスク媒体上に
書き込もうとすると、既に磁気ヘッドが別の位置に移動
しているので、再度もとの位置に磁気ヘッドを戻してか
ら書き込まなければならない。このため、磁気ディスク
装置が長時間にわたって占有され、続いて、ホスト装置
からキャッシュメモリ上に存在しない部分の読み出し命
令が送出されて、磁気ディスク装置が実際にアクセスす
る必要が生じても、前の書き込み処理が終了して磁気デ
ィスク装置が解放されるまで待たなければならない。
Therefore, when the data left in the cache memory is first read out after this and an attempt is made to write it in the magnetic disk medium, the magnetic head has already moved to another position, and the magnetic field is returned to the original position again. The head must be returned before writing. Therefore, even if the magnetic disk device is occupied for a long time, and subsequently the host device issues a read command for a portion that does not exist in the cache memory, and the magnetic disk device needs to actually access it, It is necessary to wait until the write processing is completed and the magnetic disk device is released.

【0010】従って、ストア・イン・ライト処理により
ホスト装置からの書き込み命令を高速処理できても、後
の磁気ディスク装置への書き込み処理の際に、上位装置
からの命令が待たされるため、総合的には性能の向上効
果が得られないという欠点がある。
Therefore, even if the write-in command from the host device can be processed at high speed by the store-in-write process, the command from the upper-level device is kept waiting for the subsequent write-in process to the magnetic disk device. Has the drawback that it does not have the effect of improving performance.

【0011】[0011]

【課題を解決するための手段】本発明は、キャッシュメ
モリを有し高速書き込み処理を行う磁気ディスクキャッ
シュの制御方法であって、上位装置からの書き込み処理
においてデータを書き込むべき位置のデータが前記キャ
ッシュメモリ上に存在しない場合、書き込みデータを前
記キャッシュメモリに格納し、一連の命令列処理の終了
する直前に前記キャッシュメモリ内の書き込みデータを
磁気ディスク装置に書き込む処理を開始した後、前記上
位装置に書き込み処理命令列の終了報告を行うことを特
徴とする。
SUMMARY OF THE INVENTION The present invention is a method of controlling a magnetic disk cache having a cache memory and performing high-speed write processing, wherein data at a position where data is to be written in the write processing from a higher-level device is the cache. If it does not exist in the memory, the write data is stored in the cache memory, and the process of writing the write data in the cache memory to the magnetic disk device is started immediately before the end of the series of instruction sequence processing, and then the upper device is It is characterized in that the end of the write processing instruction sequence is reported.

【0012】また、データを書き込む目的位置のデータ
がキャッシュメモリ上に存在し、上位装置からの書き込
み処理において書き込みデータを前記キャッシュメモリ
に格納し、一連の命令列処理の終了する直前に書き込み
処理を行ったトラック位置と磁気ディスク装置の磁気ヘ
ッドのトラック位置を記憶するレジスタの内容とを比較
し、両者が一致した場合、前記キャッシュメモリ内の書
き込みデータを前記磁気ディスク装置に書き込む処理を
開始した後、前記上位装置に書き込み処理命令列の終了
報告を行うことを特徴とする。
Further, the data at the target position for writing the data exists in the cache memory, the write data is stored in the cache memory in the write processing from the host device, and the write processing is performed immediately before the end of the series of instruction sequence processing. After comparing the performed track position with the contents of the register for storing the track position of the magnetic head of the magnetic disk device, and when both match, after starting the process of writing the write data in the cache memory to the magnetic disk device The end report of the write processing instruction sequence is sent to the host device.

【0013】[0013]

【実施例】次に、本発明について図面を参照して説明す
る。
Next, the present invention will be described with reference to the drawings.

【0014】図1は、本発明の一実施例を適用する磁気
ディスク制御装置を示す構成図である。磁気ディスク制
御装置1は、図1に示すように、上位装置2および磁気
ディスク装置3にそれぞれ接続されている。この上位装
置2は、本発明の磁気ディスク制御装置に対し指示を与
えるホスト装置であり、磁気ディスク装置3は、磁気ヘ
ッド(図示せず)を介して磁気ディスク媒体(図示せ
ず)へのデータの書き込みおよび読み出しを行う。
FIG. 1 is a block diagram showing a magnetic disk controller to which an embodiment of the present invention is applied. As shown in FIG. 1, the magnetic disk controller 1 is connected to a host device 2 and a magnetic disk device 3, respectively. The host device 2 is a host device that gives an instruction to the magnetic disk control device of the present invention, and the magnetic disk device 3 sends data to a magnetic disk medium (not shown) via a magnetic head (not shown). Write and read.

【0015】磁気ディスク制御装置1は、マイクロプロ
セッサ11と、上位装置2に接続する上位装置装置接続
部12と、磁気ディスク装置3に接続するドライブ接続
部13と、磁気ディスク装置3からの読み出しデータお
よび磁気ディスク装置3への書き込みデータを格納する
キャッシュメモリ14と、このキャッシュメモリ14に
格納するデータを管理するキャッシュメモリ管理テーブ
ル15と、磁気ディスク装置3の磁気ヘッドの位置を記
憶するヘッド位置レジスタ16とを含んで構成される。
The magnetic disk control device 1 includes a microprocessor 11, a host device connection unit 12 connected to the host device 2, a drive connection unit 13 connected to the magnetic disk device 3, and read data from the magnetic disk device 3. And a cache memory 14 for storing the write data to the magnetic disk device 3, a cache memory management table 15 for managing the data stored in the cache memory 14, and a head position register for storing the position of the magnetic head of the magnetic disk device 3. 16 and.

【0016】磁気ディスク制御装置1のマイクロプロセ
ッサ11は、磁気ディスク制御装置1全体の動作を制御
プログラムに従って制御する。上位装置接続部12は、
上位装置2とのデータ転送,コマンド転送およびステー
タス転送を行う際に、その入出力処理を制御する。ドラ
イブ接続部13は、磁気ディスク装置3に対しデータの
転送,コマンド転送,ステータス転送を行う際に、その
入出力処理を制御する。キャッシュメモリ14は、磁気
ディスク装置3から読み出したデータを格納するととも
に、上位装置2から送られた書き込みデータを一時的に
格納する。
The microprocessor 11 of the magnetic disk controller 1 controls the overall operation of the magnetic disk controller 1 according to a control program. The host device connection unit 12 is
When data transfer, command transfer and status transfer with the higher-level device 2 are performed, the input / output processing is controlled. The drive connection unit 13 controls the input / output processing of data transfer, command transfer, and status transfer to the magnetic disk device 3. The cache memory 14 stores the data read from the magnetic disk device 3 and also temporarily stores the write data sent from the host device 2.

【0017】キャッシュメモリ管理テーブル15は、キ
ャッシュメモリ14上のデータ格納アドレスと磁気ディ
スク装置3の記録位置とを対応付けるための管理テーブ
ルであって、キャッシュメモリ14のあるエリアのデー
タが、読み出しデータであるか、もしくは、書き込みデ
ータであるか、そして、それが読み出しデータの場合
は、磁気ディスク装置3のどの位置から読み出されたデ
ータであるか、また、それが書き込みデータの場合は、
磁気ディスク装置3のどの位置に書き込むべきデータで
あるかを記憶する。このキャッシュメモリ14内の記憶
エリアは細かく分割されており、複数の読み出しデータ
および書き込みデータを格納するとともに管理可能にな
っている。
The cache memory management table 15 is a management table for associating a data storage address on the cache memory 14 with a recording position on the magnetic disk device 3, and data in an area of the cache memory 14 is read data. Whether or not it is write data, and if it is read data, from which position of the magnetic disk device 3 the data was read, and if it is write data,
The position in the magnetic disk device 3 where the data should be written is stored. The storage area in the cache memory 14 is finely divided so that a plurality of read data and write data can be stored and managed.

【0018】ヘッド位置レジスタ16は、磁気ディスク
装置3において、現在磁気ヘッドが位置しているトラッ
ク番号を記憶するレジスタであって、その内容の更新は
マイクロプロセッサ11により行う。マイクロプロセッ
サ11は、磁気ディスク装置3に対して磁気ヘッドの位
置決め命令であるシーク命令を実行したときに、シーク
したトラック番号をヘッド位置レジスタ16に記憶す
る。
The head position register 16 is a register for storing the track number where the magnetic head is currently located in the magnetic disk device 3, and its contents are updated by the microprocessor 11. When the microprocessor 11 executes a seek command which is a magnetic head positioning command for the magnetic disk device 3, the microprocessor 11 stores the track number of the seek in the head position register 16.

【0019】以上が本発明の磁気ディスクキャッシュの
制御方法を実現する磁気ディスク制御装置の構成であ
る。
The above is the configuration of the magnetic disk controller for realizing the magnetic disk cache control method of the present invention.

【0020】次に、本発明の実施例の動作について説明
する。
Next, the operation of the embodiment of the present invention will be described.

【0021】図2は、本発明の第1の実施例の動作を示
すフローチャートである。なお、本実施例は、図1に示
す磁気ディスク制御装置1がヘッド位置レジスタ16を
備えないものに適用される。
FIG. 2 is a flow chart showing the operation of the first embodiment of the present invention. The present embodiment is applied to the magnetic disk control device 1 shown in FIG. 1 that does not include the head position register 16.

【0022】図1,図2を参照すると、上位装置2から
送出される命令およびデータは、磁気ディスク制御装置
1の上位装置接続部12を介してマイクロプロセッサ1
1に入力され解析される。マイクロプロセッサ11は、
解析した命令に従って磁気ディスク装置3を制御し、そ
れが磁気ディスク装置3を動作させる命令であれば、ド
ライブ接続部13を介して磁気ディスク装置3に動作命
令を送出する。
Referring to FIGS. 1 and 2, instructions and data sent from the host device 2 are transferred to the microprocessor 1 via the host device connecting portion 12 of the magnetic disk controller 1.
1 is input and analyzed. The microprocessor 11
If the command controls the magnetic disk device 3 according to the analyzed command and the command is to operate the magnetic disk device 3, the operation command is sent to the magnetic disk device 3 via the drive connection unit 13.

【0023】本実施例においては、リード時の動作が従
来の磁気ディスク制御装置の場合と同様であり、かつ磁
気ディスク装置3から読み出されたデータがキャッシュ
メモリ14に格納されているとき、磁気ディスク制御装
置1は、上位装置2からその部分に対する読み出し命令
が送出されると、磁気ディスク装置3をアクセスするこ
となく、キャッシュメモリ14上に記憶されているデー
タを上位装置2に転送する。通常、上位装置2からの書
き込み命令は、書き込み位置を特定するシーク命令とサ
ーチ命令とを伴っている。
In the present embodiment, the read operation is the same as that of the conventional magnetic disk controller, and when the data read from the magnetic disk device 3 is stored in the cache memory 14, the magnetic When the read command for the portion is sent from the host device 2, the disk controller 1 transfers the data stored in the cache memory 14 to the host device 2 without accessing the magnetic disk device 3. Usually, the write command from the higher-level device 2 is accompanied by a seek command and a search command that specify the write position.

【0024】まず、このシーク命令もしくはサーチ命令
を受理すると、マイクロプロセッサ11は、キャッシュ
メモリ管理テーブル15を検索して、当該書き込み位置
を含む領域のデータがキャッシュメモリ14内に格納さ
れているか、すなわち、キャッシュヒットであるか、も
しくはキャッシュミスであるかを判断する(S11)。
First, when the seek instruction or the search instruction is accepted, the microprocessor 11 searches the cache memory management table 15 to determine whether the data of the area including the write position is stored in the cache memory 14, that is, , It is determined whether there is a cache hit or a cache miss (S11).

【0025】そして、シークもしくはサーチ位置のデー
タが、キャッシュメモリ14上にない場合は、キャッシ
ュミスとなるため、マイクロプロセッサ11は、目的位
置に磁気ディスクのヘッドを移動させる命令を磁気ディ
スク装置3に送出し(S12)、磁気ディスク媒体上の
データを読み出しながら目的の位置をサーチする(S1
3)。このとき、磁気ディスク媒体から読み出されたデ
ータは、同時にキャッシュメモリ14にも格納され、そ
のトラック位置はキャッシュメモリ管理テーブル15に
登録される(S14)。続いて、上位装置2から書き込
みデータを受理し、キャッシュメモリ14に格納する
(S15)。
If the data at the seek or search position is not in the cache memory 14, a cache miss will occur, so that the microprocessor 11 instructs the magnetic disk device 3 to move the head of the magnetic disk to the target position. The data is sent (S12), and the target position is searched while reading the data on the magnetic disk medium (S1).
3). At this time, the data read from the magnetic disk medium is also stored in the cache memory 14 at the same time, and its track position is registered in the cache memory management table 15 (S14). Then, the write data is received from the host device 2 and stored in the cache memory 14 (S15).

【0026】ここで、本実施例では、マイクロプロセッ
サ11が、磁気ディスク装置3に対してキャッシュメモ
リ14内に格納しているデータの読み出しを開始し(S
16)、さらに、データの書き出し完了を待たずに上位
装置2に対し当該書き込み命令の完了を報告する(S1
7)。そして、マイクロプロセッサ11は、待機中に当
該書き込みデータの磁気ディスク媒体への書き出しの完
了を監視する(S18)。
Here, in this embodiment, the microprocessor 11 starts reading the data stored in the cache memory 14 from the magnetic disk device 3 (S).
16) Furthermore, the completion of the write command is reported to the higher-level device 2 without waiting for the completion of writing the data (S1).
7). Then, the microprocessor 11 monitors completion of writing of the write data to the magnetic disk medium during standby (S18).

【0027】この間に磁気ディスク装置3をアクセスす
る命令が発行されると、この書き込み動作の完了までそ
の実行を待たなければならないが、本実施例では、書き
込み位置のサーチ後、磁気ヘッドが別のトラック位置に
移動する前に磁気ディスク媒体への書き込み動作を開始
するため、磁気ヘッドを再度トラック位置合わせをする
必要がなく、磁気ディスク媒体への書き込みに伴う磁気
ディスク装置の動作占有時間が短縮される。
When an instruction to access the magnetic disk device 3 is issued during this period, it is necessary to wait until the writing operation is completed, but in the present embodiment, after the writing position is searched, the magnetic head is changed to another one. Since the write operation to the magnetic disk medium is started before moving to the track position, it is not necessary to realign the track position of the magnetic head, and the operation occupation time of the magnetic disk device accompanying the write to the magnetic disk medium is shortened. It

【0028】また、S11の判断ステップにおいて、キ
ャッシュメモリ14内に書き込み位置のデータが存在し
ている、すなわち、キャッシュヒットの場合は、従来の
ストア・イン・ライト処理と同様に、キャッシュメモリ
14内のデータを使用してサーチ動作を行う(S1
9)。このとき、実際の磁気ディスク装置3にはアクセ
スしない。続いて、上位装置2から書き込みデータを受
理し、キャッシュメモリ14に格納する(S20)。
Further, in the determination step of S11, if the data at the write position exists in the cache memory 14, that is, if there is a cache hit, the cache memory 14 will have the same contents as in the conventional store-in-write process. The search operation is performed using the data of (S1
9). At this time, the actual magnetic disk device 3 is not accessed. Then, the write data is received from the host device 2 and stored in the cache memory 14 (S20).

【0029】キャッシュメモリ14へのデータの書き込
みが完了すると、マイクロプロセッサ11は、上位装置
2に対し当該書き込み命令の完了を報告する(S2
1)。このとき、キャッシュメモリ14内に格納された
書き込みデータは、一定時間後もしくはキャッシュメモ
リ内に一定の書き込みデータが蓄えられたときに、磁気
ディスク装置3に書き込まれる。
When the writing of the data to the cache memory 14 is completed, the microprocessor 11 reports the completion of the write instruction to the host device 2 (S2).
1). At this time, the write data stored in the cache memory 14 is written in the magnetic disk device 3 after a fixed time or when a fixed write data is stored in the cache memory.

【0030】本実施例では、上位装置2への書き込み命
令の終了報告の直前に、磁気ディスク媒体への書き込み
を開始しているため、磁気ディスク装置3の動作占有時
間は、上位装置2が次の命令を送出するまでの時間であ
るコマンド間隔と相殺し合い、上位装置から見て磁気デ
ィスク装置3の動作占有時間は、コマンド間隔の分だけ
短く見える。これにより、磁気ディスク装置3の動作占
有による次のアクセスの待ち合わせ時間を短縮できる。
In this embodiment, since the writing to the magnetic disk medium is started immediately before the completion report of the write command to the upper apparatus 2, the operation occupation time of the magnetic disk apparatus 3 is The command occupancy time, which is the time until the command is transmitted, cancels each other out, and the operation occupied time of the magnetic disk device 3 seems to be shorter by the command interval as seen from the host device. As a result, the waiting time for the next access due to the occupation of the magnetic disk device 3 can be shortened.

【0031】次に、本発明の第2の実施例の動作につい
て、図1,図3を参照して説明する。
Next, the operation of the second embodiment of the present invention will be described with reference to FIGS.

【0032】なお、本実施例は、図1に示す磁気ディス
ク制御装置1がヘッド位置レジスタ16を備えたものに
適用され、キャッシュヒットの場合に、磁気ディスク媒
体上の磁気ヘッドのトラック位置を記憶するヘッド位置
レジスタ16を用いて、さらに、高い効果を得る方法で
ある。
The present embodiment is applied to the magnetic disk controller 1 shown in FIG. 1 provided with the head position register 16 and stores the track position of the magnetic head on the magnetic disk medium in the case of a cache hit. Using the head position register 16 that operates, a higher effect can be obtained.

【0033】ここで、図3に示すフローチャートは、図
2に示すフローチャートのS20とS21との間に、S
20′の判断ステップを挿入したものである。従って、
本実施例において内容の重複する箇所の説明は省略す
る。
Here, in the flowchart shown in FIG. 3, S20 is inserted between S20 and S21 of the flowchart shown in FIG.
The judgment step of 20 'is inserted. Therefore,
In the present embodiment, the description of the duplicated contents will be omitted.

【0034】図3を参照すると、まず、S11におい
て、キャッシュミスした場合、すなわち、キャッシュメ
モリ14内に目的位置のデータが格納されていない場合
の動作は、上述した第1の実施例において説明した動作
と同様であるが、マイクロプロセッサ11は、磁気ディ
スク装置3の磁気ヘッドの位置を変更する度に、ヘッド
位置レジスタ16の内容を更新する。従って、マイクロ
プロセッサ11は、ヘッド位置レジスタ16の内容を読
み出すことにより現在の磁気ヘッドの位置を知ることが
できる。
Referring to FIG. 3, first, the operation when a cache miss occurs in S11, that is, when the data of the target position is not stored in the cache memory 14, is explained in the first embodiment described above. The operation is similar, but the microprocessor 11 updates the contents of the head position register 16 every time the position of the magnetic head of the magnetic disk device 3 is changed. Therefore, the microprocessor 11 can know the current position of the magnetic head by reading the contents of the head position register 16.

【0035】一方、S11において、キャッシュヒット
した場合、すなわち、キャッシュメモリ14内に目的位
置のデータが存在した場合、マイクロプロセッサ11
は、一連の書き込み処理の命令列の終了前に、キャッシ
ュメモリ管理テーブル15の内容から書き込み命令によ
ってキャッシュメモリ14に書き込まれたデータを磁気
ディスク媒体上に書き込むべきトラックアドレスと、ヘ
ッド位置レジスタ16との内容を比較する。すなわち、
磁気ヘッドの位置がキャッシュメモリ内のデータを読み
出せる位置にあるか否かを判断する(S20′)。
On the other hand, in S11, if there is a cache hit, that is, if the data at the target position exists in the cache memory 14, the microprocessor 11
Before the end of the series of instructions for the write process, the track address at which the data written in the cache memory 14 by the write command from the contents of the cache memory management table 15 should be written on the magnetic disk medium, the head position register 16, and Compare the contents of. That is,
It is determined whether or not the position of the magnetic head is in a position where data can be read out from the cache memory (S20 ').

【0036】そして、両者が一致した場合は、キャッシ
ュメモリ14内のデータを磁気ディスク媒体に書き込む
処理を開始する(S16)。また、両者が一致しない場
合は、上位装置2に書込み処理の終了報告を行う(S2
1)。この制御方法は、磁気ヘッドの位置が既にキャッ
シュメモリ14内の書き込みデータを直ちに磁気ディス
ク媒体に書き込む位置にある場合、磁気ディスク媒体へ
の書き込み開始の判断とするものである。これにより、
磁気ヘッドの無駄な動作をさらに減少させることがで
き、磁気ディスク装置3の動作占有時間を軽減できる。
If the two match, the process of writing the data in the cache memory 14 to the magnetic disk medium is started (S16). If they do not match, the end of the writing process is reported to the higher-level device 2 (S2).
1). This control method is to judge the start of writing to the magnetic disk medium when the position of the magnetic head is already at the position where the write data in the cache memory 14 is immediately written to the magnetic disk medium. This allows
The useless operation of the magnetic head can be further reduced, and the operation occupation time of the magnetic disk device 3 can be reduced.

【0037】[0037]

【発明の効果】以上説明したように本発明は、磁気ディ
スク媒体への不規則な書き込み処理において、キャッシ
ュメモリへ書き込みデータを格納し、一連の書き込み命
令の終了直前に磁気ディスク媒体へのデータの書き込み
を開始するため、磁気ヘッドが現在のトラック位置で書
き込みを開始でき、磁気ヘッドの移動に伴う磁気ディス
ク装置の動作占有時間を短縮できるという効果がある。
As described above, according to the present invention, in the irregular write processing to the magnetic disk medium, the write data is stored in the cache memory, and the data is written to the magnetic disk medium immediately before the completion of a series of write commands. Since writing is started, the magnetic head can start writing at the current track position, and the operation occupation time of the magnetic disk device accompanying the movement of the magnetic head can be shortened.

【0038】さらに、キャッシュメモリから磁気ディス
ク媒体への書き込み開始と同時にホスト装置に書き込み
命令の完了を報告するため、磁気ディスク装置への書き
込み処理の時間をホスト装置からのコマンド間隔と相殺
することができる。
Further, since the completion of the write command is reported to the host device at the same time when the writing from the cache memory to the magnetic disk medium is started, the write processing time to the magnetic disk device can be offset with the command interval from the host device. it can.

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

【図1】本発明の一実施例を適用する磁気ディスク制御
装置の構成図である。
FIG. 1 is a configuration diagram of a magnetic disk control device to which an embodiment of the present invention is applied.

【図2】本発明の一実施例を示すフローチャートであ
る。
FIG. 2 is a flowchart showing an embodiment of the present invention.

【図3】本発明の他の実施例を示すフローチャートであ
る。
FIG. 3 is a flowchart showing another embodiment of the present invention.

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

1 磁気ディスク制御装置 2 上位装置 3 磁気ディスク装置 11 マイクロプロセッサ 12 上位装置接続部 13 ドライブ接続部 14 キャッシュメモリ 15 キャッシュメモリ管理テーブル 16 ヘッド位置レジスタ S12〜S21 処理ステップ S11,S20′ 判断ステップ DESCRIPTION OF SYMBOLS 1 magnetic disk control device 2 host device 3 magnetic disk device 11 microprocessor 12 host device connection part 13 drive connection part 14 cache memory 15 cache memory management table 16 head position register S12 to S21 processing step S11, S20 'determination step

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 キャッシュメモリを有し高速書き込み処
理を行う磁気ディスクキャッシュの制御方法であって、
上位装置からの書き込み処理においてデータを書き込む
べき位置のデータが前記キャッシュメモリ上に存在しな
い場合、書き込みデータを前記キャッシュメモリに格納
し、一連の命令列処理の終了する直前に前記キャッシュ
メモリ内の書き込みデータを磁気ディスク装置に書き込
む処理を開始した後、前記上位装置に書き込み処理命令
列の終了報告を行うことを特徴とする磁気ディスクキャ
ッシュの制御方法。
1. A method for controlling a magnetic disk cache having a cache memory and performing high-speed write processing, comprising:
When the data at the position where the data is to be written does not exist in the cache memory in the write processing from the host device, the write data is stored in the cache memory, and the write in the cache memory is performed immediately before the end of the series of instruction sequence processing. A method for controlling a magnetic disk cache, characterized in that after starting a process of writing data to a magnetic disk device, a completion report of a write processing instruction sequence is sent to the upper device.
【請求項2】 データを書き込む目的位置のデータがキ
ャッシュメモリ上に存在し、上位装置からの書き込み処
理において書き込みデータを前記キャッシュメモリに格
納し、一連の命令列処理の終了する直前に書き込み処理
を行ったトラック位置と磁気ディスク装置の磁気ヘッド
のトラック位置を記憶するレジスタの内容とを比較し、
両者が一致した場合、前記キャッシュメモリ内の書き込
みデータを前記磁気ディスク装置に書き込む処理を開始
した後、前記上位装置に書き込み処理命令列の終了報告
を行うことを特徴とする磁気ディスクキャッシュの制御
方法。
2. The data at the target position for writing the data exists in the cache memory, the write data is stored in the cache memory in the write processing from the host device, and the write processing is performed immediately before the end of the series of instruction sequence processing. Compare the performed track position with the contents of the register that stores the track position of the magnetic head of the magnetic disk device,
If the two match, a method for controlling the magnetic disk cache is characterized in that, after starting the process of writing the write data in the cache memory into the magnetic disk device, the end of the write processing instruction sequence is reported to the upper device. .
JP7154894A 1995-06-21 1995-06-21 Control method of magnetic disk cache Expired - Fee Related JP2704138B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7154894A JP2704138B2 (en) 1995-06-21 1995-06-21 Control method of magnetic disk cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7154894A JP2704138B2 (en) 1995-06-21 1995-06-21 Control method of magnetic disk cache

Publications (2)

Publication Number Publication Date
JPH096676A true JPH096676A (en) 1997-01-10
JP2704138B2 JP2704138B2 (en) 1998-01-26

Family

ID=15594288

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7154894A Expired - Fee Related JP2704138B2 (en) 1995-06-21 1995-06-21 Control method of magnetic disk cache

Country Status (1)

Country Link
JP (1) JP2704138B2 (en)

Also Published As

Publication number Publication date
JP2704138B2 (en) 1998-01-26

Similar Documents

Publication Publication Date Title
US6230239B1 (en) Method of data migration
US5937427A (en) Information recording apparatus and method capable of efficient erase, write and verify processes
JPH06236241A (en) Hard disk device using flash memory
JPH10149260A (en) Reading cache system for disk drive
US7174421B2 (en) HDD with rapid availability of critical data after critical event
JP2007102436A (en) Storage controller and storage control method
JP2704138B2 (en) Control method of magnetic disk cache
JP3122702B2 (en) Disk device write-back control method
JP2002342038A (en) Disk device controlling execution order of commands
US20050125651A1 (en) Method for providing critical data in an HDD after critical event
JP2634867B2 (en) Disk cache data transfer control method
JPH11232037A (en) Magnetic disk device having disk cache write function
JPH11265262A (en) High speed write cache disk device
JPH10275425A (en) Disk device and method for rapidly transferring rearrangement data due to defect in it to host
JP2561394B2 (en) I / O control method
JPH11224165A (en) Disk device
JPH0684283A (en) Transfer method for magneto-optical disk data
JP3103209B2 (en) Image file device
JP2001034536A (en) Disk drive and recording medium
JPH05257607A (en) Magnetic disk controller
JPS6286425A (en) Magnetic disc control device
JPH05108485A (en) Defective/alternate track controlling system for disk cache controller
JPH05134809A (en) Read/write control method for disk device
JPH01201754A (en) Data transfer system in external storage device
JPH05324474A (en) Disk controller provided with cache memory

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: 19970902

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees