JPH06332809A - Information processor - Google Patents

Information processor

Info

Publication number
JPH06332809A
JPH06332809A JP5121700A JP12170093A JPH06332809A JP H06332809 A JPH06332809 A JP H06332809A JP 5121700 A JP5121700 A JP 5121700A JP 12170093 A JP12170093 A JP 12170093A JP H06332809 A JPH06332809 A JP H06332809A
Authority
JP
Japan
Prior art keywords
file
data
writing
flag
nvram
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
JP5121700A
Other languages
Japanese (ja)
Inventor
Asami Kato
朝美 加藤
Shinichiro Tomizawa
眞一郎 富澤
Satoshi Noro
聡 野呂
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP5121700A priority Critical patent/JPH06332809A/en
Publication of JPH06332809A publication Critical patent/JPH06332809A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the malfunction of a user application using a file by storing that data are being written in a file header and judging whether or not the file is ended in the middle of write at the time of reading the tile. CONSTITUTION:At the time of writing the file 13 in an NVRAM, a flag 21 for indicating that the write to the items of the file header 14 present in the respective files 13 is in progress is provided and is set. Every time 1 byte of the data is written, the number of the written data is increased by one and is written in a data size 19 which is one item of the file header 14. Then, when the entire write operations of the data of the file 13 are completed, the data write in-progress flag 21 is cleared. When the read operation of the file 13 is requeted, the file header 14 is referred to and it is judged that the write operation is normally ended when the data write in-progress flag 21 is cleared and that the write is in the middle when the data write in-progress flag 21 is set.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は情報処理装置に関するも
ので、特に、NVRAMデバイスにファイルの書込み及
び読出しを行う情報処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus, and more particularly to an information processing apparatus for writing and reading a file in an NVRAM device.

【0002】[0002]

【従来の技術】NVRAMデバイスへのデータの書込み
・読出しができる情報処理装置においては、NVRAM
上にファイルが作成される場合、ファイル・ヘッダとデ
ータ本体から構成されるファイルはそれらが連続して作
成される。したがって、NVRAMに対してファイルの
書込みを実行中にシステムの電源が遮断された場合、そ
のファイルは部分的にデータが更新され、システムのバ
ックアップ用電源によりそれが保持される。しかし、そ
のようなファイルが読出されるときには、データの更新
が途中で終了しているにもかかわらず、完全なファイル
と同様にファイルのデータが読出される。
2. Description of the Related Art In an information processing device capable of writing / reading data to / from an NVRAM device, an NVRAM
When a file is created on top of it, the file consisting of the file header and the data body is created in succession. Therefore, if the power of the system is cut off while writing the file to the NVRAM, the data of the file is partially updated, and the data is held by the backup power supply of the system. However, when such a file is read, the data of the file is read in the same way as a complete file, although the update of the data has ended halfway.

【0003】[0003]

【発明が解決しようとする課題】このように、従来のN
VRAMデバイスへデータの書込み・読出しを行うシス
テムにおいては、NVRAMに対してファイルの書込み
を実行中にシステムの電源が遮断された場合、そのファ
イルは部分的にデータが更新された状態となり、それが
システムのバックアップ用電源により保持されているか
ら、ユーザのアプリケーション・プログラムがそのよう
なファイルを読出したとき、データ本体の更新が途中で
終っておりファイルとして不完全であることを知らない
まま使用してしまう。このようなファイルをユーザのア
プリケーション・プログラムが読出したとき、不適切な
データを扱ってしまい誤動作になる可能性がある。
As described above, the conventional N
In a system that writes / reads data to / from a VRAM device, if the power of the system is cut off while writing a file to / from NVRAM, the file is partially updated with data, which It is held by the system's backup power supply, so when a user's application program reads such a file, it should be used without knowing that the update of the data body has ended halfway and is incomplete. Will end up. When such a file is read by the user's application program, improper data may be handled and malfunction may occur.

【0004】そこで、本発明は、NVRAMデバイスに
記憶されたファイルの読出しを行うとき、そのNVRA
Mへの書込みが途中で終ったファイルに対しては、その
ファイルのデータが不完全であることをユーザに知らせ
ることができる情報処理装置の提供を課題とするもので
ある。
Therefore, according to the present invention, when reading a file stored in an NVRAM device, the NVRA of that file is read.
An object of the present invention is to provide an information processing apparatus that can inform the user that the data of the file is incomplete for a file that has been written to M halfway.

