JPH0731640B2 - Disk access control method - Google Patents
Disk access control methodInfo
- Publication number
- JPH0731640B2 JPH0731640B2 JP62224923A JP22492387A JPH0731640B2 JP H0731640 B2 JPH0731640 B2 JP H0731640B2 JP 62224923 A JP62224923 A JP 62224923A JP 22492387 A JP22492387 A JP 22492387A JP H0731640 B2 JPH0731640 B2 JP H0731640B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- disk device
- disk
- written
- power
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【発明の詳細な説明】 〔概要〕 データをディスク装置に書き込むディスクアクセス制御
方式に関し、 データをディスク装置にライト中に電源異常が発生して
も、電源再投入時に保存しておいたデータを再度ライト
すると共にECC又はCRCを再生成して信頼性を向上させる
ことを目的とし、 ディスク装置に書き込もうとするデータを格納すると共
に、このデータをディスク装置に書き込んだか否かを表
す未ライトフラグを格納する不揮発性メモリを備え、ラ
イト要求元からデータ転送されてきたデータを上記不揮
発性メモリに格納した後に未ライトフラグをオン状態に
し、このデータをディスク装置に書き込み中に電源異常
が発生し、電源再投入時にこの未ライトフラグがオン状
態のデータをディスク装置にライトするように構成す
る。DETAILED DESCRIPTION [Overview] Regarding a disk access control method for writing data to a disk device, even if a power failure occurs while writing data to the disk device, the data saved when the power is turned on again is restored. The data to be written to the disk device is stored for the purpose of improving reliability by rewriting the ECC or CRC while writing, and at the same time, the unwritten flag indicating whether or not this data was written to the disk device is stored. The non-write flag is turned on after the data transferred from the write request source is stored in the non-volatile memory and the power failure occurs while writing this data to the disk device. At the time of re-input, the data whose unwritten flag is on is written to the disk device.
本発明は、データをディスク装置に書き込むディスクア
クセス制御方式に関するものである。The present invention relates to a disk access control method for writing data in a disk device.
従来、第4図(イ)に示すような計算機システムの場
合、CPU15からの命令によってディスク装置13に対して
アクセスを行っている。例えばライト中に瞬断などの電
源異常が発生すると、第4図(ロ)に示すように、1セ
クタを完全にライトできず、データの一部およびセクタ
の末尾にライトするECC、CRCなどのチェックビットをラ
イトし得ない状態が発生してしまう。そして、電源が再
投入された時、このデータの一部およびECC、CRCなどの
チェックビットの欠如したデータを読みだすと、エラー
が発生し、システムダウンなどの障害が発生してしまう
という問題点があった。以下第4図を簡単に説明する。Conventionally, in the case of the computer system as shown in FIG. 4A, the disk device 13 is accessed by an instruction from the CPU 15. For example, if a power failure such as a momentary interruption occurs during writing, one sector cannot be completely written, as shown in Fig. 4 (b), and ECC, CRC, etc., that writes a part of the data and the end of the sector. A state occurs in which the check bit cannot be written. Then, when the power is turned on again, if part of this data and data lacking check bits such as ECC and CRC are read, an error occurs and a problem such as a system down occurs. was there. The following is a brief description of FIG.
第4図(イ)において、改選接続部17を介して転送され
てきたデータがMEM(メモリ)14に格納される。このMEM
14に格納されたデータは、DISK制御部(ディスク制御
部)11の制御のもとで、ディスク装置13に書き込まれ
る。そして、必要に応じて、ディスク装置13から読み出
されたデータは、MEM14に書き込まれた後、回線接続部1
7を介して端末などに送出される。In FIG. 4A, the data transferred via the reselection connection unit 17 is stored in the MEM (memory) 14. This MEM
The data stored in 14 is written in the disk device 13 under the control of the DISK controller (disk controller) 11. Then, if necessary, the data read from the disk device 13 is written in the MEM 14 and then the line connection unit 1
It is sent to the terminal etc. via 7.
この場合、第4図(ロ)に示すように、データをディス
ク装置13に対してライトしている途中で、AC入力の瞬断
などの電源異常が発生すると、データの一部および末尾
のECC、CRCなどのチェックビットの書き込みが行われな
い状態が発生してしまう。このため、電源が再投入され
た時、このセクタからデータを読みだすと、ECC、CRCな
どのチェックビットによってエラーが検出され、システ
ムダウンなどが発生してしまうという問題点がある。In this case, as shown in FIG. 4B, if a power failure such as a momentary interruption of the AC input occurs while data is being written to the disk device 13, the ECC of part or the end of the data will be lost. There is a situation where check bits such as CRC are not written. Therefore, when data is read from this sector when the power is turned on again, there is a problem that an error is detected by check bits such as ECC and CRC, and a system down occurs.
本発明は、データをディスク装置にライト中に電源異常
が発生しても、電源再投入時に保存しておいたデータを
再度ライトすると共にECC又はCRCを再生成して信頼性を
向上させることを目的としている。According to the present invention, even if a power failure occurs while writing data to the disk device, the data saved when the power is turned on again is rewritten and the ECC or CRC is regenerated to improve reliability. Has an aim.
第1図は本発明の原理構成図を示す。 FIG. 1 shows the principle configuration of the present invention.
第1図において、ディスク制御部1は、ディスク装置3
をアクセス制御するものである。In FIG. 1, the disk controller 1 is a disk device 3
Access control.
不揮発性メモリ2は、電源が遮断されても格納されたデ
ータなどを保持するものであって、コントロールテーブ
ル2−1およびデータ2−2を格納するものである。The non-volatile memory 2 holds stored data and the like even when the power is cut off, and stores the control table 2-1 and the data 2-2.
コントロールテーブル2−1は、揮発性メモリ2中に格
納したデータ2−2のディスクアドレス(ディスク装置
3に格納するアドレス)、未ライトフラグ(データをデ
ィスク装置3にライトしたか否かを表すフラグ)、およ
びNVMアドレス(データが格納されている不揮発性メモ
リ2中のアドレス)などを格納するものである。The control table 2-1 includes a disk address (address to be stored in the disk device 3) of the data 2-2 stored in the volatile memory 2, an unwritten flag (a flag indicating whether or not the data has been written to the disk device 3). ), An NVM address (an address in the nonvolatile memory 2 in which data is stored), and the like are stored.
データ2−2は、ディスク装置3にライトしようとする
データである。Data 2-2 is data to be written to the disk device 3.
ディスク装置3は、データを格納するものである。The disk device 3 stores data.
MEM(メモリ)4は、端末などから転送されてきたデー
タを格納したり、ディスク装置3から読み出したデータ
を格納などするものである。The MEM (memory) 4 stores data transferred from a terminal or the like and stores data read from the disk device 3.
CPU5は、各種制御を行うものである。The CPU 5 performs various controls.
本発明は、第1図に示すように、MEM4から読み出したデ
ータを不揮発性メモリ2中のデータ2−2として格納し
た後に未ライトフラグをオン状態にし、このデータ2−
2をディスク装置3に書き込み中に電源異常が発生し、
電源が再投入された時にこの未ライトフラグがオンに対
応するデータ2−2をディスク装置3に書き込むように
している。As shown in FIG. 1, the present invention stores the data read from the MEM4 as the data 2-2 in the non-volatile memory 2 and then sets the unwritten flag to the ON state to
A power failure occurred while writing 2 to the disk device 3,
When the power is turned on again, the data 2-2 corresponding to the unwritten flag turned on is written to the disk device 3.
このため、データ2−2をディスク装置3に書き込み中
に例え瞬断などの電源異常が発生しても、保存していお
いたデータを電源再投入時にディスク装置3に書き込む
ことが可能となり、システムの信頼性を向上させること
ができる。Therefore, even if a power failure such as a momentary interruption occurs while writing the data 2-2 to the disk device 3, it becomes possible to write the saved data to the disk device 3 when the power is turned on again. The reliability of can be improved.
次に第2図および第3図を用いて本発明の1実施例の構
成および動作を順次詳細に説明する。Next, the configuration and operation of one embodiment of the present invention will be sequentially described in detail with reference to FIG. 2 and FIG.
第2図において、ディスク制御部1は、1−1ないし1
−4、2−3、2−4から構成され、ディスク装置3に
対してアクセス制御するものである。In FIG. 2, the disk control unit 1 includes 1-1 to 1
-4, 2-3, 2-4, and controls access to the disk device 3.
P−mode DMA割込み制御部1−1は、共通バスのP−mo
de、DMAおよび割込みを制御するものである。The P-mode DMA interrupt control unit 1-1 uses the P-mo of the common bus.
It controls de, DMA and interrupts.
Diskコントロール部1−2は、ディスク装置3をコント
ロールして、アクセス制御するものである。The disk control unit 1-2 controls the disk device 3 to perform access control.
ROM(リードオンメモリ)1−3は、ディスク制御部1
を制御する各種プログラムを格納するものである。ROM (read-on memory) 1-3 is a disk controller 1
It stores various programs for controlling.
MPU1−4は、ROM1−3から読み出したプログラムによっ
て各種制御を行うものである。The MPU1-4 performs various controls according to the program read from the ROM1-3.
RAM(ランダムアクセスメモリ)2−3およびNVM(不揮
発性メモリ)2−4は、バックアップ電池6によって電
源がバックアップされており、電源断となってもこれら
に格納されたコントロールテーブル2−1およびデータ
2−2を保持するものである。尚、RAM2−3などのよう
にバックアップ電池6によって電源バックアップして不
揮発性メモリ2として使用する代わりに、電源断となっ
てもデータが保存される機能を持つ読み書き可能な素子
なら何を用いてもよい。The RAM (random access memory) 2-3 and the NVM (nonvolatile memory) 2-4 are backed up by a backup battery 6, and the control table 2-1 and the data stored in them are stored even when the power is cut off. 2-2 is held. It should be noted that instead of using the non-volatile memory 2 by backing up the power supply by the backup battery 6 such as the RAM 2-3, use any readable / writable element having a function of saving data even when the power is cut off. Good.
ディスク装置3は、データを保存するものである。The disk device 3 stores data.
MEM(メモリ)4は、データなどを格納するものであ
る。The MEM (memory) 4 stores data and the like.
CPU5は、各種制御を行うものである。The CPU 5 performs various controls.
バックアップ電池6は、RAM2−3およびNVMの電源をバ
ックアップするものである。The backup battery 6 backs up the power sources of the RAM 2-3 and NVM.
回線接続部7は、回線との間を接続するものである。The line connection unit 7 connects to the line.
次に、第3図を用いて第2図構成の動作を詳細に説明す
る。Next, the operation of the configuration shown in FIG. 2 will be described in detail with reference to FIG.
第3図において、図中は、DMAでメモリからNVMへデー
タ転送する状態を示す。これは、CPU5からの通知により
P−mode DMA割込み制御部1−1が起動され、MEM4から
読み出したデータを、NVM2−4にDMA転送して書き込む
ことを意味している(第1図データ2−2)。この時、
RAM2−3中には、第1図コントロールテーブル2−1に
示すように、データをディスク装置3に書き込むディス
クアドレス、データが格納されているNVM2−4中のNVM
アドレス、およびデータをディスク装置3に書き込んだ
か否かを表す未ライトフラグなどが格納される。In FIG. 3, the figure shows a state in which data is transferred from the memory to the NVM by DMA. This means that the P-mode DMA interrupt control unit 1-1 is activated by the notification from the CPU 5, and the data read from the MEM 4 is DMA-transferred to the NVM 2-4 and written (FIG. 1 data 2). -2). At this time,
In the RAM 2-3, as shown in the control table 2-1 in FIG. 1, the disk address for writing the data to the disk device 3 and the NVM in the NVM 2-4 in which the data is stored.
An address and an unwritten flag indicating whether or not the data is written in the disk device 3 are stored.
図中は、RAM2−3に各種アドレス及び未ライトフラグ
をセットする状態を示す。The figure shows a state in which various addresses and unwritten flags are set in the RAM 2-3.
図中は、ディスクへライトする状態を示す。これは、
バックアップ電池6で電源バックアップされているRAM2
−3に保存されているコントロールテーブル2−1から
NVMアドレスを読み出し、この読み出したNVMアドレスに
よってNVM2−4から読み出したデータを、RAM2−3に保
存されているコントロールテーブル2−1から読み出し
たディスク装置中のディスクアドレスに対してデータ転
送し、例えばセクタ単位でECC、CRCなどのチェックビッ
トを付加した状態で書き込むことを意味している。In the figure, the state of writing to the disk is shown. this is,
RAM2 whose power is backed up by backup battery 6
From the control table 2-1 stored in -3
The NVM address is read, and the data read from the NVM2-4 by this read NVM address is transferred to the disk address in the disk device read from the control table 2-1 stored in the RAM2-3. This means writing with check bits such as ECC and CRC added to each sector.
図中は、電源再投入時に、未ライトフラグがオンのデ
ータをディスク装置にライトする状態を示す。これは、
図中でデータをディスク装置3に書き込み中に電源異
常が発生したことに対応してコントロールテーブル2−
1中の未ライトフラグをオン状態にして保存しておいた
ので、電源が再投入された後、この未ライトフラグがオ
ン状態に対応するNVM2−4中に保存されているデータを
ディスク装置3に書き込むことを意味している。尚、デ
ィスク装置3に対してデータを書き込んだ後、未ライト
フラグをOFFにしておく。The figure shows a state in which the data whose unwritten flag is on is written to the disk device when the power is turned on again. this is,
In the figure, the control table 2-corresponding to the occurrence of a power failure while writing data to the disk device 3
Since the unwritten flag in 1 is saved in the ON state, the data saved in NVM2-4 corresponding to the ON state of this unwritten flag is stored in the disk device 3 after the power is turned on again. Means to write to. After writing the data to the disk device 3, the unwritten flag is turned off.
以上のように、ディスク制御部1内にバックアップ電池
6で電源バックアップされたNVM2−4およびRAM2−3中
にデータ2−2およびコントロールテーブル2−1を格
納した後に未ライトフラグをオン状態にし、データ2−
2をディスク装置3に書き込み中に電源断となり、電源
再投入時に、この未ライトフラグがオンに対応するデー
タをディスク装置3に書き込むことにより、データの破
壊を防止してシステムの信頼性を向上させることが可能
となる。As described above, after storing the data 2-2 and the control table 2-1 in the NVM2-4 and the RAM2-3 which are backed up by the backup battery 6 in the disk control unit 1, the unwrite flag is turned on, Data 2-
2 is written to the disk device 3, the power is cut off, and when the power is turned on again, the data corresponding to the unwritten flag turned on is written to the disk device 3 to prevent the data from being destroyed and improve the system reliability. It becomes possible.
以上説明したように、本発明によれば、ディスク制御部
内に不揮発性メモリを設け、ディスク装置に書き込もう
とするデータおよび制御情報をこの不揮発性メモリに格
納した後に未ライトフラグをオンにし、データをディス
ク装置に書き込み中に電源異常が発生した場合、ライト
エラーの可能性があるために電源再投入時にこの未ライ
トフラグがオンのデータをディスク装置に書き込む構成
を採用しているため、例え瞬断などの電源異常が発生し
ても、ディスク装置に書き込み途中のデータを保存し、
かつ電源再投入時に再書き込みを行って読み出しエラー
の発生によるシステムダウンなどを回避し、システムの
信頼性を向上させることができる。As described above, according to the present invention, the non-volatile memory is provided in the disk control unit, the data to be written to the disk device and the control information are stored in the non-volatile memory, and then the unwritten flag is turned on to save the data. If a power failure occurs during writing to the disk device, a write error may occur.Therefore, the data is written to the disk device when the power is turned on again. Even if a power failure such as occurs, save the data being written to the disk device,
In addition, it is possible to improve the reliability of the system by avoiding a system down caused by the occurrence of a read error by rewriting when the power is turned on again.
第1図は本発明の原理構成図、第2図は本発明の1実施
例構成図、第3図は本発明の動作説明フローチャート、
第4図は従来技術の説明図を示す。 図中、1はディスク制御部、2は不揮発性メモリ、2−
1はコントロールテーブル、2−2はデータ、3はディ
スク装置、4はMEM(メモリ)、5はCPUを表す。FIG. 1 is a block diagram showing the principle of the present invention, FIG. 2 is a block diagram showing an embodiment of the present invention, and FIG. 3 is a flowchart for explaining the operation of the present invention.
FIG. 4 shows an explanatory view of the prior art. In the figure, 1 is a disk controller, 2 is a non-volatile memory, 2-
Reference numeral 1 is a control table, 2-2 is data, 3 is a disk device, 4 is MEM (memory), and 5 is a CPU.
Claims (1)
アクセス制御方式において、 ディスク装置(3)に書き込もうとするデータを格納す
ると共に、このデータを1セクタあるいは複数セクタ単
位にディスク装置(3)に書き込んだか否かを表す未ラ
イトフラグを格納する不揮発性メモリ(2)を備え、 電源通電中はライト要求元からデータ転送されてきたデ
ータを上記不揮発性メモリ(2)にのみ格納した後に未
ライトフラグをオン状態にし、このデータについてチェ
ックビットをセクタ毎に付加し1セクタあるいは複数セ
クタにしてディスク装置(3)に書き込んだ後に未ライ
トフラグを1セクタあるいは複数セクタ単位にオフ状態
にし、当該書き込み中に電源異常が発生したときは電源
再投入時にこの未ライトフラグがオン状態の1セクタあ
るいは複数セクタ単位のデータをディスク装置(3)に
書き込んだ後に未ライトフラグをオフ状態にするように
構成したことを特徴とするディスクアクセス制御方式。1. In a disk access control method for writing data to a disk device, whether the data to be written is stored in the disk device (3) and the data is written to the disk device (3) in units of one sector or a plurality of sectors. A non-volatile memory (2) for storing a non-write flag indicating whether or not the data is transferred from the write request source is stored only in the non-volatile memory (2) while the power is on. After turning on, writing a check bit for each sector to each sector to write one or more sectors to the disk device (3) and then turning off the unwritten flag in units of one sector or multiple sectors, When a power failure occurs, this unwritten flag remains on when the power is turned on again. Disk access control method which is characterized by being configured to the data of a sector or a plurality sectors in the non-write flag OFF state after writing to the disk device (3).
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62224923A JPH0731640B2 (en) | 1987-09-08 | 1987-09-08 | Disk access control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62224923A JPH0731640B2 (en) | 1987-09-08 | 1987-09-08 | Disk access control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6466727A JPS6466727A (en) | 1989-03-13 |
| JPH0731640B2 true JPH0731640B2 (en) | 1995-04-10 |
Family
ID=16821288
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62224923A Expired - Lifetime JPH0731640B2 (en) | 1987-09-08 | 1987-09-08 | Disk access control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0731640B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0833864B2 (en) * | 1990-01-30 | 1996-03-29 | 富士通株式会社 | Data integrity method |
| JPH03248369A (en) * | 1990-02-26 | 1991-11-06 | Nec Corp | System for preventing destruction of disk write information |
| JP2743606B2 (en) * | 1991-04-11 | 1998-04-22 | 三菱電機株式会社 | Array type recording device |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59220856A (en) * | 1983-05-30 | 1984-12-12 | Toshiba Corp | Disc cache memory back-up system |
-
1987
- 1987-09-08 JP JP62224923A patent/JPH0731640B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6466727A (en) | 1989-03-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6016536A (en) | Method for backing up the system files in a hard disk drive | |
| JPH0291749A (en) | Nonvolatile type semiconductor memory device | |
| JP4146006B2 (en) | Electronic device having flash memory | |
| JPH02297770A (en) | Optical disk device | |
| JP3194900B2 (en) | Memory management method for computer having hard disk drive | |
| JPH0731640B2 (en) | Disk access control method | |
| KR20020007090A (en) | Method and system for booting recovery a computer | |
| WO2023226107A1 (en) | Storage apparatus data backup method, system, electronic device, and medium | |
| JPH01235075A (en) | Disk memory controller | |
| JP6877265B2 (en) | Semiconductor device and flash memory control method | |
| JPH0518143B2 (en) | ||
| JPS6378211A (en) | Power failure handling device for disk recording and reproducing device in microcomputer | |
| JPS5856165A (en) | Record update system | |
| JPH09212424A (en) | Disk cache and disk cache method | |
| JP3498028B2 (en) | Boot program rewriting system | |
| JP3074817B2 (en) | File backup circuit | |
| JP3166659B2 (en) | Storage device | |
| JP2549197B2 (en) | Disk device cache memory management device | |
| JPH053611B2 (en) | ||
| JP5332800B2 (en) | Storage device | |
| JP2000276461A (en) | Microcomputer | |
| JPH09101866A (en) | Disk array system and its application method | |
| JPH0728707A (en) | Nonvolatile memory data protection method | |
| JPH082880Y2 (en) | EEPROM data writing device | |
| JPH01102658A (en) | File write backup method |