[go: up one dir, main page]

JPH07121444A - Auxiliary storage device - Google Patents

Auxiliary storage device

Info

Publication number
JPH07121444A
JPH07121444A JP5263854A JP26385493A JPH07121444A JP H07121444 A JPH07121444 A JP H07121444A JP 5263854 A JP5263854 A JP 5263854A JP 26385493 A JP26385493 A JP 26385493A JP H07121444 A JPH07121444 A JP H07121444A
Authority
JP
Japan
Prior art keywords
data
buffer memory
memory
writing
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
JP5263854A
Other languages
Japanese (ja)
Inventor
Yasuhiko Aizawa
安彦 相沢
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP5263854A priority Critical patent/JPH07121444A/en
Publication of JPH07121444A publication Critical patent/JPH07121444A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To inexpensively provide an auxiliary storage device capable of ensuring the write of specified data and satisfactrily holding the capacity of a cache memory capable of high-speed access at the time of occurrence of a fault in a power source while writing data. CONSTITUTION:In the case of occurrence of the fault in the power source at the time of storing data stored in a buffer memory 13 in a disk 14, the device executes restoring processing which writes only data, which is temporarily stored in a nonvolatile memory 13a, in the disk 14 after restoring the fault of the power source.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、バッファメモリとして
揮発性メモリ及び不揮発性メモリを備えた補助記憶装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an auxiliary storage device having a volatile memory and a non-volatile memory as a buffer memory.

【0002】[0002]

【従来の技術】従来、ディスク装置に代表される補助記
憶装置に対するアクセスを高速化するために、CPUと
ディスク装置との橋渡し役を担うバッファメモリを用い
ることが多い。
2. Description of the Related Art Conventionally, in order to speed up access to an auxiliary storage device represented by a disk device, a buffer memory that serves as a bridge between the CPU and the disk device is often used.

【0003】このバッファメモリは、CPUがディスク
装置から読み込むデータを一時的に蓄えておき、再読み
込みする際にはこのバッファメモリから読み出すように
動作するキャッシュメモリ(cashe memory)として一般
的に知られている。なお、この場合には、スタティック
RAM(SRAM)のように高速なアクセス可能なメモ
リチップが用いられる。
This buffer memory is generally known as a cache memory that temporarily stores data to be read from the disk device by the CPU and reads the data from the buffer memory when the data is read again. ing. In this case, a high-speed accessible memory chip such as a static RAM (SRAM) is used.

【0004】また、このバッファメモリは、上記キャッ
シュメモリとしてアクセスの高速化を図るだけでなく、
データ書き込み時のライトバッファ(write buffer)と
しても用いられている。
The buffer memory not only serves as the cache memory to speed up access, but also
It is also used as a write buffer when writing data.

【0005】例えば、特開昭64−66727号公報に
は、ディスク装置にライトバッファの役割を持つ不揮発
性メモリを設け、電源異常が発生して書き込み未完に終
わったデータについては、電源回復後に不揮発性メモリ
を用いた再書き込みを行うことによりデータの書き込み
を保証するディスクアクセス制御方式が開示されてい
る。
For example, in Japanese Patent Laid-Open No. 64-66727, a non-volatile memory having a role of a write buffer is provided in a disk device, and data that has not been completely written due to a power failure occurs in the nonvolatile memory after the power is restored. There is disclosed a disk access control method that guarantees writing of data by performing rewriting using a non-volatile memory.

【0006】しかしながら、上記従来技術によると、再
書き込み時に必要となるデータ等を全て不揮発性メモリ
上に保持する必要があるため、大量の不揮発性メモリが
必要となり、また書き込み未完であると認識された全て
のデータがディスク装置に再書き込みされるため、電源
異常回復後の再書き込みに長時間を要するという問題が
ある。
However, according to the above-mentioned conventional technique, it is necessary to hold a large amount of non-volatile memory because it is necessary to hold all the data and the like required for rewriting in the non-volatile memory, and it is recognized that the writing is incomplete. Also, since all the data is rewritten to the disk device, there is a problem that it takes a long time to rewrite after recovery from the power failure.

【0007】このため、特開平4−138540号公報
においては、メインメモリの一部を電池バックアップ付
きの揮発性メモリで構成することにより低コストで電源
異常に対応できるメモリバックアップ方法が開示されて
いる。
For this reason, Japanese Patent Application Laid-Open No. 4-138540 discloses a memory backup method that can cope with a power failure at low cost by configuring a part of the main memory with a volatile memory with a battery backup. .

【0008】しかし、上記従来技術は、あくまでも書き
込み時のデータ保護という観点からなされたものであ
り、キャッシュメモリとしての読み込み時の高速なアク
セスを考慮したものではない。このため、電池によりバ
ックアップがされない揮発性メモリ上の対象ファイルに
ついては、高速なアクセスができないことになる。
However, the above-mentioned conventional technique is made only from the viewpoint of data protection at the time of writing, and does not consider high-speed access at the time of reading as a cache memory. Therefore, the target file on the volatile memory that is not backed up by the battery cannot be accessed at high speed.

【0009】したがって、上記従来技術を用いて高速ア
クセス可能な対象ファイルを多くするには、キャッシュ
メモリとして稼動する電池バックアップ付きの揮発性メ
モリ部分の容量を大きくする必要があるため、バックア
ップを行う電池が必要となってしまう。
Therefore, in order to increase the number of target files that can be accessed at high speed using the above-mentioned conventional technique, it is necessary to increase the capacity of the volatile memory portion with a battery backup that operates as a cache memory. Will be needed.