【0005】[0005]

【課題を解決するための手段】請求項1にかかる情報処
理装置は、データ本体とそのデータ本体の属性を示すフ
ァイル・ヘッダから構成されるファイルと、アドレスが
1ずつ増加するようにシーケンシャルに書込みが行わ
れ、連続したアドレス・エリアに前記ファイルを記憶す
るNVRAMと、前記NVRAMにファイルを書込む書
込手段と、前記NVRAMからファイルを読出す読出手
段とを具備する情報処理装置において、前記書込手段は
前記NVRAMに前記ファイルを書込むとき、前記ファ
イル・ヘッダにデータ書込中であることを記憶し、前記
読出手段は前記ファイルの読出すときに前記ファイル・
ヘッダを参照し、前記ファイルが書込途中で終了したか
を判定するものである。
According to a first aspect of the present invention, there is provided an information processing device, which sequentially writes a file including a data body and a file header indicating an attribute of the data body and an address in increments of one. And an NVRAM for storing the file in successive address areas, a writing unit for writing the file in the NVRAM, and a reading unit for reading the file from the NVRAM. When writing the file into the NVRAM, the writing means stores that the data is being written in the file header, and the reading means stores the file when reading the file.
By referring to the header, it is determined whether or not the file has ended in the middle of writing.

【0006】請求項2にかかる情報処理装置は、前記フ
ァイル・ヘッダは、データ本体のサイズと、その有効性
を示すフラグを含み、データ本体のサイズを書込む前に
そのフラグをセットし、書込んだ直後にフラグをクリア
することで、データサイズ情報の信頼性を記憶するもの
である。
According to a second aspect of the present invention, in the file header, the file header includes the size of the data body and a flag indicating its validity. The flag is set and written before writing the size of the data body. The reliability of the data size information is stored by clearing the flag immediately after loading.

【0007】[0007]

【作用】請求項1においては、NVRAMデバイスにフ
ァイルを書込むとき、ファイル・ヘッダに書込中である
ことを示すフラグをセットし、ファイル本体の全てのデ
ータの書込動作が終了したとき、書込中フラグをクリア
する。そして、ファイルの読出動作が要求されたときに
は、まず、ファイル・ヘッダを参照し、書込中フラグが
クリアされている状態であれば、このファイルは書込動
作を正常に終了したものであり、また、書込中フラグが
セットされている状態であれば、このファイルは書込途
中であったと判定する。
According to the first aspect of the present invention, when a file is written to the NVRAM device, a flag indicating that the file is being written is set in the file header, and when the writing operation of all the data in the file body is completed, Clear the writing flag. Then, when a file read operation is requested, first, the file header is referenced, and if the writing flag is cleared, this file has been written normally. If the writing flag is set, it is determined that this file is being written.

【0008】請求項2においては、NVRAMデバイス
にファイルを書込むとき、ファイル・ヘッダに書込中で
あることを示すフラグをセットする。また、データ1バ
イトを書込み毎に、書込んだデータ数を1インクリメン
トし、これをファイル・ヘッダのデータサイズ項目に書
込む。データサイズ項目を更新する直前にも、データサ
イズの更新中を示すフラグをセットし、データサイズの
項目を更新した後にデータサイズ情報の有効を示すデー
タサイズ更新中フラグをリセットする。ファイル本体の
全てのデータの書込動作が終了したとき、書込中フラグ
をクリアする。ファイルの読出動作が要求されたときに
は、まず、ファイル・ヘッダを参照し、書込中フラグが
クリアされている状態であれば、このファイルは書込動
作を正常に終了し、また、書込中フラグがセットされて
いる状態であれば、このファイルは書込途中であったと
判定する。
According to the present invention, when writing a file to the NVRAM device, a flag indicating that writing is in progress is set in the file header. Also, each time one byte of data is written, the number of written data is incremented by 1, and this is written in the data size item of the file header. Immediately before updating the data size item, the flag indicating that the data size is being updated is set, and after updating the data size item, the data size updating flag indicating that the data size information is valid is reset. When the writing operation of all the data in the file body is completed, the writing flag is cleared. When a file read operation is requested, first the file header is referenced, and if the write flag is cleared, this file has completed the write operation normally and is being written. If the flag is set, it is determined that this file is being written.

