JPH06309232A - Control system for disk cache - Google Patents

Control system for disk cache

Info

Publication number
JPH06309232A
JPH06309232A JP5092721A JP9272193A JPH06309232A JP H06309232 A JPH06309232 A JP H06309232A JP 5092721 A JP5092721 A JP 5092721A JP 9272193 A JP9272193 A JP 9272193A JP H06309232 A JPH06309232 A JP H06309232A
Authority
JP
Japan
Prior art keywords
disk cache
cache control
remaining capacity
computer system
disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5092721A
Other languages
Japanese (ja)
Inventor
Norihisa Kitagata
憲央 北▲潟▼
Ryuichi Hattori
隆一 服部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP5092721A priority Critical patent/JPH06309232A/en
Publication of JPH06309232A publication Critical patent/JPH06309232A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To protect data in the disk cache memory and prevent a computer system from malfunctioning. CONSTITUTION:The computer system which is equipped with the uninterruptive power unit equipped with a storage battery 1 and a means 2 for detecting the remaining capacity of the storage battery 1, a voltage setting means, the disk cache memory 7, an external storage device 8, and a disk cache controller 4 which controls the disk cache memory 7 and external storage device 8 and caches data on a disk controls the disk caching by comparing the remaining capacity of the storage battery 1 detected by the remaining capacity detecting means 2 with a voltage set value set by the voltage value setting means and then selecting a copy-back system or write-through system for the disk cache control.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、無停電電源装置を使用
するコンピュータシステムにおけるディスクキャッシュ
メモリのデータ保護方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data protection system for a disk cache memory in a computer system using an uninterruptible power supply.

【0002】[0002]

【従来の技術】ディスクキャッシュは、主メモリと外部
記憶装置との間に位置し、外部記憶装置とのデータ転送
において、外部記憶装置とデータを入出力する時間(以
下、アクセス時間と略す)を速くするために設けられ
る。一般に、外部記憶装置は、ハードディスクドライブ
やフロッピーディスクドライブなど磁気ディスク等で構
成されている。そして、それらのアクセス時間は半導体
メモリで構成されている主メモリと比べると約10〜3
0倍遅い。そこで例えば、上記外部記憶装置に対するデ
ータのアクセス時間を見かけ上速くするための手段とし
て、主メモリと外部記憶装置の間に半導体メモリで構成
されたディスクキャッシュメモリを置く方法がある。
2. Description of the Related Art A disk cache is located between a main memory and an external storage device, and in data transfer with the external storage device, the time for inputting / outputting data to / from the external storage device (hereinafter abbreviated as access time) is set. Provided for speed. Generally, the external storage device is composed of a magnetic disk such as a hard disk drive or a floppy disk drive. And the access time of them is about 10 to 3 compared with the main memory composed of the semiconductor memory.
0 times slower. Therefore, for example, as a means for apparently shortening the data access time to the external storage device, there is a method of placing a disk cache memory composed of a semiconductor memory between the main memory and the external storage device.

【0003】ディスクキャッシュメモリの動作として、
例えば、外部記憶装置から、入出力されたデータは、デ
ィスクキャッシュメモリ上に書き込まれる。そして、そ
のデータが、ディスクキャッシュメモリ上に保持してい
る間は、そのデータをディスクキャッシュメモリから入
出力することができる(これをディスクキャッシュヒッ
トと呼ぶ)。そして、そのデータをディスクキャッシュ
に保持している限り、外部記憶装置からデータを読み込
む必要はない。この場合、外部記憶装置と比べてアクセ
ス時間の速いディスクキャッシュメモリからデータを入
出力できるため、外部記憶装置へのデータのアクセス時
間は見かけ上速くなる。
As an operation of the disk cache memory,
For example, the data input / output from the external storage device is written in the disk cache memory. Then, while the data is held in the disk cache memory, the data can be input / output from the disk cache memory (this is called a disk cache hit). Then, as long as the data is held in the disk cache, it is not necessary to read the data from the external storage device. In this case, data can be input / output from / to the disk cache memory that has a faster access time than the external storage device, and therefore the data access time to the external storage device is apparently faster.

【0004】また、ディスクキャッシュには、ハードウ
ェアで実現するものとソフトウェアで実現するものの2
種類ある。ハードウェアによるディスクキャッシュは、
ディスクキャッシュメモリとディスクキャッシュ制御装
置が一体となったものである。そして、それが外部記憶
装置と主メモリの間に置かれたものである。また、ソフ
トウェアによるディスクキャッシュは主メモリの一部を
ディスクキャッシュメモリに割り当て、オペレーティン
グ・システムのディスク・ドライバによってディスクキ
ャッシュ動作を行なう。
There are two types of disk cache, one realized by hardware and the other realized by software.
There are types. Hardware disk cache
The disk cache memory and the disk cache control device are integrated. And, it is placed between the external storage device and the main memory. Further, the software disk cache allocates a part of the main memory to the disk cache memory, and the disk driver of the operating system performs the disk cache operation.

【0005】ここで、ディスクキャッシュメモリは外部
記憶装置と比べると、そのメモリ単価は高い。そのた
め、コンピュータシステムに組み込むディスクキャッシ
ュメモリの記憶容量は、外部記憶装置の記憶容量と比べ
るとはるかに小さい。そして、外部記憶装置からアクセ
スされたデータは、記憶容量の小さいディスクキャッシ
ュメモリにすべて書き込むことはできない。そのため、
ディスクキャッシュメモリにデータを書き込む領域がな
い場合、ディスクキャッシュメモリに空き領域を作る必
要がある。空き領域は、ディスクキャッシュメモリのデ
ータを無効化するか、あるいはそのデータを外部記憶装
置に掃き出すことによって作る。そして、その空き領域
に書き込むことができなかったデータを書き込む。
Here, the unit price of the disk cache memory is higher than that of the external storage device. Therefore, the storage capacity of the disk cache memory incorporated in the computer system is much smaller than the storage capacity of the external storage device. Then, all the data accessed from the external storage device cannot be written in the disk cache memory having a small storage capacity. for that reason,
If there is no area to write data in the disk cache memory, it is necessary to make a free area in the disk cache memory. The empty area is created by invalidating the data in the disk cache memory or by flushing the data to an external storage device. Then, the data that could not be written into the empty area is written.

