JPH043218A - Data writing method and device - Google Patents

Data writing method and device

Info

Publication number
JPH043218A
JPH043218A JP2105712A JP10571290A JPH043218A JP H043218 A JPH043218 A JP H043218A JP 2105712 A JP2105712 A JP 2105712A JP 10571290 A JP10571290 A JP 10571290A JP H043218 A JPH043218 A JP H043218A
Authority
JP
Japan
Prior art keywords
data
writing
written
flag
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2105712A
Other languages
Japanese (ja)
Other versions
JPH0820933B2 (en
Inventor
Yoshiyuki Imanishi
今西 嘉幸
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.)
Daikin Industries Ltd
Original Assignee
Daikin Industries 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 Daikin Industries Ltd filed Critical Daikin Industries Ltd
Priority to JP2105712A priority Critical patent/JPH0820933B2/en
Publication of JPH043218A publication Critical patent/JPH043218A/en
Publication of JPH0820933B2 publication Critical patent/JPH0820933B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 この発明はデータ書き込み方法およびその装置に関し、
さらに詳細にいえば、磁気ディスクに代表される記憶装
置に対するデータの書き込みを行なう方法およびその装
置に関する。
[Detailed Description of the Invention] <Industrial Application Field> The present invention relates to a data writing method and an apparatus thereof;
More specifically, the present invention relates to a method and apparatus for writing data to a storage device such as a magnetic disk.

〈従来の技術、および発明が解決しようとする課題〉 従来からコンピュータ・システム等においては種々のデ
ータを格納しておくために磁気ディスク、フロッピー・
ディスク、メモリー・カード、RAMディスク等の記憶
装置が用いられている。そして、これらの記憶装置は、
一定量の情報を1単位として記憶するように設計されて
いる。具体的には、例えば、256バイト、512バイ
ト、1024バイト等が1単位の情報量として設定され
ている。
<Prior art and problems to be solved by the invention> Computer systems have traditionally used magnetic disks, floppy disks, etc. to store various data.
Storage devices such as disks, memory cards, and RAM disks are used. And these storage devices are
It is designed to store a certain amount of information as a unit. Specifically, for example, 256 bytes, 512 bytes, 1024 bytes, etc. are set as one unit of information amount.

したがって、1記憶単位の情報の書き込み途中で電源異
常等により処理が中断されれば、該当する記憶単位の情
報が不完全なものになってしまい、記憶装置に書き込ま
れたデータ自体の完全性が保障できなくなってしまう。
Therefore, if processing is interrupted due to a power failure etc. while writing information for one storage unit, the information for that storage unit will become incomplete, and the integrity of the data itself written to the storage device will be compromised. It will no longer be guaranteed.

また、フロッピー・ディスク、メモリー・カード等のよ
うに取り外し可能な記憶装置に対する書き込みが行なわ
れている場合には、1記憶単位の情報の書き込み途中に
記憶媒体が取り外される可能性があり、記憶媒体の取り
外しが生じた場合にも、該当する記憶単位のデータに完
全性が保障できなくなってしまう。
Furthermore, when writing is being performed on a removable storage device such as a floppy disk or memory card, there is a possibility that the storage medium may be removed while writing one storage unit of information. Even if a storage unit is removed, the integrity of the data in the corresponding storage unit cannot be guaranteed.

さらに詳細に説明すると、記憶装置は、第4図に示すよ
うに、データ自体を格納しておくデータ領域と、各デー
タ毎の識別名、バス、データ・サイズおよび該当データ
の格納アドレスを示すポインタ等を格納しておくディレ
クトリ領域とに区分されており、先ず、ディレクトリ領
域をサーチし、ポインタを読出してから該当するデータ
自体をアクセスすることによりアクセス所要時間を短縮
できる。また、−数的に、例えば256バイトまでの長
さのデータであれば電源異常の発生に拘らず、データ書
き込みの完全性を保障するようにしている。したがって
、このような装置であれば、1記憶単位のデータ書き込
み毎に次のような処理を行なうことによりデータ全体の
完全性を保障することができる。即ち、 ■ 書き込みデータのコピーを予め設定された第1の領
域に書き込み、 ■ ディレクトリの状態、書き込みデータのアドレス、
書き込み完了か否かを示す情報をあらがじろめ設定され
た第2の領域に書き込み、■ データを該当するアドレ
スに書き込み、■ ディレクトリを書き込み、 ■ 最後に、第2の領域に書き込まれている、書き込み
完了か否かを示す情報を書き込み完了を示す情報に変更
して書き込む。
To explain in more detail, as shown in FIG. 4, the storage device has a data area in which the data itself is stored, and a pointer indicating the identification name, bus, data size, and storage address of each data. The required access time can be shortened by first searching the directory area, reading the pointer, and then accessing the corresponding data itself. In addition, numerically speaking, if the data is up to 256 bytes in length, the integrity of data writing is ensured regardless of the occurrence of a power failure. Therefore, with such a device, the integrity of the entire data can be guaranteed by performing the following processing every time data is written in one storage unit. That is, ■ write a copy of the write data to a preset first area; ■ write the directory status, address of the write data,
Writes information indicating whether writing is complete or not to the randomly set second area, ■ writes the data to the corresponding address, ■ writes the directory, and ■ finally writes the data written to the second area. The information indicating whether or not the writing is completed is changed to the information indicating that the writing is completed, and then the information is written.