【0009】[0009]

【実施例】以下、本発明の実施例の情報処理装置につい
て説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An information processing apparatus according to an embodiment of the present invention will be described below.

【0010】図1は本発明の情報処理装置の一実施例に
おけるシステム構成図である。
FIG. 1 is a system configuration diagram of an embodiment of an information processing apparatus of the present invention.

【0011】図1において、1はCPU(中央演算処理
装置)で、本システムの全体のプログラム制御を行う。
2はプログラム等を記憶した外部記憶装置である。RO
M4はROM化されたプログラム5が内蔵されているリ
ードオンリーメモリ、RAM6は外部記憶装置2から読
出されたプログラム3等が格納されるランダムアクセス
メモリである。NVRAM7は前記プログラム3等の指
示により、データ・ファイル等が保持される不揮発性メ
モリで、アドレスが1ずつ増加するようにシーケンシャ
ルに書込みが行われ、連続したアドレス・エリアにデー
タを記憶する。また、8は表示用のディスプレイ装置で
ある。
In FIG. 1, reference numeral 1 is a CPU (central processing unit) which controls the entire program of the system.
An external storage device 2 stores programs and the like. RO
M4 is a read-only memory in which the ROM-based program 5 is incorporated, and the RAM 6 is a random access memory in which the program 3 and the like read from the external storage device 2 are stored. The NVRAM 7 is a non-volatile memory that holds data files and the like in accordance with the instructions of the program 3 and the like, and is sequentially written so that the address increases by 1 and stores data in consecutive address areas. Reference numeral 8 is a display device for display.

【0012】図2は本発明の情報処理装置の一実施例に
おけるプログラム構成図である。
FIG. 2 is a program configuration diagram in an embodiment of the information processing apparatus of the present invention.

【0013】図2において、各機能はそれぞれ独立した
プログラムで構成されている。9は全機能を統率するた
めのマネージャ機能、10は外部記憶装置2内のプログ
ラム3をRAM6上に呼込むためのプログラム管理機
能、11はNVRAM7への書込み・読出しを行なう対
NVRAM書込み/読出し機能、12はディスプレイ装
置8に表示を行なうディスプレイへのエラー・メッセー
ジ表示機能、なお、マネージャ機能9からディスプレイ
へのエラー・メッセージ表示機能12は、ROM4内に
ROM化されたプログラム5として存在する。
In FIG. 2, each function is composed of an independent program. Reference numeral 9 is a manager function for controlling all functions, 10 is a program management function for calling the program 3 in the external storage device 2 onto the RAM 6, and 11 is a NVRAM write / read function for writing / reading to / from the NVRAM 7. , 12 are error message display functions on the display for displaying on the display device 8, and the error message display function 12 from the manager function 9 to the display exists in the ROM 4 as the program 5 stored in the ROM.

【0014】図3は本発明の情報処理装置の一実施例に
おけるNVRAM上のファイルの構造模式図である。
FIG. 3 is a schematic diagram of the structure of a file on NVRAM in one embodiment of the information processing apparatus of the present invention.

【0015】図3において、NVRAM7に記憶される
ファイル13の構造模式は、ファイルの属性等を記した
ファイル・ヘッダ14と、データ本体15から構成され
ている。ファイル・ヘッダ14はファイルの名前16、
ファイル13のアトリビュート17、ファイル13のオ
ーナー名18、データ本体15のデータサイズ19、フ
ァイル13の作成日時20、ファイル書込中であるとき
にセットされるデータ書込中フラグ21、データサイズ
19を更新中であるときにセットされる更新中フラグ2
2等から構成されている。
In FIG. 3, the schematic structure of the file 13 stored in the NVRAM 7 is composed of a file header 14 indicating the attributes of the file and a data body 15. The file header 14 is the name of the file 16,
The attribute 17 of the file 13, the owner name 18 of the file 13, the data size 19 of the data body 15, the creation date / time 20 of the file 13, the data writing flag 21 set when the file is being written, and the data size 19 are set. Updating flag 2 set when updating
It is composed of 2 etc.