【0010】[0010]

【発明が解決しようとする課題】このように、上記従来
技術を用いたとしても、書き込み時の電源異常に伴うデ
ータ保護と、読み出し時の高速アクセス性という両者の
要求を同時に満足することができない。
As described above, even if the above-mentioned conventional technique is used, it is not possible to simultaneously satisfy both requirements of data protection due to power supply abnormality at the time of writing and high-speed accessibility at the time of reading. .

【0011】そこで、本発明では上記問題を解決し、デ
ータ書き込み中に電源障害が発生した場合に、特定のデ
ータを書き込み保証することができ、かつ高速なアクセ
スが可能なキャッシュメモリの容量を十分に保持できる
補助記憶装置を低コストで提供することを目的とする。
In view of the above, the present invention solves the above-mentioned problems, and when a power failure occurs during data writing, it is possible to guarantee writing of specific data and to have a sufficient capacity of a cache memory that can be accessed at high speed. It is an object of the present invention to provide an auxiliary storage device that can be stored in a memory at low cost.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するた
め、本発明は、データを記憶する主記憶部と、バッファ
メモリとを具備し、前記主記憶部にデータを書き込む際
及び前記主記憶部からデータを読み出す際に該データを
一時的に前記バッファメモリに記憶する補助記憶装置に
おいて、前記バッファメモリは、不揮発性メモリからな
る第1の記憶手段と、揮発性メモリからなる第2の記憶
手段とを具備し、前記主記憶部に対してデータを書き込
む際に、特定のデータは前記第1の記憶手段に選択的に
記憶するとともに、電源障害が生じた場合は前記第1の
記憶手段に記憶されたデータのみを該電源障害が復旧し
た後に前記主記憶部に書き込むことにより復旧処理を行
う制御手段を具備したことを特徴とする。
To achieve the above object, the present invention comprises a main memory unit for storing data and a buffer memory, and when writing data to the main memory unit and the main memory unit. In an auxiliary storage device for temporarily storing the data in the buffer memory when reading the data from the storage device, the buffer memory includes a first storage unit made of a non-volatile memory and a second storage unit made of a volatile memory. When writing data to the main storage unit, specific data is selectively stored in the first storage unit, and when a power failure occurs, the specific storage unit is stored in the first storage unit. It is characterized by comprising control means for performing a restoration process by writing only the stored data to the main memory after the power failure is restored.

【0013】[0013]

【作用】本発明によれば、バッファメモリに記憶したデ
ータを主記憶部に記憶する際に電源障害が生じた場合に
は、電源障害が復旧した後に第1の記憶手段に一時的に
記憶したデータのみを主記憶部に書き込む復旧処理を行
う。これにより、特定のデータを選択的に書き込み保証
するとともに、迅速な復旧処理を行うことができる。
According to the present invention, when a power failure occurs when the data stored in the buffer memory is stored in the main memory, the data is temporarily stored in the first storage means after the power failure is restored. A recovery process of writing only data to the main memory is performed. As a result, it is possible to selectively guarantee writing of specific data and perform a quick recovery process.

【0014】また、主記憶部にデータを書き込む際及び
主記憶部からデータを読み出す際には、第1の記憶手段
及び第2の記憶手段からなるバッファメモリに対して該
データを一時的に記憶するため、キャッシュメモリの容
量を十分に保持することができる。
When writing data to the main storage unit and reading data from the main storage unit, the data is temporarily stored in the buffer memory composed of the first storage unit and the second storage unit. Therefore, the capacity of the cache memory can be sufficiently held.

【0015】ここで、第1の記憶手段を使用するか第2
の記憶手段を使用するかの決定を選択情報を用いて行う
ことにより、ユーザが書き込みを保証するか否かをデー
タ毎に判断することができる。
Here, whether the first storage means is used or the second storage means is used.
By using the selection information to determine whether or not to use the storage means, it is possible for the user to determine whether or not writing is guaranteed for each data.

【0016】また、第1の記憶手段を使用するか第2の
記憶手段を使用するかの決定を主記憶部のアドレス情報
にしたがって決定することにより、ユーザがバッファメ
モリの選択を行なわなくても、特定のデータを書き込み
保証することができる。
Further, by deciding whether to use the first storage means or the second storage means according to the address information of the main storage portion, the user does not have to select the buffer memory. , Writing specific data can be guaranteed.

【0017】[0017]

【実施例】以下、本発明に係る補助記憶装置の一実施例
としてディスク装置を例にとり図面を参照して説明す
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A disk device will be described below as an embodiment of an auxiliary storage device according to the present invention with reference to the drawings.

【0018】図1は、本発明に係るディスク装置の全体
構成を示すブロック図である。
FIG. 1 is a block diagram showing the overall configuration of a disk device according to the present invention.

【0019】図1に示すように、このディスク装置11
は、制御部12とバッファメモリ13とディスク装置1
4とデータバス15とから構成される。
As shown in FIG. 1, this disk device 11
Is a control unit 12, a buffer memory 13, and a disk device 1.
4 and a data bus 15.

【0020】制御部12は、ディスク14に対する書き
込み制御及びディスク14からの読み出し制御を行うも
のであり、いずれの場合にもバッファメモリ13を介し
て制御する。
The control unit 12 controls writing to the disk 14 and reading from the disk 14, and in any case, controls via the buffer memory 13.