【0006】ところで、このディスクキャッシュメモリ
が保持するデータをメモリに書き込む方式(以下ライト
アルゴリズムと呼ぶ)には、ライトスルー方式とコピー
バック方式と呼ばれる2種類の方式がある。ライトスル
ー方式は、あるメモリ・アドレスに対する主メモリから
外部記憶装置へのデータの書き込み動作が、直ちに外部
記憶装置にたいして実行される方式をいう。つまり、デ
ィスクキャッシュメモリに書き込まれたデータは、同時
に外部記憶装置に書き込まれる。そのため、あるメモリ
アドレスに対応するデータは、ディスクキャッシュメモ
リと外部記憶装置との間で常に一致している。一方、コ
ピー・バック方式では、主メモリからのデータの書き込
み動作は、ディスクキャッシュメモリに対してのみ行な
われる。あるメモリアドレスに対応するデータは、ディ
スクキャッシュメモリと外部記憶装置で異なる場合があ
る。この場合、ディスクキャッシュメモリに更新データ
が存在し、外部記憶装置に古いデータが存在する。これ
ら2種類の方式は、特開平4−123151で示され
る。
By the way, there are two types of methods for writing the data held in the disk cache memory to the memory (hereinafter referred to as a write algorithm), a write-through method and a copy-back method. The write-through method is a method in which an operation of writing data from a main memory to an external storage device for a certain memory address is immediately executed to the external storage device. That is, the data written in the disk cache memory is simultaneously written in the external storage device. Therefore, the data corresponding to a certain memory address always matches between the disk cache memory and the external storage device. On the other hand, in the copy back method, the data write operation from the main memory is performed only to the disk cache memory. The data corresponding to a certain memory address may differ between the disk cache memory and the external storage device. In this case, update data exists in the disk cache memory and old data exists in the external storage device. These two types of methods are disclosed in JP-A-4-123151.

【0007】ここで、上記2種類のライトアルゴリズム
のうち、直ちに外部記憶装置へデータの書き込みを行な
わないコピーバック方式の方が、データのアクセス時間
等が速くなる。また、ディスクキャッシュメモリは揮発
性メモリであるため、停電時においては、ディスクキャ
ッシュメモリのデータが失われてしまう。ゆえに、コピ
ーバック方式ではディスクキャッシュメモリ上に最新の
更新データを保持しているため、停電時には更新データ
が消失し、データ内容の誤りによるコンピュータの誤動
作を引き起こす。したがって、停電時等において、ディ
スクキャッシュメモリの更新データは失われ、コピーバ
ック方式ではデータの消失によるコンピュータシステム
の誤動作を防ぐことはできない。
Here, of the above-mentioned two types of write algorithms, the copy-back method, in which data is not immediately written to the external storage device, has a faster data access time. Further, since the disk cache memory is a volatile memory, data in the disk cache memory will be lost during a power failure. Therefore, since the latest update data is held in the disk cache memory in the copy-back method, the update data is lost at the time of power failure, causing a malfunction of the computer due to an error in the data content. Therefore, the update data of the disk cache memory is lost at the time of power failure, etc., and the copy back method cannot prevent the malfunction of the computer system due to the loss of data.

【0008】一方、主メモリからデータを書込む時、常
に外部記憶装置へアクセスするライトスルー方式におい
て、コピーバック方式と比べるとデ−タのアクセス時間
は速くならない。また、ライトスルー方式のライトアル
ゴリズムは、外部記憶装置上に、常にディスクキャッシ
ュメモリと同じ更新データを保持している。そのため、
停電時に、揮発性メモリであるディスクキャッシュメモ
リの更新データが失われても、不揮発性メモリである外
部記憶装置にディスクキャッシュメモリと同一の更新デ
ータを保持しているため、データ内容の誤りによるコン
ピュータの誤動作を引き起こす事はない。データのアク
セス時間が速いコピーバック方式を用い、ディスクキャ
ッシュメモリのデータを停電時においても保護できる方
法として、特開平3−263146で示される方法があ
る。
On the other hand, in the write-through method of always accessing the external storage device when writing data from the main memory, the data access time is not faster than that of the copy-back method. Further, the write-through type write algorithm always holds the same update data as the disk cache memory in the external storage device. for that reason,
Even if the update data in the disk cache memory, which is volatile memory, is lost during a power failure, the same update data as the disk cache memory is held in the external storage device, which is non-volatile memory. It does not cause the malfunction of. There is a method disclosed in Japanese Patent Laid-Open No. 3-263146 as a method that can protect the data in the disk cache memory even in the case of a power failure by using a copy back method in which the data access time is fast.

【0009】このように、停電によって生じるコンピュ
ータシステムの誤動作を未然に防ぐ装置として、無停電
電源装置がある。無停電電源装置とは、コンピュータシ
ステムと商用電源の中間に接続され、停電、瞬時電圧低
下、電源不安定などの電源障害が起こったとき、即座に
商用電源を無停電電源装置の充電池に置き換えることに
より、コンピュータシステムに電源の供給を行ない、コ
ンピュータシステムの誤動作を防止する装置である。こ
の場合無停電電源装置の機能は、例えば停電発生時に自
動的に無停電電源を使用しているコンピュータシステム
にRS232C等の信号ケーブルを通して停電メッセー
ジを伝達する。その後、商用電源が復帰しなければ、無
停電電源装置はコンピュータシステムに電源を供給しな
いというシャットダウンメッセージを伝達する。そし
て、無停電電源装置はコンピュータシステムに電源を供
給しなくなる。ここで、コンピュータシステムを使用し
ている使用者は、停電メッセージを受け取った後、シャ
ットダウンメッセージを受け取るまでの間に、必要なデ
ータを外部記憶装置に退避させ、無停電電源装置からの
電源遮断に備えることになる。無停電電源装置について
は、特開平2−228223等で示される。
As described above, there is an uninterruptible power supply device as a device for preventing malfunction of a computer system caused by a power failure. The uninterruptible power supply is connected between the computer system and the commercial power supply, and when a power failure such as a power failure, momentary voltage drop, or power instability occurs, the commercial power is immediately replaced with the rechargeable battery of the uninterruptible power supply. As a result, power is supplied to the computer system to prevent malfunction of the computer system. In this case, the function of the uninterruptible power supply automatically transmits a power failure message to a computer system using the uninterruptible power supply when a power failure occurs through a signal cable such as RS232C. After that, unless the commercial power is restored, the uninterruptible power supply transmits a shutdown message not to supply power to the computer system. Then, the uninterruptible power supply stops supplying power to the computer system. Here, the user using the computer system saves the necessary data in the external storage device after receiving the power failure message and before receiving the shutdown message to shut off the power from the uninterruptible power supply. You will be prepared. The uninterruptible power supply is disclosed in JP-A-2-228223 and the like.