【0016】図4は本発明の情報処理装置の一実施例に
おけるメッセージの事例であり、図5は本発明の情報処
理装置の一実施例におけるフローチャート、図6は本発
明の情報処理装置の一実施例における書込要求の動作を
示すフローチャート、図7は本発明の情報処理装置の一
実施例における読出要求の動作を示すフローチャートで
ある。
FIG. 4 is an example of a message in one embodiment of the information processing apparatus of the present invention, FIG. 5 is a flow chart in one embodiment of the information processing apparatus of the present invention, and FIG. 6 is one of the information processing apparatus of the present invention. FIG. 7 is a flowchart showing a write request operation in the embodiment, and FIG. 7 is a flowchart showing a read request operation in the embodiment of the information processing apparatus of the present invention.

【0017】図4はNVRAM7内にあるファイルを読
出そうとした際、ファイルが書込み中となっていた場合
にディスプレイ装置8に表示されるエラーメッセージの
一例である。
FIG. 4 shows an example of an error message displayed on the display device 8 when a file in the NVRAM 7 is being read and the file is being written.

【0018】次に、このように構成された本実施例の情
報処理装置について、その動作を説明する。
Next, the operation of the information processing apparatus of this embodiment having the above configuration will be described.

【0019】まず、ステップS1でROM4にROM化
されたプログラム5のプログラム管理機能10が外部記
憶装置2よりプログラム3をRAM6上に呼込む。ステ
ップS2で呼込まれたプログラム3はCPU1により外
部記憶装置2内のプログラム3をRAM6上に呼込むた
めのプログラム管理機能が実行される。プログラム3に
おいてNVRAM7へのファイルの書込要求が発生した
場合、ROM4中のプログラム5のNVRAM7への書
込み・読出し機能11が、次の動作を行なう。
First, in step S1, the program management function 10 of the program 5 stored in the ROM 4 of the ROM 4 loads the program 3 from the external storage device 2 onto the RAM 6. The program 3 called in step S2 is executed by the CPU 1 by the program management function for calling the program 3 in the external storage device 2 into the RAM 6. When a file write request to the NVRAM 7 is generated in the program 3, the write / read function 11 of the program 5 in the ROM 4 to / from the NVRAM 7 performs the following operation.

【0020】まず、ステップS11でファイル13内の
ファイル・ヘッダ14を参照し、ステップS12でファ
イル・ヘッダ14のうち、ファイルの名前16、そのフ
ァイルへの書込みができるか否かをアトリビュート17
とファイル13のオーナー名18で確認する。また、ス
テップS13でデータのファイル13への書込みを開始
した日時を作成日時20に更新し、これからデータを書
込むということを示す書込中フラグ21をセットし、ス
テップS14でデータの書込みを開始する。データの書
込みは1バイトずつ行われ、その書込み毎に書込んだデ
ータ数を1インクリメントし、データサイズ19に書込
む。このとき、データサイズ19を書替える前にデータ
サイズ更新中フラグ22をセットし、書込んだ直後に、
このフラグをクリアする。書込み中フラグ21はデータ
書込み動作中の間はセットされたままである。ステップ
S15でファイルの全データの書込動作が終了したと
き、ステップS16で書込中フラグ21をクリアし、デ
ータの書込動作を終了する。
First, in step S11, the file header 14 in the file 13 is referred to, and in step S12, the file name 16 of the file header 14 and the attribute 17 indicating whether the file can be written or not.
And confirm with the owner name 18 of the file 13. In step S13, the date and time when the writing of the data to the file 13 is started is updated to the creation date and time 20, the writing flag 21 indicating that the data is about to be written is set, and the writing of the data is started in step S14. To do. Data writing is performed byte by byte, and the number of written data is incremented by 1 for each writing, and the data size 19 is written. At this time, the data size updating flag 22 is set before rewriting the data size 19, and immediately after writing,
Clear this flag. The writing flag 21 remains set during the data writing operation. When the writing operation of all the data of the file is completed in step S15, the in-writing flag 21 is cleared in step S16, and the data writing operation is completed.

【0021】また、プログラム3においてNVRAM7
からのファイル13の読出し要求が発生した場合、RO
M4中のプログラム5のNVRAM7への書込み・読出
し機能11が、次の動作を行なう。
In the program 3, NVRAM 7
When a read request for the file 13 from the
The write / read function 11 of the program 5 in the M4 to the NVRAM 7 performs the following operation.