【0021】具体的には、データバス15からディスク
14に書き込みを行うライトデータを受信したならば、
該ライトデータに付与されたディスク14の格納場所に
関するアドレス情報を参照して、該ライトデータは不揮
発性メモリ(以下「NVRAM」と言う。)をバッファ
メモリとして用いる書き込み保証付きデータか否かを判
断し、書き込み保証付きデータである場合にはNVRA
Mを介してディスク14の所定の位置にデータを格納す
るよう制御する。
Specifically, if write data for writing to the disk 14 is received from the data bus 15,
It is determined whether the write data is write-guaranteed data using a non-volatile memory (hereinafter referred to as "NVRAM") as a buffer memory by referring to the address information regarding the storage location of the disk 14 given to the write data. However, if the data is guaranteed write data, NVRA
The data is controlled to be stored in a predetermined position on the disk 14 via M.

【0022】また、データの読み出し指示を受けたなら
ば、バッファメモリ13上に存在するデータについては
該バッファメモリ13から、バッファメモリ13上にな
いデータについてはディスク14からバッファメモリ1
3を介して該当データをデータバス15に送出するよう
制御する。
When a data read instruction is received, data existing in the buffer memory 13 is sent from the buffer memory 13, and data not existing in the buffer memory 13 is sent from the disk 14 to the buffer memory 1.
The data is controlled so as to be sent to the data bus 15 via No. 3.

【0023】バッファメモリ13は、同じデータを複数
回読み出す場合にはディスク14の代わりに該バッファ
メモリ13から読み出すことによりアクセスを高速化す
るとともに、ディスク14にライトデータを格納する場
合には書き込み中のデータを保護するために使用される
ものであり、揮発性メモリ13b(以下「RAM13
b」という)及びNVRAM13aから構成される。
The buffer memory 13 speeds up access by reading the same data from the buffer memory 13 instead of the disk 14 when reading the same data a plurality of times, and during writing when storing write data in the disk 14. Volatile memory 13b (hereinafter referred to as "RAM13").
b ”) and NVRAM 13a.

【0024】揮発性メモリ13bは、電源停止に際して
メモリ内容がリフレッシュされるメモリであり、高速ア
クセス可能なSRAMや集積度が高く経済的なダイナミ
ックRAM(DRAM)がメモリチップとして用いられ
る。
The volatile memory 13b is a memory whose contents are refreshed when the power supply is stopped, and an SRAM which can be accessed at high speed or a dynamic RAM (DRAM) which is highly integrated and economical is used as a memory chip.

【0025】NVRAM13aは、電源停止に際しても
メモリ内容が保持できるメモリであり、SRAMを電池
でバックアップしたもの等が用いられる。
The NVRAM 13a is a memory that can retain the contents of the memory even when the power supply is stopped, and an SRAM backed up by a battery or the like is used.

【0026】ディスク14は、ディスク装置の主体をな
すものであり、ライトデータをディスク上に保持する。
ここで用いるディスクは、磁気ディスクや光ディスク等
各種のものが用いられる。
The disk 14 is the main body of the disk device and holds write data on the disk.
Various disks such as magnetic disks and optical disks are used as the disks used here.

【0027】次に、上記構成を持つディスク装置11の
制御部12が行う全体処理について図2を用いて説明す
る。
Next, the overall processing performed by the control unit 12 of the disk device 11 having the above configuration will be described with reference to FIG.

【0028】図2に示すように、ディスク装置11では
入出力要求の有無を確認し(S201)、入出力要求が
なければバッファメモリ13に書き込み未完のデータが
存在するか否かを確認する(S202)。そして、書き
込み未完のデータが存在する場合には所定量の当該デー
タをディスク14に掃き出す(S203)。
As shown in FIG. 2, the disk device 11 confirms the presence / absence of an input / output request (S201). If there is no input / output request, it is confirmed whether or not unwritten data exists in the buffer memory 13 (step S201). S202). If there is unwritten data, a predetermined amount of the data is swept onto the disk 14 (S203).

【0029】以上の処理を入出力要求があるまで繰り返
し、バッファメモリ13上に滞留する書き込み未完のデ
ータをディスク14に掃き出す。
The above processing is repeated until an input / output request is made, and the unwritten data that remains in the buffer memory 13 is flushed to the disk 14.

【0030】なお、不揮発性メモリ13aからディスク
14に書き込みを行っている間に電源障害が発生し、デ
ィスク14に対する書き込みが正常に終了していない場
合にも、電源回復後上記処理によりディスク14に再書
き込みされる。
Even if the power failure occurs while writing to the disk 14 from the nonvolatile memory 13a and the writing to the disk 14 is not normally completed, the disk 14 is written to the disk 14 by the above processing after the power is restored. Will be rewritten.

【0031】また、入出力要求待ち状態(S201)に
おいて、入出力要求が発生した場合には、書き込み要求
か読み出し要求かを確認し(S204)、読み出し要求
である場合には、後述するバッファメモリを介した読み
出し処理(S205)を行った後、入出力要求待ち状態
(S201)に移行する。
When an input / output request is issued in the input / output request waiting state (S201), it is confirmed whether the request is a write request or a read request (S204). After performing the reading process (S205) via the, the process shifts to the input / output request waiting state (S201).

【0032】一方、書き込み要求である場合には、該デ
ータが書き込まれるディスク14のアドレスを参照して
書き込み保証を行うか否かを確認する(S206)。
On the other hand, if the request is a write request, the address of the disk 14 in which the data is written is referenced to confirm whether or not the write is guaranteed (S206).