この一連の処理を行なうようにしておけば、■■におい
て電源異常、記憶媒体の取り外しが発生しても、■■に
おいて書き込んでおいた情報を参照してデータを復旧す
ることが可能である。
By performing this series of processes, even if a power failure or removal of the storage medium occurs in step 2, it is possible to restore the data by referring to the information written in step 2.

しかし、このような一連の処理を1記憶単位毎に行なわ
せようとすれば、特別の回路、装置を付加して1記憶単
位のデータ書き込みに対するデータの完全性を保障する
ことが必要になるのであるから、システム全体がコスト
アップしてしまう。
However, if such a series of processes is to be performed for each storage unit, it is necessary to add special circuits and devices to ensure data integrity when writing data for one storage unit. This increases the cost of the entire system.

〈発明の目的〉 この発明は上記の問題点に鑑みてなされたものであり、
書き込みの完全性を保障するための特別の回路、装置を
用いることなく、書き込まれたデータの完全性を保障で
きる新規なデータ書き込み方法およびその装置に関する
<Object of the invention> This invention was made in view of the above problems,
The present invention relates to a novel data writing method and device that can ensure the integrity of written data without using any special circuit or device for ensuring the integrity of writing.

く課題を解決するための手段〉 上記の目的を達成するための、この発明のブタ書き込み
方法は、記憶手段を、データ自体を書き込むデータ領域
と、書き込まれたデータ毎に割り当てられたデータ情報
を書き込むデータ情報格納領域と、データ自体の書き込
みが完了したかブタ情報の書き込みが完了したかを示す
フラグを書き込むフラグ領域とに区分しておき、記憶手
段に対するデータ書き込み途中において処理の中断か発
生した場合に、フラグに基づいてデータ領域に書き込ま
れたデータ自体が正常か否かを判別し、正常でないと判
別された場合にのみ記憶手段へのデータ自体の書き込み
を上記処理の中断後に行なう方法である。
Means for Solving the Problems> In order to achieve the above object, the pig writing method of the present invention includes a storage means, a data area in which the data itself is written, and data information allocated for each written data. It is divided into a data information storage area to be written and a flag area to write a flag indicating whether writing of the data itself or pig information has been completed, and if processing is interrupted or occurs while writing data to the storage means. In this case, it is determined whether or not the data itself written in the data area is normal based on the flag, and only when it is determined that the data is not normal, the data itself is written to the storage means after the above processing is interrupted. be.

上記の目的を達成するための、この発明のデータ書き込
み装置は、データを書き込むデータ領域と、書き込まれ
たデータ毎に割り当てられたデータ情報を書き込むデー
タ情報格納領域と、データ自体の書き込みが完了したか
データ情報の書き込みが完了したかを示すフラグを書き
込むフラグ領域とに区分された記憶手段と、記憶手段の
該当領域に所定のデータを書き込む書き込み手段と、記
憶手段に対するデータ書き込み途中において処理の中断
が発生したことを検出する中断検出手段と、中断検出手
段により処理の中断が発生したことを検出したことを条
件として、フラグ領域の該当するフラグに基づいてデー
タ領域に書き込まれたデータ自体か正常か否かを判別す
る判別手段と、判別手段により正常でないと判別された
ことを条件として記憶手段へのデータ自体の書き込みを
上記処理の中断後に行なわせる制御手段とを含んでいる
In order to achieve the above object, the data writing device of the present invention has a data area for writing data, a data information storage area for writing data information allocated for each written data, and a data storage area for writing the data itself. a storage means divided into a flag area for writing a flag indicating whether or not writing of data information is completed; a writing means for writing predetermined data into the corresponding area of the storage means; and an interruption of processing in the middle of writing data to the storage means. An interruption detection means detects that a process has occurred, and on the condition that the interruption detection means detects that a processing interruption has occurred, it is determined whether the data itself written to the data area is normal or not based on the corresponding flag in the flag area. The control means includes a determining means for determining whether or not the processing is normal, and a control means for writing the data itself into the storage means after the above processing is interrupted, on the condition that the determining means determines that the data is not normal.