【0022】まず、ステップS21でファイル13内の
ファイル・ヘッダ14を参照し、ステップS22でファ
イル13の名前16、そのファイル13からの読出しが
できるか否か、アトリビュート17とファイル13のオ
ーナー名18を確認する。次に、ステップS23でファ
イル・ヘッダ14の書込中フラグ21を参照し、この書
込中フラグ21がクリアされているならば、このファイ
ル13は正常に書込動作が終了しているものと判別で
き、ステップS26でこのまま読出動作を続行する。あ
るいは、書込中フラグ21がセットされているならば、
このファイル13はデータ書込中にシステムが停止し、
書込みが完了していないことを意味するから、ステップ
S24で、さらに、データサイズ更新中フラグ22を参
照し、このフラグがセットされているとき、ステップS
25でデータサイズ19の情報自体が完全でないことを
示し、ファイル全体を補償することができないと判別で
き、その意味のメッセージ(図4(a)参照)を表示す
る。データサイズ更新中フラグ22がセットされていな
いとき、ステップS27でデータサイズ19の情報が信
頼できるものと判別でき、信頼できるデータサイズ19
を表示(図4(b)参照)する。このようにして、ファ
イル13の読出動作を終了する。
First, in step S21, the file header 14 in the file 13 is referred to. In step S22, the name 16 of the file 13 and whether or not the file 13 can be read out are determined by the attribute 17 and the owner name 18 of the file 13. To confirm. Next, in step S23, the in-writing flag 21 of the file header 14 is referred to. If this in-writing flag 21 is cleared, it means that the writing operation of this file 13 has been completed normally. The determination can be made, and the read operation is continued as it is in step S26. Alternatively, if the writing flag 21 is set,
This file 13 stops the system while writing data,
Since this means that the writing has not been completed, the data size updating flag 22 is further referred to in step S24, and when this flag is set, step S24
25 indicates that the information itself of the data size 19 is not complete, it can be determined that the entire file cannot be compensated, and a message (see FIG. 4A) indicating that is displayed. When the data size updating flag 22 is not set, the information of the data size 19 can be determined to be reliable in step S27, and the reliable data size 19 can be determined.
Is displayed (see FIG. 4B). In this way, the reading operation of the file 13 is completed.

【0023】この種のNVRAM7が使用エリアと空き
エリアがそれぞれ常に連続であるように管理されるよう
な場合、通常のファイル13の書替えによるデータサイ
ズの変更が、より後ろに配置される複数のファイル13
の再配置を引起こすことがある。このような場合にも、
本来のファイル以外の再配置されるファイルについて、
本発明によるファイルの保護は有効となる。
When the NVRAM 7 of this type is managed such that the used area and the empty area are always continuous, a change in the data size due to the rewriting of the normal file 13 causes a plurality of files arranged at the rear. Thirteen
May cause rearrangement. Even in this case,
Regarding relocated files other than original files,
The protection of the file according to the present invention is effective.

【0024】このように、本実施例の情報処理装置は、
データ本体15とそのデータ本体15の属性を示すファ
イル・ヘッダ14から構成されるファイル13と、アド
レスが1ずつ増加するようにシーケンシャルに書込みが
行われ、連続したアドレス・エリアに前記ファイル13
を記憶するNVRAM7と、前記NVRAM7にファイ
ルを書込むステップS11乃至ステップS16からなる
書込手段と、前記NVRAM7からファイル13を読出
すステップS21乃至ステップS27からなる読出手段
とを具備する情報処理装置において、前記書込手段は前
記NVRAM7に前記ファイル13を書込むとき、前記
ファイル・ヘッダ14にデータ書込中であることを記憶
し、前記読出手段は前記ファイル13の読出すときに前
記ファイル・ヘッダ14を参照し、前記ファイル13が
書込途中で終了したかを判定するものである。
As described above, the information processing apparatus of this embodiment is
A file 13 composed of a data body 15 and a file header 14 indicating the attributes of the data body 15 is written sequentially so that the address is incremented by one, and the file 13 is written in consecutive address areas.
In an information processing apparatus, the information processing apparatus includes: an NVRAM 7 for storing a file; When writing the file 13 into the NVRAM 7, the writing means stores that the data is being written in the file header 14, and the reading means stores the file header when reading the file 13. 14, it is determined whether or not the file 13 is completed in the middle of writing.

