JPS6010329B2 - File control method - Google Patents

File control method

Info

Publication number
JPS6010329B2
JPS6010329B2 JP55104612A JP10461280A JPS6010329B2 JP S6010329 B2 JPS6010329 B2 JP S6010329B2 JP 55104612 A JP55104612 A JP 55104612A JP 10461280 A JP10461280 A JP 10461280A JP S6010329 B2 JPS6010329 B2 JP S6010329B2
Authority
JP
Japan
Prior art keywords
file
logical record
counter section
data
writing
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
Application number
JP55104612A
Other languages
Japanese (ja)
Other versions
JPS5730061A (en
Inventor
達夫 堀越
茂雄 田辺
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.)
Fujitsu Ltd
Fuji Facom Corp
Original Assignee
Fujitsu Ltd
Fuji Facom Corp
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 Fujitsu Ltd, Fuji Facom Corp filed Critical Fujitsu Ltd
Priority to JP55104612A priority Critical patent/JPS6010329B2/en
Publication of JPS5730061A publication Critical patent/JPS5730061A/en
Publication of JPS6010329B2 publication Critical patent/JPS6010329B2/en
Expired legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 本発明は、障害時のデ−夕の有効性を正しく判断できる
ファイル制御方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a file control method that can correctly determine the validity of data in the event of a failure.

リアルタイム処理において電源断などの障害がファイル
・ライト中に発生すると、アクセス中のレコードが書込
み途中であるか杏かを判断できない。また、同一データ
を複数のファイルに書込む場合、例えばトランザクショ
ン・ファイルに書込むと同時にマスタ・ファイルを更新
するような場合に電源断などの障害が発生すると、マス
タ・ファイルのどのデータをトランザクシヨンのどのデ
ータで更新すべきであったか判断がつかない。本発明は
、上記の考察に基づくものであって、トランザクション
・フアイルとマスタ・フアイルとを備えるファイル・シ
ステムにおいて、障害復旧時のファイルの有効性の判断
を正しく行い得るようにしたファイル制御方式を提供す
ることを目的としている。そしてそのため、本発明のフ
ァイル制御方式は、トランザクション・ファイルとマス
タ・ファイルを備えるファイル・システムにおいて、各
論理レコード‘こ前段ライト・カウンタ部と後段ライト
・カウンタ部を設け、データの書込みを行うとき、対応
する論理レコードの前段ライト・カウンタ部の値を更新
し、当該論理レコードに対するデータ書込み処理が完了
してから後段ライト・カウンタ部を更新することを特徴
とするものである。以下、本発明を図面を参照しつつ説
明する。第1図は本発明の機器構成の1例を示すもので
あって、1は中央処理装置、2一1と2−2は磁気ディ
スク装置、3は線量自動謙取装置、4−1と4一2はデ
ィスプレイをそれぞれ示している。
In real-time processing, if a failure such as a power outage occurs during file writing, it cannot be determined whether the record being accessed is in the middle of being written or not. Also, when writing the same data to multiple files, for example when writing to a transaction file and updating the master file at the same time, if a failure such as a power outage occurs, which data in the master file will not be updated during the transaction. It is difficult to determine which data should be updated. The present invention is based on the above considerations, and provides a file control method that enables correct determination of file validity during disaster recovery in a file system that includes a transaction file and a master file. is intended to provide. Therefore, in a file system including a transaction file and a master file, the file control method of the present invention provides a preceding stage write counter section and a subsequent stage write counter section for each logical record. , the value of the preceding stage write counter section of the corresponding logical record is updated, and the subsequent stage write counter section is updated after the data writing process for the logical record is completed. Hereinafter, the present invention will be explained with reference to the drawings. FIG. 1 shows an example of the equipment configuration of the present invention, in which 1 is a central processing unit, 2-1 and 2-2 are magnetic disk devices, 3 is an automatic dose sampling device, and 4-1 and 4-4 are magnetic disk devices. 12 each indicate a display.