く作用〉 以上のデータ書き込み方法であれば、記憶手段を、デー
タ自体を書き込むデータ領域と、書き込まれたデータ毎
に割り当てられたデータ情報を書き込むデータ情報格納
領域と、データ自体の書き込みが完了したかデータ情報
の書き込みか完了したかを示すフラグを書き込むフラグ
領域とに区分しておき、先ず、データ情報の書き込みを
行ない、データ情報の書き込みが正常に行なわれた場合
にフラグをデータ情報の書き込みが完了したことを示す
データに設定してフラグ領域に書き込む。次いで、デー
タ自体の書き込みを行ない、データ自体の書き込みが正
常に行なわれた場合にフラグをデータ自体の書き込みが
完了したことを示すデータに設定してフラグ領域に書き
込む。この場合において、フラグが正しく読み込まれれ
ば、所定の処理手順を実行すればよい。この場合におい
て、フラグを含む1記憶単位の書き込み途中に電源異常
、記憶媒体の抜き取り等が発生してフラグが正しく書き
込まれていなければ、データ情報領域およびデータ自体
も正しく書き込まれているのであるから、フラグをデー
タ書き込み完了と判断した場合であっても、データ情報
に基づいて再度データを書き込んだ場合であっても、デ
ータの完全性は保障される。
With the above data writing method, the storage means is divided into a data area where the data itself is written, a data information storage area where data information allocated for each written data is written, and a storage area where writing of the data itself is completed. First, data information is written, and if the data information writing is completed successfully, the flag area is divided into a flag area where a flag indicating whether writing of data information is completed is written. is set to data indicating that the process has been completed and written to the flag area. Next, the data itself is written, and if the writing of the data itself is performed normally, a flag is set to data indicating that the writing of the data itself has been completed, and is written in the flag area. In this case, if the flag is read correctly, a predetermined processing procedure may be executed. In this case, if a power failure, removal of the storage medium, etc. occurs during writing of one storage unit including the flag, and the flag is not written correctly, the data information area and the data itself are also written correctly. The integrity of the data is guaranteed even if the flag is determined to indicate completion of data writing or if the data is written again based on the data information.

以上の構成のデータ書き込み装置であれば、データ自体
を書き込むデータ領域と、書き込まれたデータ毎に割り
当てられたデータ情報を書き込むデータ情報格納領域と
、データ自体の書き込みが完了したかデータ情報の書き
込みが完了したかを示すフラグを書き込むフラグ領域と
に区分された記憶手段に対して、先ず、書き込み手段に
よりデータ情報の書き込みを行ない、データ情報の書き
込みが正常に行なわれた場合に、書き込み手段により、
データ情報の書き込みが完了したことを示すフラグをフ
ラグ領域に書き込む。次いで、書き込み手段によりデー
タ自体の書き込みを行ない、データ自体の書き込みが正
常に行なわれた場合にデータ自体の書き込みが完了した
ことを示すフラグをフラグ領域に書き込む。
If the data writing device has the above configuration, there is a data area where the data itself is written, a data information storage area where data information allocated for each written data is written, and a data information storage area where the writing of the data itself is completed. First, the writing means writes data information into the storage means divided into a flag area in which a flag indicating whether the data is completed is written, and if the data information has been written normally, the writing means ,
A flag indicating that writing of data information is completed is written in the flag area. Next, the writing means writes the data itself, and if the writing of the data itself is performed normally, a flag indicating that the writing of the data itself is completed is written in the flag area.