【0025】NVRAM7にファイル13を書込むと
き、各ファイル13にあるファイル・ヘッダ14の項目
に書込中であることを示すフラグを設け、これをセット
する。データ1バイトを書込み毎に、書込んだデータ数
を1インクリメントし、これをファイル・ヘッダ14の
一項目であるデータサイズ19に書込む。データサイズ
19の項目を更新する直前にも、データサイズ19の更
新中を示すフラグをセットし、データサイズ19の項目
を更新した後にデータサイズ情報の有効を示すために、
データサイズ更新中フラグ22をリセットする。ファイ
ル13の全てのデータの書込動作が終了したとき、デー
タ書込中フラグ21をクリアする。ファイル13の読出
動作が要求された場合には、まず、ファイル・ヘッダ1
4を参照し、データ書込中フラグ21がクリアされてい
る状態であれば、このファイル13は書込動作を正常に
終了し、また、データ書込中フラグ21がセットされて
いる状態であれば、このファイル13は書込途中であっ
たと判別する。前者の場合はこのまま読出動作を続け、
後者の場合はこのファイル13はデータが不完全である
ことを示すエラーメッセージと共に有効なデータ数を示
す。ファイル・ヘッダ14中のデータサイズ19の項目
の更新は必ずしも1バイトごとでなくても良く、システ
ムの都合のよい値を選択すればよい。
When writing the files 13 in the NVRAM 7, a flag indicating that writing is in progress is provided in the item of the file header 14 in each file 13, and this flag is set. Each time one byte of data is written, the number of written data is incremented by 1, and this is written in the data size 19 which is one item of the file header 14. Immediately before updating the item of data size 19, a flag indicating that the data size 19 is being updated is set, and after updating the item of data size 19, to indicate the validity of the data size information,
The data size updating flag 22 is reset. When the writing operation of all the data in the file 13 is completed, the data writing flag 21 is cleared. When a read operation of the file 13 is requested, first, the file header 1
4, if the data writing flag 21 is cleared, the writing operation of the file 13 is normally completed, and the data writing flag 21 is set. For example, it is determined that this file 13 is being written. In the former case, the read operation is continued as it is,
In the latter case, this file 13 shows the number of valid data with an error message indicating that the data is incomplete. The update of the item of the data size 19 in the file header 14 does not necessarily have to be performed for each byte, and a value convenient for the system may be selected.

【0026】これにより、NVRAMデバイスに作られ
たファイル13の読出しにおいて書込途中で終ったファ
イル13に対して、ファイル13のデータが不完全であ
ることをユーザに知らせることができ、そのファイル1
3を用いるユーザ・アプリケーションの誤動作を防ぐこ
とができる。
As a result, the user can be informed that the data of the file 13 is incomplete for the file 13 that has been written in the reading of the file 13 created in the NVRAM device.
It is possible to prevent a malfunction of a user application that uses No. 3.

【0027】ところで、本実施例では、ファイル・ヘッ
ダ14にデータ書込中であることをフラグで記憶したも
のであるが、ファイル13のメモリ占有率を書込み開始
でクリヤしておき、書込完了したときにそれを更新単位
で加算して書込むようにしておけば、前記フラグと同様
に使用できる。即ち、本発明を実施する場合には、ファ
イル・ヘッダ14にデータ書込中であることの記憶は、
ファイル・ヘッダ14の書込み形態を特定するものでは
ない。
By the way, in the present embodiment, the fact that data is being written is stored in the file header 14 by a flag. However, the memory occupancy of the file 13 is cleared at the start of writing, and the writing is completed. If this is done, it can be used in the same manner as the flag if it is written by adding it in update units. That is, in the case of implementing the present invention, the storage of the fact that data is being written in the file header 14 is
It does not specify the writing form of the file header 14.

【0028】[0028]