【0010】[0010]

【発明が解決しようとする課題】従来の技術で述べたよ
うに、ディスクキャッシュメモリのデータは、電源が供
給されないとそのデータの内容が失われてしまうという
問題がある。そのため、停電が起きたときでもコンピュ
ータシステムの電源を無停電電源装置の充電池で置き換
えることによりコンピュータシステムに電源を供給して
いた。そして、停電等による、ディスクキャッシュメモ
リデータの消失を防いでいた。しかし、例えば無停電電
源充電開始直後や無停電電源装置の充電池の残量が著し
く減っている場合に停電が起こった時、無停電電源装置
はコンピュータシステムに電源を供給することが出来な
い。その結果、コンピュータシステムのディスクキャッ
シュメモリのデータは失われてしまう。この時、コピー
バック方式でディスクキャッシュ制御を行なっていた場
合、更新された最新のデータは失われてしまう。そし
て、データの誤りからコンピュータシステムは、誤動作
する可能性がある。ゆえに、無停電電源装置の充電池の
残量を把握し、ディスクキャッシュメモリの更新データ
が停電により消失しても、更新データの誤りによるコン
ピュータシステムの誤動作をなくすことを本発明の課題
とする。
As described in the prior art, the data of the disk cache memory has a problem that the content of the data is lost unless power is supplied. Therefore, even when a power failure occurs, the power of the computer system is replaced with the rechargeable battery of the uninterruptible power supply to supply the power to the computer system. Then, the loss of the data in the disk cache memory due to a power failure or the like was prevented. However, the uninterruptible power supply cannot supply power to the computer system, for example, immediately after the charging of the uninterruptible power supply is started or when a power failure occurs when the rechargeable battery of the uninterruptible power supply is significantly reduced. As a result, the data in the disk cache memory of the computer system will be lost. At this time, if the disk cache control is performed by the copy back method, the updated latest data will be lost. Then, the computer system may malfunction due to data error. Therefore, it is an object of the present invention to grasp the remaining amount of the rechargeable battery of the uninterruptible power supply and eliminate the malfunction of the computer system due to the error of the update data even if the update data of the disk cache memory is lost due to the power failure.

【0011】[0011]

【課題を解決するための手段】上記課題を解決するため
に、無停電電源装置の充電池の残容量を検出する手段と
して、残容量検出器を設ける。そして、検出した充電池
の残容量の値により無停電電源装置が停電時にコンピュ
ータシステムに電源を供給できるかどうか判断する手段
を設ける。ここで、判断するために残容量と比較される
値を設定する設定値回路を設ける。設定値回路で設定さ
れた値を設定値と呼ぶ。また、設定値と残容量の値を比
較した結果を信号によってディスクキャッシュコントロ
ーラに送るディスクキャッシュ制御方式選択回路を設け
る。設定値より充電池の残容量の値のほうが小さい場
合、ディスクキャッシュ制御方式選択回路はディスクキ
ャッシュコントローラにライトスルー方式でディスクキ
ャッシュ制御を行なわせる信号を出す。ライトスルー方
式でディスクキャッシュ制御を行なうと、あるメモリア
ドレスに対応するディスクキャッシュメモリのデータと
外部記憶装置のデータは同じになる。そのため、無停電
電源装置の充電池の残容量の有無に関わらず、停電時に
おいてディスクキャッシュメモリのデータが消失しても
外部記憶装置に同一のデータが存在するためデータの誤
りに対するコンピュータの誤動作を未然に防ぐことがで
きる。また、設定値より充電池の残容量の値のほうが大
きい場合、ディスクキャッシュ制御方式選択回路はディ
スクキャッシュコントローラにコピーバック方式でディ
スクキャッシュ制御を行なわせる信号を出す。コピーバ
ック方式でディスクキャッシュ制御を行なえば、主メモ
リと外部記憶装置の間でライトスルー方式よりも高速に
データをアクセスすることができる。
In order to solve the above problems, a remaining capacity detector is provided as a means for detecting the remaining capacity of the rechargeable battery of the uninterruptible power supply. A means for determining whether or not the uninterruptible power supply can supply power to the computer system at the time of a power failure is provided based on the detected remaining capacity of the rechargeable battery. Here, a set value circuit for setting a value to be compared with the remaining capacity for making a determination is provided. The value set by the set value circuit is called a set value. Further, a disk cache control system selection circuit is provided which sends the result of comparing the set value and the value of the remaining capacity to the disk cache controller by a signal. When the value of the remaining capacity of the rechargeable battery is smaller than the set value, the disk cache control method selection circuit outputs a signal to the disk cache controller to perform disk cache control by the write through method. When the disk cache control is performed by the write-through method, the data in the disk cache memory corresponding to a certain memory address becomes the same as the data in the external storage device. Therefore, regardless of the remaining capacity of the rechargeable battery of the uninterruptible power supply, even if the data of the disk cache memory is lost at the time of power failure, the same data exists in the external storage device, and the computer malfunctions due to data error. It can be prevented. If the value of the remaining capacity of the rechargeable battery is larger than the set value, the disk cache control system selection circuit outputs a signal to the disk cache controller to perform the disk cache control by the copy back system. If the disk cache control is performed by the copy-back method, the data can be accessed between the main memory and the external storage device faster than the write-through method.

【0012】[0012]