【0033】この書き込み保証とは、受信データを蓄え
たバッファメモリ13からディスク14に書き込み中に
電源異常が発生した場合においても、電源回復後に該バ
ッファメモリに蓄えた内容を再書き込みすることによ
り、ディスク14に対するデータの書き込みを保証する
ことを言う。
The guarantee of writing is to rewrite the contents stored in the buffer memory after the power is restored, even if a power failure occurs during writing from the buffer memory 13 storing the received data to the disk 14. It refers to guaranteeing the writing of data to the disk 14.

【0034】この書き込み保証を行う場合には、NVR
AM13aを用いた保証付き書き込み処理(S207)
を行った後、入出力要求待ち状態(S201)に移行す
る。一方、書き込み保証を行わない場合には、RAM1
3b又はNVRAM13aの空きエリアを用いた保証な
し書き込み処理(S208)を行った後、入出力要求待
ち状態(S201)に移行する。
To guarantee this writing, the NVR
Guaranteed write processing using AM 13a (S207)
After that, the process shifts to the I / O request waiting state (S201). On the other hand, when the write guarantee is not performed, the RAM1
After performing the write process without guarantee (S208) using the free area of 3b or NVRAM 13a, it shifts to the I / O request waiting state (S201).

【0035】上記一連の処理を行うことにより、入出力
要求がない場合にはキャッシュ13上のデータをディス
ク14に掃き出すとともに、読み出し要求があった場合
には高速アクセス可能なバッファメモリとして動作し、
書き込み要求があった場合には所定のデータについてデ
ータ保護を行うライトバッファとして機能することがで
きる。
By performing the above series of processing, the data in the cache 13 is swept out to the disk 14 when there is no input / output request, and it operates as a buffer memory which can be accessed at high speed when there is a read request.
When a write request is made, it can function as a write buffer that protects predetermined data.

【0036】次に、上記各処理のうち、ディスク14に
対する書き込み処理(S203)、読み出し処理(S2
05)、保証付き書き込み処理(S207)及び保証な
し書き込み処理(S208)について、詳細に説明す
る。
Next, among the above-mentioned processes, a writing process (S203) and a reading process (S2) for the disk 14 are performed.
05), guaranteed write processing (S207) and non-guaranteed write processing (S208) will be described in detail.

【0037】図3は、ディスク14に対する掃き出し処
理(S203)の流れを示すフローチャートである。
FIG. 3 is a flow chart showing the flow of the sweeping process (S203) for the disk 14.

【0038】図3に示すように、データバス15から書
き込みデータを受信したならば、まずディスク14に対
する書き込みデータがNVRAM13a上にあるか否か
を確認し(S301)、書き込みデータが存在する場合
にはディスク14に当該データを格納する(S30
3)。
As shown in FIG. 3, when the write data is received from the data bus 15, it is first checked whether the write data for the disk 14 is on the NVRAM 13a (S301), and if the write data exists. Stores the data in the disk 14 (S30
3).

【0039】次に、RAM13b上に書き込みデータが
存在するか否かを確認し(S302)、書き込みデータ
存在する場合には、ディスク14に当該データを格納す
る(S303)。
Next, it is confirmed whether or not the write data exists on the RAM 13b (S302), and if the write data exists, the data is stored in the disk 14 (S303).

【0040】そして、書き込みを完了したデータについ
ては、読み込み時に高速アクセス可能なキャッシュデー
タの役割を果たすため、データの属性を読み込みデータ
に変更して書き込み未完のデータと区別する(S30
4)。なお、データの属性を変更する代わりに、従来法
で一般に用いられるフラグ等を用いることもできる。
As for the data that has been written, it plays the role of cache data that can be accessed at high speed at the time of reading, so the attribute of the data is changed to read data to distinguish it from unwritten data (S30).
4). Instead of changing the data attribute, a flag or the like generally used in the conventional method can be used.

【0041】以上の処理を行うことにより、NVRAM
13a及びRAM13b上の書き込みデータをディスク
14に掃き出すことができる。
By performing the above processing, NVRAM
The write data on 13a and RAM 13b can be swept out to the disk 14.

【0042】なお、ディスク14に対して書き込み途中
に電源異常が発生し、書き込み未完に終わったデータの
うちNVRAM上のものについては保持されるため、上
記処理により、再書き込みが実行できることになる。
Since a power failure occurs in the middle of writing to the disk 14 and data in the NVRAM that has not been completely written is retained, rewriting can be executed by the above processing.

【0043】図4は、読み出し処理の流れを示すフロー
チャートである。
FIG. 4 is a flowchart showing the flow of the reading process.

【0044】図4に示すように、ディスク装置11に対
して読み出し要求が行われたならば、読み出す対象とな
るデータがバッファメモリ13上に存在するか否かを確
認し(S401)、バッファメモリ13上に存在する場
合には該バッファメモリ13から該当するデータを読み
出し(S409)てデータバス15に送出する。
As shown in FIG. 4, when a read request is issued to the disk device 11, it is confirmed whether or not the data to be read exists in the buffer memory 13 (S401), and the buffer memory If it exists on the data buffer 13, the corresponding data is read from the buffer memory 13 (S409) and sent to the data bus 15.

【0045】一方、バッファメモリ上に当該データがな
い場合には、ディスク14上のデータを読み出すことに
なるが、このデータをキャッシュできるエリアがバッフ
ァメモリ13上に確保できるか否かを調べる必要があ
る。
On the other hand, when the data is not present in the buffer memory, the data on the disk 14 is read, but it is necessary to check whether or not an area where this data can be cached can be secured in the buffer memory 13. is there.