以上の一連の処理を行なっている間に電源異常等に起因
する処理の中断が発生した場合には、中断検出手段によ
り処理の中断を検出できるので、判別手段により、フラ
グに基づいて、処理が中断されたデータの完全性が担保
されているか否かを判別する。即ち、フラグがデータ自
体の書き込みか完了したことを示すデータであれば、デ
ータ情報のみならずデータ自体も完全に書き込まれてい
ることが分り、逆に、フラグがデータ情報の書き込みか
完了したことを示すデータであれば、データ情報のみが
完全に書き込まれ、データ自体は完全には書き込まれて
いないことが分る。したがって、後者の判別結果が得ら
れた場合には、完全に書き込まれたデータ情報に基づい
てデータ自体を再度書き込むべく制御手段により書き込
み手段を制御するので、データの完全性を担保できる。
If a processing interruption occurs due to a power failure or the like while performing the above series of processing, the interruption detection means can detect the interruption of the processing, and the discriminating means will determine whether the processing is stopped based on the flag. Determine whether the integrity of the interrupted data is guaranteed. In other words, if the flag indicates that writing of the data itself has been completed, it means that not only the data information but also the data itself has been completely written; conversely, the flag indicates that writing of the data information has been completed. If the data indicates , it can be seen that only the data information has been completely written, and the data itself has not been completely written. Therefore, when the latter determination result is obtained, the control means controls the writing means to rewrite the data itself based on the completely written data information, so that the integrity of the data can be ensured.

〈実施例〉 以下、実施例を示す添付図面によって詳細に説明する。<Example> Hereinafter, embodiments will be described in detail with reference to the accompanying drawings showing examples.

第2図はこの奪明のデータ書き込み方法が適用される記
憶媒体(1)(フロッピー・ディスク、磁気ディスク、
光磁気ディスク等)の割り当てを概略的に示す図であり
、データ自体を書き込むデータ領域(1a)と、データ
自体に対応する識別名、ノくス、データ・サイズおよび
該当データの格納アドレスを示すポインタ等のデータ情
報を書き込むデータ情報領域(lb)と、データ自体の
書き込みが完了したか、データ情報の書き込みが完了し
たかを示すフラグを書き込むフラグ領域(1c)とに区
分されている。
Figure 2 shows storage media (1) (floppy disk, magnetic disk,
This is a diagram schematically showing the allocation of a magneto-optical disk (such as a magneto-optical disk), and shows the data area (1a) in which the data itself is written, the identification name, node, data size, and storage address of the data corresponding to the data itself. It is divided into a data information area (lb) in which data information such as a pointer is written, and a flag area (1c) in which a flag indicating whether writing of the data itself or data information is completed is written.

第1図はこの発明のデータ書き込み方法の一実施例を示
すフローチャートであり、同図(A)は電源異常等に起
因する書き込み処理の中断を伴なわない場合を示してい
る。ステップ■においてデータ情報領域(1b)に対す
る書き込みを行ない、書き込みが終了すれば、ステップ
■において、フラグ領域(lc)の該当するアドレスに
データ情報の書き込みが完了したことを示すフラグ(例
えば、“1°のフラグ)を書き込む。次いて、ステ・ツ
ブ■においてデータ領域(1a)に対するデータ自体の
書き込みを行ない、書き込みが終了すれば、ステップ■
において、フラグ領域(]C)の該当するアドレス(ス
テップ■と同じアドレス)にデータ自体の書き込みが完
了したことを示すフラグ(例えば、“0°のフラグ)を
書き込む。
FIG. 1 is a flowchart showing an embodiment of the data writing method of the present invention, and FIG. 1(A) shows a case where the writing process is not interrupted due to power abnormality or the like. In step (2), writing is performed to the data information area (1b), and when the writing is completed, in step (2), a flag (for example, “1 Next, the data itself is written to the data area (1a) in step ■, and when the writing is completed, step
In this step, a flag (for example, a "0° flag") indicating that writing of the data itself has been completed is written to the corresponding address (the same address as in step 2) of the flag area (]C).

そして、他に書き込むべきデータが存在する場合には、
上記一連の処理を反復する。尚、上記フラグは、初期値
として“0“が割り当てられている。
And if there is other data to write,
Repeat the above series of processes. Note that "0" is assigned to the above flag as an initial value.

第1図(B)は書き込み処理の中断が発生した場合の処
理を示している。
FIG. 1(B) shows the processing when the write processing is interrupted.

書き込み処理の中断が解消された場合には、ステップ■
においてフラグが“0°か“1′かを判別し、“ユ°て
あれれば、データ情報のみが完全に書き込まれ、データ
自体が完全には書き込まれていないのであるから、ステ
ップ■において、データ情報に基づいて該当するデータ
自体の書き込みを行ない、ステップ■においてフラグを
“O。
If the write process is no longer interrupted, proceed to step ■
It is determined whether the flag is "0°" or "1'", and if it is "Y°", only the data information is completely written, and the data itself is not completely written. Therefore, in step (2), the data is The corresponding data itself is written based on the information, and the flag is set to "O" in step (3).