【作用】以上のように、残容量検出手段により充電池の
残容量を検出する。そして、ディスクキャッシュ制御方
式選択回路は検出信号により充電池の残容量を読み取
る。残容量の値が設定値より大きい場合は、停電発生時
に、無停電電源装置が動作してコンピュータシステムに
十分な電源を供給できると考えられる。そのため停電が
起こってもディスクキャッシュメモリのデータは、消失
する恐れが無い。よって、ディスクキャッシュ制御方式
選択回路は、コピ−バック方式でディスクキャッシュ制
御を行なう信号をディスクキャッシュコントローラに送
る。そして、ディスクキャッシュコントローラは、コピ
ーバック方式でディスクキャッシュ制御を行ない、コン
ピュータシステムを高速に運転する。
As described above, the remaining capacity of the rechargeable battery is detected by the remaining capacity detecting means. Then, the disk cache control system selection circuit reads the remaining capacity of the rechargeable battery by the detection signal. When the value of the remaining capacity is larger than the set value, it is considered that the uninterruptible power supply operates to supply sufficient power to the computer system when a power failure occurs. Therefore, even if a power failure occurs, the data in the disk cache memory will not be lost. Therefore, the disk cache control system selection circuit sends a signal for performing the disk cache control by the copy back method to the disk cache controller. Then, the disk cache controller controls the disk cache by the copy-back method and operates the computer system at high speed.

【0013】一方、残容量の値が設定値よりも小さい場
合、停電に対して無停電電源装置はコンピュータシステ
ムに十分に電源を供給できない可能性がある。そのため
停電が起こった時、ディスクキャッシュメモリのデータ
は消失してしまう可能性がある。よって、ディスクキャ
ッシュ制御方式選択回路は、ライトスルー方式でディス
クキャッシュ制御を行なう信号をディスクキャッシュコ
ントローラに送る。そして、ディスクキャッシュコント
ローラは、ライトスルー方式でディスクキャッシュ制御
を行なう。ライトスルー方式でディスクキャッシュ制御
を行なうと、ディスクキャッシュメモリに書き込まれる
データは、外部記憶装置にも書き込まれる。ここで、無
停電電源装置の充電池の残量が、十分なかった場合、コ
ンピュータシステムに電源を供給することはできない。
そのため、ディスクキャッシュメモリのデータは、消失
してしまう。しかし、ライトスルー方式でディスクキャ
ッシュ制御を行なっていれば、停電により、ディスクキ
ャッシュメモリのデータが万一消失した場合でも、外部
記憶装置からデータを参照すれば良く、誤ったデータに
よるコンピュータシステムの誤動作を防ぐことができ
る。
On the other hand, when the value of the remaining capacity is smaller than the set value, there is a possibility that the uninterruptible power supply cannot sufficiently supply power to the computer system against a power failure. Therefore, when a power failure occurs, the data in the disk cache memory may be lost. Therefore, the disk cache control system selection circuit sends a signal for performing disk cache control by the write through system to the disk cache controller. Then, the disk cache controller controls the disk cache by the write-through method. When the disk cache control is performed by the write-through method, the data written in the disk cache memory is also written in the external storage device. Here, if the remaining amount of the rechargeable battery of the uninterruptible power supply is not sufficient, power cannot be supplied to the computer system.
Therefore, the data in the disk cache memory is lost. However, if the disk cache control is performed by the write-through method, even if the data in the disk cache memory is lost due to a power failure, it is sufficient to refer to the data from the external storage device and malfunction of the computer system due to incorrect data. Can be prevented.

【0014】以上の様に、ディスクキャッシュ制御方式
選択回路は、無停電電源装置の充電池の残容量を把握
し、コンピュータシステムのディスクキャッシュ制御方
式を選択することにより、ディスクキャッシュメモリの
データを保護し、コンピュータシステムを誤動作無く運
転させる。
As described above, the disk cache control system selection circuit protects the data in the disk cache memory by grasping the remaining capacity of the rechargeable battery of the uninterruptible power supply and selecting the disk cache control system of the computer system. The computer system to operate without malfunction.

【0015】[0015]

【実施例】以下本発明の実施例について説明する。EXAMPLES Examples of the present invention will be described below.

【0016】図1は、本発明のディスクキャッシュ制御
方式選択回路を組み込んだ全体のシステムのブロック図
の一例を示している。1は無停電電源装置の充電池、2
は無停電電源装置の充電池1の残容量を検出する充電池
1の残容量検出回路(残容量検出手段)、3はコンピュ
ータシステムのディスクキャッシュ制御方式を選択する
ディスクキャッシュ制方式御選択回路、4はディスクキ
ャッシュメモリ7を制御するディスクキャッシュコント
ローラ、5はコンピュータシステムのCPU、6はコン
ピュータシステムの主メモリ、7は外部記憶装置8のデ
ータをキャッシュするディスクキャッシュメモリ、8は
データを格納する不揮発性のメモリであり、ハードディ
スク等の外部記憶装置、9は残容量検出器2からの検出
信号、10はディスクキャッシュ制御方式選択回路3か
ら送られるディスクキャッシュ制御方式を決定した信号
である。
FIG. 1 shows an example of a block diagram of an entire system incorporating a disk cache control system selection circuit of the present invention. 1 is a rechargeable battery for the uninterruptible power supply, 2
Is a remaining capacity detection circuit (remaining capacity detection means) of the rechargeable battery 1 for detecting the remaining capacity of the rechargeable battery 1 of the uninterruptible power supply, 3 is a disk cache control system selection circuit for selecting the disk cache control method of the computer system Reference numeral 4 is a disk cache controller for controlling the disk cache memory 7, 5 is a CPU of the computer system, 6 is a main memory of the computer system, 7 is a disk cache memory for caching data in the external storage device 8, and 8 is a nonvolatile memory for storing data. Is an external storage device such as a hard disk, 9 is a detection signal from the remaining capacity detector 2, and 10 is a signal sent from the disk cache control system selection circuit 3 for determining the disk cache control system.