【0046】そこで、まずRAM13bに空きエリアが
存在するか否かを調べ(S402)、空きエリアがある
場合にはRAM13bをバッファメモリとして採用し、
ディスク14から該当データを読み込んだ後(S40
3)に該データをデータバス15に送出する(S40
9)。
Therefore, it is first checked whether or not there is a free area in the RAM 13b (S402), and if there is a free area, the RAM 13b is adopted as a buffer memory,
After reading the corresponding data from the disk 14 (S40
In 3), the data is sent to the data bus 15 (S40).
9).

【0047】これに対して、RAM13bに空きがない
場合には、さらにNVRAM13aにおける空きエリア
の有無を調べ(S404)、NVRAM13aにも空き
エリアが存在しない場合には、バッファメモリ13上に
読み込みデータが存在するか否かを調べる(S40
5)。
On the other hand, if the RAM 13b has no free space, it is further checked whether or not there is a free area in the NVRAM 13a (S404). It is checked whether or not it exists (S40
5).

【0048】ここで、読み込みデータを調べる理由は、
バッファメモリ13上に存在する書き込みデータは、書
き込み未完のデータであり破棄できないためである。
Here, the reason for checking the read data is
This is because the write data existing on the buffer memory 13 is data that has not been written and cannot be discarded.

【0049】このバッファメモリ13上に読み込みデー
タが存在する場合には、利用度が最も低いと考えられる
最も古い読み込みデータを無効にする(S407)とと
もに、該エリアにデータを読み込んだ後(S408)デ
ータバス15に送出する(S409)。
When the read data exists in the buffer memory 13, the oldest read data which is considered to have the lowest utilization is invalidated (S407), and after the data is read into the area (S408). The data is sent to the data bus 15 (S409).

【0050】ところで、バッファメモリ13上に読み込
みデータがない場合には、この時点でバッファメモリ1
3が満杯状態であることを意味するため、図3において
説明した掃き出し処理(S406)を行って空きエリア
を確保した後に、S402に移行する。
By the way, when there is no read data in the buffer memory 13, the buffer memory 1 is read at this point.
3 means that it is in a full state, so after performing the sweep-out processing (S406) described in FIG. 3 to secure an empty area, the process proceeds to S402.

【0051】上記処理を行うことにより、読み込みデー
タは必ずバッファメモリ13上にキャッシュされること
になる。
By performing the above processing, the read data is always cached in the buffer memory 13.

【0052】図5は、保証付き書き込み処理(S20
7)の流れを示すフローチャートである。
FIG. 5 shows a guaranteed write process (S20
It is a flowchart which shows the flow of 7).

【0053】図5に示すように、データ書き込みアドレ
スがNVRAM13aに対応するものである場合には、
NVRAM13aにデータをキャッシュすることにな
る。
As shown in FIG. 5, when the data write address corresponds to the NVRAM 13a,
The data will be cached in the NVRAM 13a.

【0054】具体的には、まず同じデータ名を持つもの
が複数存在すると錯誤が生じるため、該データがバッフ
ァメモリ13上にキャッシュされているか否かを確認し
(S501)、存在する場合にはバッファメモリ上の当
該データを無効にする(S502)。
More specifically, first, since a mistake occurs when there are a plurality of data having the same data name, it is confirmed whether the data is cached in the buffer memory 13 (S501). The data on the buffer memory is invalidated (S502).

【0055】次に、NVRAM13a上に当該データを
キャッシュできる空きエリアが存在するか否かを確認し
(S503)、空きエリアが存在する場合にはNVRA
M13aにデータを読み込む(S507)。
Next, it is confirmed whether or not there is a free area in the NVRAM 13a where the data can be cached (S503). If there is a free area, NVRA is used.
The data is read into M13a (S507).

【0056】これに対して、NVRAM13a上に空き
エリアがない場合には、図4に示す読み出し処理と同様
に、NVRAM13a上に読み込みデータがあるか否か
を確認し(S504)、読み込みデータがあるならば最
も古い読み込みデータを無効にして(S506)該当箇
所にデータを書き込む(S507)。
On the other hand, when there is no free area in the NVRAM 13a, it is confirmed whether there is read data in the NVRAM 13a (S504), as in the read process shown in FIG. 4, and there is read data. If so, the oldest read data is invalidated (S506) and the data is written in the corresponding portion (S507).

【0057】また、NVRAM13a上に読み込みデー
タがない場合には、この時点でNVRAM13a、図3
において説明したディスク14に対する掃き出し処理
(S505)を行って空きエリアを確保した後に、S5
03に移行する。
If there is no read data in the NVRAM 13a, the NVRAM 13a, FIG.
After the flushing process (S505) for the disk 14 described in 1) is performed to secure an empty area, S5 is performed.
Move to 03.

【0058】上記処理を行うことにより、特定のアドレ
ス情報を持つデータは必ずNVRAM13a上にキャッ
シュされることになる。
By carrying out the above processing, the data having the specific address information is always cached in the NVRAM 13a.

【0059】図6は、保証なし書き込み処理(S20
8)の流れを示すフローチャートである。
FIG. 6 shows a write process without guarantee (S20
It is a flow chart which shows a flow of 8).