にセットして一連の処理を終了する。逆に、“0゜であ
れば、データ領域に書き込まれたデータは完全であるか
ら、そのまま処理を終了する。
Set it to end the series of processing. On the other hand, if the angle is "0°," the data written in the data area is complete, so the process ends.

さらに詳細に説明すると、データ情報の更新中(第1図
(A)中ステップ■参照)に処理の中断が発生した場合
には、フラグが“0″であり、データ自体は完全(但し
、更新前の完全な状態)であるから、データ自体のりカ
バリ−は行なわなくてもよい。
To explain in more detail, if processing is interrupted while data information is being updated (see step ■ in Figure 1 (A)), the flag is "0" and the data itself is complete (however, the updated (previous complete state), there is no need to recover the data itself.

データ自体の更新中(第1図(A)中ステップ■参照)
に処理の中断が発生した場合には、フラグが“1″であ
り、データ自体が不完全である。
Updating the data itself (see step ■ in Figure 1 (A))
If a processing interruption occurs, the flag is "1" and the data itself is incomplete.

しかし、データ情報は完全であるから、データ情報に基
づいてデータ自体の更新を改めて行なうことによりデー
タ自体を完全にできる。
However, since the data information is complete, the data itself can be made complete by updating the data itself again based on the data information.

第1図(A)中ステップ■のフラグ書き込み時に処理の
中断が発生した場合、フラグが“0″であれば、データ
自体は完全(但し、更新前の完全な状態)であるから、
データ自体のりカバリ−は行なわなくてもよい。逆に、
フラグが“1°であれば、データ情報の書き込みは完全
に行なわれているので、データ情報に基づいてデータ自
体の更新を行なうことによりデータ自体を完全にてきる
If processing is interrupted when writing the flag in step (2) in Figure 1 (A), if the flag is "0", the data itself is complete (however, it is in the complete state before updating).
Data itself does not need to be recovered. vice versa,
If the flag is "1°," the data information has been completely written, so the data itself can be completely updated by updating the data itself based on the data information.

第1図(A)中ステップ■のフラグ書き込み時に処理の
中断が発生した場合、フラグが“0″であれば、データ
自体は完全(但し、更新後の完全な状態)であるから、
データ自体のりカバリ−は行なわなくてもよい。逆に、
フラグが“1°であっても、データ情報の書き込みは完
全には行なわれているので、データ情報に基づいてデー
タ自体の更新を行なうことによりデータ自体を完全にで
きる。
If processing is interrupted when writing the flag in step (2) in Figure 1 (A), if the flag is "0", the data itself is complete (however, it is in a complete state after updating)
Data itself does not need to be recovered. vice versa,
Even if the flag is "1°," the data information has been completely written, so the data itself can be made complete by updating the data itself based on the data information.

第3図はこの発明のデータ書き込み装置の一実施例を示
すブロック図であり、書き込むべきデータを受は取って
データ情報およびデータ自体を識別する識別部(2)と
、識別されたデータ情報およびデータ自体をこの順に受
は取って記憶媒体(1)の該当アドレスに書き込む書き
込み部(3)と、書き込み部(3)によるデータ情報の
書き込みが終了したことおよびデータ自体の書き込みが
終了したことを検出する終了検出部(4)と、書き込み
終了が検出されたデータの種別に対応して“1°または
“0”のフラグを書き込み部(3)に供給するフラグ出
力部(5)と、電源異常等に起因する書き込み処理の中
断が生じたことを検出する中断検出部(6)と、中断が
生じたことを条件として処理再開時に記憶媒体(1)の
フラグ領域からフラグを読み出すフラグ読み出し部σ)
と、読み出されたフラグに基づいてデータ自体の更新を
行なう必要があるか否かを判別する判別部S)と、更新
を行なう必要があることを示す判別結果に基づいて、記
憶媒体(1)のデータ情報領域(1b)から読み出され
たデータ情報に基づいてデータ自体の書き込みを再度行
なわせる制御部(9)とを有している。
FIG. 3 is a block diagram showing an embodiment of the data writing device of the present invention, which includes an identification section (2) that receives data to be written and identifies data information and the data itself, and an identification section (2) that receives data to be written and identifies the data information and the data itself; The writing unit (3) receives and writes the data itself in this order to the corresponding address of the storage medium (1), and the writing unit (3) confirms that the writing of data information has been completed and that the writing of the data itself has been completed. An end detection unit (4) that detects the completion of writing, a flag output unit (5) that supplies a flag of “1°” or “0” to the write unit (3) in accordance with the type of data for which the end of writing has been detected, and a power source. An interruption detection unit (6) that detects that the writing process has been interrupted due to an abnormality, etc., and a flag reading unit that reads the flag from the flag area of the storage medium (1) when the process is resumed on the condition that the interruption has occurred. σ)
and a determination unit S) that determines whether or not it is necessary to update the data itself based on the read flag, and a determination unit S) that determines whether or not it is necessary to update the data itself based on the read flag; ), and a control unit (9) that causes the data itself to be written again based on the data information read from the data information area (1b).