【0017】図2は、図1で示したディスクキャッシュ
制御方式選択回路3の内部図を示しており、12はディ
スクキャッシュ制御方式の切り替えを行うための設定値
を決定する設定値回路である。そして、これらの設定値
回路12はディプスィッチ等などで構成される。また、
ソフト的には、コンピュータシステムで決定された設定
値の信号をディスクキャッシュ制御選択回路3に内部信
号で設定値回路12に送ることで設定値を決定できる。
信号13は設定値回路12で決定された設定値の信号で
ある。14は残容量の検出信号9と設定値の信号13と
を比較する比較器である。比較器14は、その時の最適
なディスクキャッシュ制御方式を決定する。そして、決
定されたディスクキャッシュ制御方式をコンピュータシ
ステムに信号10として送出する。
FIG. 2 shows an internal view of the disk cache control system selection circuit 3 shown in FIG. 1, and 12 is a set value circuit for determining a set value for switching the disk cache control system. Then, these set value circuits 12 are configured by a dip switch or the like. Also,
In terms of software, the set value can be determined by sending a signal of the set value determined by the computer system to the set value circuit 12 as an internal signal to the disk cache control selection circuit 3.
The signal 13 is a signal of the set value determined by the set value circuit 12. Reference numeral 14 is a comparator for comparing the remaining capacity detection signal 9 and the set value signal 13. The comparator 14 determines the optimum disk cache control method at that time. Then, the determined disk cache control method is sent to the computer system as a signal 10.

【0018】これら図1と図2で示すディスクキャッシ
ュ制御方式選択回路3の動作を図3のフローチャートで
参照しながら説明する。
The operation of the disk cache control system selection circuit 3 shown in FIGS. 1 and 2 will be described with reference to the flow chart of FIG.

【0019】ライトスルー方式とコピーバック方式とを
切り換えるための設定値は、システムの使用者が設定値
回路12で決定する。(ステップ)。充電池1の残容
量は、残容量検出器2が充電池1の電圧等を測定して決
定する。そして、残容量検出器2は、充電池1の残容量
をディスクキャッシュコントローラに送出する(ステッ
プ)。そして、ディスクキャッシュ制御方式選択回路
3は、充電池1の残容量と設定値の値を比較器14で比
較する(ステップ)。
The setting value for switching between the write-through method and the copy-back method is determined by the user of the system using the setting value circuit 12. (Step). The remaining capacity of the rechargeable battery 1 is determined by the remaining capacity detector 2 by measuring the voltage of the rechargeable battery 1 and the like. Then, the remaining capacity detector 2 sends the remaining capacity of the rechargeable battery 1 to the disk cache controller (step). Then, the disk cache control system selection circuit 3 compares the remaining capacity of the rechargeable battery 1 with the set value by the comparator 14 (step).

【0020】ここで、残容量の値が設定値より大きい場
合、ディスクキャッシュ制御方式選択回路3は、信号1
0の電圧値をHiレベルにアサートし、ディスクキャッ
シュコントローラ4に送出する(ステップ)。Hiレ
ベルの信号を受け取ったディスクキャッシュコントロー
ラ4は、信号10がLowレベルからHiレベルに変化
したか調べる(ステップ)。信号10が、Lowレベ
ルからHiレベルに変化していないのなら、コンピュー
タシステムはコピーバック方式でディスクキャッシュ制
御を行なっていたと判断され、ステップに戻る。一
方、信号10がLowレベルからHiレベルに変化した
なら、コンピュータシステムはライトスルー方式でディ
スクキャッシュ制御を行なっていたと判断され、ディス
クキャッシュコントローラ4は、ディスクキャッシュ制
御をコピーバック方式に切り替える操作を行なう(ステ
ップ)。ディスクキャッシュコントローラ4はコピー
バック方式でディスクキャッシュ制御を行なうことによ
り、コンピュータシステムは、高速に運転する(ステッ
プ)。
If the value of the remaining capacity is larger than the set value, the disk cache control system selection circuit 3 outputs the signal 1
The voltage value of 0 is asserted to the Hi level and sent to the disk cache controller 4 (step). The disk cache controller 4, which has received the Hi-level signal, checks whether the signal 10 has changed from the Low level to the Hi level (step). If the signal 10 has not changed from the Low level to the Hi level, it is determined that the computer system is performing the disk cache control by the copy back method, and the process returns to the step. On the other hand, if the signal 10 changes from the Low level to the Hi level, it is determined that the computer system is performing the disk cache control by the write-through method, and the disk cache controller 4 performs the operation of switching the disk cache control to the copyback method. (Step). The disk cache controller 4 performs disk cache control by the copy back method, so that the computer system operates at high speed (step).

【0021】また、残容量の値が設定値より小さい場
合、ディスクキャッシュ制御方式選択回路3は、信号1
0の電圧値をLowレベルにアサートし、ディスクキャ
ッシュコントローラ4に送出する(ステップ)。Lo
wレベルの信号を受け取ったディスクキャッシュコント
ローラ4は、信号10を受け取った時、信号10がHi
レベルからLowレベルに変化したか調べる(ステップ
)。信号10が、HiレベルからLowレベルに変化
していないのなら、コンピュータシステムはライトスル
ー方式でディスクキャッシュ制御を行なっていたと判断
され、ステップに戻る。一方、信号10がHiレベル
からLowレベルに変化したなら、コンピュータシステ
ムはコピーバック方式でディスクキャッシュ制御を行な
っていたと判断され、ディスクキャッシュコントローラ
4は、ディスクキャッシュ制御をライトスルー方式に切
り替える操作を行なう。この場合、ディスクキャッシュ
メモリ7に更新データが書き込まれているため、ディス
クキャッシュコントローラ4は、そのディスクキャッシ
ュメモリ7の更新データを外部記憶装置8に書き込む操
作を行なう。この操作をディスクキャッシュメモリ7を
フラッシュするという(ステップA)。ディスクキャッ
シュメモリ7をフラッシュした後、ディスクキャッシュ
コントローラ4はライトスルー方式で、ディスクキャッ
シュ制御を行なう。ライトスルー方式でディスクキャッ
シュ制御を行なうことにより、ディスクキャッシュメモ
リ7のデータと外部記憶装置8のデータは等しくなる。
この時、停電などで電源が遮断され、ディスクキャッシ
ュメモリ7のデータが消失してしまっても、外部記憶装
置8に消失したデータと同じデータが保存されているた
め、必要なデータを外部記憶装置8から読み込めばよ
い。ゆえに、データの誤りによるコンピュータシステム
の誤動作を防ぐことができる。(ステップB)。
When the value of the remaining capacity is smaller than the set value, the disk cache control system selection circuit 3 outputs the signal 1
The voltage value of 0 is asserted to the low level and sent to the disk cache controller 4 (step). Lo
The disk cache controller 4 which has received the signal of the w level, when receiving the signal 10, changes the signal 10 to Hi.
Check whether the level has changed to the Low level (step). If the signal 10 has not changed from the Hi level to the Low level, it is determined that the computer system is performing the disk cache control by the write-through method, and the process returns to the step. On the other hand, if the signal 10 changes from the Hi level to the Low level, it is determined that the computer system is performing the disk cache control by the copy back method, and the disk cache controller 4 performs the operation of switching the disk cache control to the write through method. . In this case, since the update data is written in the disk cache memory 7, the disk cache controller 4 performs the operation of writing the update data in the disk cache memory 7 into the external storage device 8. This operation is called flushing the disk cache memory 7 (step A). After flushing the disk cache memory 7, the disk cache controller 4 performs disk cache control by the write-through method. By performing the disk cache control by the write-through method, the data in the disk cache memory 7 and the data in the external storage device 8 become equal.
At this time, even if the power of the disk cache memory 7 is lost due to a power failure due to a power failure or the like, the same data as the lost data is stored in the external storage device 8. You can read from 8. Therefore, it is possible to prevent malfunction of the computer system due to data error. (Step B).