【0060】図6に示すように、書き込み保証を行わな
い場合には、NVRAM13a及びRAM13bを区別
する必要がないため、図5に示すNVRAM13aに対
する処理をバッファメモリ13を用いた処理に代替えす
ることにより実現することができる。
As shown in FIG. 6, when the write guarantee is not performed, it is not necessary to distinguish between the NVRAM 13a and the RAM 13b. Therefore, the process for the NVRAM 13a shown in FIG. 5 is replaced with the process using the buffer memory 13. Can be realized.

【0061】この保証なし書き込み処理(S208)及
び保証付き書き込み処理(S207)を行うことによ
り、全ての書き込みデータがバッファメモリ13上にキ
ャッシュされるため、書き込みを完了した後は該データ
を高速にアクセスすることが可能となる。
By performing the write process without guarantee (S208) and the write process with guarantee (S207), all write data is cached in the buffer memory 13. Therefore, after the write is completed, the data can be written at high speed. It becomes possible to access.

【0062】上述してきた一連の処理を行うことによ
り、データ書き込み中に電源障害が発生した場合でも、
特定のアドレス情報を有するデータについては書き込み
を保証することができ、かつバッファメモリとしての高
速なアクセスを保持することが可能となる。
By performing the series of processes described above, even if a power failure occurs during data writing,
Writing of data having specific address information can be guaranteed, and high-speed access as a buffer memory can be maintained.

【0063】なお、上記実施例においては、特定のアド
レス情報を持つデータについて書き込み保証を行うこと
としたが、データにNVRAM13a又はRAM13b
のいずれかを選択したかを示す選択情報を用いることに
より、特定の情報について書き込み保証を行うことも可
能である。
In the above embodiment, the write guarantee is made for the data having the specific address information, but the NVRAM 13a or RAM 13b is used as the data.
It is also possible to guarantee the writing of specific information by using the selection information indicating which one has been selected.

【0064】また、上記実施例においては、NVRAM
13aとRAM13bとを同様に取り扱うこととした
が、RAM13bとして集積度が高く低価格なダイナミ
ックRAM(DRAM)を用いることもできるため、十
分なRAMを装着したことを前提とすることもできる。
この場合には、図4に示す読み出し処理において、S4
04において行うNVRAM13aの空きエリアの確認
処理等が不要となる。
In the above embodiment, the NVRAM is used.
13a and the RAM 13b are handled in the same manner, but a dynamic RAM (DRAM) having a high degree of integration and a low price can be used as the RAM 13b, and it can be assumed that sufficient RAM is mounted.
In this case, in the reading process shown in FIG.
It is not necessary to perform the confirmation processing of the empty area of the NVRAM 13a performed in 04.

【0065】上述してきたように、本実施例では、不揮
発性メモリ(NVRAM13a)と揮発性メモリ(RA
M13b)とをバッファメモリ13としてディスク装置
11に装着して、データのアドレス情報を用いてキャッ
シュ制御するように構成したので、データ書き込み中に
電源障害が発生した場合には特定のアドレス情報を有す
るデータをNVRAM13aを用いて書き込み保証する
ことができる。
As described above, in this embodiment, the nonvolatile memory (NVRAM 13a) and the volatile memory (RA
M13b) is attached to the disk device 11 as the buffer memory 13 and is configured to perform cache control using the address information of the data, so that it has specific address information when a power failure occurs during data writing. Data can be guaranteed to be written by using the NVRAM 13a.

【0066】なお、特定のアドレス情報を有するデータ
のみをNVRAM13aにキャッシュするように構成し
たため、電源回復時に掃き出し処理を迅速に行うことが
できる。
Since only the data having the specific address information is cached in the NVRAM 13a, the flushing process can be performed quickly when the power is restored.

【0067】また、バッファメモリ13として、NVR
AM13aのみならずRAM13bについても使用でき
るため、十分なキャッシュ容量を保持することができ
る。
Further, as the buffer memory 13, the NVR
Since not only the AM 13a but also the RAM 13b can be used, a sufficient cache capacity can be held.

【0068】さらに、バッファメモリ13全てを不揮発
性メモリ13aで構成する場合に比して低コストでディ
スク装置11を構成することができる。
Further, the disk device 11 can be constructed at a lower cost than when the buffer memory 13 is entirely composed of the non-volatile memory 13a.

【0069】なお、本実施例においては、バッファメモ
リ13をディスク装置11内に組み込んだ場合について
示したが、本発明はこれに限定されるものではなく、バ
ッファメモリ13を計算機本体側及び外付けとして構成
することもできる。
In this embodiment, the case where the buffer memory 13 is incorporated in the disk device 11 has been described, but the present invention is not limited to this, and the buffer memory 13 is attached to the computer main body side and an external device. Can also be configured as.

【0070】[0070]

【発明の効果】以上詳細に説明したように、本発明によ
れば、不揮発性メモリ及び揮発性メモリをバッファメモ
リとして補助記憶装置に装着し、読み込み時には該バッ
ファメモリをキャッシュメモリとして、また書き込み時
にはライトバッファとして動作するように構成したので
下記に示す利点がある。
As described in detail above, according to the present invention, a non-volatile memory and a volatile memory are mounted on an auxiliary storage device as a buffer memory, and the buffer memory is used as a cache memory at the time of reading and is also used at the time of writing. Since it is configured to operate as a write buffer, it has the following advantages.

【0071】1)データ書き込み中に電源障害が発生し
た場合には、不揮発性メモリ上に保持した特定のデータ
を書き込み保証することができ、かつキャッシュメモリ
の容量を十分に保持することが可能となる。
1) When a power failure occurs during data writing, it is possible to guarantee the writing of specific data held in the non-volatile memory, and it is possible to sufficiently hold the capacity of the cache memory. Become.