以上の構成のデータ書き込み装置の動作は次のとおりで
ある。
The operation of the data writing device having the above configuration is as follows.

書き込むべきデータか送られてきた場合には、先ず、識
別部(2)においてデータ情報およびデータ自体が識別
され、識別されたデータ情報およびデータ自体をこの順
に書き込み部(3)に供給することにより、記憶媒体(
1)のデータ情報領域(1b)に対する書き込みが行な
われる。この場合における書き込みは、予め定められて
いる書き込み単位長さずつ行なわれる。そして、最初に
データ情報の書き込みが終了するので、終了検出部(4
)により書き込み終了が検出され、フラグ出力部(5)
がデータ情報の書き込みが終了したことを示すフラグ1
′を書き込み部(3)に供給するので、記憶媒体(1)
のフラグ領域(1c)にフラグ1′を書き込む。
When data to be written is sent, first, the data information and the data itself are identified in the identification section (2), and the identified data information and the data itself are supplied in this order to the writing section (3). , storage medium (
Writing to the data information area (1b) of 1) is performed. Writing in this case is performed in units of a predetermined writing unit length. Since writing of data information is completed first, the end detection unit (4
) detects the end of writing, and the flag output section (5)
Flag 1 indicates that writing of data information has finished.
' is supplied to the writing unit (3), so the storage medium (1)
A flag 1' is written in the flag area (1c).

次いで、識別されたデータ自体が書き込み部(3)に供
給されるので、記憶媒体(1)のデータ領域(1a)に
対する書き込みが、予め定められている書き込み単位長
さずつ行なわれる。そして、データ自体の書き込みか終
了すれば、終了検出部(4)により書き込み終了か検出
され、フラグ出力部(5)がデータ自体の書き込みが終
了したことを示すフラグ0”を書き込み部(3)に供給
するので、記憶媒体(1)のフラグ領域(lc)にフラ
グO°を書き込む。
Next, the identified data itself is supplied to the writing unit (3), so that writing to the data area (1a) of the storage medium (1) is performed for each predetermined writing unit length. When the writing of the data itself is completed, the end detection section (4) detects whether the writing is completed, and the flag output section (5) sends a flag 0" indicating that the writing of the data itself has been completed to the writing section (3). Therefore, the flag O° is written in the flag area (lc) of the storage medium (1).

以下、データの書き込みが指示される毎に上記の動作を
反復する。
Thereafter, the above operation is repeated every time data writing is instructed.

また、以上の一連の処理を行なっている間に電源異常、
記憶媒体自体の抜き取り等に起因する処理の中断が生じ
た場合には、中断検出部(6)により、中断された処理
を認識できるので、該当する原因が解消されることによ
り処理を再開することができる。この場合において、先
ず、フラグ読み出し部(7)によりフラグを読み出し、
制御部(8)において、読み出されたフラグに基づいて
データ自体を再度書き込むべきか否かが判別され、再度
書き込むべきであると判別された場合(フラグが“1“
であると判別された場合)にのみ、データ情報領域(i
b)の情報に基づいてデータ自体をデータ領域(1a)
に書き込み、データの完全性を担保することができる。
Also, during the above series of processing, a power failure may occur.
If processing is interrupted due to removal of the storage medium itself, etc., the interrupted processing can be recognized by the interruption detection unit (6), so that processing can be resumed when the corresponding cause is resolved. I can do it. In this case, first, the flag is read out by the flag reading section (7),
In the control unit (8), it is determined whether or not the data itself should be written again based on the read flag, and if it is determined that the data itself should be written again (if the flag is "1").
The data information area (i
The data itself is stored in the data area (1a) based on the information in b).
can be written to ensure data integrity.