第1図のシステムは作業員の被爆線量を記録するもので
ある。線量自動読取装置3は、管理区域に設けられてお
り、管理区域に立入った作業員が退出する際、作業員の
放射線被爆量は線量自動謙取装置3によって測定される
。自動測定された被爆量は、トランザクション・ファイ
ルおよびマスタ・ファイルに記録される。オペレータは
、ディスプレイ4−1又は4−2を用いてトランザクシ
ョン−ファイルまたはマスタ・ファイルの内容を諸取る
ことが可能である。第2図はトランザクション・ファイ
ルとマスタ・ファイルの関係を示すものである。
The system shown in Figure 1 records the radiation doses of workers. The automatic dose reading device 3 is provided in the controlled area, and when a worker enters the controlled area and leaves the controlled area, the amount of radiation exposure of the worker is measured by the automatic dose sampling device 3. The automatically measured exposure amount is recorded in the transaction file and master file. The operator can read the contents of the transaction file or master file using the display 4-1 or 4-2. FIG. 2 shows the relationship between transaction files and master files.

第2図において、5−1なし、し5一3はトランザクシ
ヨソ・ファイル、6はマス夕・ファイルを示している。
例えばトランザクション5−1が入退域トランザクショ
ン・ファイルであって被爆線量を記憶するものである。
第3図はライト・カウンタ部を説明するものである。
In FIG. 2, 5-1 is missing, 5-3 are transaction files, and 6 is a master file.
For example, transaction 5-1 is an entry/exit transaction file that stores the exposure dose.
FIG. 3 explains the write counter section.

トランザクション・ファイルの各論理レコードには、前
段ライト・カゥンタ部C,と終段ライト・カウンタ部C
2が設けられている。初期状態においては、前段ライト
・カウンタ部C,および後段ライト・カウンタC2は“
0”である。A氏の論理レコードのデータTR,(A)
の第1回目の更新が実行されると、前段ライト・カゥン
タ部C,および後段ライト・カウンタ部C2は共に“1
”となり、データTR,(A)の第2回目の更新が行わ
れると、前段カウンタ部C,および後段ライト・カウン
タ部C2は共に“2”となる。しかし、データTR,(
A)の第2回目の更新中に電源断などが発生すると、前
段ライト・カウン夕部C2は“2”となるが、後段ライ
ト・カウンタ部C2は“1’’のま)である。第4図は
シーケンス。
Each logical record of a transaction file has a preceding write counter section C and a final write counter section C.
2 is provided. In the initial state, the front-stage write counter section C and the rear-stage write counter C2 are “
0". Data TR of Mr. A's logical record, (A)
When the first update of is executed, both the front-stage write counter section C and the rear-stage write counter section C2 become "1".
”, and when the second update of data TR,(A) is performed, both the front-stage counter section C and the rear-stage write counter section C2 become "2".However, the data TR,(A) becomes "2".
If a power failure occurs during the second update in A), the front-stage write counter section C2 becomes "2", but the rear-stage write counter section C2 remains "1". Figure 4 shows the sequence.