【0072】2)不揮発性メモリのみでバッファメモリ
を構成する場合に比して、バッファメモリを安価に構成
することが可能となる。
2) The buffer memory can be constructed at a low cost as compared with the case where the buffer memory is composed of only the non-volatile memory.

【0073】3)書き込み途中で電源異常が発生して書
き込み未完に終わったデータを、電源回復後に書き込む
際に、不揮発性メモリ上に保持した特定のデータのみを
書き込むため、復旧処理を迅速に行うことが可能とな
る。
3) When data that has not been completely written due to a power supply error during writing is written after the power is restored, only the specific data held in the non-volatile memory is written, so recovery processing is performed quickly. It becomes possible.

【0074】4)バッファメモリとして不揮発性メモリ
及び揮発性メモリを利用できるため、バッファメモリの
容量を十分に保持することが可能となる。
4) Since the non-volatile memory and the volatile memory can be used as the buffer memory, it is possible to sufficiently hold the capacity of the buffer memory.

【0075】5)第2の発明では、重要度及び機密性等
のデータ特性に応じて、使用するバッファメモリをデー
タ毎に選択することが可能となる。
5) In the second invention, the buffer memory to be used can be selected for each data according to the data characteristics such as the importance and the confidentiality.

【0076】6)第3の発明では、データに付加したア
ドレス情報に基づいてバッファメモリを制御するため、
使用するバッファメモリをデータ毎に選択する動作を省
き、バッファメモリをトランスペアレントに構築するこ
とが可能となる。
6) In the third invention, since the buffer memory is controlled based on the address information added to the data,
The operation of selecting the buffer memory to be used for each data can be omitted, and the buffer memory can be transparently constructed.

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

【図1】 本発明の一実施例であるディスク装置の構成
を示すブロック図。
FIG. 1 is a block diagram showing the configuration of a disk device that is an embodiment of the present invention.

【図2】 図1に示す制御部が行う全体処理の流れを示
すフローチャート。
FIG. 2 is a flowchart showing a flow of overall processing performed by a control unit shown in FIG.

【図3】 図2に示す掃き出し処理の流れを示すフロー
チャート。
FIG. 3 is a flowchart showing a flow of sweeping processing shown in FIG.

【図4】 図2に示す読み出し処理の流れを示すフロー
チャート。
FIG. 4 is a flowchart showing the flow of read processing shown in FIG.

【図5】 図2に示す保証付き書き込み処理の流れを示
すフローチャート。
5 is a flowchart showing the flow of guaranteed write processing shown in FIG. 2. FIG.

【図6】 図2に示す保証なし書き込み処理の流れを示
すフローチャート。
FIG. 6 is a flowchart showing the flow of write processing without guarantee shown in FIG.

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

11 ディスク装置、 12 制御部、 13 バッフ
ァメモリ、13a 不揮発性メモリ、 13b 揮発性
メモリ、 14 ディスク、15 データバス
11 disk device, 12 control unit, 13 buffer memory, 13a non-volatile memory, 13b volatile memory, 14 disk, 15 data bus

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】データを記憶する主記憶部と、バッファメ
モリとを具備し、前記主記憶部にデータを書き込む際及
び前記主記憶部からデータを読み出す際に該データを一
時的に前記バッファメモリに記憶する補助記憶装置にお
いて、 前記バッファメモリは、 不揮発性メモリからなる第1の記憶手段と、 揮発性メモリからなる第2の記憶手段とを具備し、 前記主記憶部に対してデータを書き込む際に、特定のデ
ータは前記第1の記憶手段に選択的に記憶するととも
に、電源障害が生じた場合は前記第1の記憶手段に記憶
されたデータのみを該電源障害が復旧した後に前記主記
憶部に書き込むことにより復旧処理を行う制御手段を具
備したことを特徴とする補助記憶装置。
1. A buffer memory comprising: a main memory unit for storing data; and a buffer memory, wherein the data is temporarily written in the main memory unit and in reading the data from the main memory unit. In the auxiliary storage device, the buffer memory includes: a first storage unit made of a non-volatile memory; and a second storage unit made of a volatile memory, and writes data to the main storage unit. At this time, the specific data is selectively stored in the first storage means, and when a power failure occurs, only the data stored in the first storage means is restored after the power failure is restored. An auxiliary storage device comprising a control means for performing a recovery process by writing in a storage unit.
【請求項2】前記制御手段は、データの書き込み時に与
えられる選択情報にしたがって、該データを前記第1の
記憶手段に書き込むか、前記第2の記憶手段に書き込む
かを決定することを特徴とする請求項1記載の補助記憶
装置。
2. The control means determines whether to write the data in the first storage means or the second storage means according to the selection information given when writing the data. The auxiliary storage device according to claim 1.
【請求項3】前記制御手段は、データの書き込み時に与
えられる前記主記憶部のアドレス情報にしたがって、該
データを前記第1の記憶手段に書き込むか、前記第2の
記憶手段に書き込むかを決定することを特徴とする請求
項1記載の補助記憶装置。
3. The control means determines whether to write the data in the first storage means or the second storage means according to the address information of the main storage portion given when writing the data. The auxiliary storage device according to claim 1, wherein:
JP5263854A 1993-10-21 1993-10-21 Auxiliary storage device Pending JPH07121444A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5263854A JPH07121444A (en) 1993-10-21 1993-10-21 Auxiliary storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5263854A JPH07121444A (en) 1993-10-21 1993-10-21 Auxiliary storage device