【0022】ここで実際に、充電池1の残容量によるデ
ィスクキャッシュ制御方式の切り替えを図4を用いて説
明する。図4は、充電池1の残容量が時間に従って増え
ている様子を示している。そして、充電池1の残容量と
設定値に対する信号10の変化とディスクキャッシュ制
御方式の切り替わりが示してある。設定値回路12によ
り設定値を充電池1の満残容量のX%に定める。残容量
検出器2は充電池の1の残容量を検出し、その検出信号
9をディスクキャッシュ制御選択回路3に送出する。デ
ィスクキャッシュ制御方式選択回路3は、残容量がX%
より小さいならディスクキャッシュコントローラにLo
w信号10を送出する。そして、Low信号10を受け
取ったコンピュータシステムのディスクキャッシュコン
トローラ4は、ライトスルー方式でディスクキャッシュ
を行う。また、残容量がX%以上ならば、ディスクキャ
ッシュ制御選択回路3は、Hi信号10をディスクキャ
ッシュコントローラに送出する。そして、Hi信号10
を受け取ったコンピュータシステムのディスクキャッシ
ュコントローラ4は、コピーバック方式でディスクキャ
ッシュ制御を行う。
Here, switching of the disk cache control method depending on the remaining capacity of the rechargeable battery 1 will be described with reference to FIG. FIG. 4 shows how the remaining capacity of the rechargeable battery 1 increases with time. Then, the change of the signal 10 with respect to the remaining capacity of the rechargeable battery 1 and the set value and the switching of the disk cache control method are shown. The set value circuit 12 sets the set value to X% of the full remaining capacity of the rechargeable battery 1. The remaining capacity detector 2 detects the remaining capacity of the rechargeable battery 1, and sends a detection signal 9 to the disk cache control selection circuit 3. The disk cache control method selection circuit 3 has a remaining capacity of X%.
If smaller, Lo to disk cache controller
The w signal 10 is transmitted. Then, the disk cache controller 4 of the computer system that receives the Low signal 10 performs the disk cache by the write-through method. If the remaining capacity is X% or more, the disk cache control selection circuit 3 sends the Hi signal 10 to the disk cache controller. Then, the Hi signal 10
The disk cache controller 4 of the computer system that has received the command performs disk cache control by the copy back method.

【0023】また、図1には、ハードウェアによるディ
スクキャッシュ制御を用いたコンピュータシステムを示
したが、ソフトウェアによるディスクキャッシュ制御も
同様である。図5にソフトウェアによるディスクキャッ
シュ制御のコンピュータシステムの一例を示す。図5で
ディスクキャッシュメモリ7は、主メモリ6上にある。
そして、ディスクキャッシュメモリ7は、ソフトウェア
によって管理されている。ゆえに、ディスクキャッシュ
制御方式選択回路3からの信号10に従ってソフトウェ
アがコピーバック方式かライトスルー方式のどちらかで
ディスクキャッシュ制御を行う。よって、主メモリ6上
のディスクキャッシュメモリ7をソフトウェアが制御す
ることになる。従って、ソフトウェアによるディスクキ
ャッシュ制御を用いたコンピュータシステムもディスク
キャッシュ制御選択回路3からの信号10でディスクキ
ャッシュ制御を選択することが出来る。
Although FIG. 1 shows a computer system using disk cache control by hardware, the same applies to disk cache control by software. FIG. 5 shows an example of a computer system of disk cache control by software. In FIG. 5, the disk cache memory 7 is on the main memory 6.
The disk cache memory 7 is managed by software. Therefore, according to the signal 10 from the disk cache control system selection circuit 3, the software performs the disk cache control by either the copy back system or the write through system. Therefore, the software controls the disk cache memory 7 on the main memory 6. Therefore, the computer system using the disk cache control by software can also select the disk cache control by the signal 10 from the disk cache control selection circuit 3.

【0024】[0024]

【発明の効果】以上の通り本発明によれば、無停電電源
装置の充電池の残容量の値に対してディスクキャッシュ
制御方式を選択するディスクキャッシュ制御方式選択回
路を設けることで、充電池の残容量が少ないときにはラ
イトスルー方式でディスクキャッシュ制御を行なうこと
により、停電時におけるディスクキャッシュメモリの更
新データの消失に対してもコンピュータシステムを誤動
作させずに運転することができる。また、残容量が十分
あるときには、コピーバック方式でディスクキャッシュ
制御をさせることにより、コンピュータシステムを高速
に運転できる。
As described above, according to the present invention, by providing the disk cache control system selection circuit for selecting the disk cache control system for the value of the remaining capacity of the rechargeable battery of the uninterruptible power supply, When the remaining capacity is small, the disk cache control is performed by the write-through method, so that the computer system can be operated without malfunction even when the update data of the disk cache memory is lost at the time of power failure. Further, when the remaining capacity is sufficient, the computer system can be operated at high speed by controlling the disk cache by the copy back method.

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