カゥンタ部を説明する図である。トランザクシヨン・フ
ァイル5一1のA氏のデータをマスタ・ファイル6に書
込む際、トランザクション・ファイル5一1のA氏の論
理レコードのシーケンス・カウソタ部SCTは“1”と
なり、書込み終了でマスタ・ファイル6のA氏の論理レ
コードのシーケンス・カワンタ部SCMも“1”となる
。トランザクシヨン・フアイル5−2のB氏のデータT
R2(B)をマス夕・ファイルに書込むとき、トランザ
クション・ファイル5−2のB氏の論理レコードのシー
ケンス・カウンタ部SCTは“2”となり、書込み終了
でマスタ・ファイル6のB氏の論理レコードのシーケン
ス・カウンタ剤SCMも“2”となる。トランザクショ
ン・ファイル5−3のB氏のデータTR3(B)をマス
タ・ファイル6に書込む際、トランザクション・ファイ
ル5一3のB氏の論理レコードのシーケンス・カウンタ
部SCTは“3”となり、書込み終了でマスタ・ファイ
ル6のB氏の論理レコードのシーケンス・カウンタ部も
“3”となる。トランザクション・ファイル5一3のA
氏のデータTR4(A)をマスタ・ファイル6に書込む
際、トランザクション・ファイル5一3のA氏の論理レ
コードのシーケンス・カウンタ部SCTは“4”となり
、書込み終了でマスタ・ファイル6のA氏の論理レコー
ドのシーケンス・カウンタ部SCMも“4”となる。し
かし、この書込み中に、第5図に示すように電源断が生
ずると、マスタ・ファイルA氏の論理レコードのシーケ
ンス・カウンタ剤SCMは‘‘2”のま)である。した
がって、電源断などがあった場合、シーケンス・カウン
タ部SCTの値が最も大きい論理レコードを検索し、そ
の論理レコードに対応するマスタ・ファイルの論理レコ
ードのシーケンス・カウンタ部SCMの値を求め、両者
が一致しているか否かを調べ、.両者が一致している場
合にはマスタ・ファイルへのデータ書込みが完了してい
ると判断し、両者が不一致の場合にはデータの書込みが
完了していないと判断する。第6図はライト・カゥンタ
部C,およびC2の書換え処理を説明するフローチャー
トである。
It is a figure explaining a counter part. When writing Mr. A's data in the transaction file 5-1 to the master file 6, the sequence counter section SCT of Mr. A's logical record in the transaction file 5-1 becomes "1", and the data is transferred to the master file upon completion of writing.・Sequence Kawanta part SCM of Mr. A's logical record in file 6 is also “1”. Mr. B's data T in transaction file 5-2
When writing R2(B) to the master file, the sequence counter SCT of Mr. B's logical record in transaction file 5-2 becomes "2", and when the writing is completed, Mr. B's logical record in master file 6 becomes "2". The sequence counter SCM of the record also becomes "2". When writing Mr. B's data TR3 (B) of transaction file 5-3 to master file 6, the sequence counter section SCT of Mr. B's logical record of transaction file 5-3 becomes "3", and the writing is completed. Upon completion, the sequence counter section of Mr. B's logical record in master file 6 also becomes "3". Transaction file 5-3 A
When writing Mr. A's data TR4(A) to the master file 6, the sequence counter section SCT of Mr. A's logical record in the transaction file 5-3 becomes "4", and when the writing is completed, the A of the master file 6. The sequence counter SCM of his logical record also becomes "4". However, if a power failure occurs during this writing as shown in Figure 5, the sequence counter SCM of the logical record of master file A remains at ``2''. If there is a value in the sequence counter SCT, search for the logical record with the largest value in the sequence counter SCT, find the value in the sequence counter SCM of the logical record in the master file that corresponds to that logical record, and check whether the two match. If they match, it is determined that data writing to the master file has been completed, and if they do not match, it is determined that data writing has not been completed. FIG. 6 is a flowchart illustrating the rewriting process of the write counter units C and C2.

トランザクション・ファイルにデータを書込むとき、先
ず該当する論理レコードをトランザクション・ファイル
から銘出し、現在のライト・カウンタ部C,,C2の内
容を取出す。正常の場合には前段ライト・カゥンタ部C
,と後段のライト・カウンタ部C2は等しい。取出した
ライト・カウンタ部C,(又はC2)の内容を十1する
。次に「前段ライト・カゥンタ部C,に十1した値を書
込み、競いてデータを書込む。データの書込みが完了し
た後で、後段ライト・カゥンタ部C2に十1した値を書
込む。第7図はシーケンス・カウンタ部SCTおよびS
CMの書換え処理を説明するフローチャートである。
When writing data to a transaction file, first the corresponding logical record is written out from the transaction file, and the contents of the current write counter sections C, , C2 are taken out. If normal, the front stage light counter section C
, and the subsequent write counter section C2 are equal. The contents of the extracted write counter section C, (or C2) are multiplied by 11. Next, write a value incremented by 11 to the first-stage write counter section C, and compete to write data. After the data writing is completed, write a value incremented by 11 to the second-stage write counter section C2. Figure 7 shows the sequence counter sections SCT and S.
It is a flowchart explaining CM rewriting processing.