Publications (1)

Publication Number Publication Date
JPH07121444A true JPH07121444A (en) 1995-05-12

Family

ID=17395159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5263854A Pending JPH07121444A (en) 1993-10-21 1993-10-21 Auxiliary storage device

Country Status (1)

Country Link
JP (1) JPH07121444A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242708A (en) * 2004-02-26 2005-09-08 Matsushita Electric Ind Co Ltd File repair method and file recording apparatus
JP2009146168A (en) * 2007-12-14 2009-07-02 Omron Corp Component mounting board for PLC
US7631142B2 (en) 2006-04-28 2009-12-08 Kabushiki Kaisha Toshiba Method and apparatus for selectively storing data into cache or nonvolatile memory
US7861040B2 (en) 2006-12-28 2010-12-28 Konica Minolta Business Technologies, Inc. Memory apparatus, cache control method, and cache control program
EP2518767A2 (en) 2011-04-29 2012-10-31 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
KR20120140202A (en) 2011-06-16 2012-12-28 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Memory device and semiconductor device
US8897049B2 (en) 2011-05-13 2014-11-25 Semiconductor Energy Laboratories Co., Ltd. Semiconductor device and memory device including semiconductor device
US9043561B2 (en) 2012-05-02 2015-05-26 Semiconductor Energy Laboratory Co., Ltd. Storage device
US9093136B2 (en) 2010-12-28 2015-07-28 Semiconductor Energy Laboratory Co., Ltd. Signal processing circuit comprising memory cell
US9230648B2 (en) 2011-04-15 2016-01-05 Semiconductor Energy Laboratory Co., Ltd. Memory device
JP2016009273A (en) * 2014-06-23 2016-01-18 キヤノン株式会社 Information processing apparatus, information processing method, and computer program
US9859268B2 (en) 2011-05-17 2018-01-02 Semiconductor Energy Laboratory Co., Ltd. Content addressable memory

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242708A (en) * 2004-02-26 2005-09-08 Matsushita Electric Ind Co Ltd File repair method and file recording apparatus
US7631142B2 (en) 2006-04-28 2009-12-08 Kabushiki Kaisha Toshiba Method and apparatus for selectively storing data into cache or nonvolatile memory
US7861040B2 (en) 2006-12-28 2010-12-28 Konica Minolta Business Technologies, Inc. Memory apparatus, cache control method, and cache control program
JP2009146168A (en) * 2007-12-14 2009-07-02 Omron Corp Component mounting board for PLC
KR20180134815A (en) 2010-12-28 2018-12-19 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
US9093136B2 (en) 2010-12-28 2015-07-28 Semiconductor Energy Laboratory Co., Ltd. Signal processing circuit comprising memory cell
US9230648B2 (en) 2011-04-15 2016-01-05 Semiconductor Energy Laboratory Co., Ltd. Memory device
EP2518767A2 (en) 2011-04-29 2012-10-31 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US9111795B2 (en) 2011-04-29 2015-08-18 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device with capacitor connected to memory element through oxide semiconductor film
KR20120122912A (en) 2011-04-29 2012-11-07 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
US10910404B2 (en) 2011-04-29 2021-02-02 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US9773810B2 (en) 2011-04-29 2017-09-26 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US10388670B2 (en) 2011-04-29 2019-08-20 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US8897049B2 (en) 2011-05-13 2014-11-25 Semiconductor Energy Laboratories Co., Ltd. Semiconductor device and memory device including semiconductor device
US9859268B2 (en) 2011-05-17 2018-01-02 Semiconductor Energy Laboratory Co., Ltd. Content addressable memory
KR20120140202A (en) 2011-06-16 2012-12-28 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Memory device and semiconductor device
US9043561B2 (en) 2012-05-02 2015-05-26 Semiconductor Energy Laboratory Co., Ltd. Storage device
JP2016009273A (en) * 2014-06-23 2016-01-18 キヤノン株式会社 Information processing apparatus, information processing method, and computer program

Similar Documents

Publication Publication Date Title
TWI590049B (en) Memory device and operating method of same
JP4948793B2 (en) Flash memory system including bad block manager
US20080028132A1 (en) Non-volatile storage device, data storage system, and data storage method
KR930010981A (en) Storage device using flash memory
KR19990063999A (en) Flash EEPROM Main Memory in Computer Systems
KR930022379A (en) Memory card device
US20080250188A1 (en) Memory Controller, Nonvolatile Storage, Nonvolatile Storage System, and Memory Control Method
JPH07121444A (en) Auxiliary storage device
KR20100052518A (en) Memory device and file system
JP4836647B2 (en) Storage device using nonvolatile cache memory and control method thereof
KR20030065355A (en) Storage, data processing method and data processing program
JP2010086009A (en) Storage device and memory control method
JP2009116465A (en) Storage device and memory control method
JPH01235075A (en) Disk memory controller
JP4661369B2 (en) Memory controller
JP4177292B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM, AND FLASH MEMORY CONTROL METHOD
KR20080045833A (en) Flash memory management method and flash memory system using the same
JPH04311219A (en) Data backup system
JPH0793101A (en) Data backup device
JP3166659B2 (en) Storage device
JPH0520196A (en) Disk / Cash control unit
JPH04137077A (en) Data recording method and memory card system for memory card
JPH0644139A (en) Disk cache system and its page replacement control method
US7996598B2 (en) Memory management module
US5594909A (en) File I/O control device writing blocks to faster device first and canceling exclusive lock as each block is written