【発明の効果】以上説明したように、本発明の情報処理
装置によれば、NVRAMにファイルを書込むとき、フ
ァイル・ヘッダにデータ書込中であることを記憶してお
き、前記ファイルを読出すときに、そのファイル・ヘッ
ダを参照し、そのファイルが書込途中で終了したかを判
定することにより、ファイルのデータの書込みが完了し
たものか、そうでないものか容易に判別できる。
As described above, according to the information processing apparatus of the present invention, when writing a file in NVRAM, it is stored in the file header that data is being written and the file is read. At the time of output, by referring to the file header and determining whether the file has ended in the middle of writing, it is possible to easily determine whether the writing of the data of the file is completed or not.

【0029】また、データの書込みが完了していないフ
ァイルについて、その有効なデータを示すことによりフ
ァイルのデータを途中まで信頼性の高いデータとして用
いることができるのでファイル全体を無効にしなくても
よい。これらのことにより、NVRAMに格納されたフ
ァイルを使用するユーザ・アプリケーションの誤動作を
防ぐことができる。さらにデータサイズ情報自体の信頼
性を示すデータサイズ更新中フラグを参照することによ
り、データサイズ情報が信頼できるかどうかを判別する
ことができ、データサイズ更新中フラグがセットされて
いれば、信頼できるサイズが記憶できなかったことがわ
かり、そのファイル全体の爾後の扱が検討できる。これ
らのエラー状態を検出した場合、例えば、表示機能によ
ってユーザに対して警告を与えることが可能となる。こ
れによりユーザは残ったファイルのデータの取捨選択が
できる。
Further, by indicating valid data of a file for which data writing has not been completed, the data of the file can be used as highly reliable data up to the middle, so that it is not necessary to invalidate the entire file. . Due to these, it is possible to prevent the malfunction of the user application that uses the file stored in the NVRAM. Further, by referring to the data size updating flag indicating the reliability of the data size information itself, it is possible to determine whether or not the data size information is reliable, and if the data size updating flag is set, it is reliable. It turns out that the size could not be stored, and the subsequent handling of the entire file can be considered. When these error states are detected, for example, the display function can give a warning to the user. This allows the user to select the remaining file data.

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

【図1】図1は本発明の情報処理装置の一実施例におけ
るシステム構成図である。
FIG. 1 is a system configuration diagram in an embodiment of an information processing apparatus of the present invention.

【図2】図2は本発明の情報処理装置の一実施例におけ
るプログラム構成図である。
FIG. 2 is a program configuration diagram in an embodiment of the information processing apparatus of the present invention.

【図3】図3は本発明の情報処理装置の一実施例におけ
るNVRAM上のファイルの構造模式図である。
FIG. 3 is a schematic diagram of a file structure on NVRAM in an embodiment of the information processing apparatus of the present invention.

【図4】図4は本発明の情報処理装置の一実施例におけ
るメッセージの事例である。
FIG. 4 is an example of a message in an embodiment of the information processing apparatus of the present invention.

【図5】図5は本発明の情報処理装置の一実施例におけ
るフローチャートである。
FIG. 5 is a flowchart in one embodiment of the information processing apparatus of the present invention.

【図6】図6は本発明の情報処理装置の一実施例におけ
る書込要求の動作を示すフローチャートである。
FIG. 6 is a flowchart showing a write request operation in an embodiment of the information processing apparatus of the present invention.

【図7】図7は本発明の情報処理装置の一実施例におけ
る読出要求の動作を示すフローチャートである。
FIG. 7 is a flowchart showing a read request operation in an embodiment of the information processing apparatus of the present invention.