【図1】本発明を含んだ全体のシステムの一例を示した
図である。
FIG. 1 is a diagram showing an example of an entire system including the present invention.

【図2】本発明のディスクキャッシュ制御選択回路3の
一例を示した図である。
FIG. 2 is a diagram showing an example of a disk cache control selection circuit 3 of the present invention.

【図3】図1、図2でのディスクキャッシュ制御選択回
路3の動作を説明するフローチャート図である。
FIG. 3 is a flowchart illustrating the operation of a disk cache control selection circuit 3 shown in FIGS. 1 and 2.

【図4】設定値を残量のX%に定めた場合、充電池1の
残量の変化によって、信号10がHiかLowに切り変
わる様子と、ディスクキャッシュ制御がライトスルー方
式かコピーバック方式かに切り変わる様子を示した図で
ある。
FIG. 4 shows how the signal 10 switches between Hi and Low depending on the change in the remaining amount of the rechargeable battery 1 when the set value is set to X% of the remaining amount, and the disk cache control is a write-through method or a copy-back method. It is the figure which showed a mode that it switched to.

【図5】ソフトウェアによるディスクキャッシュを用い
たコンピュータシステムの図である。
FIG. 5 is a diagram of a computer system using a software disk cache.

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

1…充電池、 2…残量検出器、 3…ディスクキャッシュ制御選択回路、 4…ディスクキャッシュコントローラ、 5…CPU、 6…主メモリ、 7…ディスクキャッシュメモリ、 8…外部記憶装置、 9…残量の検出信号、 10…ディスクキャッシュ制御決定信号、 12…設定値回路、 13…設定値回路12で決定された設定値を示す信号、 14…比較器。 1 ... Rechargeable battery, 2 ... Remaining amount detector, 3 ... Disk cache control selection circuit, 4 ... Disk cache controller, 5 ... CPU, 6 ... Main memory, 7 ... Disk cache memory, 8 ... External storage device, 9 ... Remaining Quantity detection signal, 10 ... Disk cache control determination signal, 12 ... Setting value circuit, 13 ... Signal indicating setting value determined by setting value circuit 12, 14 ... Comparator.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】充電池と、前記充電池の残容量を検出する
手段とを備えた無停電電源装置と、電圧値設定手段と、
ディスクキャッシュメモリと、外部記憶装置と、前記デ
ィスクキャッシュメモリと前記外部記憶装置とを制御す
るディスクキャッシュコントローラを備えディスクキャ
ッシュを行っているコンピュータシステムにおいて、前
記残容量検出手段により検出した前記充電池の残容量と
前記電圧値設定手段によって設定した電圧設定値の比較
により、上記ディスクキャッシュ制御をコピーバック方
式かライトスルー方式かのどちらかに選択することを特
徴とするディスクキャッシュの制御方式。
1. An uninterruptible power supply comprising a rechargeable battery and means for detecting the remaining capacity of the rechargeable battery, and voltage value setting means.
In a computer system performing a disk cache including a disk cache memory, an external storage device, and a disk cache controller that controls the disk cache memory and the external storage device, the rechargeable battery detected by the remaining capacity detecting means A disk cache control method characterized in that the disk cache control is selected from a copy-back method and a write-through method by comparing the remaining capacity with a voltage setting value set by the voltage value setting means.
【請求項2】請求項1に述べたディスクキャッシュ制御
方式選択回路において、前記充電池の残容量検出手段か
ら検出した残容量と前記電圧値設定手段によって設定し
た電圧設定値の比較により、前記残容量の値が前記電圧
設定値より小さい場合、前記ディスクキャッシュ制御方
式選択回路は、ライトスルー方式のディスクキャッシュ
制御方式を選択し、前記ディスクキャッシュ方式選択回
路からの信号により前記ディスクキャッシュコントロー
ラは、ライトスルー方式でディスクキャッシュを行なう
ことにより、停電等による前記ディスクキャッシュメモ
リのデータ消失に対して、ディスクキャッシュメモリの
データを保護することを特徴とするディスクキャッシュ
の制御方式。
2. The disk cache control system selection circuit according to claim 1, wherein the remaining capacity detected by the remaining capacity detecting means of the rechargeable battery is compared with the voltage set value set by the voltage value setting means, and the remaining capacity is determined. When the capacity value is smaller than the voltage setting value, the disk cache control system selection circuit selects a write-through system disk cache control system, and the disk cache controller selects a write-through system by a signal from the disk cache system selection circuit. A disk cache control method, which protects data in the disk cache memory against data loss due to a power failure or the like by performing the disk cache by a through method.
【請求項3】請求項1に述べたディスクキャッシュ制御
方式選択回路において、前記ディスクキャッシュ制御の
切り替えを行うための前記電圧設定値を決定する設定値
回路を備え、前記電圧設定値と前記充電池の残容量検出
手段からの検出信号とを比較する比較器を備え、比較器
によりコンピュータシステムのディスクキャッシュ制御
方式をライトスルー方式かコピーバック方式かのどちら
かに選択し、選択したディスクキャッシュ制御方式の信
号を前記比較器がディスクキャッシュコントローラに送
ることを特徴とするディスクキャッシュ制御方式選択回
路を備えたディスクキャッシュの制御方式。
3. The disk cache control system selection circuit according to claim 1, further comprising a set value circuit for determining the voltage set value for switching the disk cache control, the voltage set value and the rechargeable battery. A comparator for comparing the detection signal from the remaining capacity detecting means of the computer system, and the comparator selects the write-through method or the copy-back method for the disk cache control method of the computer system. The control method of the disk cache including a disk cache control method selection circuit, wherein the comparator sends the signal of (1) to the disk cache controller.
【請求項4】請求項3に述べた設定値回路において、ハ
ードウェアまたはソフトウェァにより電圧設定値を定め
られる設定値回路を組み込んだことを特徴とするディス
クキャッシュ制御方式選択回路を備えたディスクキャッ
シュの制御方式。
4. A set value circuit according to claim 3, wherein a set value circuit for setting a voltage set value by hardware or software is incorporated, and a disk cache control method selecting circuit is provided. control method.
【請求項5】請求項1に述べたディスクキャッシュ方式
選択回路において、ディスクキャッシュ制御方式選択回
路がコンピュータシステムに内蔵されていることを特徴
とするコンピュータシステムのディスクキャッシュの制
御方式。
5. A disk cache control method for a computer system according to claim 1, wherein the disk cache control method selection circuit is built in the computer system.
【請求項6】請求項1に述べたディスクキャッシュコン
トローラにおいて、ハードウェアであろうとソフトウェ
アであろうとディスクキャッシュ制御方式選択回路から
の信号により、ディスクキャッシュ制御方式の選択がで
きることを特徴とするコンピュータシステムのディスク
キャッシュの制御方式。
6. The computer system according to claim 1, wherein the disk cache control system can be selected by a signal from a disk cache control system selection circuit whether it is hardware or software. Disk cache control method.
JP5092721A 1993-04-20 1993-04-20 Control system for disk cache Pending JPH06309232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5092721A JPH06309232A (en) 1993-04-20 1993-04-20 Control system for disk cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5092721A JPH06309232A (en) 1993-04-20 1993-04-20 Control system for disk cache