トランザクション・ファイルのデータをマスタ・ファイ
ルに書込む場合、主メモリ上に設けられているシーケン
ス・カウンタSCを取出し、この値を十1して再びシー
ケンス・カウンタSCに書込む。十1したシーケンス・
カウンタSCの値をトランザクション・ファイルの該当
する論理レコ−ドのシーケンス・カウンタ部SCTに書
込み、書込み終了後マスタ・ファイルの該当する論理レ
コードのシーケンス・カウンタ部SCMにシーケンス・
カウンタSCの値を書込む。以上の説明から明らかなよ
うに、本発明によれば、障害発生時のデータの有効性を
正しく判断することが出来る。
When writing transaction file data to the master file, a sequence counter SC provided on the main memory is taken out, this value is multiplied by 1, and the result is written to the sequence counter SC again. 11 sequences
The value of the counter SC is written to the sequence counter section SCT of the corresponding logical record of the transaction file, and after writing is completed, the value of the counter SC is written to the sequence counter section SCM of the corresponding logical record of the master file.
Write the value of counter SC. As is clear from the above description, according to the present invention, it is possible to correctly determine the validity of data when a failure occurs.

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

第1図は本発明の機器構成の1例を示す図、第2図はト
ランザクション・ファイルとマスタ・ファイルの関係を
示す図、第3図はライト・カウンタ部を説明する図、第
4図はシーケンス−カゥンタ部、第5図はトランザクシ
ョン・ファイル2一1のデータをマスタ・ファイルに書
込んでいるときに電源断を生じた場合のシーケンス・カ
ウンタ部の状態を説明する図、第6図はライト・カウン
タ部の書換え処理を説明するフローチャート、第7図は
シーケンス・カウンタ部の書換え処理を説明するフロー
チャートである。 1・・・・・・中央処理装置、2一1と2−2・・・・
・・磁気ディスク装置、3・・・・・・線量自動論取装
置、4一1と4一2……デイスプレイ、5一1なし、し
5−3……トランザクシヨン・フアイル、5……マスタ
・フアイル、C,とC2・”…ライト・力ウンタ部、S
CTとSCM・・・・・・シーケンス・カゥンタ部。 外ー図オ2図 オ3図 才子図 氷上図 矛5図 フや7図
Figure 1 is a diagram showing an example of the equipment configuration of the present invention, Figure 2 is a diagram showing the relationship between transaction files and master files, Figure 3 is a diagram explaining the write counter section, and Figure 4 is a diagram showing the relationship between a transaction file and a master file. Sequence-Counter Section, FIG. 5 is a diagram explaining the state of the sequence counter section when a power failure occurs while writing data of the transaction file 2-1 to the master file, and FIG. 6 is a diagram illustrating the state of the sequence counter section. FIG. 7 is a flowchart illustrating the rewriting process of the write counter section. FIG. 7 is a flowchart illustrating the rewriting process of the sequence counter section. 1...Central processing unit, 2-1 and 2-2...
...Magnetic disk device, 3...Dose automatic discussion device, 4-1 and 4-2...Display, 5-1 none, 5-3...Transaction file, 5...Master・File, C, and C2・”...Write/power counter section, S
CT and SCM...Sequence counter section. Outer figure O2 figure O3 figure Saiko figure ice figure spear figure 5 figure F and 7 figure

Claims (1)

