JPH06267175A - Storage device and method for controlling the same - Google Patents
Storage device and method for controlling the sameInfo
- Publication number
- JPH06267175A JPH06267175A JP5103493A JP5103493A JPH06267175A JP H06267175 A JPH06267175 A JP H06267175A JP 5103493 A JP5103493 A JP 5103493A JP 5103493 A JP5103493 A JP 5103493A JP H06267175 A JPH06267175 A JP H06267175A
- Authority
- JP
- Japan
- Prior art keywords
- data
- storage medium
- mode
- cache
- hit rate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
(57)【要約】
【目的】 ディスク装置のスループットを落すことな
く、消費電力を低減することを目的とする。
【構成】 現在のキャッシュ300のヒット率を保持す
るヒット率保持部200と、ヒット率の基準値を保持す
る規定値保持部210とを備える。ディスク装置は、動
作モ−ド複数種類有する。コントロ−ラ120は、現在
のヒット率と、上記基準値とを比較する。その結果、現
在のヒット率が上記基準値を越えている場合には、消費
電力の少ない動作モ−ドに移るべくコマンドを発行す
る。
(57) [Abstract] [Purpose] The objective is to reduce power consumption without reducing the throughput of a disk device. A hit ratio holding unit 200 that holds the current hit ratio of the cache 300, and a specified value holding unit 210 that holds the reference value of the hit ratio are provided. The disk device has a plurality of operation modes. The controller 120 compares the current hit rate with the reference value. As a result, if the current hit rate exceeds the reference value, a command is issued to move to an operation mode with low power consumption.
Description
【0001】[0001]
【産業上の利用分野】本発明は、消費電力の抑制と処理
速度の向上とを図った記憶装置およびその制御方法に関
するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a storage device which suppresses power consumption and improves processing speed, and a control method thereof.
【0002】[0002]
【従来の技術】従来のディスク装置、特に2.5インチ
以下の磁気ディスク装置では、動作モードを複数設け、
動作モードを選択することにより、消費電力の低減を図
るように設計されている。動作モードの遷移ブロック図
を図17に示す。動作モードは大きく分けて次の5つに
わかれている。第1は、リードライトモード(100
0)である。このモ−ドは、記録媒体からのデータの読
み出し、または、記録媒体へのデータの書き込みを行っ
ている状態である。第2は、シークモード(1010)
である。これはリードライトヘッドを目的の位置へ移動
させるモードである。第3は、アイドルモード(102
0)である。これは記録媒体は定常回転にあり、上位シ
ステムからの命令を待っている状態である。第4は、ス
タンドバイモード(1030)である。このモ−ドで
は、記録媒体の回転は停止し、上位システムから命令が
発せられると、記録媒体を回転した後、上位からのコマ
ンドを実行する。第5は、スリープモード(1040)
である。このモ−ドにおいては、すべての機能は停止
し、上位システムからの初期化信号により、再起動され
る。2. Description of the Related Art A conventional disk device, particularly a magnetic disk device of 2.5 inches or less, is provided with a plurality of operation modes.
It is designed to reduce power consumption by selecting an operation mode. FIG. 17 shows a transition block diagram of the operation modes. The operation modes are roughly divided into the following five. The first is the read / write mode (100
0). In this mode, data is being read from the recording medium or data is being written to the recording medium. Second, seek mode (1010)
Is. This is a mode in which the read / write head is moved to the target position. Third, idle mode (102
0). This is a state in which the recording medium is in steady rotation and waiting for a command from the host system. Fourth is the standby mode (1030). In this mode, the rotation of the recording medium is stopped, and when a command is issued from the host system, the recording medium is rotated and then the command from the host is executed. Fifth, sleep mode (1040)
Is. In this mode, all functions are stopped and restarted by an initialization signal from the host system.
【0003】ディスク装置に電源を投入すると、スピン
ドルモータが起動され、アイドルモードで上位システム
からの命令待ちとなる。この状態で上位システムからデ
ータの読み書き命令が来ると、リードライトモードに遷
移する。また、シーク命令が来ると、シークモードに遷
移する。When the disk device is powered on, the spindle motor is activated, and in the idle mode, it waits for a command from the host system. When a data read / write command is received from the host system in this state, the mode changes to the read / write mode. Also, when a seek command arrives, the mode changes to the seek mode.
【0004】アイドルモードからスタンドバイモードに
遷移させるタイミングには、2つの場合がある。第1の
タイミングは、上位システムからの命令が来た時点で即
モードを切り替る方法である。第2のタイミングは、上
位システムから規定された時間の間、ディスク装置に命
令が来ないと、アイドルモードからスタンドバイモード
に遷移させる方法である。例えば、遷移時間を60秒と
セットすると、アイドルモードが60秒続いた時点で、
ディスク装置は自動的にスタンドバイモードに遷移す
る。There are two cases at the timing of transition from the idle mode to the standby mode. The first timing is a method of switching the mode immediately when a command from the host system arrives. The second timing is a method of transitioning from the idle mode to the standby mode when no command comes to the disk device for a prescribed time from the host system. For example, if you set the transition time to 60 seconds, when the idle mode continues for 60 seconds,
The disk device automatically shifts to the standby mode.
【0005】この種の装置として関連するものには、例
えば、日経エレクトロニクス,1990年10月29
日,No.512,第175頁や、特開平4−7685
7等が挙げられる。Related to this type of device, for example, Nikkei Electronics, October 29, 1990.
Sun, No. 512, page 175 and JP-A-4-7685.
7 etc. are mentioned.
【0006】[0006]
【発明が解決しようとする課題】上記従来技術は、デー
タの読み出し、及び、書き込み処理時間について十分に
考慮されていなかった。例えば、スタンドバイモードを
使用すると、スピンドルモータが停止するため、低消費
電力モード時には、システムスループット(記録データ
の読み出し、書き込み速度)が著しく低下する問題があ
った。The above-mentioned prior art has not sufficiently considered the data read and write processing times. For example, when the standby mode is used, the spindle motor stops, so that there is a problem that the system throughput (reading and writing speed of recorded data) is significantly reduced in the low power consumption mode.
【0007】また、スタンドバイモードを常に利用する
と、スピンドルモータの起動回数が増え、機構系寿命が
短くなるという問題もあった。Further, if the standby mode is always used, there is a problem that the number of times the spindle motor is started increases and the mechanical system life is shortened.
【0008】本発明の第1の目的は、低消費電力モード
を使用してもシステムスループットの劣化が少ないディ
スク装置およびその電力制御方法を提供することにあ
る。A first object of the present invention is to provide a disk device and a power control method thereof in which the system throughput is less deteriorated even when the low power consumption mode is used.
【0009】第2の目的は、電源投入時から消費電力を
低減できるディスク装置を提供することにある。A second object is to provide a disk device which can reduce power consumption after the power is turned on.
【0010】また、第3の目的は、スピンドルモータの
起動回数を低減し、長寿命なディスク装置を提供するこ
とにある。A third object is to provide a disk device having a long life by reducing the number of times of starting the spindle motor.
【0011】[0011]
【課題を解決するための手段】本発明は上記目的を達成
するためになされたもので、その一態様としては、複数
の動作モ−ドを有し、記憶媒体として主記憶媒体とキャ
ッシュ記憶媒体とを使用する記憶装置において、他の装
置からの命令を受け付けるとともに、該命令の実行にと
もなって必要となる他の装置とのデ−タの授受を行う入
出力手段と、上記主記憶媒体に記憶されたデ−タを読み
出す主記憶読み出し手段と、上記主記憶読み出し手段に
よって読み出されたデータを上記キャッシュ記憶媒体に
格納する機能と、上記キャッシュ記憶媒体に格納された
デ−タを読み出す機能とを備えたキャッシュ管理手段
と、他の装置から読み出し命令を受けた回数をカウント
し、アクセス回数として保持するアクセス回数保持手段
と、他の装置から読み出し命令の対象となっているデ−
タが上記キャッシュ記憶媒体に格納されているか否かを
判定する判定手段と、上記判定手段による判定の結果、
上記読み出しの対象となるデ−タが上記キャッシュ記憶
媒体に保持されていた回数をカウントし、ヒット回数と
して保持するヒット回数保持手段と、上記ヒット回数と
上記アクセス回数とを用いてヒット率を算出するヒット
率算出手段と、動作モ−ド変更の基準となる、あらかじ
め設定された第1規定値を保持する規定値保持手段と、
上記ヒット率算出手段の算出した最新のヒット率と上記
第1規定値とを比較し、該比較の結果に従って動作モ−
ドの制御を行う動作モ−ド制御手段と、を有し、上記動
作モ−ド制御手段は、上記動作モ−ドとして、少なくと
も、上記主記憶媒体へのアクセスと、上記キャッシュ記
憶媒体へのアクセスと、を行なうことのできる第1モ−
ドと、上記第1モ−ドよりも消費電力が少なく、かつ、
少なくとも上記キャッシュ記憶媒体へのアクセスが可能
な第2モ−ドと、の少なくとも二つを備え、上記比較の
結果、上記ヒット率が上記第1規定値よりも小さい場合
には該記憶装置の動作モ−ドを上記第1モ−ドに移行さ
せ、逆に、上記ヒット率が上記第1規定値よりも大きい
場合には該記憶装置の動作モ−ドを上記第2モ−ドに移
行させるものであること、を特徴とする記憶装置が提供
される。The present invention has been made to achieve the above object, and in one aspect thereof, has a plurality of operation modes and has a main storage medium and a cache storage medium as storage media. In a storage device using and, in the main storage medium, an input / output unit that receives an instruction from another device and exchanges data with another device that is necessary when the instruction is executed. Main memory reading means for reading the stored data, a function for storing the data read by the main memory reading means in the cache storage medium, and a function for reading the data stored in the cache storage medium And a cache management unit including an access count holding unit that counts the number of times a read command is received from another device and holds the count as an access count, and a read count from another device. De that is the issue the subject of instruction -
Determination means for determining whether or not the data is stored in the cache storage medium, and the determination result by the determination means,
The hit rate is calculated by using the hit number holding means for counting the number of times the data to be read is held in the cache storage medium and holding it as the hit number, and the hit number and the access number. A hit rate calculating means, and a prescribed value holding means for holding a preset first prescribed value, which serves as a reference for changing the operation mode,
The latest hit rate calculated by the hit rate calculation means is compared with the first prescribed value, and the operation mode is calculated according to the result of the comparison.
And an operation mode control means for controlling the mode, wherein the operation mode control means, as the operation mode, at least accesses the main storage medium and accesses the cache storage medium. The first mode that can access and
And less power consumption than the first mode, and
At least two second modes capable of accessing the cache storage medium are provided, and as a result of the comparison, if the hit rate is smaller than the first specified value, the operation of the storage device. The mode is shifted to the first mode, and conversely, when the hit rate is larger than the first prescribed value, the operation mode of the storage device is shifted to the second mode. What is provided is a storage device.
【0012】なお、この場合、現時点から少なくとも過
去一定範囲におけるヒット率を記憶するヒット率保持手
段と、上記ヒット率保持手段に格納されたヒット率の値
を用いて、現時点におけるヒット率変化の傾きを求める
傾き算出手段と、を有し、上記規定値保持手段は、あら
かじめ設定された第2規定値をさらに有し、上記動作モ
−ド制御手段は、上記傾き算出手段の算出したヒット率
変化の傾きと、上記第2規定値とを比較する機能をさら
に有し、上記ヒット率が上記第1規定値よりも大きい場
合であっても、上記傾きが上記第2規定値よりも小さい
時には、動作モ−ドを上記第1モ−ドへ移行させないも
のであってもよい。In this case, the slope of the hit rate change at the present time is calculated by using the hit rate holding means for storing the hit rate in at least a certain past range from the present time and the value of the hit rate stored in the hit rate holding means. And a predetermined value holding means further has a second predetermined value set in advance, and the operation mode control means has the hit rate change calculated by the tilt calculating means. Further has a function of comparing the slope of the above with the second prescribed value, and even when the hit rate is larger than the first prescribed value, when the inclination is smaller than the second prescribed value, The operation mode may not be shifted to the first mode.
【0013】本発明の第2の態様としては、複数の動作
モ−ドを有し、記憶媒体として主記憶媒体とキャッシュ
記憶媒体とを使用する記憶装置において、他の装置から
の命令を受け付けるとともに、該命令の実行にともなっ
て必要となる他の装置とのデ−タの授受を行う入出力手
段と、上記主記憶媒体に記憶されたデ−タを読み出す主
記憶読み出し手段と、上記主記憶読み出し手段によって
読み出されたデータを上記キャッシュ記憶媒体に格納す
る機能と、上記キャッシュ記憶媒体に格納されたデ−タ
を読み出す機能とを備えたキャッシュ管理手段と、他の
装置から読み出し命令を受けた回数をカウントしアクセ
ス回数として保持するアクセス回数保持手段と、他の装
置から読み出し命令の対象となっているデ−タが上記キ
ャッシュ記憶媒体に格納されているか否かを判定する判
定手段と、上記判定手段による判定の結果、上記読み出
しの対象となるデ−タが上記キャッシュ記憶媒体に保持
されていた回数をカウントし、ヒット回数として保持す
るヒット回数保持手段と、上記ヒット回数と上記アクセ
ス回数とを用いてヒット率を算出するヒット率算出手段
と、他の装置から最後にアクセスを受けたときから動作
モ−ドを変更するまでの時間(以下”モ−ド遷移時間”
という)とヒット率との、あらかじめ定義された対応関
係を記憶するモ−ド遷移時間保持手段と、現時点におけ
るモ−ド遷移時間を保持する規定値保持手段と、他の装
置から最後にアクセスを受けたときからの経過時間を計
時する計時手段と、現時点におけるヒット率と、上記モ
−ド遷移時間保持手段に保持されたヒット率とモ−ド遷
移時間との対応関係とから、現時点におけるモ−ド遷移
時間を求めて上記規定値保持手段に格納するとともに、
該現時点におけるモ−ド遷移時間と上記経過時間とを比
較し、該比較の結果に従って動作モ−ドの制御を行う動
作モ−ド制御手段と、を有し、上記動作モ−ド制御手段
は、少なくとも、上記主記憶媒体へのアクセスと、上記
キャッシュ記憶媒体へのアクセスと、を行なうことので
きる第1モ−ドと、上記第1モ−ドよりも消費電力が少
なく、かつ、少なくとも上記キャッシュ記憶媒体へのア
クセスが可能な第2モ−ドと、の少なくとも二つの動作
モ−ドを備え、上記比較の結果、上記経過時間が上記モ
−ド遷移時間を越えていた場合には、該記憶装置の動作
モ−ドを上記第2モ−ドに移行させるものであること、
を特徴とする記憶装置が提供される。As a second aspect of the present invention, in a storage device having a plurality of operation modes and using a main storage medium and a cache storage medium as storage media, while accepting a command from another device, An input / output means for exchanging data with another device which is necessary when the instruction is executed, a main memory reading means for reading the data stored in the main storage medium, and the main memory A cache management unit having a function of storing the data read by the reading unit in the cache storage medium, a function of reading the data stored in the cache storage medium, and a read command from another device. The access count holding means for counting the number of times of access and holding it as the access count, and the data that is the target of the read command from another device are As a result of the judgment by the judging means for judging whether or not the data is stored, and the result of the judgment by the judging means, the number of times that the data to be read is held in the cache storage medium is counted and held as the number of hits. Hit count holding means, hit ratio calculation means for calculating the hit ratio using the hit count and the access count, and the time from the last access from another device until the operation mode is changed. (Hereinafter "mode transition time"
Mode) and the hit rate, a mode transition time holding means for storing a predefined correspondence relationship, a specified value holding means for holding the current mode transition time, and a final access from another device. From the timing means for measuring the elapsed time from the time of receiving, the hit rate at the present time, and the correspondence relationship between the hit rate held in the mode transition time holding means and the mode transition time, -The transition time is calculated and stored in the specified value holding means, and
The operation mode control means compares the current mode transition time with the elapsed time and controls the operation mode according to the result of the comparison. , A first mode capable of performing at least access to the main storage medium and access to the cache storage medium, power consumption lower than that of the first mode, and at least the above At least two operation modes, that is, a second mode capable of accessing the cache storage medium, are provided, and as a result of the comparison, if the elapsed time exceeds the mode transition time, The operation mode of the storage device is to be transferred to the second mode,
A storage device is provided.
【0014】この場合、現時点から過去一定範囲におけ
るヒット率を記憶するヒット率保持手段と、上記ヒット
率保持手段に格納されたヒット率の値を用いて、現時点
におけるヒット率変化の傾きを求める傾き算出手段と、
を有し、上記モ−ド遷移時間保持手段の保持しているモ
−ド遷移時間とヒット率とのあらかじめ定義された対応
関係は、ヒット率変化の傾きとの対応関係をも含んで定
義されているものであり、上記動作モ−ド制御手段は、
上記モ−ド遷移時間を求める処理を、現時点におけるヒ
ット率およびヒット率の傾きと、上記モ−ド遷移時間保
持手段の保持しているモ−ド遷移時間とヒット率とヒッ
ト率変化の傾きとの対応関係と、を用いて行うものであ
ってもよい。In this case, using the hit rate holding means for storing the hit rate within a certain range from the present time to the past, and the value of the hit rate stored in the hit rate holding means, the inclination for obtaining the inclination of the hit rate change at the present time Calculation means,
And the predefined correspondence relationship between the mode transition time held by the mode transition time holding means and the hit rate is defined including the correspondence relationship with the slope of the hit rate change. The operation mode control means is
The processing for obtaining the mode transition time is performed by using the hit rate and the slope of the hit rate at the present time, the mode transition time held by the mode transition time holding means, the hit rate, and the slope of the change in the hit rate. It is also possible to use the correspondence relationship of
【0015】本発明の上記第1、第2の態様において
は、電源がOFFになった場合、少なくとも、上記キャ
ッシュ記憶媒体に格納されているデ−タと、アクセス回
数保持手段に保持されているアクセス回数と、ヒット回
数保持手段に保持されているヒット回数とを、記憶して
保護するデ−タ保護手段を備えることが好ましい。In the first and second aspects of the present invention, when the power is turned off, at least the data stored in the cache storage medium and the access count holding means are held. It is preferable to provide data protection means for storing and protecting the access count and the hit count held in the hit count holding means.
【0016】本発明の第3の態様としては、記憶媒体と
して、ディスク型の主記憶媒体と、キャッシュ記憶媒体
とを使用する記憶装置において、他の装置からの命令を
受け付けるとともに、該命令の実行にともなって必要と
なる他の装置とのデ−タの授受を行う入出力手段と、上
記主記憶媒体のデ−タを読み出す主記憶読み出し手段
と、上記主記憶読み出し手段によって読み出されたデー
タを上記キャッシュ記憶媒体に格納する機能と、上記キ
ャッシュ記憶媒体に格納されたデ−タを読み出す機能と
を備えたキャッシュ管理手段と、上記主記憶媒体がデ−
タの読み出しが可能な回転状態にない時に他の装置から
デ−タの読み出し命令を受けた場合、当該デ−タが上記
キャッシュ記憶媒体に格納されているか否かを判定し、
格納されている場合には、上記手記憶媒体を起動するこ
となく、上記キャッシュ記憶媒体に格納されている当該
デ−タを読み出して出力させる制御手段と、を有するこ
とを特徴とする記憶装置が提供される。According to a third aspect of the present invention, a storage device using a disk type main storage medium and a cache storage medium as a storage medium accepts an instruction from another device and executes the instruction. I / O means for transmitting and receiving data to and from other devices, which is necessary in connection with the main memory, main memory reading means for reading the data of the main memory medium, and data read by the main memory reading means. Is stored in the cache storage medium, and a cache management means having a function of reading data stored in the cache storage medium;
When a data read command is received from another device when the data is not in a rotation state in which the data can be read, it is determined whether the data is stored in the cache storage medium,
When stored, a storage device comprising: a control unit that reads out and outputs the data stored in the cache storage medium without activating the hand storage medium. Provided.
【0017】本発明の第4の態様としては、記憶媒体と
して、ディスク型の主記憶媒体と、ライトキャッシュ記
憶媒体とを使用する記憶装置において、他の装置からの
命令を受け付けるとともに、該命令の実行にともなって
必要となる他の装置とのデ−タの授受を行う入出力手段
と、上記主記憶媒体にデ−タを書き込む主記憶書き込み
手段と、上記主記憶媒体がデ−タの書き込みが可能な回
転状態にない時に他の装置からデ−タの書き込み命令を
受けた場合、当該デ−タをライトキャッシュ記憶媒体に
格納するとともに、該ライトキャッシュ記憶媒体に当該
デ−タが書き込まれた時点で、該書き込み命令が実行さ
れたことを上記他の装置に対し通達し、その後、あらか
じめ設定されたタイミングで該ライトキャッシュ記憶媒
体に書き込まれた当該デ−タを上記手記憶媒体に書き込
ませる制御手段と、を有することを特徴とする記憶装置
が提供される。According to a fourth aspect of the present invention, in a storage device that uses a disk-type main storage medium and a write cache storage medium as the storage medium, while accepting an instruction from another device, Input / output means for transmitting / receiving data to / from other devices necessary for execution, main memory writing means for writing data in the main storage medium, and data writing in the main storage medium When a data write command is received from another device when the data is not in a rotation state that allows the data to be stored, the data is stored in the write cache storage medium and the data is written to the write cache storage medium. At that point, the fact that the write command has been executed is notified to the other device, and thereafter, the write instruction is written to the write cache storage medium at a preset timing.該De - storage device is provided, characterized in that and a control means for writing to the hand storage medium data.
【0018】[0018]
【作用】上記第1、第2の態様においては、ヒット率算
出手段により算出されたヒット率やヒット率の傾きを用
いて、記憶装置の動作モ−ドを制御することによって、
記憶装置の特定部位(例えば、主記憶媒体としてディス
ク型のものを使用している場合には、スピンドルモ−タ
等)の機能を停止等させるため、システムスループット
の劣化を防ぐことができる。In the first and second modes, the operation mode of the storage device is controlled by using the hit rate and the slope of the hit rate calculated by the hit rate calculating means.
Since the function of a specific part of the storage device (for example, a spindle motor or the like when a disk type is used as the main storage medium) is stopped, deterioration of system throughput can be prevented.
【0019】また、ディスク型の主記憶媒体がすぐにデ
−タの読み出しができない場合でも、現在のキャッシュ
ヒット率に対応する確率で、ディスク装置からデータを
読み出すことができる。従って、システムスループット
の劣化を防ぐことができる。Even if the disk type main storage medium cannot immediately read the data, the data can be read from the disk device with a probability corresponding to the current cache hit rate. Therefore, deterioration of system throughput can be prevented.
【0020】電源を再投入したとき、前回電源遮断時に
記録保持したデータ、及び、前回までのアクセス回数、
ヒット回数を、それぞれ、回復することができ、前回ま
でのヒット率、及び、キャッシュ内データを利用するこ
とができ、電源投入時から消費電力を低減できる。When the power is turned on again, the data recorded and retained when the power was last turned off, and the number of accesses up to the last time,
The number of hits can be recovered respectively, the hit rate up to the previous time and the data in the cache can be used, and the power consumption can be reduced even after the power is turned on.
【0021】上記第3、第4の態様においては、主記憶
媒体がデ−タの書き込みが可能な回転状態にないとき
(すなわち、スピンドルモータ停止時等)には、ライト
キャッシュ記憶媒体に書き込みデータを保持する。そし
て、その後、あらかじめ設定されたタイミング、例え
ば、主記憶媒体が記録媒体が回転されたとき等に、ライ
トキャッシュ記憶媒体に書き込まれたデータを一括して
主記憶媒体に書き込む。これにより、主記憶媒体、すな
わち、スピンドルモータ等の起動回数を低減することが
できる。In the third and fourth modes, when the main storage medium is not in the rotation state in which data can be written (that is, when the spindle motor is stopped, etc.), the write data is written in the write cache storage medium. Hold. Then, after that, at a preset timing, for example, when the main storage medium is rotated, the data written in the write cache storage medium is collectively written in the main storage medium. As a result, the number of times the main storage medium, that is, the spindle motor or the like, is activated can be reduced.
【0022】[0022]
【実施例】以下、本発明の一実施例を図1から図11を
用いて説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS.
【0023】まず最初に本実施例の磁気ディスク装置の
概要を、図1を用いて説明する。磁気ディスク装置の機
構部(HDA)500は、データを記録保持する磁気記
録円板510と、磁気記録円板510を回転させるスピ
ンドルモータ520と、磁気記録円板510にデータを
記録または磁気記録円板510からデータを読み出す磁
気ヘッド530と、磁気ヘッド530を磁気記録円板5
10上の任意の位置に移動させるアクチュエータ540
と、を含んで構成される。First, an outline of the magnetic disk device of this embodiment will be described with reference to FIG. A mechanism unit (HDA) 500 of the magnetic disk device records a magnetic recording disk 510 for recording and holding data, a spindle motor 520 for rotating the magnetic recording disk 510, and a magnetic recording disk 510 for recording or recording data. A magnetic head 530 for reading data from the plate 510 and a magnetic recording disk 5 for the magnetic head 530.
Actuator 540 for moving to any position on 10
And are included.
【0024】スピンドルモータ520は、スピンドルモ
ータ制御回路150で制御され、回転速度は一定に保た
れる。また、コントローラ120は、電力供給コントロ
ーラ400を通して、スピンドルモータ520の回転/
停止を制御することができる。アクチュエータ540
は、位置決め制御回路140でコントロールされる。こ
れにより磁気ヘッド530は磁気記録円板510上の任
意の位置に移動することができる。The spindle motor 520 is controlled by the spindle motor control circuit 150, and the rotation speed is kept constant. The controller 120 also controls the rotation / rotation of the spindle motor 520 through the power supply controller 400.
The stop can be controlled. Actuator 540
Are controlled by the positioning control circuit 140. This allows the magnetic head 530 to move to any position on the magnetic recording disk 510.
【0025】ホストがディスクからデータを読み出すリ
ード動作を図1を用いて説明する。ホストからリード命
令がくると、コントローラ120は、まず、キャッシュ
300の中にホストの欲しいデータが有るか無いかを判
定する。もし、欲しいデータがキャッシュ300内にあ
った場合には、キャッシュリードヒットとなり、キャッ
シュ300内のデータをホストに転送する。逆に、欲し
いデータがキャッシュ300内になかった場合には、キ
ャッシュリードミスとなり、磁気記録円板510上から
欲しいデータを読み出し、R/W回路130、ハードデ
ィスクコントローラ(HDC)110、インタフェース
コントローラ100を通してホストに転送することにな
る。このとき、ホストにデータを転送すると同時に、キ
ャッシュ300にこのデータを記録する。これにより、
これ以降、該データの読み出し命令が来たときには、キ
ャッシュリードヒットとなる。このとき、リード時のキ
ャッシュのヒット率Rは (ヒット率R)={(キャッシュリードヒット回数 )
/(リード回数)}×100 で与えられる。キャッシュリードヒットすることで、デ
ータの読みだし時間を大幅に短縮することができる。A read operation in which the host reads data from the disk will be described with reference to FIG. When a read command is received from the host, the controller 120 first determines whether or not the data desired by the host exists in the cache 300. If the desired data is in the cache 300, a cache read hit occurs and the data in the cache 300 is transferred to the host. Conversely, if the desired data is not in the cache 300, a cache read miss occurs, the desired data is read from the magnetic recording disk 510, and the host is accessed through the R / W circuit 130, the hard disk controller (HDC) 110, and the interface controller 100. Will be transferred to. At this time, the data is transferred to the host, and at the same time, the data is recorded in the cache 300. This allows
After that, when a read command for the data comes, a cache read hit occurs. At this time, the cache hit rate R during read is (hit rate R) = {(cache read hit count)
/ (Read count)} × 100. The cache read hit can significantly reduce the data read time.
【0026】次に、ホストがディスクにデータを書き込
むライト動作を図1を用いて説明する。記録したいデー
タは、インタフェースコントローラ100、ハードディ
スクコントローラ(HDC)110、R/W回路130
を通して、磁気ヘッド530で磁気記録円板510上に
記録される。このとき、同時に、記録データをキャッシ
ュ300にも記録する。Next, a write operation in which the host writes data to the disk will be described with reference to FIG. The data to be recorded is the interface controller 100, the hard disk controller (HDC) 110, the R / W circuit 130.
Through the magnetic head 530 to record on the magnetic recording disk 510. At this time, the record data is also recorded in the cache 300 at the same time.
【0027】本実施例のディスク装置は、複数の動作モ
−ドを備え、該動作モ−ド遷移のタイミングをキャッシ
ュ300のヒット率等を用いて決定することにより、シ
ステムスループットの劣化を最小限に押えつつ、消費電
力を低減した点に特徴を有したものである。従って、以
下においてはこの点を中心に説明を行うこととする。The disk device of this embodiment is provided with a plurality of operation modes, and the timing of the operation mode transition is determined by using the hit rate of the cache 300 or the like, so that the deterioration of the system throughput is minimized. The feature is that the power consumption is reduced while being suppressed. Therefore, in the following, this point will be mainly described.
【0028】R/W回路130、位置決め制御回路14
0、スピンドルモ−タ制御回路150、スピンドルモ−
タ520等は、それぞれ個別に動作モ−ドを有している
(以下、これら各部が独自に備えた動作モ−ドを、該デ
ィスク装置全体での動作モ−ドと区別して、”固有動作
モ−ド”という。)。これらは、通常の動作モ−ドとは
別に、消費電力の小さい動作モ−ド(あるいは、動作を
停止して電力を消費しない動作モ−ド)をそれぞれ独自
に有している(以下、これら各部が独自に備えた消費電
力の小さい動作モ−ドを、該ディスク装置全体での低消
費電力モ−ドと区別して、”固有省電力モ−ド”とい
う。)。本実施例のスピンドルモ−タ520は、該固有
省電力モ−ドにおいては回転を停止され、一方、通常の
動作モ−ドにおいては回転される。これらの各部は、後
述する電力供給コントロ−ラ400からの制御指令によ
って、該固有小電力モ−ドと、通常の動作モ−ドとの間
を遷移可能に構成されている。R / W circuit 130, positioning control circuit 14
0, spindle motor control circuit 150, spindle motor
Each of the controllers 520 and the like has its own operation mode (hereinafter, the operation mode unique to each of these units is distinguished from the operation mode of the entire disk device as "unique operation". "Mode".). In addition to the normal operation mode, each has its own operation mode with low power consumption (or operation mode that stops operation and does not consume power). An operation mode with low power consumption, which is uniquely provided in each unit, is called a "specific power saving mode" to distinguish it from a low power consumption mode for the entire disk device.) The spindle motor 520 of this embodiment stops rotating in the inherent power saving mode, while rotating in the normal operation mode. Each of these units is configured to be able to transit between the specific small power mode and the normal operation mode according to a control command from a power supply controller 400 described later.
【0029】電力供給コントロ−ラ400は、コントロ
−ラ120からの指令に応じて、スピンドルモ−タ制御
回路150やスピンドルモ−タ520等の固有動作モ−
ドを変更させる機能を有している。The power supply controller 400 responds to a command from the controller 120, and the spindle motor control circuit 150, the spindle motor 520, and the like have their own operation motors.
It has a function to change the mode.
【0030】コントローラ120は、該ディスク装置全
体としての動作モ−ドを定義した動作モ−ド定義テ−ブ
ルを有している(図2参照)。該動作モ−ド定義テ−ブ
ルには、各動作モ−ドにおいて上記各部(例えば、スピ
ンドルモ−タ520等)毎の個別動作モ−ドをどのよう
にするかを定義したものである。本実施例においては、
該動作モ−ド定義テ−ブル上に、”通常モ−ド”と、”
低消費電力モ−ド”との二種類の動作モ−ドを定義して
いる。The controller 120 has an operation mode definition table defining the operation mode of the entire disk device (see FIG. 2). The operation mode definition table defines how the individual operation mode for each of the above-mentioned units (for example, the spindle motor 520, etc.) in each operation mode is set. In this embodiment,
On the operation mode definition table, "normal mode" and "
Two types of operation modes, "low power consumption mode" are defined.
【0031】”低消費電力モ−ド”とは、スピンドルモ
−タ520やスピンドルモ−タ制御回路150等を固有
省電力モ−ドで動作させるモ−ドである。いずれの部分
を固有省電力モ−ドに遷移させるかは特に限定されな
い。しかし、本実施例においては消費電力の抑制という
観点から、低消費電力モ−ドにおいては、少なくともス
ピンドルモ−タ520が固有省電力モ−ドとなるように
定義している。つまり、該低消費電力モ−ドにおいて
は、スピンドルモ−タ520は回転を停止される。逆
に、該低消費電力モ−ドであっても、少なくともコント
ロ−ラ120自身はコマンド受け付け可能な状態に保た
れている必要がある。また、電力供給コントロ−ラ40
0についても、コントロ−ラ120からの制御指令を受
け付けることのできる状態に保たれている。この他、本
実施例においては、低消費電力モ−ドであっても、キャ
ッシュ300からの読み出しおよびキャッシュ300へ
の書き込みが可能となるように該低消費電力モ−ドを定
義している。なお、本実施例においては、該低消費電力
モ−ドが特許請求の範囲においていう”第2モ−ド”に
相当する。The "low power consumption mode" is a mode in which the spindle motor 520, the spindle motor control circuit 150, etc. are operated in an inherent power saving mode. It is not particularly limited which part is changed to the unique power saving mode. However, in the present embodiment, from the viewpoint of suppressing the power consumption, at least the spindle motor 520 is defined to be the unique power saving mode in the low power consumption mode. That is, in the low power consumption mode, the rotation of the spindle motor 520 is stopped. On the contrary, even in the low power consumption mode, at least the controller 120 itself needs to be kept in a command receivable state. In addition, the power supply controller 40
Also for 0, the control command from the controller 120 is maintained. In addition, in this embodiment, even in the low power consumption mode, the low power consumption mode is defined so that reading from the cache 300 and writing to the cache 300 are possible. In this embodiment, the low power consumption mode corresponds to the "second mode" in the claims.
【0032】”通常モ−ド”とは、上記低消費電力モ−
ドに比べて、固有省電力モ−ドにされている部分が少な
いモ−ドである。ただし、必ずしもすべての部分が、固
有省電力モ−ドでなくなっている必要はない。本実施例
においては、該通常モ−ドにおいては、読み出し動作等
をすみやかに行うために、少なくとも、スピンドルモ−
タ520、スピンドルモ−タ制御回路150は、固有省
電力モ−ドとはされていない。つまり、該通常モ−ドに
おいては、スピンドルモ−タ520は、回転されてい
る。なお、該通常モ−ドが特許請求の範囲においてい
う”第1モ−ド”に相当する。The "normal mode" means the low power consumption mode.
This is a mode in which there are fewer parts that are set to the unique power saving mode than the modes. However, it is not always necessary that all parts are in the unique power saving mode. In the present embodiment, in the normal mode, at least the spindle mode is set in order to quickly perform the read operation and the like.
The motor 520 and the spindle motor control circuit 150 are not set to the unique power saving mode. That is, in the normal mode, the spindle motor 520 is rotated. The normal mode corresponds to the "first mode" in the claims.
【0033】さらに本実施例のコントローラ120は、
ホストからリード命令が来る度に、ヒット率保持部20
0に保持しているアクセス回数、キャッシュのヒット回
数を更新する機能を有している。また、これらの値を用
いてヒット率を演算し、該ヒット率をヒット率保持部2
00に格納する機能を有している。さらには、該コント
ロ−ラ120は、該ヒット率の値に応じて、上述の動作
モ−ドを選択する構成となっている。そして、上記動作
モ−ド定義テ−ブルを参照することによって、該選択さ
れた動作モ−ドに対応した制御指令を電力供給コントロ
−ラ400に出力する機能を有している。なお、該動作
モ−ド選択の詳細については後ほど説明する。Further, the controller 120 of this embodiment is
Each time a read command comes from the host, the hit rate holding unit 20
It has a function of updating the access count and cache hit count held at 0. Further, the hit rate is calculated using these values, and the hit rate is calculated by the hit rate holding unit 2
00 has a function of storing the data in "00". Further, the controller 120 is configured to select the operation mode described above according to the value of the hit rate. Then, it has a function of outputting a control command corresponding to the selected operation mode to the power supply controller 400 by referring to the operation mode definition table. The details of the operation mode selection will be described later.
【0034】この他に、本実施例のコントロ−ラ120
は、ヒット率保持部200、規定値保持部210、キャ
ッシュメモリ300の内容を、磁気記録円板510など
に保存させる機能、キャッシュ300内にライトキャッ
シュを設定し、これを用いてライト動作時のスル−プッ
ト低化を防ぐ機能をも有している。なお、これらの機能
については後ほど詳細に説明する。In addition to this, the controller 120 of the present embodiment.
Is a function for storing the contents of the hit ratio holding unit 200, the specified value holding unit 210, and the cache memory 300 in the magnetic recording disk 510, a write cache is set in the cache 300, and this is used to perform a write operation. It also has a function to prevent throughput drop. Note that these functions will be described in detail later.
【0035】ヒット率保持部200は、ホストからのリ
−ドアクセス回数、キャッシュのヒット回数、また、こ
れらを用いて算出されたキャッシュのヒット率やヒット
率の傾きΔR等を記憶するメモリである。The hit ratio holding unit 200 is a memory for storing the number of read accesses from the host, the number of cache hits, the cache hit ratio calculated using these, the hit ratio slope ΔR, and the like. .
【0036】規定値保持部210は、動作モ−ドの制御
に際して必要となる各種制御値を記憶するメモリであ
る。後述するとおり、コントロ−ラ120による動作モ
−ドの選択方法として3つの方法が考えられ、各方法ご
とに記憶する制御値の内容が異なっている。第1、第3
の方法におけるスピンドルモ−タ停止規定値やスピンド
ルモ−タ520を停止させる一定時間t、第2、第4の
方法におけるモ−ド遷移時間t’等がある。なお、これ
ら制御値の具体的な値および、後述するモ−ド遷移時間
を規定した関数f,gの具体的な内容は、動作制御の際
に、スル−プット、消費電力、等のうちいずれの点をよ
り重視するかによってその値を決定されるものである。The specified value holding unit 210 is a memory for storing various control values necessary for controlling the operation mode. As will be described later, three methods can be considered as a method for selecting the operation mode by the controller 120, and the contents of the control value to be stored are different for each method. 1st, 3rd
There is a spindle motor stop specified value in the above method, a fixed time t for stopping the spindle motor 520, and a mode transition time t'in the second and fourth methods. It should be noted that the concrete values of these control values and the concrete contents of the functions f and g which define the mode transition time, which will be described later, are determined by any one of the throughput, the power consumption, etc. in the operation control. The value is determined depending on whether the point of is more important.
【0037】キャッシュ300は、スル−プットの向上
を図るために、磁気記録円板510から読み出したデ−
タを保持する半導体メモリである。さらに、該キャッシ
ュ300内には、ライトキャッシュが設定され、磁気記
録円板510への書き込みデ−タを一時保持する機能を
有している。The cache 300 reads data from the magnetic recording disk 510 in order to improve throughput.
Is a semiconductor memory that holds data. Further, a write cache is set in the cache 300 and has a function of temporarily holding write data to the magnetic recording disk 510.
【0038】不揮発性メモリ310は、電圧低化等の非
常時にキャッシュ300内のデ−タを格納、保存するた
めのものである。The non-volatile memory 310 is for storing and storing the data in the cache 300 in the event of an emergency such as a voltage drop.
【0039】2次電力供給源450は、停電等の際に、
デ−タの保護動作を実行するために必要な電力を各部に
供給するためのものである。該2次電力供給源450の
電力は、電力供給コントロ−ラ400によって、少なく
とも、該保護動作を実行するために必要な部分に供給さ
れる構成となっている。The secondary power supply source 450 is used in case of a power failure or the like.
It is for supplying electric power necessary for executing the data protection operation to each unit. The power of the secondary power supply source 450 is configured to be supplied by the power supply controller 400 to at least a portion necessary for executing the protection operation.
【0040】なお、特許請求の範囲において言う、”入
出力手段”とは、主に、インタフェ−スコントロ−ラ1
00、ハ−ドディスクコントロ−ラ110によって実現
されるものである。”主記憶読み出し手段”、”手記憶
書き込み手段”とは、主に、R/W回路130、位置決
め制御回路140、スピンドルモ−タ制御回路150等
によって実現されるものである。”キャッシュ管理手
段”とは、主に、コントロ−ラ120、ハ−ドディスク
コントロ−ラ110によって実現されるものである。”
アクセス回数保持手段”、”ヒット回数保持手段””ヒ
ット率保持手段”とは、ヒット率保持部200によって
実現されるものである。”判定手段”、”ヒット率算出
手段”、”動作モ−ド制御手段”、”計時手段”、”制
御手段”とは、主に、コントロ−ラ120によって実現
されるものである。”規定値保持手段”とは、規定値保
持部210によって実現されるものである。”デ−タ保
護手段”とは、主に、不揮発性メモリ310(あるいは
磁気記録円板510)、コントロ−ラ120等によって
実現されるものである。また、”モ−ド遷移時間保持手
段”とは、磁気記録円板510により実現されるもので
ある。ただし、各部は密接に連携しつつ動作するもので
あるため、特許請求の範囲との上述した対応関係は、厳
密なものではない。Incidentally, in the claims,
The output means "is mainly the interface controller 1
00, realized by hard disk controller 110
It is what is done. "Main memory reading means", "Hand memory"
The "writing means" mainly refers to the R / W circuit 130, the positioning
Control circuit 140, spindle motor control circuit 150, etc.
Is realized by. ”Cache manager
The term "dan" mainly refers to the controller 120 and the hard disk.
It is realized by the controller 110. ”
Access count holding means "," hit count holding means "
The hit rate holding means "is defined by the hit rate holding unit 200.
It will be realized. "Judgment means", "Hit rate calculation
Means "," motion mode control means "," timekeeping means "," control "
The "means" is mainly realized by the controller 120.
It is what is done. "Specified value holding means" means specified value holding
It is realized by the holding unit 210. "Data protection
The protection means "mainly means the non-volatile memory 310 (or
Magnetic recording disk 510), controller 120, etc.
It will be realized. Also, hold the mode transition time.
The “step” is realized by the magnetic recording disk 510.
is there. However, each part works in close cooperation.
Therefore, the above-mentioned correspondence with the claims is strict.
Not dense.
【0041】ここで、動作モ−ド制御の前提となるキャ
ッシュのヒット率の推移の一般的な様子を図3を用いて
説明する。キャッシュ300に全くデ−タが格納されて
いない状態においては、ヒット率は当然0%である。デ
ィスク装置の使用時間が長くなるにつれて(注:より正
確には、デ−タの読み出しを重ねるつれて)、ヒット率
は徐々に上昇する。しかし、一定のレベルにまで達する
と飽和し、それ以上はほとんどヒット率が上昇しなくな
る。ヒット率の飽和点を決定する一つの要因としてキャ
ッシュ300の容量がある。キャッシュ300の容量が
十分にある場合や、特定のデ−タを繰返し読み出すよう
な場合には、ヒット率が90%を越えることもある。逆
に、キャッシュ300の容量が小さいとき等においては
(例えば、数百キロバイト程度の時)、ヒット率はほと
んど上がらない。Here, a general state of the transition of the cache hit rate, which is the premise of the operation mode control, will be described with reference to FIG. When no data is stored in the cache 300, the hit rate is naturally 0%. The hit rate gradually increases as the disk device is used for a long time (note: more accurately, as data is read repeatedly). However, when it reaches a certain level, it becomes saturated, and beyond that, the hit rate hardly increases. The capacity of the cache 300 is one factor that determines the saturation point of the hit rate. When the cache 300 has a sufficient capacity, or when specific data is repeatedly read, the hit rate may exceed 90%. On the contrary, when the capacity of the cache 300 is small (for example, about several hundreds of kilobytes), the hit rate hardly increases.
【0042】次に、コントロ−ラ120による動作モ−
ドの制御を詳細に説明する。動作モ−ドの制御方法(選
択方法)てはいくつか考えられるが、本実施例において
は以下に述べる4つの方法を採用している。Next, the operation mode by the controller 120 will be described.
The control of the mode will be described in detail. There are several possible operation mode control methods (selection methods), but the following four methods are employed in this embodiment.
【0043】第1の方法を説明する。The first method will be described.
【0044】この方法においては、規定値保持部210
にあらかじめ設定されたスピンドルモータ停止規定値を
保持しておく。ここで”スピンドルモ−タ規定値”と呼
んでいる基準値は、該ディスク装置の動作モ−ドを決定
する際の基準として使用するものであり、単にスピンド
ルモ−タ520を停止させるか否かの基準としてのみ用
いるものではない。しかし、低消費電力の抑制という観
点からみた場合、スピンドルモ−タ520を回転させる
か否かが重要であるため、ここでは”スピンドルモ−タ
停止規定値”と呼ぶこととする。In this method, the specified value holding unit 210
The spindle motor stop regulation value set in advance is held. The reference value referred to as "spindle motor prescribed value" is used as a reference when determining the operation mode of the disk device, and whether or not the spindle motor 520 is simply stopped. It is not used only as a reference. However, from the viewpoint of suppressing low power consumption, whether or not the spindle motor 520 is rotated is important, and is therefore referred to as "spindle motor stop regulation value" here.
【0045】コントローラ120は、ホストからリ−ド
命令が来るたびに、常に、キャッシュがヒットしたか否
かを判定する。The controller 120 always determines whether or not the cache is hit each time a read command is received from the host.
【0046】キャッシュがヒットした場合には、キャッ
シュ300内からデ−タを読みだして転送させる。さら
に、ヒット率保持部200に格納されているアクセス回
数等を更新するとともに、ヒット率を演算・更新する。
そして、この時算出したヒット率を、スピンドルモ−タ
規定値と比較する。When the cache hits, the data is read from the cache 300 and transferred. Further, the number of accesses stored in the hit rate holding unit 200 is updated, and the hit rate is calculated / updated.
Then, the hit rate calculated at this time is compared with the specified value of the spindle motor.
【0047】その結果、新たなヒット率がスピンドルモ
−タ停止規定値を越えていた場合には、この時のリ−ド
動作を行う前の状態が、通常モ−ドであったか、低消費
電力モ−ドであったかに関わらず、これ以後は低消費電
力モ−ドで動作することになる。従って、上述の動作モ
−ド定義テ−ブルにおける”低消費電力モ−ド”の定義
に基づいて、電力供給コントロ−ラ400に制御指令を
出力する。電力供給コントロ−ラ400は、該指示に従
ってコマンドを発行し各部の固有動作モ−ドを変更させ
る。例えば、スピンドルモータ520やスピンドルモ−
タ制御回路150は固有省電力モ−ドにされる(注:本
実施例においては、該固有省電力モ−ドにおいて、スピ
ンドルモ−タ520は停止される。)。図3において
は、スピンドルモータ停止規定値を75.00%に設定
している。使用に伴ってヒット率が上昇して、ヒット率
が75.00%を超えた時刻Pにおいて動作モ−ドを変
更しスピンドルモータ520の停止等を行わせる。As a result, if the new hit rate exceeds the spindle motor stop regulation value, the state before the read operation at this time was the normal mode or the low power consumption. Regardless of whether it was in the mode or not, it will operate in the low power consumption mode thereafter. Therefore, the control command is output to the power supply controller 400 based on the definition of "low power consumption mode" in the above-mentioned operation mode definition table. The power supply controller 400 issues a command according to the instruction to change the peculiar operation mode of each unit. For example, a spindle motor 520 or a spindle motor
The controller control circuit 150 is set to the unique power saving mode (Note: in this embodiment, the spindle motor 520 is stopped in the unique power saving mode). In FIG. 3, the spindle motor stop regulation value is set to 75.00%. The hit rate increases with use, and at time P when the hit rate exceeds 75.00%, the operation mode is changed and the spindle motor 520 is stopped.
【0048】リ−ド動作を行う前の状態が”通常モ−
ド”であり、キャッシュがヒットした(すなわち、ヒッ
ト率が上昇した)にも関わらず、ヒット率がスピンドル
モ−タ規定値よりも小さい場合には、それ以後も、通常
モ−ドのままとされる。The state before the read operation is "normal mode".
If the hit rate is smaller than the spindle motor specified value even though the cache hits (that is, the hit rate has increased), it will remain in the normal mode thereafter. To be done.
【0049】一方、キャッシュミスが発生した場合に
は、コントロ−ラ120は、その時の動作モ−ドがいず
れであるかに関わらず、一旦通常モ−ドを選択し、動作
モ−ド定義テ−ブルに従って、スピンドルモータ52
0、位置決め制御回路140とR/W回路130を通常
の動作状態とさせる。そして、磁気記録円板510から
デ−タを読み取って転送させる。なお、位置決め制御回
路140とR/W回路130を通常の動作状態に戻すタ
イミングを、スピンドルモータ520が一定回転に達し
た時点とすれば、電力消費の抑制という観点からはより
有効である。この後、さらに、コントロ−ラ120は、
ヒット率保持部200に格納されているアクセス回数等
を更新するとともに、ヒット率を演算・更新する。そし
て、この時算出した新たなヒット率を、スピンドルモ−
タ規定値と比較する。On the other hand, when a cache miss occurs, the controller 120 once selects the normal mode regardless of the operation mode at that time, and the operation mode definition table. The spindle motor 52 according to the bull
0, the positioning control circuit 140 and the R / W circuit 130 are brought into a normal operation state. Then, the data is read from the magnetic recording disk 510 and transferred. It is more effective from the viewpoint of suppressing power consumption if the timing for returning the positioning control circuit 140 and the R / W circuit 130 to the normal operating state is the time when the spindle motor 520 reaches a certain rotation. After this, the controller 120 further
The number of accesses stored in the hit rate holding unit 200 is updated, and the hit rate is calculated and updated. Then, the new hit rate calculated at this time is set to the spindle mode.
Compare with the specified value.
【0050】通常モ−ドにおける動作中にキャッシュミ
スが発生していた場合には、当然、キャッシュ率はスピ
ンドルモ−タ規定値よりも小さいため、この後も通常モ
−ドのままとして、スピンドルモータ520を回転をさ
せつづける。If a cache miss occurs during the operation in the normal mode, the cache rate is naturally smaller than the specified value of the spindle motor. The motor 520 continues to rotate.
【0051】低消費電力モ−ドにおける動作中にキャッ
シュミスが発生していた時には、更新後のヒット率が、
スピンドルモ−タ規定値よりも小さくなっている場合
と、スピンドルモ−タ規定値以上の大きさを保っている
場合とがある。ヒット率がスピンドルモ−タ停止規定値
よりも小さくなった場合には、これ以後は”通常モ−
ド”で動作することになる。従って、キャッシュミスを
したデ−タを読み取るために起動したスピンドルモ−タ
520等にそのまま動作を継続させる。一方、ヒット率
がスピンドルモ−タ停止規定値以上であった場合には、
再び、低消費電力モ−ドに戻る。従って、キャッシュミ
スをしたデ−タを読み取るために起動したスピンドルモ
−タ520等は、一定時間t経過後再び動作を停止され
る。なお、該一定時間tの間にキャッシュリードミス、
もしくは、ライト動作が発生した場合には、改めてヒッ
ト率の確認などを行うとともに、その時点から一定時間
tの計測を再度開始する。When a cache miss occurs during operation in the low power consumption mode, the hit rate after update is
It may be smaller than the specified value for the spindle motor, or may be larger than the specified value for the spindle motor. If the hit rate becomes smaller than the specified value for stopping the spindle motor, the "normal motor" will be used thereafter.
Therefore, the spindle motor 520 or the like which is started to read the data having the cache miss is allowed to continue the operation as it is. On the other hand, the hit rate is equal to or more than the specified value for stopping the spindle motor. If
It returns to the low power consumption mode again. Therefore, the spindle motor 520 and the like started to read the data having the cache miss are stopped again after the elapse of the predetermined time t. Incidentally, during the fixed time t, a cache read miss,
Alternatively, when the write operation occurs, the hit rate is confirmed again and the measurement of the constant time t is restarted from that point.
【0052】規定値保持部210に格納されるスピンド
ルモ−タ停止規定値等は、該ディスク装置に接続される
ホスト側からコマンドにより設定する構成となってい
る。例えば、ホスト・ハードディスク間のインタフェー
スがSCSIの場合、図4に示すようなベンダユニーク
なコマンドを用いて設定を行う。なお、上述のコントロ
−ラ120は、このコマンドを受け取ることで、キャッ
シュヒット率に基づいた動作モ−ドの選択を行うことと
する。The spindle motor stop regulation value and the like stored in the regulation value holding unit 210 are set by a command from the host side connected to the disk device. For example, when the interface between the host and the hard disk is SCSI, setting is performed using a vendor unique command as shown in FIG. Note that the above-mentioned controller 120 receives this command and selects the operation mode based on the cache hit rate.
【0053】なお、ホストは、現在のヒット率保持部2
00内の数値を読み出せるコマンドを有している。例え
ば、インタフェースがSCSIの場合、図5に示すよう
な各社固有のコマンドを有し、ホストは現在のヒット率
を知ることができる。これにより、本発明を用いたディ
スク装置を使用するユーザは、設定する値の目安を得る
ことができる。The host is the current hit rate holding unit 2.
It has a command that can read the numerical value in 00. For example, when the interface is SCSI, it has commands unique to each company as shown in FIG. 5, and the host can know the current hit rate. As a result, the user who uses the disk device according to the present invention can obtain a guide for the set value.
【0054】この第1の方法を適用した場合のコントロ
−ラ120の動作を、図6のフローチャートを用いてさ
らに詳細かつ具体的に説明する。The operation of the controller 120 to which the first method is applied will be described in more detail and specifically with reference to the flowchart of FIG.
【0055】ホストからリード命令が来る(ステップ7
00)と、キャッシュがヒットしたか否かを判定する
(ステップ702)。その結果、キャッシュリードヒッ
トであった場合、キャッシュ300からデータを転送さ
せる(ステップ710)。さらに、ヒット率保持部20
0に格納されているアクセス回数、ヒット回数をインク
リメントし(ステップ712)、その後、ヒット率を演
算する(ステップ714)。そして、そのヒット率をス
ピンドルモ−タ停止規定値と比較する(ステップ71
6)。比較の結果、ヒット率が該スピンドルモ−タ停止
規定値以上であった場合には、続いて、スピンドルモー
タ520の動作状態をチェックする(ステップ72
0)。スピンドルモ−タ520が回転している場合(す
なわち、通常モ−ドである場合)には、、低消費電力モ
−ドに移行すべくスピンドルモータ520を停止させ
る。また、この他の部分についても同様に、動作モ−ド
定義テ−ブルに従って、各部の固有動作モ−ドを維持あ
るいは変更する(ステップ722)。そして、そのまま
処理を終了する(ステップ749)。A read command comes from the host (step 7)
00), it is determined whether or not the cache is hit (step 702). As a result, if there is a cache read hit, the data is transferred from the cache 300 (step 710). Furthermore, the hit rate holding unit 20
The access count and hit count stored in 0 are incremented (step 712), and then the hit ratio is calculated (step 714). Then, the hit rate is compared with the spindle motor stop regulation value (step 71).
6). As a result of the comparison, if the hit rate is equal to or higher than the specified value for stopping the spindle motor, then the operating state of the spindle motor 520 is checked (step 72).
0). When the spindle motor 520 is rotating (that is, in the normal mode), the spindle motor 520 is stopped in order to shift to the low power consumption mode. Similarly, with respect to the other parts, the peculiar motion mode of each part is maintained or changed in accordance with the motion mode definition table (step 722). Then, the processing is finished as it is (step 749).
【0056】ステップ720においてスピンドルモ−タ
が停止していた場合(すなわち、低消費電力モ−ドであ
った場合)には、そのまま処理を終了する(ステップ7
49)。また、ステップ716において、ヒット率がス
ピンドルモ−タ停止規定値よりも小さかった場合にも、
そのまま処理を終了する(ステップ749)。If the spindle motor is stopped in step 720 (that is, in the low power consumption mode), the processing is terminated as it is (step 7).
49). Also, in step 716, if the hit rate is smaller than the spindle motor stop regulation value,
The processing is terminated as it is (step 749).
【0057】ステップ702においてキャッシュリード
ミスであった場合には、スピンドルモータ520の回転
をチェックする(ステップ730)。その結果、スピン
ドルモータ520が回転していた場合(すなわち、通常
モ−ドである場合)には、R/W回路130等によって
磁気記録円板510からデータを読み取って該デ−タの
転送を行わせる(ステップ732)。その後、アクセス
回数をインクリメント(ステップ734)するととも
に、ヒット率を演算・格納する(ステップ736)。そ
して、そのまま処理を終了し(ステップ749)、この
後も通常モ−ドで動作を継続する。If there is a cache read miss in step 702, the rotation of the spindle motor 520 is checked (step 730). As a result, when the spindle motor 520 is rotating (that is, in the normal mode), the R / W circuit 130 or the like reads data from the magnetic recording disk 510 and transfers the data. It is performed (step 732). After that, the access count is incremented (step 734) and the hit rate is calculated and stored (step 736). Then, the processing is terminated as it is (step 749), and the operation is continued in the normal mode even after this.
【0058】ステップ730においてスピンドルモータ
520が停止していた場合(すなわち、低消費電力モ−
ドにあった場合)には、通常モ−ドへ移行すべく、スピ
ンドルモータ520を起動し(ステップ740)、定常
回転になるのを待つ(ステップ741)。定常回転に達
すると、R/W回路130等により磁気記録円板510
からデ−タを読み取り、該デ−タをホストに転送する
(ステップ742)。その後、アクセス回数等をインク
リメントし(ステップ743)、ヒット率を演算等する
(ステップ744)。そして、この時算出したヒット率
を、スピンドルモ−タ停止規定値と比較する(ステップ
745)。比較の結果、ヒット率がスピンドルモ−タ停
止規定値以下であった場合には、これ以後も”通常モ−
ド”のままで動作を継続する。さらに、該通常モ−ドに
おいては、常に、スピンドルモ−タ520を回転させる
こととなっているため、上記一定時間tをカウントする
タイマを無効にする(ステップ746)。一方、ステッ
プ745において、ヒット率がスピンドルモ−タ停止規
定値よりも大きかった場合には、上記タイマを有効にし
て(ステップ747)、上記一定時間tに対応したカウ
ント値を設定する(ステップ748)。ステップ74
6、748のあとは、処理を終了する(ステップ74
9)。When the spindle motor 520 is stopped in step 730 (that is, the low power consumption mode is selected).
If it is in the normal mode, the spindle motor 520 is started to shift to the normal mode (step 740), and it is waited for the steady rotation (step 741). When steady rotation is reached, the magnetic recording disk 510 is read by the R / W circuit 130 and the like.
The data is read from and the data is transferred to the host (step 742). After that, the access count and the like are incremented (step 743), and the hit rate is calculated (step 744). Then, the hit rate calculated at this time is compared with the spindle motor stop regulation value (step 745). As a result of the comparison, if the hit rate is less than the specified value for stopping the spindle motor, the "normal mode" continues thereafter.
In this normal mode, the spindle motor 520 is always rotated. Therefore, the timer for counting the constant time t is invalidated ( On the other hand, when the hit rate is larger than the spindle motor stop regulation value in step 745, the timer is enabled (step 747) and the count value corresponding to the constant time t is set. (Step 748) Step 74
After 6 and 748, the process ends (step 74).
9).
【0059】ただし、ステップ748においてタイマが
有効にされた場合には、ステップ750乃至ステップ7
59として示したタイマ割り込みが発生する。タイマ割
り込みが発生すると(ステップ750)、コントロ−ラ
120はタイマのカウント値を確認する(ステップ75
2)。そして、カウント値が0になっていた場合、すな
わち、ステップ748で設定された一定時間tが経過し
ていた場合、低消費電力モ−ドに再び戻るべく、動作モ
−ド定義テ−ブルに従って、スピンドルモータ520を
固有省電力モ−ド(注:本実施例においては停止状態)
に移行させる(ステップ756)。さらに、この他の不
用部分の回路(位置決め制御回路140と、スピンドル
モータ制御回路150と、R/W回路130)について
も固有省電力モ−ドに移行させる(ステップ758)。However, if the timer is enabled in step 748, steps 750 through 7 are performed.
A timer interrupt, designated as 59, occurs. When a timer interrupt occurs (step 750), the controller 120 confirms the count value of the timer (step 75).
2). When the count value is 0, that is, when the constant time t set in step 748 has elapsed, the operation mode definition table is followed in order to return to the low power consumption mode again. , Spindle motor 520 is peculiar power saving mode (Note: in this embodiment, it is in a stopped state)
(Step 756). Further, the circuits of other unnecessary parts (the positioning control circuit 140, the spindle motor control circuit 150, and the R / W circuit 130) are also shifted to the unique power saving mode (step 758).
【0060】動作モ−ド制御の第2の方法を説明する。A second method of controlling the operation mode will be described.
【0061】この方法は、通常モ−ドでの動作中、その
時点でのヒット率に応じて決定される時間t’以上ホス
トから命令がこないと、スピンドルモータ520を停止
して低消費電力モ−ドに移るというものである。ただ
し、この低消費電力モ−ドにおいても、キャッシュ30
0からの読み出し、及び、キャッシュ300への書き込
みを行えるだけの回路は駆動させている。なお、この第
2および後述する第4の方法の説明中、ディスク装置に
最後に命令が来てから、スピンドルモータを止めるまで
の時間t’を”モード遷移時間”と呼ぶ。In this method, during normal mode operation, if no command is received from the host for a time t'determined according to the hit rate at that time, the spindle motor 520 is stopped and the low power consumption mode is set. -It is to move to DO. However, even in this low power consumption mode, the cache 30
A circuit that can read from 0 and write to the cache 300 is driven. In the description of the second and fourth methods described later, the time t ′ from the last command to the disk device until the spindle motor is stopped is called “mode transition time”.
【0062】モード遷移時間t’は、下記数1のとお
り、ヒット率Rの関数として表すことができる。The mode transition time t'can be expressed as a function of the hit rate R as shown in the following mathematical formula 1.
【0063】[0063]
【数1】t=f(R) 関数fはディフォルトで、磁気記録円板510内にあら
かじめ持っている。そして、該ディスク装置の電源がO
Nにされた時点で読みだされ、コントロ−ラ120内に
該関数が保持される。そして、コントロ−ラ120は該
関数fとヒット率とを用いてモ−ド遷移時間を求め、こ
れを規定値保持部210に格納する。[Mathematical formula-see original document] t = f (R) The function f is the default, and is held in the magnetic recording disk 510 in advance. Then, the power supply of the disk device is turned off.
The function is read out at the time when it is set to N, and the function is held in the controller 120. Then, the controller 120 obtains the mode transition time using the function f and the hit rate, and stores it in the specified value holding unit 210.
【0064】関数fはホスト側から与えることができる
構成となっており、使用するシステムに適した遷移時間
制御を行うことができる。例えば、図7の関数fは、ヒ
ット率0%のときモード遷移時間300秒、ヒット率2
5%のときモード遷移時間295秒、ヒット率50%の
ときモード遷移時間280秒、ヒット率75%のときモ
ード遷移時間180秒、ヒット率100%のときモード
遷移時間0秒となる5点を通る補間曲線である。この図
7のように関数fを定義すると、ヒット率の低いときは
モード遷移時間が長くなり、ヒット率が高くなるとモー
ド遷移時間が短くなる。関数fの変更は、上記5点にお
けるモード遷移時間を変更することで行うことができ
る。The function f is constructed so that it can be given from the host side, and transition time control suitable for the system used can be performed. For example, the function f in FIG. 7 has a mode transition time of 300 seconds and a hit rate of 2 when the hit rate is 0%.
5 points, the mode transition time is 295 seconds, the hit rate is 50%, the mode transition time is 280 seconds, the hit rate is 75%, the mode transition time is 180 seconds, and the hit rate is 100%, the mode transition time is 0 seconds. It is an interpolation curve that passes through. When the function f is defined as shown in FIG. 7, the mode transition time becomes long when the hit rate is low, and the mode transition time becomes short when the hit rate is high. The function f can be changed by changing the mode transition time at the above five points.
【0065】この第2の方法におけるコントロ−ラ12
0の動作を図8のフローチャートを用いてさらに詳細か
つ具体的に説明する。The controller 12 in this second method
The operation of 0 will be described in more detail and specifically with reference to the flowchart of FIG.
【0066】ホストからリード命令が来る(ステップ7
60)と、コントロ−ラ120はキャッシュがヒットし
たか否かを判定する(ステップ762)。キャッシュリ
ードヒットの場合、キャッシュ300からデータを読み
出して転送させる(ステップ764)とともに、規定値
保持部210に格納されているヒット回数等をインクリ
メントする(ステップ765)。A read command comes from the host (step 7)
60), the controller 120 determines whether the cache is hit (step 762). In the case of a cache read hit, the data is read from the cache 300 and transferred (step 764), and the number of hits and the like stored in the specified value holding unit 210 is incremented (step 765).
【0067】ステップ762において、キャッシュリー
ドミスであった場合には、続いて、スピンドルモータ5
20の回転チェックを行う(ステップ770)。スピン
ドルモータが回転している場合(すなわち、通常モ−ド
である場合)は、磁気記録円板510からデータを読み
出して、該デ−タを転送する(ステップ772)。一
方、スピンドルモータ520が停止している場合(すな
わち、低消費電力モ−ドである場合)は、該スピンドル
モータ520を起動(ステップ780)し、定常回転に
なるのを待つ(ステップ782)。そして、定常回転に
達した後、磁気記録円板510からデータを読み出して
転送させる(ステップ784)。If there is a cache read miss in step 762, then the spindle motor 5
20 rotation checks are performed (step 770). When the spindle motor is rotating (that is, in the normal mode), the data is read from the magnetic recording disk 510 and the data is transferred (step 772). On the other hand, when the spindle motor 520 is stopped (that is, in the low power consumption mode), the spindle motor 520 is activated (step 780) and waits for steady rotation (step 782). Then, after the steady rotation is reached, the data is read from the magnetic recording disk 510 and transferred (step 784).
【0068】ステップ765、772、784いずれの
場合とも、その後は、アクセス回数のインクリメント
(ステップ766)を行った後、ヒット率Rを演算する
(ステップ767)。そして、関数f(R)に従って、
現在のヒット率Rに対応したモード遷移時間を求め、こ
れをタイマに設定して(ステップ768)、処理を終了
する(ステップ769)。In any of steps 765, 772, and 784, after that, the number of accesses is incremented (step 766) and then the hit ratio R is calculated (step 767). Then, according to the function f (R),
The mode transition time corresponding to the current hit rate R is calculated, this is set in the timer (step 768), and the processing is ended (step 769).
【0069】なお、この後は、所定のタイミングで、ス
テップ790乃至ステップ798として示したタイマ割
り込みが発生する。After that, the timer interrupt shown in steps 790 to 798 is generated at a predetermined timing.
【0070】タイマ割り込みが発生すると(ステップ7
90)、タイマの値を確認する(ステップ791)。タ
イマのカウント値が0であれば(すなわち、ステプ76
8で設定したモ−ド遷移時間が経過していれば)、スピ
ンドルモータ520を停止する(ステップ794)。さ
らに、不用部分の回路(位置決め制御回路140と、ス
ピンドルモータ制御回路150と、R/W回路130
等)を固有省電力モ−ドとする(ステップ796)。When a timer interrupt occurs (step 7)
90) and confirm the value of the timer (step 791). If the count value of the timer is 0 (that is, step 76
If the mode transition time set in 8 has elapsed), the spindle motor 520 is stopped (step 794). Further, circuits of unnecessary parts (positioning control circuit 140, spindle motor control circuit 150, R / W circuit 130)
Etc.) as a unique power saving mode (step 796).
【0071】動作モ−ド制御の第3の方法を説明する。A third method of controlling the operation mode will be described.
【0072】この方法は、上述の第1の方法を基本とし
つつ、その時々のヒット率だけではなく、それ以前のヒ
ット率をも用いてディスク装置の動作モードを制御する
ものである。本実施例においては、ヒット率の現時点で
の傾きΔRと、現時点でのヒット率Rとを用いて制御を
行う。なお、ここでいうヒット率およびその傾きΔRThis method is based on the first method described above, and controls the operation mode of the disk device by using not only the hit rate at that time but also the hit rate before that. In the present embodiment, control is performed using the current slope ΔR of the hit rate and the current hit rate R. The hit ratio and its slope ΔR
【0073】は、下記Is the following
【数2】、[Equation 2],
【数3】で定義されるものである。It is defined by
【0074】[0074]
【数2】(ヒット率R)={(キャッシュリードヒット
回数 )/(リード回数)}×100[Equation 2] (hit rate R) = {(cache read hit count) / (read count)} × 100
【0075】[0075]
【数3】ΔR=dR/dt コントロ−ラ120は、最新のヒット率をヒット率保持
部200に格納する際に、少なくとも現時点を基準とし
た過去一定範囲のヒット率の値を消去することなく残
す。また、現時点から過去一定範囲におけるヒット率か
ら、ヒット率の変化の現時点での傾きΔRを算出する。
なお、過去一定範囲とは、該傾きを算出するに十分な範
囲であれば特に限定されない。ΔR = dR / dt When the latest hit rate is stored in the hit rate holding unit 200, the ΔR = dR / dt controller 120 does not erase at least the value of the hit rate in the past certain range based on the present time. leave. Further, the slope ΔR of the change in the hit rate at the present time is calculated from the hit rate in a certain range in the past from the present time.
The past fixed range is not particularly limited as long as it is a range sufficient to calculate the inclination.
【0076】そして、コントロ−ラ120は、現在のヒ
ット率と傾きΔRとの両方を考慮して、動作モ−ドを決
定する。傾きΔRがマイナスの時(つまり、ヒット率が
低下する傾向にある時)は、キャッシュリードミスが連
続して起こっていると考えることができる。従って、こ
の場合には、ヒット率がスピンドル停止規定値以上であ
っても、コントロ−ラ120はスピンドルモータ520
を停止させることなく、傾きΔRが0近くまで大きくな
るまでスピンドルモータ520を回転し続ける(つま
り、通常モ−ドを維持する)。一方、傾きΔRが0ある
いは正である時(つまり、ヒット率が現状維持あるいは
上昇する傾向にあるとき)には、ヒット率がスピンドル
停止規定値以上となっていれば、原則(上記第1の方
法)どおり、スピンドルモ−タ520を停止する等して
低消費電力モ−ドに移行する。Then, the controller 120 determines the operation mode in consideration of both the current hit rate and the slope ΔR. When the slope ΔR is negative (that is, when the hit rate tends to decrease), it can be considered that cache read misses occur continuously. Therefore, in this case, even if the hit rate is equal to or higher than the spindle stop specified value, the controller 120 causes the spindle motor 520 to
The spindle motor 520 continues to rotate (that is, the normal mode is maintained) until the inclination ΔR becomes close to 0 without stopping. On the other hand, when the slope ΔR is 0 or a positive value (that is, when the hit rate tends to be maintained or rises), if the hit rate is equal to or higher than the spindle stop specified value, in principle (the above first Method), the spindle motor 520 is stopped, and the mode is changed to the low power consumption mode.
【0077】なお、現時点でのヒット率Rがスピンドル
モ−タ停止規定値よりも小さい場合には、動作モ−ド制
御に際して傾きΔRの値を考慮することはなく、常に、
通常モ−ドとする。When the hit rate R at the present time is smaller than the specified value for stopping the spindle motor, the value of the inclination .DELTA.R is not taken into consideration in the operation mode control.
Normal mode.
【0078】動作モ−ド制御の第4の方法を説明する。A fourth method of controlling the operation mode will be described.
【0079】この方法は、上述の第2の方法を基本とし
つつ、その時のヒット率だけではなく、現時点よりも前
のヒット率をも用いてディスク装置の動作モードを制御
するものである。本実施例においては、ヒット率の現時
点での傾きΔRと、現時点でのヒット率Rとを用いて制
御を行う。なお、ヒット率の現時点での傾きΔR等のThis method is based on the second method described above, and controls the operation mode of the disk device by using not only the hit rate at that time but also the hit rate before the current time. In the present embodiment, control is performed using the current slope ΔR of the hit rate and the current hit rate R. Note that the current slope of the hit rate, ΔR, etc.
【0080】定義は、上述のThe definition is as described above.
【数2】、[Equation 2],
【数3】に示したとおりである。As shown in [Equation 3].
【0081】この方法では、モード遷移時間の関数g
を、ヒット率Rおよび傾きΔRの関数として定義する。
該関数gの一例を図9に示す。In this method, the function g of the mode transition time is
Is defined as a function of the hit rate R and the slope ΔR.
An example of the function g is shown in FIG.
【0082】上述したとおり、傾きΔRがマイナスの傾
きのとき(つまり、ヒット率が低下する傾向にある時)
は、キャッシュリードミスが連続して起こっていると考
えることができる。従って、該関数gは、ヒット率Rが
大きいほど、モ−ド遷移時間が短くなるように定義され
ている。また、傾きΔRが小さいほど(つまり、ヒット
率低化の傾向が強いほど)、モ−ド遷移時間が長くなる
ように定義されている。従って、この第4の方法では、
ヒット率Rが同じであっても、その時の傾きΔRが小さ
いほど、モ−ド遷移時間が長くなる。As described above, when the slope ΔR is a negative slope (that is, when the hit rate tends to decrease).
Can be considered as consecutive cache read misses. Therefore, the function g is defined such that the larger the hit rate R, the shorter the mode transition time. Further, it is defined that the mode transition time becomes longer as the gradient ΔR becomes smaller (that is, the tendency of lowering the hit rate becomes stronger). Therefore, in this fourth method,
Even if the hit rate R is the same, the smaller the gradient ΔR at that time, the longer the mode transition time.
【0083】なお、該モ−ド遷移時間を示す曲線(すな
わち、関数g)は、傾きΔRの値に応じて無段階に変化
させるものであっても、あるいは、段階的に変化させる
ものであって構わない。The curve showing the mode transition time (that is, the function g) may be changed steplessly or stepwise according to the value of the gradient ΔR. I don't care.
【0084】以上説明してきたとおり、本実施例におい
ては、ヒット率(つまり、スピンドルモ−タ520の再
起動の可能性)に応じて動作モ−ドを制御するため、シ
ステムスル−プットの劣化を最小限に抑えつつ、消費電
力を低減することができる。ところで、このようなヒッ
ト率を用いた動作モ−ドの制御を行う場合、ディスク装
置の電源のOFFに伴ってキャッシュ300の内容やヒ
ット率の値が消失するのでは、電源をON/OFFする
度ごとに、ヒット率が0の状態からスタ−トすることに
なってしまう。これでは、過去における経験(例えば、
キャッシュに格納されているデ−タ、ヒット率等)を十
分に生かすことができないばかりでなく、通常モ−ドで
動作する時間が必要以上に長くなり、消費電力の抑制と
いう効果を十分に発揮できなくなる。従って、本実施例
においては、この問題を解決すべく、電源がOFFにさ
れてもキャッシュ300の内容やヒット率等を保持しつ
づける機能をも備えている。以下、この機能について、
電源ON/OFF時にコントロ−ラ120が実行する処
理を中心として説明する。As described above, in this embodiment, since the operation mode is controlled according to the hit rate (that is, the possibility of restarting the spindle motor 520), the system throughput is deteriorated. It is possible to reduce power consumption while minimizing the above. By the way, when controlling the operation mode using such a hit ratio, the contents of the cache 300 and the value of the hit ratio disappear when the power of the disk device is turned off, so the power is turned on / off. Each time, the start rate starts from 0. This is a matter of past experience (eg
Not only can the data stored in the cache, hit rate, etc.) not be fully utilized, but the operation time in normal mode will be longer than necessary, and the effect of suppressing power consumption will be fully exerted. become unable. Therefore, in order to solve this problem, the present embodiment also has a function of keeping the contents of the cache 300, the hit rate, etc. even when the power is turned off. Below, about this function,
The processing executed by the controller 120 when the power is turned on / off will be mainly described.
【0085】電源OFF時、コントロ−ラ120は、キ
ャッシュ300内のデータを磁気記録円板510上の特
定のエリアに記録させる。このとき、ヒット率保持部2
00のアクセス回数、ヒット回数等の値も磁気記録円板
510上、もしくは、不揮発性メモリ310に保持させ
る。そして、次の電源ON時には、電源OFF時に磁気
記録円板510上の特定のエリアに記録した前回使用し
たキャッシュ内のデータをキャッシュ300に復元す
る。さらに、磁気記録円板510上、もしくは、不揮発
性メモリ310に保持された前回電源OFF時における
アクセス回数、ヒット回数をヒット率保持部200に戻
す。When the power is turned off, the controller 120 records the data in the cache 300 in a specific area on the magnetic recording disk 510. At this time, the hit rate holding unit 2
Values such as the number of accesses of 00 and the number of hits are also held on the magnetic recording disk 510 or in the non-volatile memory 310. Then, when the power is turned on next time, the data in the previously used cache recorded in the specific area on the magnetic recording disk 510 when the power is turned off is restored to the cache 300. Further, the number of accesses and the number of hits held on the magnetic recording disk 510 or in the non-volatile memory 310 at the previous power-off time are returned to the hit rate holding unit 200.
【0086】このような電源ON/OFFシーケンスを
用いることで、キャッシュのヒット率を保つと共に、電
源投入時から低消費電力モ−ドを十分に活用することが
できる。By using such a power ON / OFF sequence, the cache hit rate can be maintained and the low power consumption mode can be fully utilized even after the power is turned on.
【0087】例えば、キャッシュ300の容量が4Mバ
イトの時、磁気記録円板の最内周に16Mバイト領域を
確保する。電源OFF時には、キャッシュ300内のデ
ータを、この16Mバイトの領域に同じデータを4回記
録する。なお、同じデ−タを複数回記録するのは、デー
タの信頼性を向上させるためである。For example, when the capacity of the cache 300 is 4 Mbytes, a 16 Mbyte area is secured on the innermost circumference of the magnetic recording disk. When the power is turned off, the same data in the cache 300 is recorded four times in this 16 Mbyte area. The same data is recorded a plurality of times in order to improve the reliability of data.
【0088】また、異常な電源OFF(例えば停電)の
ときには、キャッシュ300内のデ−タを磁気記録円板
510等に記録することができない可能性がある。従っ
て、異常電源OFFの場合には、キャッシュ300の内
容と、ヒット率とを保持(更新)しない。よって、次回
の電源ON時には、一番最近に正常な電源OFFの行え
た時のキャッシュ300の内容と、そのときのアクセス
回数、ヒット回数を復元する。Further, when the power is abnormally turned off (for example, power failure), there is a possibility that the data in the cache 300 cannot be recorded on the magnetic recording disk 510 or the like. Therefore, when the power is abnormally turned off, the contents of the cache 300 and the hit rate are not retained (updated). Therefore, when the power is turned on next time, the contents of the cache 300 when the power was turned off most recently and the access count and hit count at that time are restored.
【0089】なお、ここでは特に述べなかったが、規定
値保持部210に格納されている内容についても同様
に、電源OFF時には保持するようにしてもよい。Although not particularly described here, the contents stored in the specified value holding unit 210 may be held similarly when the power is turned off.
【0090】本実施例のさらに別の機能について説明す
る。Still another function of this embodiment will be described.
【0091】上述の低消費電力モ−ドでは、スピンドル
モータ520は停止し、キャッシュ300からのデータ
の読み出し、及び、キャッシュ300へのデータの書き
込みだけができる状態になっている。従って、該低消費
電力モ−ドにおける動作中(すなわち、スピンドルモー
タの停止時)にデータの書き込み命令が来ると、まず、
スピンドルモータ520を起動し、スピンドルモータ5
20が定常回転に達した時点でデータを記録することと
なる。このため、スピンドルモータ520が定常回転に
なるまでの時間、スループットが低下することになる。In the low power consumption mode described above, the spindle motor 520 is stopped and only the data can be read from the cache 300 and written to the cache 300. Therefore, when a data write command comes during the operation in the low power consumption mode (that is, when the spindle motor is stopped), first,
The spindle motor 520 is started and the spindle motor 5
Data will be recorded when 20 reaches steady rotation. For this reason, the throughput is reduced until the spindle motor 520 is steadily rotated.
【0092】そこで、本実施例では、ライト動作時のス
ル−プットの低下をも防ぐ機能を有している。以下にお
いては、該機能について説明する。Therefore, the present embodiment has a function of preventing a decrease in throughput during a write operation. The function will be described below.
【0093】コントロ−ラ120は、スピンドルモータ
520を停止した時点で、キャッシュ300内に、揮発
性メモリ310の容量以下のライトキャッシュを併設す
る。スピンドルモ−タ520の停止時、あるいは、回転
してはいるもののすぐに書き込みができる回転状態にな
い場合(例えば、回転が定常的になっていない場合)に
ライト命令が来ると、まず、このライトキャッシュ内に
データを書き込み、該ライト命令の処理を終了したこと
とする。このように、磁気記録円板510への書き込み
データを、一時的に、ライトキャッシュに保持すること
で、スピンドルモータ520の起動なしに(あるいは、
スピンドルモ−タ520の回転が所定の回転状態に達す
るのを待つことなく)、ライト命令を処理することがで
きる。When the spindle motor 520 is stopped, the controller 120 installs a write cache having a capacity equal to or less than that of the volatile memory 310 in the cache 300. When a write command comes when the spindle motor 520 is stopped, or when the spindle motor 520 is rotating but is not in a rotation state in which writing can be performed immediately (for example, the rotation is not constant), It is assumed that the data is written in the write cache and the processing of the write instruction is completed. Thus, by temporarily holding the write data to the magnetic recording disk 510 in the write cache, the spindle motor 520 is not activated (or
The write command can be processed (without waiting for the rotation of the spindle motor 520 to reach a predetermined rotation state).
【0094】ライトキャッシュ内に一時格納された書き
込みデータは、次の4つのタイミングで磁気記録円板5
10上に記録される。The write data temporarily stored in the write cache is stored in the magnetic recording disk 5 at the following four timings.
Recorded on 10.
【0095】第1のタイミングは、キャッシュリードミ
スが発生し、スピンドルモータ520が起動された時で
ある。キャッシュリードミスが発生すると、コントロー
ラ120はスピンドルモータ520を起動して、データ
を読み出す。その後、命令の合間を利用して、ライトキ
ャッシュ内のデータを磁気記録円板510上に記録す
る。つまり、なんらかの要因により、スピンドルモータ
520を起動した時点でライトキャッシュ内のデータを
磁気記録円板510に書き込む方式である。The first timing is when a cache read miss occurs and the spindle motor 520 is activated. When a cache read miss occurs, the controller 120 activates the spindle motor 520 to read the data. After that, the data in the write cache is recorded on the magnetic recording disk 510 by using the interval between the commands. In other words, it is a method of writing the data in the write cache to the magnetic recording disk 510 when the spindle motor 520 is activated for some reason.
【0096】第2のタイミングは、ライトキャッシュが
いっぱいになったときである。コントロ−ラ120は、
ライトキャッシュがいっぱいになった時点でスピンドル
モータ520を起動して、ライトキャッシュ内のデータ
を磁気記録円板510上に記録する。The second timing is when the write cache is full. The controller 120 is
When the write cache becomes full, the spindle motor 520 is activated to record the data in the write cache on the magnetic recording disk 510.
【0097】第3のタイミングは、ホストからの命令に
よる。ライトキャッシュフラッシュ命令を用意してお
く。ホストからこのコマンドが発行されると、スピンド
ルモータ520を起動して、ライトキャッシュ内のデー
タを磁気記録円板510上に記録する。The third timing depends on a command from the host. Prepare a write cache flush instruction. When this command is issued from the host, the spindle motor 520 is activated and the data in the write cache is recorded on the magnetic recording disk 510.
【0098】第4のタイミングは、電源OFF時であ
る。電源OFFには、上述したとおりキャッシュ300
内のデータの保存が行われる。このとき、ライトキャッ
シュ内のデータも磁気記録円板510上に記録する。The fourth timing is when the power is off. When turning off the power, the cache 300 is used as described above.
The data in is stored. At this time, the data in the write cache is also recorded on the magnetic recording disk 510.
【0099】また、上記以外の特別な場合として、書き
込みたいファイルの大きさが比較的大きな時(例えば、
書き込みたいファイルの大きさがキャッシュ容量の50
%以上の場合)には、ライトキャッシュを利用せず、そ
の時点でスピンドルモータ520を起動し磁気記録円板
510に直接、記録する。また、この時、ライトキャッ
シュ内にあるデータもあわせて磁気記録円板510に書
き込んでしまう。このようにすることで、キャッシュ3
00を効率よく用いることができ、また、スピンドルモ
−タ520の起動回数を減らすことができる。As a special case other than the above, when the size of the file to be written is relatively large (for example,
The size of the file you want to write is 50 of the cache capacity.
%), The write cache is not used and the spindle motor 520 is activated at that time to directly record on the magnetic recording disk 510. At this time, the data in the write cache is also written in the magnetic recording disk 510. By doing this, cache 3
00 can be used efficiently, and the number of times of starting the spindle motor 520 can be reduced.
【0100】先に述べたように、ライトキャッシュを用
いる場合、ライトキャッシュの容量は、不揮発性メモリ
310の容量で決定される。これは、非常時の電源遮断
に備えるためである。例えば、停電などが発生し電源が
遮断されると、ライトキャッシュ内のデータが消えてし
まう。これでは、ユーザデータが消滅してしまい、磁気
ディスク装置の信頼性がなくなってしまう。従って、本
実施例においては、このような事態に対処するため電力
供給コントローラ400を介して、2次電力供給源45
0を設けている。As described above, when the write cache is used, the capacity of the write cache is determined by the capacity of the non-volatile memory 310. This is to prepare for power shutdown in an emergency. For example, when the power is cut off due to a power failure or the like, the data in the write cache is lost. In this case, the user data disappears and the reliability of the magnetic disk device is lost. Therefore, in this embodiment, in order to deal with such a situation, the secondary power supply source 45 is supplied via the power supply controller 400.
0 is set.
【0101】非常時、電力供給コントローラ400は、
コントローラ120、キャッシュ300、不揮発性メモ
リ310等、必要最小限の部分にのみ電力を供給する。
このとき、電力は2次電力供給源450から電力供給コ
ントローラ400を介して供給される。この状態におい
て、コントローラ120はライトキャッシュ内のデータ
を不揮発性メモリ310に保存する。従って、2次電力
供給源450は、この処理を行えるだけの容量を持って
いればよい。In an emergency, the power supply controller 400
Power is supplied only to the minimum necessary parts such as the controller 120, the cache 300, and the non-volatile memory 310.
At this time, electric power is supplied from the secondary power supply source 450 via the power supply controller 400. In this state, the controller 120 saves the data in the write cache in the non-volatile memory 310. Therefore, the secondary power supply source 450 only needs to have a capacity capable of performing this processing.
【0102】但し、電源供給が確実な場合や、ノートパ
ソコンのようにホストシステムがバッテリ駆動されてい
る場合には、不揮発性メモリ310は不用となる。従っ
て、ライトキャッシュの容量は、キャッシュ300の容
量が上限となる。また、2次電力供給源450の電力容
量および不揮発性メモリ310の記憶容量に余裕が有り
さえすれば、キャッシュ300の内容すべてと、ヒット
率保持部200、規定値保持部210内のデ−タとにつ
いても不揮発性メモリ310に格納するようにしてもよ
い。さらには、スピンドルモ−タ520を起動し、直接
磁気記録円板510に書き込むようにしてもよく、この
場合には、不揮発性メモリ310は不要になる。However, the nonvolatile memory 310 is unnecessary when the power supply is reliable or when the host system is driven by a battery like a notebook computer. Therefore, the capacity of the write cache is limited to the capacity of the cache 300. Further, as long as the power capacity of the secondary power supply source 450 and the storage capacity of the non-volatile memory 310 have a margin, the entire contents of the cache 300 and the data in the hit rate holding unit 200 and the specified value holding unit 210 are stored. Also, and may be stored in the non-volatile memory 310. Further, the spindle motor 520 may be activated to directly write on the magnetic recording disk 510, and in this case, the non-volatile memory 310 becomes unnecessary.
【0103】以上説明したとおり、本実施例において
は、キャッシュヒット率などを用いて動作モ−ドの制御
を行うため、低消費電力モ−ドを使用することに伴うス
ル−プットの低下を最小限に抑えることができる。ま
た、ライト動作時におけるスル−プットの低化をも防ぐ
ことができる。さらには、停電などの場合でも、デ−タ
を保護することができる。この他にも、スピンドルモ−
タ520の再起動回数の低減などにより、機構系の使用
時間を減らし装置の寿命を伸ばすこともできる。As described above, in this embodiment, since the operation mode is controlled by using the cache hit rate or the like, the deterioration of the throughput due to the use of the low power consumption mode is minimized. You can keep it to the limit. It is also possible to prevent the throughput from being lowered during the write operation. Further, the data can be protected even in the case of a power failure. In addition to this, spindle mode
By reducing the number of restarts of the controller 520, the operating time of the mechanical system can be reduced and the life of the device can be extended.
【0104】なお、上記実施例においては、動作モ−ド
として”通常モ−ド”と”低消費電力モ−ド”との二つ
を有していたが、動作モ−ドの種類を増やしさらに決め
細かな制御を行ってもよい。この場合には、動作モ−ド
を定義するための規定値(例えば、上述のスピンドルモ
−タ停止規定値)を複数備えることとなる。さらに、ス
ピンドルモ−タ520などの各部の固有動作モ−ドにつ
いても、”通常モ−ド”、”固有省電力モ−ド”だけで
はなく、さらに多種類の固有動作モ−ドを規定すれば、
より決め細かな電力制御が可能になる。さらには、動作
モ−ドの変更ではなく、各部への電力供給そのものをO
N/OFFする構成としても構わない。In the above embodiment, there are two operation modes, "normal mode" and "low power consumption mode", but the number of operation modes is increased. Further, fine control may be performed. In this case, a plurality of prescribed values (for example, the spindle motor stop prescribed value described above) for defining the operation mode are provided. Further, with respect to the peculiar operation mode of each part such as the spindle motor 520, not only the "normal mode" and the "specific power saving mode" but also more kinds of peculiar operation modes are specified. If
It enables more precise power control. Furthermore, instead of changing the operation mode, the power supply itself to each part
The configuration may be N / OFF.
【0105】上記実施例においては、ヒット率の演算や
動作モ−ド選択等の本発明の主な機能はコントロ−ラ1
20が受け持っていた。しかし、本発明の具体的構成は
これに限定されるものではなく、上記演算等を各部で分
散して行う構成としても構わない。このような例を第2
の実施例として説明する。In the above embodiment, the main functions of the present invention such as the calculation of the hit ratio and the selection of the operation mode are the controller 1.
20 was in charge. However, the specific configuration of the present invention is not limited to this, and the above-described calculation and the like may be dispersed in each unit. Second such example
Will be described as an example.
【0106】該第2の実施例は、本発明の機能の一部を
キャッシュコントロールLSIに割り当てたものであ
る。本実施例の全体構成およびキャッシュコントロール
LSIの位置付けを図10に示す。In the second embodiment, a part of the functions of the present invention is assigned to the cache control LSI. FIG. 10 shows the overall configuration of this embodiment and the position of the cache control LSI.
【0107】キャッシュコントロールLSI600は、
インタフェースコントローラ100と、ハードディスク
コントローラ(HDC)1100の間に位置付けられ
る。また、キャッシュ300は、キャッシュコントロー
ルLSI600によって管理される。キャッシュコント
ロールLSI600はコントローラ1200によって制
御される。The cache control LSI 600 is
It is located between the interface controller 100 and a hard disk controller (HDC) 1100. The cache 300 is managed by the cache control LSI 600. The cache control LSI 600 is controlled by the controller 1200.
【0108】本実施例のコントロ−ラ1200は、該デ
ィスク装置の動作モ−ドを定義した、動作モ−ド定義テ
−ブルを備えている。そして、ヒット率演算部670等
の算出したヒット率等の値に基づいて、電力制御コント
ロ−ラ400に指令を出し、該ディスク装置の動作モ−
ドを制御変更させる機能を有している。ただし、本実施
例のコントロ−ラ1200は、上記実施例のコントロ−
ラ120とは異なり、キャッシュヒットミス判定を行う
機能、ヒット率の演算機能、ヒット率の格納機能等を備
えていない。本実施例においては、これらの機能は、キ
ャッシュコントロ−ルLSI600が内部に有するヒッ
ト率演算部670、キャッシュコントロ−ル部660、
規定値保持部680等により行われる。The controller 1200 of this embodiment is provided with an operation mode definition table which defines the operation mode of the disk device. Then, based on the value of the hit rate or the like calculated by the hit rate calculation unit 670 or the like, a command is issued to the power control controller 400, and the operation mode of the disk device is controlled.
It has a function to control and change the mode. However, the controller 1200 of this embodiment is the same as the controller 1200 of the above embodiment.
Unlike the cache 120, it does not have a function for determining a cache hit miss, a function for calculating a hit rate, a function for storing a hit rate, and the like. In the present embodiment, these functions are performed by the hit ratio calculation unit 670, the cache control unit 660, which the cache control LSI 600 internally has.
This is performed by the prescribed value holding unit 680 and the like.
【0109】電力供給コントロ−ラ400、インタフェ
−スコントロ−ラ100、キャッシュ300、R/W回
路130、この他この図には記されていない部分につい
ては、基本的には、図1と同様の機能を有している。The power supply controller 400, the interface controller 100, the cache 300, the R / W circuit 130, and other parts not shown in this figure are basically the same as those in FIG. It has a function.
【0110】キャッシュコントロールLSI600の内
部構成を、図11に示す。キャッシュコントロールLS
IはDMA620によって、インタフェースコントロー
ラ100と接続される。キャッシュコントロールLSI
はDMA630によって、ハードディスクコントローラ
(HDC)110と接続される。DMA620とDMA
630は、転送速度の違いを吸収するため、それぞれ、
FIFO(FirstIn First Out Me
mory)625,FIFO635を有する。 キャッ
シュコントロール部660は、キャッシュインタフェー
ス610を介して、キャッシュ300を制御している。
また、該キャッシュコントロール部660は、データの
置換アルゴリズム、データの排他アルゴリズムを実行す
る機能を有している。さらには、上記実施例においては
コントロ−ラ120が行っていたキャッシュヒットミス
判定等を行う機能を有している。FIG. 11 shows the internal structure of the cache control LSI 600. Cash control LS
I is connected to the interface controller 100 by the DMA 620. Cache control LSI
Is connected to the hard disk controller (HDC) 110 by the DMA 630. DMA620 and DMA
Since 630 absorbs the difference in transfer speed,
FIFO (FirstIn First Out Me)
mary) 625, FIFO 635. The cache control unit 660 controls the cache 300 via the cache interface 610.
The cache control unit 660 has a function of executing a data replacement algorithm and a data exclusion algorithm. Further, the controller 120 has a function of performing cache hit / miss determination, which is performed by the controller 120 in the above embodiment.
【0111】ヒット率演算部670は、ホスト側からの
アクセスのたびにキャッシュヒット率Rやヒット率の傾
きΔRを演算し、その値を保持する機能を有する。さら
には、モ−ド遷移時間等をも決定する機能を有してい
る。該機能は上記実施例においては、コントロ−ラ12
0、ヒット率保持部200等が行っていたものである。The hit ratio calculation unit 670 has a function of calculating the cache hit ratio R and the slope ΔR of the hit ratio for each access from the host side, and holding the value. Furthermore, it also has a function of determining the mode transition time and the like. The function is the controller 12 in the above embodiment.
0, the hit rate holding unit 200 and the like.
【0112】規定値保持部680は、上述の実施例にお
ける規定値保持部210に相当するものである。The specified value holding unit 680 corresponds to the specified value holding unit 210 in the above-described embodiment.
【0113】ここで挙げた各部の機能はその概要を述べ
たに過ぎず、その詳細等は、4種類ある動作モ−ド制御
方法のうちいずれを使用するかによって異なる。また、
各部はここで挙げた機能のすべてを有するとは限らな
い。例えば、上記動作モ−ド制御方法として、上記第1
の方法を使用する場合には、ヒット率の傾きΔRを算出
する機能は有さないことはいうまでもない。The functions of the respective parts mentioned here are merely outlines, and the details thereof differ depending on which of the four kinds of operation mode control methods is used. Also,
Each unit may not have all of the functions listed here. For example, as the operation mode control method, the first
It goes without saying that the method of (1) does not have the function of calculating the slope ΔR of the hit rate.
【0114】なお、特許請求の範囲において言う、”入
出力手段”は、主に、インタフェ−スコントロ−ラ10
0によって実現されるものである。”主記憶読み出し手
段”、”手記憶書き込み手段”は、主にR/W回路13
0等によって実現されるものである。”キャッシュ管理
手段”とは、主に、キャッシュコントロ−ルユニット6
60によって実現されるものである。”アクセス回数保
持手段”、”ヒット回数保持手段””ヒット率保持手
段””ヒット率算出手段”、”判定手段”、”動作モ−
ド制御手段”、”計時手段””制御手段”は、ヒット率
演算部670、コントロ−ラ1200等によって実現さ
れるものである。”規定値保持手段”とは、規定値保持
部680によって実現されるものである。”デ−タ保護
手段”とは、主に、この図には示していない不揮発性メ
モリ(あるいは磁気記録円板510)等によって実現さ
れるものである。モ−ド遷移時間保持手段は磁気記録円
板510によって実現されるものである。ただし、各部
は密接に連携しつつ動作するものであるため、特許請求
の範囲との上述した対応関係は、厳密なものではない。[0114] The "input / output means" referred to in the claims is mainly the interface controller 10.
It is realized by 0. The “main memory reading means” and the “hand memory writing means” mainly include the R / W circuit 13.
It is realized by 0 or the like. The "cache management means" mainly refers to the cache control unit 6
It is realized by 60. "Access count holding means", "hit count holding means", "hit rate holding means", "hit rate calculation means", "determination means", "operation mode"
The "control means" and the "timer means" and the "control means" are realized by the hit rate calculating section 670, the controller 1200, etc. The "specified value holding means" is realized by the specified value holding section 680. The "data protection means" is mainly realized by a non-volatile memory (or magnetic recording disk 510) or the like not shown in this figure. The time holding means is realized by the magnetic recording disk 510. However, since the respective parts operate in close cooperation, the above-mentioned correspondence with the claims is not strict. .
【0115】リード動作の概要について説明する。イン
タフェースコントローラ100を介してホストからリー
ド命令が来ると、キャッシュコントロール部660はキ
ャッシュ300内に目的のデータがあるかヒットミス判
定を行う。またこれと同時に、ヒット率演算部670は
ヒット率を求めてこれを保持する。The outline of the read operation will be described. When a read command is received from the host via the interface controller 100, the cache control unit 660 determines whether there is target data in the cache 300 or not. At the same time, the hit rate calculation unit 670 obtains and holds the hit rate.
【0116】キャッシュリードヒットの場合、DMA6
20がキャッシュ300から目的のデータを読み出し
て、インタフェースコントローラ100に転送する。In case of cache read hit, DMA6
20 reads the target data from the cache 300 and transfers it to the interface controller 100.
【0117】キャッシュリードミスの場合、割り込みコ
ントローラ650からコントローラ1200に対して、
キャッシュリードミスしたことを知らせる。コントロー
ラ1200はこの割り込み信号を受け取ると、ハードデ
ィスクコントローラ1100に磁気記録円板510
(注:図10には示していない)からのデータの読み出
しを命令する。磁気記録円板510から読み出されたデ
ータは、DMA630とDMA620を介してインタフ
ェースコントローラ100に送られると共に、キャッシ
ュインタフェース610を通して、キャッシュ300に
保持される。なお、このときのデータの格納アルゴリズ
ムは、キャッシュコントロール部660が制御する。In the case of a cache read miss, the interrupt controller 650 notifies the controller 1200 of
Notify that a cache read miss has occurred. When the controller 1200 receives this interrupt signal, the hard disk controller 1100 receives the magnetic recording disk 510.
(Note: not shown in FIG. 10) command to read data from. The data read from the magnetic recording disk 510 is sent to the interface controller 100 via the DMA 630 and the DMA 620, and is held in the cache 300 via the cache interface 610. The cache control unit 660 controls the data storage algorithm at this time.
【0118】次に、ライト動作について説明する。イン
タフェースコントローラ100を介してホストからライ
ト命令が来ると、キャッシュコントロ−ルLSI600
はFIFO625を用いてデータを受け取る。そして、
キャッシュ300内にライトキャッシュを設けている場
合には、キャッシュインタフェース610を通じて、該
デ−タを、一旦キャッシュ300に格納する。その後、
上述の4つのタイミングにあわせて、DMA630を通
してハードディスクコントローラ(HDC)1100に
データを転送し、磁気記録円板510にデ−タを書き込
ませる。なお、該ライト動作時に既に磁気記録円板51
0にすぐにデ−タの書き込みが可能な状態にある場合
(つまり、通常モ−ドである場合)には、キャッシュ3
00に書き込むと同時に、磁気記録円板510に書き込
む。この場合、磁気記録円板510にすぐにデ−タを書
き込むにも関わらず、キャッシュ300にもデ−タを格
納するのは、次に該デ−タの読み出しが行われる可能性
に備えるためである。Next, the write operation will be described. When a write command is received from the host via the interface controller 100, the cache control LSI 600
Receives data using FIFO 625. And
When a write cache is provided in the cache 300, the data is temporarily stored in the cache 300 via the cache interface 610. afterwards,
Data is transferred to the hard disk controller (HDC) 1100 through the DMA 630 in accordance with the above four timings, and data is written to the magnetic recording disk 510. Incidentally, at the time of the write operation, the magnetic recording disk 51 has already been
When data can be immediately written to 0 (that is, in normal mode), the cache 3
No. 00 at the same time as writing to the magnetic recording disk 510. In this case, although the data is immediately written to the magnetic recording disk 510, the data is also stored in the cache 300 in order to prepare for the possibility that the data will be read next. Is.
【0119】一方、ライトキャッシュを設けていない場
合には、すぐにハ−ドディスクコントロ−ラ1100に
該デ−タを転送し、磁気記録円板510に書き込む。な
お、このときのデータの格納アルゴリズムは、キャッシ
ュコントロール部660が制御する。On the other hand, when the write cache is not provided, the data is immediately transferred to the hard disk controller 1100 and written on the magnetic recording disk 510. The cache control unit 660 controls the data storage algorithm at this time.
【0120】ユーザは、MPUインタフェース640を
通して、規定値保持部680のデータを書き換えること
ができる。また、MPUインタフェース640を通し
て、ヒット率演算部670内の現在のヒット率を読み出
すこともできる。キャッシュコントロ−ルユニット66
0は、常に現在のヒット率と規定値保持部680の数値
を比較している。現在のヒット率が規定値保持部680
に格納した値(注:スピンドルモ−タ停止規定値に相当
する。)を超えると、キャッシュコントロール部660
は割り込みコントロール部650に割込信号を発生させ
る。この割り込み信号を受けると、コントローラ120
0は上述の実施例と同様の動作モ−ドの制御を行うべ
く、電力供給コントローラ400に命令を発行する。例
えば、低消費電力モ−ドに移行し、スピンドルモータを
停止する。これ以外の動作・処理(例えば、電源ON/
OFF時のヒット率の保存・再生等)についても、実行
する動作主体および具体的動作が上述の実施例とは異な
る部分があるものの、その目的・内容は基本的には上述
の実施例と同様である。ここでは、具体的に説明しなか
った動作についても各部が適宜分担して実行すればよ
い。各動作の目的を達成できさえすれば、動作主体等が
いずれの部分であっても構わない。また、ここでは、上
述した4種類の動作モ−ド制御方法のうち、第1の方法
を前提として動作を述べたが、他の方法(第2〜第4の
動作モ−ド制御方法)を適用する場合も、その基本的動
作の目的・内容は上記第1の実施例において述べた場合
と同様である。ただし、各方法毎に必要とされる機能に
応じて、各部の機能や構成を変更・付加・削除すること
はいうまでもない。The user can rewrite the data in the specified value holding unit 680 through the MPU interface 640. Also, the current hit rate in the hit rate calculation unit 670 can be read through the MPU interface 640. Cash control unit 66
For 0, the current hit rate is always compared with the numerical value of the specified value holding unit 680. The current hit rate is the specified value holding unit 680
When it exceeds the value stored in (Note: Corresponding to the spindle motor stop regulation value), the cache control unit 660.
Causes the interrupt control unit 650 to generate an interrupt signal. Upon receiving this interrupt signal, the controller 120
0 issues a command to the power supply controller 400 to control the operation mode similar to that of the above-described embodiment. For example, the mode is changed to the low power consumption mode and the spindle motor is stopped. Other operations / processing (for example, power ON /
Also in the case of saving / reproducing the hit ratio at the time of OFF), although there is a part in which the operation main body to be executed and the specific operation are different from those in the above-described embodiment, the purpose and content thereof are basically the same as those in the above-mentioned embodiment. Is. Here, each unit may appropriately share and execute an operation not specifically described. As long as the purpose of each operation can be achieved, the operation subject etc. may be any part. Further, here, the operation is described on the premise of the first method among the above-mentioned four kinds of operation mode control methods, but other methods (second to fourth operation mode control methods) are used. When applied, the purpose and contents of the basic operation are the same as those described in the first embodiment. However, it goes without saying that the functions and configurations of the respective parts are changed / added / deleted according to the functions required for each method.
【0121】なお、この割込みコントロ−ル部650の
発生する割り込み信号を、直接、電力供給コントローラ
400に接続して動作モ−ド制御を行う構成とすれば、
コントロ−ラ1200の負担を軽減することもできる。
ただし、この場合には、上述の動作モ−ド定義テ−ブル
は、電力供給コントロ−ラ400が備えることとなる。
本実施例においても上記第1の実施例と同様に、消費
電力の低減と、スル−プットの低化防止とを両立させる
ことができる。If the interrupt signal generated by the interrupt control unit 650 is directly connected to the power supply controller 400 to control the operation mode,
The burden on the controller 1200 can also be reduced.
However, in this case, the above-mentioned operation mode definition table is included in the power supply controller 400.
Also in this embodiment, similarly to the first embodiment, it is possible to achieve both reduction of power consumption and prevention of lowering of throughput.
【0122】次に、第3の実施例として、本発明をディ
スク装置に接続されるホストコンピュ−タの側と役割を
分担して実現した例を説明する。Next, as a third embodiment, an example in which the present invention is implemented by sharing the role with the host computer side connected to the disk device will be described.
【0123】図12にホストコンピュ−タ2000の内
部構成を示す。FIG. 12 shows the internal structure of the host computer 2000.
【0124】なお、これらの構成は、ハ−ドウエアとし
て実現しても、あるいは、ソフトウエアとして格納しこ
れを実行することにより実現しても構わない。Note that these configurations may be realized as hardware, or may be realized by storing them as software and executing them.
【0125】本実施例のシステムは、ホストコンピュー
タ2000とディスク装置2900をインタフェース2
800で接続した構成からなる。In the system of this embodiment, the interface 2 is provided between the host computer 2000 and the disk device 2900.
It is configured by connecting at 800.
【0126】ホストコンピュ−タ2000は、主記憶2
100と、コマンド実行部2200と、ホストインタフ
ェ−ス部2300とを備えている。The host computer 2000 has a main memory 2
100, a command execution unit 2200, and a host interface unit 2300.
【0127】主記憶2100内には、キャッシュ211
0が設けられている。また、該主記憶2100内には、
ヒット率保持部2120、アクセス回数保持部213
0、ヒット回数保持部2140、規定値保持部215
0、モ−ド記憶部2160も設けられている。これら
は、上記第1の実施例におけるキャッシュ300、ヒッ
ト率保持部200、規定値保持部210に相当するもの
である。The cache 211 is stored in the main memory 2100.
0 is provided. Further, in the main memory 2100,
Hit ratio holding unit 2120, access count holding unit 213
0, hit count holding unit 2140, specified value holding unit 215
0, a mode storage unit 2160 is also provided. These correspond to the cache 300, the hit rate holding unit 200, and the specified value holding unit 210 in the first embodiment.
【0128】モ−ド記憶部2160は、その時点におけ
るディスク装置の動作モ−ドを記憶しておくためのもの
である。該モ−ド記憶部2160の初期値は、ディスク
装置の電源投入時に”通常モ−ド”として初期設定され
る。そして、その後は、ディスク装置2900の動作モ
−ドを変更させる毎に書き替えられるように構成されて
いる。The mode storage unit 2160 is for storing the operation mode of the disk device at that time. The initial value of the mode storage unit 2160 is initialized as "normal mode" when the disk device is powered on. After that, it is rewritten every time the operation mode of the disk device 2900 is changed.
【0129】この他、キャッシュがヒットしたか否かを
判定するキャッシュ有無判定部2210と、ヒット率を
算出するヒット率演算部2220、ヒット率とスピンド
ルモ−タ停止規定値等との比較を行うヒット率判定部2
230、ディスク装置2900に対してモ−ド変更コマ
ンドを発行するモ−ド変更コマンド発行部2240、キ
ャッシュ300を制御するキャッシュコントロ−ル部2
250、ソフトウエアを実行することにより各種の処理
を行うコマンド実行部2200とを含んで構成されてい
る。In addition, the cache presence / absence determining unit 2210 for determining whether or not the cache is hit, the hit ratio calculating unit 2220 for calculating the hit ratio, the hit ratio and the spindle motor stop regulation value are compared. Hit rate determination unit 2
230, a mode change command issuing unit 2240 for issuing a mode change command to the disk device 2900, and a cache control unit 2 for controlling the cache 300.
250, and a command execution unit 2200 that executes various processes by executing software.
【0130】なお、特許請求の範囲第4項および第11
項において言う、”キャッシュ管理手段”とは、主に、
キャッシュコントロ−ル部2250によって実現される
ものである。”アクセス回数保持手段”はアクセス回数
保持部2130、”ヒット回数保持手段”はヒット回数
保持部2140、”ヒット率保持手段”はヒット率保持
部2120によって実現されるものである。”判定手
段”は、主に、キャッシュ有無判定部2210によって
実現されるものである。”ヒット率算出手段”はヒット
率演算部2220によって主に実現されるものであ
る。”動作モ−ド制御手段”は、主に、ヒット率判定部
2230、モ−ド変更コマンド発行部2240、モ−ド
記憶部2160によって実現されるものである。”規定
値保持手段”とは、規定値保持部2150によって実現
されるものである。ただし、各部は密接に連携しつつ動
作するものであるため、特許請求の範囲との上述した対
応関係は、厳密なものではない。また、動作モ−ド制御
の方法として上記4つの方法のうちいずれの方法を使用
するかによって、後述するように構成を変更する必要が
有る。そして、当然ながら、これにともなって特許請求
の範囲との対応関係も変わる部分が有る。Claims 4 and 11
The "cache management means" mentioned in the section is mainly
It is realized by the cash control unit 2250. The “access count holding unit” is realized by the access count holding unit 2130, the “hit count holding unit” is realized by the hit count holding unit 2140, and the “hit ratio holding unit” is realized by the hit ratio holding unit 2120. The “determination means” is mainly realized by the cache presence / absence determination unit 2210. The “hit rate calculation means” is mainly realized by the hit rate calculation unit 2220. The "operation mode control means" is mainly realized by the hit rate determination unit 2230, the mode change command issuing unit 2240, and the mode storage unit 2160. The “specified value holding means” is realized by the specified value holding unit 2150. However, since each unit operates in close cooperation, the above-described correspondence with the claims is not strict. Further, it is necessary to change the configuration as will be described later, depending on which of the above four methods is used as the operation mode control method. And, of course, there is a part in which the correspondence relationship with the claims changes accordingly.
【0131】本実施例の適用の対象となるディスク装置
2900は、該ディスク装置2900の側が複数の動作
モ−ドを有し、ホスト2000からのコマンドにより該
動作モ−ドを変更可能であることを前提とする。このよ
うなディスク装置としては、例えば、PC/AT(PC
/ATはInternational Busines
s Machines Corporationの登録
商標です)インタフェース2800を持つ装置が既にあ
る。従って、ここではその詳細な説明は省略する。The disk device 2900 to which this embodiment is applied has a plurality of operation modes on the side of the disk device 2900, and the operation mode can be changed by a command from the host 2000. Is assumed. As such a disk device, for example, a PC / AT (PC
/ AT is International Busines
s Machines Corporation is a registered trademark) There is already a device with an interface 2800. Therefore, a detailed description thereof will be omitted here.
【0132】なお、本実施例では、第1の実施例と同様
の低消費電力モ−ドと、通常モ−ドとを有するとの前提
のもとで以下の説明を行う。In this embodiment, the following description will be made on the assumption that the low power consumption mode and the normal mode are the same as those in the first embodiment.
【0133】リ−ド動作の概要を説明する。ここでは、
動作モ−ド制御方法として上述の第1の方法を使用した
場合について述べる。The outline of the read operation will be described. here,
The case where the above-mentioned first method is used as the operation mode control method will be described.
【0134】ディスク装置2900へのリ−ド動作が発
生すると、キャッシュ有無判定部2210はキャッシュ
2100内に既にそのデータがあるかを確認する。デ−
タが有ればキャッシュリードヒットとなり、無ければキ
ャッシュリードミスとなる。When a read operation to the disk device 2900 occurs, the cache presence / absence determining unit 2210 confirms whether the data already exists in the cache 2100. De-
If there is a cache read hit, there is a cache read hit, and if there is no cache cache miss.
【0135】ヒット率演算部2220は、逐次、ヒット
率を演算し、キャッシュ部2110に格納する。The hit ratio calculation unit 2220 sequentially calculates the hit ratio and stores it in the cache unit 2110.
【0136】ヒット率判定部2230は、ヒット率があ
らかじめ設定された値(注:この値が、上述のスピンド
ルモ−タ停止規定値に相当する。)よりも高くなると、
その旨をモ−ド変更コマンド発行部2240に伝える。
すると、該モ−ド変更コマンド発行部2240は、ディ
スク装置2900に対して、低消費電力モ−ドに移行す
るようにコマンドを発行する。例えば、ディスク装置2
900がインタフェ−ス2800として、上述のPC/
ATインタフェースを持つ場合には、スタンドバイモ−
ドに遷移させるべく、コマンドE0を発行する。When the hit rate becomes higher than a preset value (Note: this value corresponds to the above spindle motor stop regulation value), the hit rate determination unit 2230 determines that the hit rate is higher than the preset value.
This is notified to the mode change command issuing unit 2240.
Then, the mode change command issuing unit 2240 issues a command to the disk device 2900 so as to shift to the low power consumption mode. For example, the disk device 2
900 is the interface 2800, and the above-mentioned PC /
If you have an AT interface,
The command E0 is issued to make a transition to the mode.
【0137】該モ−ド変更コマンドは、ホストインタフ
ェ−ス2300、インタフェ−ス2800を介してディ
スク装置2900に伝えられる。その結果、ディスク装
置2900は低消費電力モ−ド(注:PC/ATの場合
には、スタンドバイモ−ド)に移行し、スピンドルモー
タは停止される。なお、モ−ド変更コマンドを発行する
ヒット率の高さは、ユーザによってヒット率保持部22
00に設定することとしてもよい。The mode change command is transmitted to the disk device 2900 via the host interface 2300 and the interface 2800. As a result, the disk device 2900 shifts to the low power consumption mode (Note: in the case of PC / AT, the standby mode), and the spindle motor is stopped. The high hit rate for issuing the mode change command depends on the user.
It may be set to 00.
【0138】この処理方法を図13のフローチャートを
用いてさらに詳細に説明する。This processing method will be described in more detail with reference to the flowchart of FIG.
【0139】リード命令が発生すると(ステップ90
0)と、キャッシュ有無判定部2210はキャッシュが
ヒットしたか否かを判定する(ステップ902)。ヒッ
トしている場合には、コマンド実行部2200は、キャ
ッシュ2110内の当該データを読み出して所望の演算
などにおいて使用する(ステップ910)。さらに、コ
マンド実行部2200はアクセス回数保持部2130、
ヒット回数保持部2140に保持されているアクセス回
数、ヒット回数をインクリメントする(ステップ91
2)。続いて、ヒット率演算部2220は、該更新後の
アクセス回数等を用いてヒット率を算出する(ステップ
914)。ヒット率判定部2230は、ヒット率演算部
2220により算出された現在のヒット率が規定値(=
スピンドルモ−タ停止規定値)に達しているか否かを判
定する(ステップ916)。判定の結果、該規定値に達
していなければ、そのまま処理を終了する(ステップ9
99)。 一方、ステップ916において規定値に達し
ていれば、コマンド実行部2220はモ−ド記憶部21
60の内容を確認することにより、ディスク装置290
0の現在の動作モードを確認する(ステップ920)。
その結果、通常モ−ドであれば、モ−ド変更コマンド発
行部2240は低消費電力モ−ドに移るべくディスク装
置2900に対してコマンドを発行し、スピンドルモー
タを停止させる(ステップ922)。なお、この場合、
上述のPC/ATにおいてはスタンドバイモ−ドに移行
させる。そして、処理を終了する(ステップ999)。When a read command is issued (step 90)
0), the cache presence / absence determining unit 2210 determines whether or not the cache is hit (step 902). If there is a hit, the command execution unit 2200 reads the data in the cache 2110 and uses it in a desired operation or the like (step 910). Furthermore, the command execution unit 2200 uses the access count holding unit 2130,
The access count and hit count held in the hit count holding unit 2140 are incremented (step 91).
2). Then, the hit rate calculation unit 2220 calculates the hit rate using the updated access count and the like (step 914). The hit rate determination unit 2230 determines that the current hit rate calculated by the hit rate calculation unit 2220 is a specified value (=
It is determined whether or not the spindle motor stop regulation value) has been reached (step 916). If the result of determination is that the specified value has not been reached, the processing is terminated (step 9).
99). On the other hand, if the specified value is reached in step 916, the command execution unit 2220 determines that the mode storage unit 21
By checking the contents of 60, the disk device 290
The current operation mode of 0 is confirmed (step 920).
As a result, in the normal mode, the mode change command issuing unit 2240 issues a command to the disk device 2900 to shift to the low power consumption mode and stops the spindle motor (step 922). In this case,
In the above-mentioned PC / AT, the mode is changed to the standby mode. Then, the process ends (step 999).
【0140】ステップ902においてキャッシュリード
ミスであった場合は、コマンド実行部2220はモ−ド
記憶部2160を参照してディスク装置2900の現在
の動作モードを確認する(ステップ930)。通常モ−
ドである場合には、磁気記録円板からデータを読み取ら
せて転送させる(ステップ932)。その後、各部は、
アクセス回数等のインクリメント(ステップ934)、
ヒット率の演算(ステップ936)を行い、処理を終え
る(ステップ999)。If the cache read miss is detected in step 902, the command execution part 2220 refers to the mode storage part 2160 to confirm the current operation mode of the disk device 2900 (step 930). Normal mode
If so, the data is read from the magnetic recording disk and transferred (step 932). After that, each part
Increment of the number of accesses (step 934),
The hit ratio is calculated (step 936), and the process ends (step 999).
【0141】一方、ステップ930において、低消費電
力モ−ドである場合、コマンド実行部2200は、ディ
スク装置2900にコマンドを送り、通常モ−ドに移行
させる(ステップ940)。これにより、スピンドルモ
−タの起動などが行われる。なお、上述のPC/ATに
おいては、この場合、アイドルモ−ドに移行させる。On the other hand, if the mode is low power consumption mode in step 930, the command execution section 2200 sends a command to the disk device 2900 to shift to the normal mode (step 940). As a result, the spindle motor is activated. In the above PC / AT, the idle mode is entered in this case.
【0142】そして、ディスク装置が”Ready”状
態になり(ステップ942)、ディスク装置2900が
データを転送してくるのを待つ(ステップ944)。そ
の後、アクセス回数保持部2130はアクセス回数をイ
ンクリメント(ステッップ946)し、また、ヒット率
演算部2220はヒット率を演算する(ステップ94
8)。そして処理を終える(ステップ999)。Then, the disk device enters the "Ready" state (step 942) and waits for the disk device 2900 to transfer data (step 944). After that, the access count holding unit 2130 increments the access count (step 946), and the hit rate calculation unit 2220 calculates the hit rate (step 94).
8). Then, the process ends (step 999).
【0143】なお、ホストからの問い合わせに対して現
在の動作モ−ドを返答する機能をディスク装置2900
が備えている場合には、ホストはステップ920,93
0において、直接ディスク装置2900に対して現在の
動作モ−ドを問い合わせるようにしてもよい。この場合
には、モ−ド記憶部2160は不要となる。The function of returning the current operation mode in response to an inquiry from the host has a disk device 2900.
, Then the host will proceed to steps 920, 93.
At 0, the current operation mode may be inquired directly to the disk device 2900. In this case, the mode storage unit 2160 becomes unnecessary.
【0144】また、動作モ−ドを変更(あるいは維持)
する際に、動作モ−ドの確認を行うこと無く常に、動作
モ−ドを指定するコマンドを送るようにすれば、該モ−
ド記憶部2160は無くても構わない。例えば、図13
のステップ916において、ヒット率が規定値よりも大
きかった場合には、かならず、スタンドバイ命令を発行
するようにしてもよい。この場合には、ステップ920
は不要となる。Also, the operation mode is changed (or maintained).
In this case, if a command designating the operation mode is always sent without confirming the operation mode,
The storage unit 2160 may be omitted. For example, in FIG.
In step 916 of 1., if the hit rate is larger than the specified value, the standby instruction may be issued. In this case, step 920
Is unnecessary.
【0145】これ以外の動作・処理(例えば、電源ON
/OFF時のヒット率の保存・再生等)についても、実
行する動作主体および具体的動作が上述の実施例とは異
なる部分が有るものの、その内容や目的は基本的には上
述の実施例と同様である。また、ここでは、上述した4
種類の動作モ−ド制御方法のうち、第1の方法を前提と
して動作を述べたが、他の方法(第2〜第4の動作モ−
ド制御方法)を適用する場合も、その基本的動作の目的
・内容は上記実施例において述べた場合と同様である。
ただし、各方法毎に必要とされる機能を別途付加・変更
・削除する必要が有ることはいうまでもない。Other operations / processing (for example, power ON
Regarding the hit rate storage / reproduction at the time of turning off / off, etc.), although the subject of the operation and the specific operation are different from those in the above-described embodiment, the content and purpose thereof are basically the same as those in the above-described embodiment. It is the same. In addition, here, 4
The operation has been described on the premise of the first method among the various operation mode control methods, but other methods (second to fourth operation modes) have been described.
When the control method) is applied, the purpose and contents of the basic operation are the same as those described in the above embodiment.
However, it goes without saying that it is necessary to add / change / delete the functions required for each method separately.
【0146】例えば、第2の方法を適用する場合には、
図14に示すごとく、モ−ド遷移時間をヒット率の関数
として求めるf(R)演算部2270、モ−ド遷移時間
を経過したか否かを監視するためのタイマに相当する遷
移時間監視部2280をさらに設ける。その一方で、ス
ピンドルモ−タ停止規定値とヒット率との比較といった
演算は行わないため、ヒット率判定部2230はなくし
た構成とする。該第2の動作モ−ド制御方法を適用した
場合の動作概要を説明する。f(R)演算部2270
は、ヒット率演算部2220の求めたヒット率を用いて
モ−ド遷移時間を決定する。遷移時間監視部2280
は、ディスク装置2900へ最後にコマンドを発行して
からの経過時間を監視する。そして、モ−ド遷移時間が
経過するとその旨をモ−ド変更コマンド発行部2400
にしらせる。すると、モ−ド変更コマンド発行部240
0は、モ−ド変更コマンドをディスク装置2900に送
り、低消費電力モ−ドにさせる。例えば、PC/ATの
ディスク装置2900においては、アイドルコマントを
おくり、アイドルモ−ドとさせる。For example, when applying the second method,
As shown in FIG. 14, an f (R) computing unit 2270 for obtaining the mode transition time as a function of the hit rate, and a transition time monitoring unit corresponding to a timer for monitoring whether or not the mode transition time has elapsed 2280 is further provided. On the other hand, since the comparison between the spindle motor stop regulation value and the hit rate is not performed, the hit rate determination unit 2230 is omitted. An outline of the operation when the second operation mode control method is applied will be described. f (R) calculation unit 2270
Determines the mode transition time using the hit rate obtained by the hit rate calculation unit 2220. Transition time monitoring unit 2280
Monitors the elapsed time since the last command was issued to the disk device 2900. Then, when the mode transition time elapses, a mode change command issuing unit 2400 notifies the effect.
Make Then, the mode change command issuing unit 240
0 sends a mode change command to the disk device 2900 to set it to a low power consumption mode. For example, in the PC / AT disk device 2900, an idle command is sent to set the idle mode.
【0147】また、第3の方法を適用する場合には、図
15に示すごとく、さらに、ヒット率の傾きを求めるΔ
R演算部2260を設ける。第4の方法を適用する場合
には、図14の構成にさらに、ヒット率の傾きを求める
ΔR演算部2260、モ−ド遷移時間を決定するg
(R,ΔR)演算部2290を設ける。その一方で、f
(R)演算部220をなくした構成とする(図16参
照)。Further, when the third method is applied, as shown in FIG.
An R calculation unit 2260 is provided. When the fourth method is applied, in addition to the configuration shown in FIG. 14, a ΔR calculation unit 2260 for obtaining the slope of the hit ratio and a mode transition time g are determined.
An (R, ΔR) calculation unit 2290 is provided. On the other hand, f
(R) The calculation unit 220 is eliminated (see FIG. 16).
【0148】本実施例は基本的にはホストの実行するソ
フトウエアのみによっても実現可能である。従って、従
来からあるディスク装置をそのまま利用しつつ、消費電
力の低減とスル−プット低化の防止とを図ることができ
るという長所がある。This embodiment can be basically realized by only the software executed by the host. Therefore, there is an advantage that it is possible to reduce power consumption and prevent lowering of throughput while using the conventional disk device as it is.
【0149】本発明は磁気ディスクを用いた記憶装置あ
るいはその制御装置等に限定されないことはいうまでも
ない。光ディスク、光磁気ディスクを用いた記憶装置等
にも当然適用可能である。また、これらの記憶媒体とな
るディスクが固定式であるか、交換可能であるかを問わ
ず適用可能である(注:ただし、この場合には、記憶媒
体(注:上記実施例における磁気記録円板510)を交
換する度にモ−ド遷移時間を定義した関数を新たに使用
する記憶媒体に複写するか、あるいは、別途、モ−ド遷
移時間を保持するためのメモリなどを設ける必要が有
る。)。さらには、CD−ROM等の読み出し専用の記
憶媒体を使用する場合にも適用可能である。さらには、
記憶媒体はディスク型に限定されるものではない。使用
する記憶媒体の種類などに応じて読み出し回路、ヘッド
(あるいは光ピックアップ)等を構成することはいうま
でもない。Needless to say, the present invention is not limited to a storage device using a magnetic disk or its control device. Of course, it can be applied to a storage device using an optical disk or a magneto-optical disk. Further, the present invention can be applied regardless of whether the disk serving as the storage medium is fixed or replaceable (Note: in this case, the storage medium (Note: the magnetic recording circle in the above embodiment Each time the plate 510) is replaced, it is necessary to copy the function defining the mode transition time to a newly used storage medium, or to separately provide a memory or the like for holding the mode transition time. .). Furthermore, it is also applicable when using a read-only storage medium such as a CD-ROM. Moreover,
The storage medium is not limited to the disk type. It goes without saying that the read circuit, the head (or the optical pickup), and the like are configured according to the type of storage medium used.
【0150】さらには、本発明は、動作の速度、消費電
力、記憶容量、装置コスト等が異なる複数種類の記憶媒
体(上記実施例においては、キャッシュと磁気ディス
ク)を組み合わせて使用する際に、広く適用可能であ
る。この場合、各記憶媒体の使いわけは、装置の設計
上、動作速度、消費電力等のいずれの点を重視するかに
より決定すべきものである。また、上述のスピンドルモ
−タ停止規定値等の具体的値もこれらのいずれ点を重視
するかによって決定されるものである。例えば、磁気テ
−ブ記憶装置と、磁気ディスク装置とを組み合わせて使
用する場合に、スル−プットを重視するのであれば、動
作速度の速い磁気ディスク装置を上記実施例におけるキ
ャッシュとして、一方、動作速度は遅い磁気テ−ブ記憶
装置を上記実施例における磁気ディスク装置として使用
することが好ましいと思われる。また、スル−プットの
低化を防ぐことをより重視するのであれば、スピンドル
モ−タ停止規定値を大きく設定し、逆に、消費電力の抑
制をより重視するのであれば、スピンドルモ−タ停止規
定値を小さく設定する。Further, according to the present invention, when a plurality of types of storage media (in the above embodiment, cache and magnetic disk) different in operation speed, power consumption, storage capacity, device cost, etc. are used in combination, Widely applicable. In this case, the usage of each storage medium should be decided depending on which of the operating speed, power consumption and the like is important in designing the device. Further, the specific values such as the above-mentioned spindle motor stop regulation value are also determined depending on which of these points is emphasized. For example, when the magnetic tape storage device and the magnetic disk device are used in combination, if importance is attached to the throughput, the magnetic disk device having a high operation speed is used as the cache in the above embodiment, while the operation is performed. It seems preferable to use a slow magnetic tape storage device as the magnetic disk device in the above embodiment. In addition, if it is more important to prevent the throughput from decreasing, the spindle motor stop regulation value is set to a large value, and conversely, if more importance is attached to the suppression of power consumption, the spindle motor is stopped. Set a smaller stop limit value.
【0151】上記説明においては、キャッシュが”ヒッ
ト”した率を用いて動作モ−ドの制御を行っているが、
キャッシュが”ミス”をした率を用いても、実質的に同
じ制御を行うことは可能である。また、”ヒット率”の
定義は、上述したものに限定されるものではなく、実質
的にキャッシュがヒットする可能性を示すものであれ
ば、どのようなものであっても構わない。In the above description, the operation mode is controlled by using the rate of cache "hits".
It is possible to achieve substantially the same control using the cache "miss" rate. Further, the definition of the “hit rate” is not limited to the above-mentioned definition, and may be any as long as it indicates a possibility that the cache is substantially hit.
【0152】[0152]
【発明の効果】以上述べたように、本発明においては、
低消費電力モ−ドを使用した場合の、スル−プットの低
化を最小限に抑えることができる。例えば、ヒット率の
値、あるいは、ヒット率の変化の動向に応じて、スピン
ドルモータを停止等するため、スピンドルモ−タの起動
回数などを減らすことができる。これにより、スピンド
ルモータ停止による消費電力の低減と、記録データの高
速処理を両立することができる。これは、特に低消費電
力が要求される小型ディスク装置の分野で有効である。As described above, according to the present invention,
When the low power consumption mode is used, it is possible to minimize the decrease in throughput. For example, since the spindle motor is stopped in accordance with the value of the hit rate or the trend of the change in the hit rate, the number of times the spindle motor is started can be reduced. This makes it possible to reduce power consumption by stopping the spindle motor and achieve high-speed processing of recorded data. This is particularly effective in the field of small disk devices that require low power consumption.
【0153】さらには、スピンドルモータの停止時にラ
イトキャッシュを併設することで、ライト動作に伴うス
ピンドルモータ再起動回数を低減でき、処理時間を大幅
に短縮することができる。また、機構系(HDA)の使
用時間を減らし、装置の長寿命化を図ることができる。Furthermore, by additionally providing a write cache when the spindle motor is stopped, the number of times the spindle motor is restarted due to a write operation can be reduced, and the processing time can be greatly shortened. Further, the operating time of the mechanical system (HDA) can be reduced and the life of the device can be extended.
【図1】本発明を磁気ディスク装置に適用した場合の構
成図である。FIG. 1 is a configuration diagram when the present invention is applied to a magnetic disk device.
【図2】動作モ−ド定義テ−ブルの一例を示す図であ
る。FIG. 2 is a diagram showing an example of an operation mode definition table.
【図3】ディスク使用時間に対するキャッシュヒット率
の推移の様子を示すグラフである。FIG. 3 is a graph showing how a cache hit rate changes with respect to disk usage time.
【図4】インタフェ−スがSCSIである場合における
規定値設定コマンドを示す図である。FIG. 4 is a diagram showing a specified value setting command when the interface is SCSI.
【図5】インタフェ−スがSCSIである場合における
ヒット率読み出しコマンドを示す図である。FIG. 5 is a diagram showing a hit rate read command when the interface is SCSI.
【図6】スピンドルモータ停止規定値を用いて動作モ−
ドを制御する方法(第1の方法)における処理内容を示
すフローチャートである。FIG. 6 is an operation mode using a spindle motor stop specified value.
It is a flow chart which shows the processing contents in the method (1st method) of controlling mode.
【図7】ヒット率に応じてモード遷移時間を変更する方
法(第2の方法)において使用するモード遷移時間の関
数f(R)の一例を示すグラフである。FIG. 7 is a graph showing an example of a function f (R) of the mode transition time used in the method (second method) of changing the mode transition time according to the hit rate.
【図8】第2の方法における処理内容を示すフローチャ
ートである。FIG. 8 is a flowchart showing the processing contents in the second method.
【図9】ヒット率およびヒット率の傾きに応じてモード
遷移時間を変更する方法(第4の方法)において使用す
るモード遷移時間の関数f(R)の一例を示すグラフで
ある。FIG. 9 is a graph showing an example of a function f (R) of mode transition time used in the method (fourth method) of changing the mode transition time according to the hit rate and the slope of the hit rate.
【図10】第2の実施例を示す全体構成図である。FIG. 10 is an overall configuration diagram showing a second embodiment.
【図11】キャッシュコントロールLSI600の内部
構成図である。11 is an internal block diagram of a cache control LSI 600. FIG.
【図12】第3の実施例を示すシステム構成図である。FIG. 12 is a system configuration diagram showing a third embodiment.
【図13】第3の実施例におけるホストの処理を示すフ
ローチャートである。FIG. 13 is a flowchart showing the processing of the host in the third embodiment.
【図14】動作モ−ド制御方法として第2の方法を適用
した場合のホスト内の構成を示す図である。FIG. 14 is a diagram showing the internal configuration of the host when the second method is applied as the operation mode control method.
【図15】動作モ−ド制御方法として第3の方法を適用
した場合のホスト内の構成を示す図である。FIG. 15 is a diagram showing a configuration in a host when a third method is applied as an operation mode control method.
【図16】動作モ−ド制御方法として第3の方法を適用
した場合のホスト内の構成を示す図である。FIG. 16 is a diagram showing a configuration in a host when a third method is applied as an operation mode control method.
【図17】従来のディスク装置における動作モードの遷
移ブロック図である。FIG. 17 is a transition block diagram of operation modes in a conventional disk device.
100…インタフェースコントローラ、 110…ハー
ドディスクコントローラ(HDC)、 120…コント
ローラ、 130…R/W(リード/ライト)回路、
140…位置決め制御回路、 150…スピンドルモー
タ制御回路、200…ヒット率保持部、 210…規定
値保持部、 300…キャッシュ、310…不揮発性メ
モリ、 400…電力制御コントローラ、 500…磁
気ディスク装置機構部(HDA)、 510…磁気記録
円板、 520…スピンドルモータ、 530…磁気ヘ
ッド、 540…アクチュエータ、 600…キャッシ
ュコントロールLSI、 610…キャッシュインタフ
ェース、 620…DMA、 625…FIFO(Fi
rst In First Out Memory)、
630…DMA、 635…FIFO、 640…M
PUインタフェース、 650…割り込みコントロー
ラ、 660…キャッシュコントロール部、 670…
ヒット率演算部、 680…規定値保持部、 2000
…ホストコンピュータ、 2900…ディスク装置、
2800…インタフェース100 ... Interface controller, 110 ... Hard disk controller (HDC), 120 ... Controller, 130 ... R / W (read / write) circuit,
140 ... Positioning control circuit, 150 ... Spindle motor control circuit, 200 ... Hit ratio holding unit, 210 ... Specified value holding unit, 300 ... Cache, 310 ... Nonvolatile memory, 400 ... Power control controller, 500 ... Magnetic disk drive mechanism unit (HDA), 510 ... Magnetic recording disk, 520 ... Spindle motor, 530 ... Magnetic head, 540 ... Actuator, 600 ... Cache control LSI, 610 ... Cache interface, 620 ... DMA, 625 ... FIFO (Fi
rst In First Out Memory),
630 ... DMA, 635 ... FIFO, 640 ... M
PU interface, 650 ... Interrupt controller, 660 ... Cache control unit, 670 ...
Hit rate calculation unit, 680 ... Specified value holding unit, 2000
... host computer, 2900 ... disk device,
2800 ... Interface
───────────────────────────────────────────────────── フロントページの続き (72)発明者 小川 仁 神奈川県横浜市戸塚区吉田町292番地 株 式会社日立製作所マイクロエレクトロニク ス機器開発研究所内 (72)発明者 大井 深 神奈川県小田原市国府津2880番地 株式会 社日立製作所小田原工場内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Hitoshi Ogawa 292 Yoshida-cho, Totsuka-ku, Yokohama City, Kanagawa Prefecture Hitachi Ltd. Microelectronics Device Development Laboratory (72) Inventor, Fukai Oi 2880, Kozu, Odawara, Kanagawa Prefecture House number Hitachi Ltd. Odawara factory
Claims (15)
主記憶媒体とキャッシュ記憶媒体とを使用する記憶装置
において、 他の装置からの命令を受け付けるとともに、該命令の実
行にともなって必要となる他の装置とのデ−タの授受を
行う入出力手段と、 上記主記憶媒体に記憶されたデ−タを読み出す主記憶読
み出し手段と、 上記主記憶読み出し手段によって読み出されたデータを
上記キャッシュ記憶媒体に格納する機能と、上記キャッ
シュ記憶媒体に格納されたデ−タを読み出す機能とを備
えたキャッシュ管理手段と、 他の装置から読み出し命令を受けた回数をカウントし、
アクセス回数として保持するアクセス回数保持手段と、 他の装置から読み出し命令の対象となっているデ−タが
上記キャッシュ記憶媒体に格納されているか否かを判定
する判定手段と、 上記判定手段による判定の結果、上記読み出しの対象と
なるデ−タが上記キャッシュ記憶媒体に保持されていた
回数をカウントし、ヒット回数として保持するヒット回
数保持手段と、 上記ヒット回数と上記アクセス回数とを用いてヒット率
を算出するヒット率算出手段と、 動作モ−ド変更の基準となる、あらかじめ設定された第
1規定値を保持する規定値保持手段と、 上記ヒット率算出手段の算出した最新のヒット率と上記
第1規定値とを比較し、該比較の結果に従って動作モ−
ドの制御を行う動作モ−ド制御手段と、 を有し、 上記動作モ−ド制御手段は、上記動作モ−ドとして、 少なくとも、上記主記憶媒体へのアクセスと、上記キャ
ッシュ記憶媒体へのアクセスと、を行なうことのできる
第1モ−ドと、 上記第1モ−ドよりも消費電力が少なく、かつ、少なく
とも上記キャッシュ記憶媒体へのアクセスが可能な第2
モ−ドと、の少なくとも二つを備え、 上記比較の結果、上記ヒット率が上記第1規定値よりも
小さい場合には該記憶装置の動作モ−ドを上記第1モ−
ドに移行させ、逆に、上記ヒット率が上記第1規定値よ
りも大きい場合には該記憶装置の動作モ−ドを上記第2
モ−ドに移行させるものであること、 を特徴とする記憶装置。1. A storage device having a plurality of operation modes and using a main storage medium and a cache storage medium as a storage medium, accepts an instruction from another device, and executes the instruction. Input / output means for exchanging data with other required devices, main memory reading means for reading the data stored in the main storage medium, and data read by the main memory reading means A cache management means having a function of storing in the cache storage medium and a function of reading data stored in the cache storage medium, counting the number of times a read command is received from another device,
Access count holding means for holding as the access count, judging means for judging whether or not the data which is the target of the read command from another device is stored in the cache storage medium, and judgment by the judging means As a result, hit count holding means for counting the number of times the data to be read is held in the cache storage medium and holding it as the hit count, and hitting using the hit count and the access count A hit rate calculating means for calculating a rate, a prescribed value holding means for retaining a preset first prescribed value, which is a reference for changing the operation mode, and a latest hit rate calculated by the hit rate calculating means. The operation mode is compared with the first prescribed value and the operation mode is determined according to the result of the comparison.
And an operation mode control means for controlling the mode, wherein the operation mode control means has, as the operation mode, at least access to the main storage medium and access to the cache storage medium. A first mode capable of performing access and a second mode consuming less power than the first mode and capable of accessing at least the cache storage medium.
At least two modes are provided, and as a result of the comparison, if the hit rate is smaller than the first specified value, the operation mode of the storage device is set to the first mode.
If the hit rate is larger than the first specified value, the operation mode of the storage device is changed to the second mode.
A storage device characterized by being transferred to a mode.
るヒット率を記憶するヒット率保持手段と、 上記ヒット率保持手段に格納されたヒット率の値を用い
て、現時点におけるヒット率変化の傾きを求める傾き算
出手段と、 を有し、 上記規定値保持手段は、あらかじめ設定された第2規定
値をさらに有し、 上記動作モ−ド制御手段は、上記傾き算出手段の算出し
たヒット率変化の傾きと、上記第2規定値とを比較する
機能をさらに有し、上記ヒット率が上記第1規定値より
も大きい場合であっても、上記傾きが上記第2規定値よ
りも小さい時には、動作モ−ドを上記第1モ−ドへ移行
させないこと、 を特徴とする請求項1記載の記憶装置。2. A slope for obtaining a slope of a change in hit rate at the present time by using a hit ratio holding unit that stores a hit ratio in at least a certain past range from the present time and a value of the hit ratio stored in the hit ratio holding unit. Calculating means, the specified value holding means further has a second specified value set in advance, and the operation mode control means sets the slope of the hit rate change calculated by the slope calculating means. , Further having a function of comparing with the second prescribed value, and even when the hit rate is larger than the first prescribed value, when the inclination is smaller than the second prescribed value, the operation mode is changed. 2. The storage device according to claim 1, wherein the mode is not transferred to the first mode.
主記憶手段から読み出されたデ−タを保持するキャッシ
ュ記憶手段を備え、かつ、複数の動作モ−ドを備えた記
憶装置の制御方法において、 ヒット率を、あらかじめ設定された規定値と比較し、 比較の結果、 上記ヒット率が上記規定値よりも小さい場合には、少な
くとも、上記主記憶手段のデ−タの読み出しと、上記キ
ャッシュ記憶手段へのデ−タの格納と、を行なうことの
できる動作モ−ドにさせ、 上記ヒット率が上記規定値よりも大きい場合には上記第
1モ−ドよりも消費電力が少なく、かつ、少なくとも上
記キャッシュ記憶手段からのデ−タの読み出しが可能な
動作モ−ドとさせること、 を特徴とする記憶装置の制御方法。3. A memory comprising a main memory means for storing data and a cache memory means for holding the data read from the main memory means, and a memory having a plurality of operation modes. In the control method of the device, the hit rate is compared with a preset specified value, and as a result of the comparison, if the hit rate is smaller than the specified value, at least the data in the main storage means is read. And the storage of data in the cache memory means in an operation mode capable of performing the above operation. When the hit rate is larger than the specified value, the power consumption is higher than that in the first mode. A method of controlling a storage device, characterized in that the number of operations is small and at least the operation mode is such that the data can be read from the cache storage means.
からの命令に従って動作モ−ドの変更を行う機能を備え
た記憶装置、の制御装置において、 デ−タを記憶するキャッシュ記憶媒体と、 上記記憶装置から出力されたデータを上記キャッシュ記
憶媒体に格納する機能と、上記キャッシュ記憶媒体に格
納されたデ−タを読み出す機能とを備えたキャッシュ管
理手段と、 上記記憶手段に対する読み出し命令の回数をカウントし
アクセス回数として保持するアクセス回数保持手段と、 上記読み出しの対象となったデ−タが上記キャッシュ記
憶媒体に格納されているか否かを判定する判定手段と、 上記判定手段による判定の結果、上記読み出しの対象と
なるデ−タが上記キャッシュ記憶媒体に保持されていた
回数をカウントし、ヒット回数として保持するヒット回
数保持手段と、 上記ヒット回数と上記アクセス回数とを用いてヒット率
を算出するヒット率算出手段と、 あらかじめ設定された規定値を保持する規定値保持手段
と、 上記ヒット率と上記規定値とを比較し、該比較の結果に
従って上記記憶装置の動作モ−ドを制御する動作モ−ド
制御手段と、 を有すること特徴とする記憶装置の制御装置。4. A cache storage medium for storing data in a control device of a storage device having a plurality of operation modes and having a function of changing the operation mode according to an external command. A cache management means having a function of storing the data output from the storage device in the cache storage medium and a function of reading the data stored in the cache storage medium; and a read command for the storage means. An access number holding means for counting the number of times and holding it as an access number, a determination means for determining whether or not the data to be read is stored in the cache storage medium, and a determination by the determination means. As a result, the number of times the data to be read is held in the cache storage medium is counted as the hit number. Hit number holding means for holding, hit rate calculation means for calculating the hit rate using the hit number and the access number, specified value holding means for holding a preset specified value, the hit rate and the above An operation mode control means for comparing an operation mode of the storage device according to a result of the comparison with a specified value, and a control device for the storage device.
主記憶媒体とキャッシュ記憶媒体とを使用する記憶装置
において、 他の装置からの命令を受け付けるとともに、該命令の実
行にともなって必要となる他の装置とのデ−タの授受を
行う入出力手段と、 上記主記憶媒体に記憶されたデ−タを読み出す主記憶読
み出し手段と、 上記主記憶読み出し手段によって読み出されたデータを
上記キャッシュ記憶媒体に格納する機能と、上記キャッ
シュ記憶媒体に格納されたデ−タを読み出す機能とを備
えたキャッシュ管理手段と、 他の装置から読み出し命令を受けた回数をカウントしア
クセス回数として保持するアクセス回数保持手段と、 他の装置から読み出し命令の対象となっているデ−タが
上記キャッシュ記憶媒体に格納されているか否かを判定
する判定手段と、 上記判定手段による判定の結果、上記読み出しの対象と
なるデ−タが上記キャッシュ記憶媒体に保持されていた
回数をカウントし、ヒット回数として保持するヒット回
数保持手段と、 上記ヒット回数と上記アクセス回数とを用いてヒット率
を算出するヒット率算出手段と、 他の装置から最後にアクセスを受けたときから動作モ−
ドを変更するまでの時間(以下”モ−ド遷移時間”とい
う)とヒット率との、あらかじめ定義された対応関係を
記憶するモ−ド遷移時間保持手段と、 現時点におけるモ−ド遷移時間を保持する規定値保持手
段と、 他の装置から最後にアクセスを受けたときからの経過時
間を計時する計時手段と、 現時点におけるヒット率と、上記モ−ド遷移時間保持手
段に保持されたヒット率とモ−ド遷移時間との対応関係
とから、現時点におけるモ−ド遷移時間を求めて上記規
定値保持手段に格納するとともに、該現時点におけるモ
−ド遷移時間と上記経過時間とを比較し、該比較の結果
に従って動作モ−ドの制御を行う動作モ−ド制御手段
と、 を有し、 上記動作モ−ド制御手段は、 少なくとも、上記主記憶媒体へのアクセスと、上記キャ
ッシュ記憶媒体へのアクセスと、を行なうことのできる
第1モ−ドと、 上記第1モ−ドよりも消費電力が少なく、かつ、少なく
とも上記キャッシュ記憶媒体へのアクセスが可能な第2
モ−ドと、の少なくとも二つの動作モ−ドを備え、 上記比較の結果、上記経過時間が上記モ−ド遷移時間を
越えていた場合には、該記憶装置の動作モ−ドを上記第
2モ−ドに移行させるものであること、 を特徴とする記憶装置。5. A storage device having a plurality of operation modes and using a main storage medium and a cache storage medium as a storage medium, accepts an instruction from another device, and executes the instruction. Input / output means for exchanging data with other required devices, main memory reading means for reading the data stored in the main storage medium, and data read by the main memory reading means To the cache storage medium and a function to read the data stored in the cache storage medium, and the number of times a read command is received from another device is counted as the access count. The access number holding means for holding and whether or not the data which is the target of the read instruction from the other device is stored in the cache storage medium. Determining means for determining the number of times the data to be read is held in the cache storage medium as a result of the determination by the determining means, and a hit number holding means for holding the number of hits as the number of hits; A hit ratio calculating means for calculating a hit ratio using the hit count and the access count, and an operation mode from the last access from another device.
The mode transition time holding means for storing a predefined correspondence between the time until the mode is changed (hereinafter referred to as "mode transition time") and the hit rate, and the current mode transition time Specified value holding means to hold, time measuring means to measure the elapsed time from the last access from another device, hit rate at the present time, hit rate held in the mode transition time holding means From the correspondence between the mode transition time and the mode transition time, the mode transition time at the present time is obtained and stored in the specified value holding means, and the mode transition time at the present time and the elapsed time are compared, An operation mode control means for controlling the operation mode according to the result of the comparison, wherein the operation mode control means includes at least access to the main storage medium and the cache storage medium. And access to, the first mode can be carried out - and de, the first mode - Doyori also consumes less power, and the second that is accessible to at least said cache memory medium
At least two operation modes, that is, the operation mode of the memory device is set to the above-mentioned operation mode when the elapsed time exceeds the mode transition time as a result of the comparison. A storage device characterized by being transferred to two modes.
を記憶するヒット率保持手段と、 上記ヒット率保持手段に格納されたヒット率の値を用い
て、現時点におけるヒット率変化の傾きを求める傾き算
出手段と、 を有し、 上記モ−ド遷移時間保持手段の保持しているモ−ド遷移
時間とヒット率とのあらかじめ定義された対応関係は、
ヒット率変化の傾きとの対応関係をも含んで定義されて
いるものであり、 上記動作モ−ド制御手段は、上記モ−ド遷移時間を求め
る処理を、現時点におけるヒット率およびヒット率の傾
きと、上記モ−ド遷移時間保持手段の保持しているモ−
ド遷移時間とヒット率とヒット率変化の傾きとの対応関
係と、を用いて行うこと、 を特徴とする請求項5記載の記憶装置。6. A slope calculation for obtaining a slope of a change in hit rate at the present time by using hit rate holding means for storing hit rates in a certain range in the past from the present time and a value of the hit rate stored in the hit rate holding means. Means, and the predefined correspondence relationship between the mode transition time and the hit rate held by the mode transition time holding means is
It is defined including the correspondence with the slope of the change in the hit rate, and the operation mode control means performs the processing for obtaining the mode transition time in the hit rate and the slope of the hit rate at the present time. And the mode held by the mode transition time holding means.
6. The storage device according to claim 5, wherein the correspondence relationship between the transition time, the hit rate, and the slope of the change in the hit rate is used.
主記憶手段から読み出されたデ−タを保持するキャッシ
ュ記憶手段を備え、かつ、複数の動作モ−ドを備えた記
憶装置の制御方法において、 読み出しの対象となるデ−タが上記キャッシュ記憶手段
に保持されていた回数と読み出し命令を受けた回数とを
用いてヒット率求めるとともに、該ヒット率とあらかじ
め定義された関数とに基づいてモ−ド遷移時間を決定
し、 他の装置から最後にアクセスされてから上記モ−ド遷移
時間が経過するまでは、少なくとも、上記主記憶手段の
デ−タの読み出しと、上記キャッシュ記憶手段へのデ−
タの格納と、を行なうことのできる第1モ−ドに保ち、 他の装置から最後にアクセスされてから上記モ−ド遷移
時間が経過した後は、上記第1モ−ドよりも消費電力が
少なく、かつ、少なくとも上記キャッシュ記憶手段から
のデ−タの読み出しが可能な第2モ−ドとさせること、 を特徴とする記憶装置の制御方法。7. A memory having a main memory means for storing data and a cache memory means for holding the data read from the main memory means, and a memory having a plurality of operation modes. In the control method of the device, the hit rate is obtained by using the number of times the data to be read is held in the cache storage means and the number of times the read command is received, and the hit rate and a predefined function The mode transition time is determined on the basis of the above, and at least the reading of the data of the main memory means and the above-mentioned mode transition time until the mode transition time elapses after the last access from another device. Data to cache storage means
Data is stored in the first mode capable of storing and storing the data, and after the mode transition time has elapsed since the last access from another device, the power consumption is higher than that in the first mode. And a second mode in which at least data can be read from the cache storage means.
からの命令に従って動作モ−ドの変更を行う機能を備え
た記憶装置、の制御装置において、 デ−タを記憶するキャッシュ記憶媒体と、 上記記憶装置から出力されたデータを上記キャッシュ記
憶媒体に格納する機能と、上記キャッシュ記憶媒体に格
納されたデ−タを読み出す機能とを備えたキャッシュ管
理手段と、 上記記憶手段に対する読み出し命令の回数をカウントし
アクセス回数として保持するアクセス回数保持手段と、 上記読み出しの対象となったデ−タが上記キャッシュ記
憶媒体に格納されているか否かを判定する判定手段と、 上記判定手段による判定の結果、上記読み出しの対象と
なるデ−タが上記キャッシュ記憶媒体に保持されていた
回数をカウントし、ヒット回数として保持するヒット回
数保持手段と、 上記ヒット回数と上記アクセス回数とを用いてヒット率
を算出するヒット率算出手段と、 上記ヒット率とモ−ド遷移時間との間においてあらかじ
め定義された関数を保持するモ−ド遷移時間保持手段
と、 現時点におけるモ−ド遷移時間を保持する規定値保持手
段と、 上記記憶装置に対して最後にアクセスがあったときから
の経過時間を計時する計時手段と、 現時点におけるヒット率と、上記モ−ド遷移時間保持手
段に保持されたヒット率とモ−ド遷移時間との対応関係
とから、現時点におけるモ−ド遷移時間を求めて規定値
保持手段に格納するとともに、該現時点におけるモ−ド
遷移時間と上記経過時間とを比較し、 上記比較の結果、上記経過時間が上記モ−ド遷移時間を
越えていた場合には、該記憶装置の動作モ−ドを変更さ
せるものであること、 を特徴とする記憶装置の制御装置。8. A cache storage medium for storing data in a control device of a storage device having a plurality of operation modes and having a function of changing the operation mode according to an instruction from the outside. A cache management means having a function of storing the data output from the storage device in the cache storage medium and a function of reading the data stored in the cache storage medium; and a read command for the storage means. An access number holding means for counting the number of times and holding it as an access number, a determination means for determining whether or not the data to be read is stored in the cache storage medium, and a determination by the determination means. As a result, the number of times the data to be read is held in the cache storage medium is counted as the hit number. A hit number holding means for holding, a hit rate calculating means for calculating a hit rate using the hit number and the access number, and a function defined in advance between the hit rate and the mode transition time are held. A mode transition time holding means, a specified value holding means for holding the current mode transition time, and a time counting means for measuring an elapsed time from the last access to the storage device, From the hit rate at the present time and the correspondence relationship between the hit rate held in the mode transition time holding means and the mode transition time, the mode transition time at the present time is obtained and stored in the prescribed value holding means. At the same time, the mode transition time at the present time is compared with the elapsed time. As a result of the comparison, if the elapsed time exceeds the mode transition time, the storage device is A control device for a storage device, characterized in that the operation mode of the storage device is changed.
上記読み出し命令を受ける度毎に、上記ヒット率の算出
を行い、 上記動作モ−ド制御手段は、上記ヒット率の算出が行わ
れる度毎に上記比較を行うこと、 を特徴とする請求項1または5記載の記憶装置。9. The hit rate calculation means calculates the hit rate each time the read command is received from another device, and the operation mode control means calculates the hit rate. 6. The storage device according to claim 1, wherein the comparison is performed every time it is read.
媒体から、磁気または光を用いてデ−タを読み出すもの
であり、 上記キャッシュ管理手段は、上記キャッシュ記憶媒体か
ら、電気的にデ−タを読み出すものであること、 を特徴とする請求項1、2、5または6記載の記憶装
置。10. The main memory read means reads data from the main storage medium by using magnetic or optical, and the cache management means electrically reads data from the cache storage medium. 7. The storage device according to claim 1, wherein the storage device reads data.
憶媒体を備えたこと、 を特徴とする請求項1、2、5または6記載の記憶装
置。11. A storage device according to claim 1, further comprising the main storage medium and the cache storage medium.
も、上記キャッシュ記憶媒体に格納されているデ−タ
と、アクセス回数保持手段に保持されているアクセス回
数と、ヒット回数保持手段に保持されているヒット回数
とを、記憶して保護するデ−タ保護手段を備えたこと、 を特徴とする請求項1または5記載の記憶装置。12. When the power is turned off, at least the data stored in the cache storage medium, the access count held in the access count holding means, and the hit count holding means are held. 6. The storage device according to claim 1, further comprising a data protection unit that stores and protects the number of hits.
れた時、保護しているデ−タを上記キャッシュ記憶媒体
に、保護しているヒット回数を上記ヒット回数保持手段
に、保護しているアクセス回数を上記アクセス回数保持
手段に、格納すること、 を特徴とする請求項12記載の記憶装置。13. The data protection means protects the protected data in the cache storage medium and the protected hit count in the hit count holding means when the power is turned on. 13. The storage device according to claim 12, wherein the number of times of access being performed is stored in the access number holding means.
体と、キャッシュ記憶媒体とを使用する記憶装置におい
て、 他の装置からの命令を受け付けるとともに、該命令の実
行にともなって必要となる他の装置とのデ−タの授受を
行う入出力手段と、 上記主記憶媒体のデ−タを読み出す主記憶読み出し手段
と、 上記主記憶読み出し手段によって読み出されたデータを
上記キャッシュ記憶媒体に格納する機能と、上記キャッ
シュ記憶媒体に格納されたデ−タを読み出す機能とを備
えたキャッシュ管理手段と、 上記主記憶媒体がデ−タの読み出しが可能な回転状態に
ない時に他の装置からデ−タの読み出し命令を受けた場
合、当該デ−タが上記キャッシュ記憶媒体に格納されて
いるか否かを判定し、格納されている場合には、上記手
記憶媒体を起動することなく、上記キャッシュ記憶媒体
に格納されている当該デ−タを読み出して出力させる制
御手段と、 を有することを特徴とする記憶装置。14. A storage device that uses a disk-type main storage medium and a cache storage medium as a storage medium, accepts an instruction from another device, and executes another instruction that is necessary when the instruction is executed. Input / output means for exchanging data with the device, main memory reading means for reading data from the main memory medium, and data read by the main memory reading means are stored in the cache memory medium. Cache management means having a function and a function of reading data stored in the cache storage medium; and data from another device when the main storage medium is not in a rotation state in which the data can be read. When a data read command is received, it is determined whether the data is stored in the cache storage medium, and if it is stored, the manual storage medium is started. And a control unit that reads out and outputs the data stored in the cache storage medium without moving.
体と、ライトキャッシュ記憶媒体とを使用する記憶装置
において、 他の装置からの命令を受け付けるとともに、該命令の実
行にともなって必要となる他の装置とのデ−タの授受を
行う入出力手段と、 上記主記憶媒体にデ−タを書き込む主記憶書き込み手段
と、 上記主記憶媒体がデ−タの書き込みが可能な回転状態に
ない時に他の装置からデ−タの書き込み命令を受けた場
合、当該デ−タをライトキャッシュ記憶媒体に格納する
とともに、該ライトキャッシュ記憶媒体に当該デ−タが
書き込まれた時点で、該書き込み命令が実行されたこと
を上記他の装置に対し通達し、その後、あらかじめ設定
されたタイミングで該ライトキャッシュ記憶媒体に書き
込まれた当該デ−タを上記手記憶媒体に書き込ませる制
御手段と、 を有することを特徴とする記憶装置。15. A storage device, which uses a disk-type main storage medium and a write cache storage medium as a storage medium, accepts an instruction from another device, and is necessary when the instruction is executed. I / O means for exchanging data with the device, main memory writing means for writing data to the main storage medium, and when the main storage medium is not in a rotation state in which data can be written. When a data write command is received from another device, the data is stored in the write cache storage medium, and at the time when the data is written in the write cache storage medium, the write command is written. The execution is notified to the other device, and thereafter, the data written in the write cache storage medium at the preset timing is transferred to the hand storage medium. Storage apparatus characterized by and a control means for writing the.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5103493A JPH06267175A (en) | 1993-03-11 | 1993-03-11 | Storage device and method for controlling the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5103493A JPH06267175A (en) | 1993-03-11 | 1993-03-11 | Storage device and method for controlling the same |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH06267175A true JPH06267175A (en) | 1994-09-22 |
Family
ID=12875527
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5103493A Pending JPH06267175A (en) | 1993-03-11 | 1993-03-11 | Storage device and method for controlling the same |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06267175A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100506303B1 (en) * | 2001-12-19 | 2005-08-08 | 가부시끼가이샤 도시바 | Electronic device and method for controlling an operation of the electronic device |
| JP2010176771A (en) * | 2009-01-30 | 2010-08-12 | Toshiba Corp | Storage device and information processing apparatus |
| JP2016021133A (en) * | 2014-07-14 | 2016-02-04 | 株式会社東芝 | Magnetic disk device and method for executing write command |
| US10599210B2 (en) | 2017-06-29 | 2020-03-24 | Samsung Electronics Co., Ltd. | Processor, computing device including the same and method of selecting low power mode of the same |
| CN115827959A (en) * | 2021-09-17 | 2023-03-21 | 腾讯科技(深圳)有限公司 | Method, device, computer equipment and storage medium for processing content recommendation business |
-
1993
- 1993-03-11 JP JP5103493A patent/JPH06267175A/en active Pending
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100506303B1 (en) * | 2001-12-19 | 2005-08-08 | 가부시끼가이샤 도시바 | Electronic device and method for controlling an operation of the electronic device |
| JP2010176771A (en) * | 2009-01-30 | 2010-08-12 | Toshiba Corp | Storage device and information processing apparatus |
| US8009378B2 (en) | 2009-01-30 | 2011-08-30 | Kabushiki Kaisha Toshiba | Storage device and information processing apparatus |
| JP2016021133A (en) * | 2014-07-14 | 2016-02-04 | 株式会社東芝 | Magnetic disk device and method for executing write command |
| US10599210B2 (en) | 2017-06-29 | 2020-03-24 | Samsung Electronics Co., Ltd. | Processor, computing device including the same and method of selecting low power mode of the same |
| CN115827959A (en) * | 2021-09-17 | 2023-03-21 | 腾讯科技(深圳)有限公司 | Method, device, computer equipment and storage medium for processing content recommendation business |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101114492B (en) | Disk drive with nonvolatile memory having multiple modes of operation | |
| US7543108B2 (en) | Storage system and storage control method achieving both power saving and good performance | |
| US8719525B2 (en) | Storage device with manual learning | |
| US6272589B1 (en) | Method and apparatus for controlling write buffering operation in a disk drive | |
| JP2008071478A (en) | Disk drive with non-volatile memory to store data about failure | |
| KR20060052225A (en) | Hard disk drive with both DDR and flash memory | |
| US20120042182A1 (en) | Forced idle cache | |
| US20050268132A1 (en) | Method of controlling idle mode of hard disc drive and apparatus therefor | |
| US20050125602A1 (en) | HDD with storage of critical data in FLASH | |
| US9940051B2 (en) | Power state change in disk drive based on disk access history | |
| US7174421B2 (en) | HDD with rapid availability of critical data after critical event | |
| US8009378B2 (en) | Storage device and information processing apparatus | |
| US20160291888A1 (en) | Hybrid-hdd that limits dirty data in nand | |
| US20050120144A1 (en) | Disk control unit, disk drive, disk control method, and disk control program | |
| JPH06267175A (en) | Storage device and method for controlling the same | |
| CN110289022A (en) | Disk device | |
| US9286079B1 (en) | Cache optimization of a data storage device based on progress of boot commands | |
| US8638519B1 (en) | Speed control systems and methods for decreasing power consumption in rotating storage devices | |
| JP2001283503A (en) | Control method for head unloading of magnetic storage device and magnetic storage device | |
| US20050125651A1 (en) | Method for providing critical data in an HDD after critical event | |
| JPH064228A (en) | Semiconductor disk device | |
| JPH06149483A (en) | Computer system | |
| US12073855B2 (en) | Magnetic disk device and control method | |
| JPH11306674A (en) | Disk storage device and disk write control method applied to the device | |
| JPH05158815A (en) | Memory device |