Publications (1)

Publication Number Publication Date
JPH06309232A true JPH06309232A (en) 1994-11-04

Family

ID=14062321

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5092721A Pending JPH06309232A (en) 1993-04-20 1993-04-20 Control system for disk cache

Country Status (1)

Country Link
JP (1) JPH06309232A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2785693A1 (en) * 1998-11-06 2000-05-12 Bull Sa DEVICE AND METHOD FOR WRITE SECURE WRITE DISC FOR HARD DISCS IN MASS MEMORY SUBSYSTEM
US7376785B2 (en) 2004-09-22 2008-05-20 Hitachi, Ltd. Storage device and write access processing method for storage device
KR100916550B1 (en) * 2007-10-08 2009-09-14 고려대학교 산학협력단 method for proventing damage of instruction cache memory by malicious code
JP2009217603A (en) * 2008-03-11 2009-09-24 Toshiba Corp Memory system
JP2011159124A (en) * 2010-02-01 2011-08-18 Fujitsu Ltd Disk array apparatus and method for controlling the same
JP2013043458A (en) * 2011-08-22 2013-03-04 Alpine Electronics Inc On-vehicle device
US8706950B2 (en) 2008-03-01 2014-04-22 Kabushiki Kaisha Toshiba Memory system
US8762643B2 (en) 2010-02-05 2014-06-24 Fujitsu Limited Control method for disk array apparatus and disk array apparatus

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000028422A1 (en) * 1998-11-06 2000-05-18 Bull S.A. Disk cache device and method for secure writing of hard disks in mass memory subsystems
US6480933B1 (en) 1998-11-06 2002-11-12 Bull S.A. Disk cache device and method for secure writing of hard disks in mass memory subsystems
FR2785693A1 (en) * 1998-11-06 2000-05-12 Bull Sa DEVICE AND METHOD FOR WRITE SECURE WRITE DISC FOR HARD DISCS IN MASS MEMORY SUBSYSTEM
US7376785B2 (en) 2004-09-22 2008-05-20 Hitachi, Ltd. Storage device and write access processing method for storage device
KR100916550B1 (en) * 2007-10-08 2009-09-14 고려대학교 산학협력단 method for proventing damage of instruction cache memory by malicious code
US9201717B2 (en) 2008-03-01 2015-12-01 Kabushiki Kaisha Toshiba Memory system
US11409442B2 (en) 2008-03-01 2022-08-09 Kioxia Corporation Memory system
US8706950B2 (en) 2008-03-01 2014-04-22 Kabushiki Kaisha Toshiba Memory system
US10901625B2 (en) 2008-03-01 2021-01-26 Toshiba Memory Corporation Memory system
JP2009217603A (en) * 2008-03-11 2009-09-24 Toshiba Corp Memory system
JP2011159124A (en) * 2010-02-01 2011-08-18 Fujitsu Ltd Disk array apparatus and method for controlling the same
US8762643B2 (en) 2010-02-05 2014-06-24 Fujitsu Limited Control method for disk array apparatus and disk array apparatus
JP2013043458A (en) * 2011-08-22 2013-03-04 Alpine Electronics Inc On-vehicle device

Similar Documents

Publication Publication Date Title
US6693840B2 (en) Non-volatile semiconductor memory device with enhanced erase/write cycle endurance
US7111134B2 (en) Subsystem and subsystem processing method
JP3937214B2 (en) Storage device for recording error correction count
KR101110490B1 (en) Information processing device, processor and memory management method
JP5402693B2 (en) Disk array device control method and disk array device
US9075733B1 (en) Selective storage of address mapping metadata in a system having multiple memories
EP0618535A2 (en) EEprom card with defective cell substitution
JPH06324865A (en) Multiple estimation type branch estimation mechanism
JP3990439B2 (en) Cache algorithm adaptable to temperature sensitive memory
JP3302847B2 (en) Storage device
JPH06309232A (en) Control system for disk cache
EP0173967B1 (en) Microprogram load unit
KR100630702B1 (en) Controller for instruction cache and instruction translation look-aside buffer, and method of controlling the same
US6949409B2 (en) Register setting method and semiconductor device
KR910008678B1 (en) System which controls memory contents
JPH064228A (en) Semiconductor disk device
US20030144804A1 (en) Automatic detection of battery-backed data integrity in volatile memory
JP2002342147A (en) Nonvolatile memory device and memory control method thereof
JP2002014947A (en) Microcomputer
JP3239935B2 (en) Tightly-coupled multiprocessor system control method, tightly-coupled multiprocessor system, and recording medium therefor
JP4098400B2 (en) Semiconductor disk device
JPH08137753A (en) Disk cache device
JPH0744982A (en) Data recording/reproducing device and method for controlling data write
JP2001282402A (en) Recording medium controller
JP2513421B2 (en) Storage device