【特許請求の範囲】 1 トランザクシヨン・フアイルとマスタ・フアイルを
備えるフアイル・システムにおいて、各論理レコードに
前段ライト・カウンタ部と後段ライト・カウンタ部を設
け、データの書込みを行うとき対応する論理レコードの
前段ライト・カウンタ部の値を更新し、当該論理レコー
ドに対するデータ書込み処理が完了してから後段ライト
・カウンタ部を更新することを特徴とするフアイル制御
方式。 2 上記トランザクシヨン・フアイル上の論理レコード
のデータを上記マスタ・フアイルに反映する度にカウン
ト値が単位量ずつ更新されるシーケンス・カウンタを設
けると共に、上記トランザクシヨン・フアイルの各論理
レコードおよびマスタ・フアイルの各論理レコードにシ
ーケンス・カウンタ部を設け、トランザクシヨン・フア
イル上の論理レコードのデータを上記マスタ・フアイル
に書込むとき、上記シーケンス・カウンタの値を該当す
る論理レコードのシーケンス・カウンタ部に書込み、上
記マスタ・フアイルの該当する論理レコードに対応する
データの書込みが完了した後、マスタ・フアイル上の該
当する論理レコードのシーケンス・カウンタ部に、上記
シーケンス・カウンタの値を書込むことを特徴とする特
許請求の範囲第1項記載のフアイル制御方式。
[Claims] 1. In a file system including a transaction file and a master file, each logical record is provided with a preceding write counter section and a subsequent write counter section, and when data is written, the corresponding logical record is A file control method characterized in that the value of a preceding stage write counter section is updated, and the subsequent stage write counter section is updated after data writing processing for the logical record is completed. 2. A sequence counter is provided whose count value is updated by a unit amount each time the data of the logical record on the transaction file is reflected in the master file, and A sequence counter section is provided in each logical record of the file, and when writing the data of the logical record on the transaction file to the master file, the value of the above sequence counter is written to the sequence counter section of the corresponding logical record. After writing of the data corresponding to the corresponding logical record of the master file is completed, the value of the sequence counter is written to the sequence counter section of the corresponding logical record on the master file. A file control method according to claim 1.
JP55104612A 1980-07-30 1980-07-30 File control method Expired JPS6010329B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP55104612A JPS6010329B2 (en) 1980-07-30 1980-07-30 File control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP55104612A JPS6010329B2 (en) 1980-07-30 1980-07-30 File control method

Publications (2)

Publication Number Publication Date
JPS5730061A JPS5730061A (en) 1982-02-18
JPS6010329B2 true JPS6010329B2 (en) 1985-03-16

Family

ID=14385254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP55104612A Expired JPS6010329B2 (en) 1980-07-30 1980-07-30 File control method

Country Status (1)

Country Link
JP (1) JPS6010329B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62140260U (en) * 1986-02-28 1987-09-04

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58224499A (en) * 1982-06-22 1983-12-26 Fujitsu Ten Ltd Method for protecting contents of data of data storing ram
JPS5962957A (en) * 1982-08-25 1984-04-10 Fujitsu Ltd Data updating system
JPS60230250A (en) * 1984-04-27 1985-11-15 Meidensha Electric Mfg Co Ltd Data processing system of nonvolatile memory
JPS6121539A (en) * 1984-06-28 1986-01-30 Fujitsu Ltd Generation management system of data file
EP0853291B1 (en) 1996-06-28 2016-11-23 Sony Corporation Method and device for processing information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62140260U (en) * 1986-02-28 1987-09-04

Also Published As

Publication number Publication date
JPS5730061A (en) 1982-02-18

Similar Documents

Publication Publication Date Title
US5778387A (en) Database automated recovery system
US5734894A (en) Methods and apparatus for protecting the integrity of process data stored on a removable storage medium
JPH046017B2 (en)
JPS6010329B2 (en) File control method
JPH0158533B2 (en)
JPS5921057B2 (en) Intersystem shared file recovery control method
JP2822869B2 (en) Library file management device
JP2748402B2 (en) Database failure recovery method
JPS5842895B2 (en) History information high-speed processing method
JPS5852759A (en) Extraction system for pass information
JPS60122426A (en) Write data check system
JP3323524B2 (en) Optical disc difference information extraction method
JPS5834003B2 (en) How to check signal integrity
Hoffman et al. Thecis the Clinical Information System
JPH0820933B2 (en) Data writing method and device
JPS61150046A (en) File management system
JPS62194557A (en) File trouble recovery system
JPS6075950A (en) Restoration processing system of memory information
JPH04155548A (en) Log management and recovery processing system
JP2843747B2 (en) Management device for disc record management table
JPH0594348A (en) Method for updating file
JPS6032211B2 (en) File recovery control method
Baker But what does the data mean? Getting from what happened to why it happened
JPS58115562A (en) Generation management system for reused data set
JPH03288376A (en) Magneto-optical recording and reproducing device