逆に、フラグが“0”であると判別された場合には、既
にデータの完全性が担保されているので、再度の書き込
み処理を行なわない。
On the other hand, if it is determined that the flag is "0", the data integrity is already ensured, so the write process is not performed again.

〈発明の効果〉 以上のように第1の発明は、書き込み処理の中断に拘ら
ずデータの完全性が担保できるフラグによりデータ情報
の書き込みが完了したか、データ自体の書き込みが完了
したかを識別できるようにしているので、処理の中断に
伴なう再度の書き込みを行なわせるべきか否かが確実に
識別でき、特別の回路、装置を付加することなく書き込
みデータの完全性を担保できるという特有の効果を奏す
る。
<Effects of the Invention> As described above, the first invention identifies whether the writing of data information or the writing of the data itself has been completed using a flag that can ensure the integrity of data regardless of the interruption of the writing process. This feature makes it possible to reliably identify whether or not to write again due to processing interruption, and to ensure the integrity of written data without adding special circuits or devices. It has the effect of

第2の発明も、書き込み処理の中断に拘らずデータの完
全性が担保できるフラグによりデータ情報の書き込みが
完了したか、データ自体の書き込みが完了したかを識別
できるようにしているので、処理の中断に伴なう再度の
書き込みを行なわせるべきか否かが確実に識別でき、特
別の回路、装置を付加することなく書き込みデータの完
全性を担保できるという特有の効果を奏する。
The second invention also makes it possible to identify whether the writing of data information or the writing of the data itself has been completed using a flag that can ensure the integrity of the data regardless of the interruption of the writing process. This has the unique effect of being able to reliably identify whether or not to write again due to an interruption, and ensuring the integrity of written data without adding any special circuits or devices.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明のデータ書き込み方法の一実施例を示
すフローチャート、 第2図はこの発明のデータ書き込み方法が適用される記
憶媒体の割り当てを概略的に示す図、第3図はこの発明
のデータ書き込み装置の−実絶倒を示すブロック図、 第4図は記憶媒体の従来の割り当てを概略的に示す図。
FIG. 1 is a flowchart showing an embodiment of the data writing method of the present invention, FIG. 2 is a diagram schematically showing allocation of storage media to which the data writing method of the invention is applied, and FIG. 3 is a flowchart showing an embodiment of the data writing method of the present invention. FIG. 4 is a block diagram showing the actual configuration of a data writing device. FIG. 4 is a diagram schematically showing the conventional allocation of storage media.

Claims (1)

【特許請求の範囲】 1、記憶手段(1)を、データ自体を書き込むデータ領
域(1a)と、書き込まれたデータ毎に割り当てられた
データ情報を書き込 むデータ情報格納領域(1b)と、データ自体の書き込
みが完了したかデータ情報の 書き込みが完了したかを示すフラグを書 き込むフラグ領域(1c)とに区分しておき、記憶手段
(1)に対するデータ書き込み途中において処理の中断
が発生した場合に、 フラグに基づいてデータ領域(1a)に書き込まれたデ
ータ自体が正常か否かを判別 し、正常でないと判別された場合にのみ 記憶手段(1)へのデータ自体の書き込みを上記処理の
中断後に行なうことを特徴と するデータ書き込み方法。 2、データ自体を書き込むデータ領域(1a)と、書き
込まれたデータ毎に割り当てら れたデータ情報を書き込むデータ情報格 納領域(1b)と、データ自体の書き込みが完了したか
データ情報の書き込みが完了 したかを示すフラグを書き込むフラグ領 域(1c)とに区分された記憶手段(1)と、記憶手段
(1)の該当領域に所定のデータを書き込む書き込み手
段(3)と、記憶手段(1)に対するデータ書き込み途
中において処理 の中断が発生したことを検出する中断検 出手段(6)と、中断検出手段(6)により処理の中断
が発生したことを検出したことを 条件として、フラグ領域(1c)の該当するフラグに基
づいてデータ領域(1a)に書き込まれたデータ自体が
正常か否かを判別 する判別手段(8)と、判別手段(8)により正常でな
いと判別されたことを条件として 記憶手段(1)へのデータ自体の書き込みを上記処理の
中断後に行なわせる制御手段 (9)とを含むことを特徴とするデータ書き込み装置。
[Claims] 1. The storage means (1) includes a data area (1a) in which the data itself is written, a data information storage area (1b) in which data information allocated for each written data is written, and the data itself. The flag area (1c) is divided into a flag area (1c) in which a flag indicating whether the writing of data has been completed or whether the writing of data information has been completed. Based on the flag, it is determined whether the data itself written to the data area (1a) is normal or not, and only when it is determined that it is not normal, the data itself is written to the storage means (1) after the above processing is interrupted. A data writing method characterized by: 2. A data area (1a) where data itself is written, a data information storage area (1b) where data information allocated for each written data is written, and a data area (1b) where writing of the data itself is completed or writing of data information is completed. A storage means (1) is divided into a flag area (1c) for writing a flag indicating whether the An interruption detection means (6) detects that an interruption of processing has occurred during data writing, and a flag area (1c) is set on the condition that the interruption detection means (6) detects that an interruption of processing has occurred. A determining means (8) for determining whether the data itself written in the data area (1a) is normal based on the corresponding flag, and a storage means for determining whether the data itself is normal or not based on the determining means (8). A data writing device comprising: (1) a control means (9) for causing the writing of data itself to be performed after the above-mentioned processing is interrupted.
JP2105712A 1990-04-20 1990-04-20 Data writing method and device Expired - Lifetime JPH0820933B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2105712A JPH0820933B2 (en) 1990-04-20 1990-04-20 Data writing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2105712A JPH0820933B2 (en) 1990-04-20 1990-04-20 Data writing method and device