【符号の説明】 1 CPU 7 NVRAM 13 ファイル 14 ファイル・ヘッダ 15 データ本体 16 ファイルの名前 17 アトリビュート 19 データサイズ 21 データ書込中フラグ 22 更新中フラグ[Explanation of Codes] 1 CPU 7 NVRAM 13 file 14 file header 15 data body 16 file name 17 attribute 19 data size 21 data writing flag 22 updating flag

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 データ本体とそのデータ本体の属性を示
すファイル・ヘッダから構成されるファイルと、アドレ
スが1ずつ増加するようにシーケンシャルに書込みが行
われ、連続したアドレス・エリアに前記ファイルを記憶
するNVRAMと、前記NVRAMにファイルを書込む
書込手段と、前記NVRAMからファイルを読出す読出
手段とを具備する情報処理装置において、 前記書込手段は前記NVRAMに前記ファイルを書込む
とき、前記ファイル・ヘッダにデータ書込中であること
を記憶し、前記読出手段は前記ファイルの読出すときに
前記ファイル・ヘッダを参照し、前記ファイルが書込途
中で終了したかを判定することを特徴とする情報処理装
置。
1. A file consisting of a data body and a file header indicating the attributes of the data body, and data is written sequentially so that the address is incremented by 1, and the file is stored in consecutive address areas. An information processing apparatus comprising: an NVRAM for writing, a writing unit for writing a file in the NVRAM, and a reading unit for reading a file from the NVRAM, wherein the writing unit writes the file in the NVRAM. The data writing is stored in the file header, and the reading means refers to the file header when reading the file, and determines whether the file is ended in the middle of writing. Information processing device.
【請求項2】 前記ファイル・ヘッダは、データ本体の
サイズと、その有効性を示すフラグを含み、データ本体
のサイズを書込む前にそのフラグをセットし、書込んだ
直後にフラグをクリアすることで、データサイズ情報の
信頼性を記憶することを特徴とする請求項1に記載の情
報処理装置。
2. The file header includes the size of the data body and a flag indicating its validity, the flag is set before writing the size of the data body, and the flag is cleared immediately after writing. Therefore, the information processing apparatus according to claim 1, wherein the reliability of the data size information is stored.
JP5121700A 1993-05-24 1993-05-24 Information processor Pending JPH06332809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5121700A JPH06332809A (en) 1993-05-24 1993-05-24 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5121700A JPH06332809A (en) 1993-05-24 1993-05-24 Information processor

Publications (1)

Publication Number Publication Date
JPH06332809A true JPH06332809A (en) 1994-12-02

Family

ID=14817719

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5121700A Pending JPH06332809A (en) 1993-05-24 1993-05-24 Information processor

Country Status (1)

Country Link
JP (1) JPH06332809A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1027097A (en) * 1996-07-11 1998-01-27 Anritsu Corp Method and device for rewriting data of flash rom
JP2006276982A (en) * 2005-03-28 2006-10-12 Fujitsu Ltd File management device, and file management method
JP2009093236A (en) * 2007-10-04 2009-04-30 Nec Infrontia Corp Information processor, file system monitoring method, file system monitoring program and program recording medium
US8411526B2 (en) 2010-09-14 2013-04-02 Kabushiki Kaisha Toshiba Storage device, electronic device, and storage device control method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1027097A (en) * 1996-07-11 1998-01-27 Anritsu Corp Method and device for rewriting data of flash rom
JP2006276982A (en) * 2005-03-28 2006-10-12 Fujitsu Ltd File management device, and file management method
JP2009093236A (en) * 2007-10-04 2009-04-30 Nec Infrontia Corp Information processor, file system monitoring method, file system monitoring program and program recording medium
US8411526B2 (en) 2010-09-14 2013-04-02 Kabushiki Kaisha Toshiba Storage device, electronic device, and storage device control method

Similar Documents

Publication Publication Date Title
US6618794B1 (en) System for generating a point-in-time copy of data in a data storage system
CN108170495B (en) BIOS upgrading method, system, equipment and computer readable storage medium
JPH05324489A (en) Storage device
US7478207B2 (en) Control system with a write filter for protection of data
US20050028159A1 (en) Memory managing system and task controller in multitask system
JPH06332809A (en) Information processor
JPH09128267A (en) Data processor and data processing method
JP3284929B2 (en) vending machine
JP2005128613A (en) Image forming device
JP2003288213A (en) Boot program storage device and method of storing boot program of electronic appliance
JPH05181572A (en) Information processor
JP2635777B2 (en) Programmable controller
JPH04324529A (en) Program modification management system
JPH05158805A (en) Controlling system for non-volatile memory area
JPH03256128A (en) Method for loading program
JP3789248B2 (en) Program loading method, program loading apparatus and recording medium therefor
JPH11296363A (en) Method for rewriting basic software of portable terminal
JPH03268300A (en) Data processor
JPH06245040A (en) Facsimile equipment
JPH0446436B2 (en)
JPH02151945A (en) File management device
JPS6057381A (en) Display system
JPS6069739A (en) Information processor
JPH0259816A (en) System parameter control system
JPH09128320A (en) Peripheral equipment