Publications (2)

Publication Number Publication Date
JPH043218A true JPH043218A (en) 1992-01-08
JPH0820933B2 JPH0820933B2 (en) 1996-03-04

Family

ID=14414950

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2105712A Expired - Lifetime JPH0820933B2 (en) 1990-04-20 1990-04-20 Data writing method and device

Country Status (1)

Country Link
JP (1) JPH0820933B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003005208A1 (en) * 2001-07-06 2003-01-16 Sony Corporation Recording device, recording method, storage medium, program, and communication device
WO2008010450A1 (en) * 2006-07-19 2008-01-24 Kabushiki Kaisha Toshiba Portable electronic device and control method thereof
JP2016510525A (en) * 2012-12-27 2016-04-07 マイクロソフト テクノロジー ライセンシング,エルエルシー Reduction of display update time for near eye display

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0277951A (en) * 1988-09-14 1990-03-19 Mitsubishi Electric Corp Index sequence file device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0277951A (en) * 1988-09-14 1990-03-19 Mitsubishi Electric Corp Index sequence file device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003005208A1 (en) * 2001-07-06 2003-01-16 Sony Corporation Recording device, recording method, storage medium, program, and communication device
US7114048B2 (en) 2001-07-06 2006-09-26 Sony Corporation Recording apparatus, recording method, storage medium, program and communication apparatus
WO2008010450A1 (en) * 2006-07-19 2008-01-24 Kabushiki Kaisha Toshiba Portable electronic device and control method thereof
JP2016510525A (en) * 2012-12-27 2016-04-07 マイクロソフト テクノロジー ライセンシング,エルエルシー Reduction of display update time for near eye display
US10514541B2 (en) 2012-12-27 2019-12-24 Microsoft Technology Licensing, Llc Display update time reduction for a near-eye display

Also Published As

Publication number Publication date
JPH0820933B2 (en) 1996-03-04

Similar Documents

Publication Publication Date Title
RU2146399C1 (en) Method for data storage in non-volatile memory unit, method for using integral circuit device, and integral circuit device
JP2002123421A (en) Remapping control method for flash memory and structure of flash memory using the same
JPH05324489A (en) Storage device
JPH043218A (en) Data writing method and device
CN114281588A (en) Data recovery method, device, equipment and medium
JP3082344B2 (en) Disk file control device and update method
JP2000357216A (en) IC card
JPH0778231A (en) Memory card
JPH10161942A (en) Information storage method, information storage device, and information processing device
JP3196112B2 (en) Method of duplicating card type storage medium
JPH07141120A (en) Information storage medium failure processing method
JPH1153487A (en) Method for determining validity of write data in IC card
JPS6346553A (en) File copying method
JPH04236623A (en) Check processing system for wrong replacement of medium
JPS6161419B2 (en)
JP2984126B2 (en) Memory card contact failure detection device
JP2972365B2 (en) Access control method for magnetic tape storage
JP2003167687A (en) Method and device for disk array control and disk array control program
JPS62192826A (en) File writing system
JPH05265826A (en) File duplication method
JP2827520B2 (en) Input/Output Control Unit
JPS62194557A (en) File trouble recovery system
JPH0823840B2 (en) Method and apparatus for updating database
JPH0287241A (en) Disaster recovery method
JPS6013360A (en) Storage device