JPS5837586B2 - Data file control method - Google Patents

Data file control method

Info

Publication number
JPS5837586B2
JPS5837586B2 JP51072156A JP7215676A JPS5837586B2 JP S5837586 B2 JPS5837586 B2 JP S5837586B2 JP 51072156 A JP51072156 A JP 51072156A JP 7215676 A JP7215676 A JP 7215676A JP S5837586 B2 JPS5837586 B2 JP S5837586B2
Authority
JP
Japan
Prior art keywords
data
file
command
data file
processing device
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
JP51072156A
Other languages
Japanese (ja)
Other versions
JPS52155924A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP51072156A priority Critical patent/JPS5837586B2/en
Publication of JPS52155924A publication Critical patent/JPS52155924A/en
Publication of JPS5837586B2 publication Critical patent/JPS5837586B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 本発明は2つ以上のデータ処理装置が同一のデータファ
イルを共用する、いわゆるファイルシェアシステムで使
用するデータファイル制御方法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a data file control method used in a so-called file share system in which two or more data processing devices share the same data file.

ファイルシェアシステムにおいては、ある処理装置がフ
ァイル中のデータを読出し更新処理をしてから書込むま
での間に他のデータ処理装置が当該データを読出して、
そのデータに対して更新処理をして書込む可能性が考え
られる。
In a file sharing system, between the time a certain processing device reads and updates data in a file and before writing it, another data processing device reads the data,
There is a possibility that the data may be updated and written.

この場合、他の処理装置は、更新されたデータに対して
処理を行なわなければならないのに、更新前の古いデー
タに対して処理をすることになり、データ処理に矛盾を
生じる。
In this case, the other processing devices must process the updated data, but end up processing the old data before the update, causing a contradiction in data processing.

この矛盾を避ける従来技術のひとつはファイル中のデー
タの更新処理においては、データを読出してから書込む
までの間、更新を行なっている処理装置がそのファイル
を専有するようプログラムで制御するというものである
One of the conventional techniques to avoid this contradiction is to use a program to control the process of updating data in a file so that the processing device performing the update has exclusive access to the file from the time the data is read until the time it is written. It is.

具体的には、ファイルを専有することを指示するマクロ
命令と、ファイルの専有の解除を指示するマクロ命令と
を設けプログラムではファイル中のデータ更新処理にさ
きたって、ファイル専有のマクロ命令を発行して、ファ
イルを専有し、データの更新処理を行ない、その後ファ
イル専有解除のマクロ命令を発行して、ファイルの専有
を解除するという順序をふむ。
Specifically, a macro instruction for instructing exclusive use of a file and a macro instruction for instructing release of exclusive use of a file are provided, and the program issues a macro instruction for exclusive use of the file before updating data in the file. Then, the file is exclusively owned, the data is updated, and then a macro command to release the exclusive use of the file is issued to release the exclusive use of the file.

しかしプログラム上の処理によってファイルを専有する
方法にあっては、ファイルの専有という動作が命令の組
合せによって実現されるため、どうしてもファイルの専
有時間が必要以上に長くなり、その専有時間中に他の処
理装置が当該ファイルを使用しようとして待たされる確
率が高くなり、ひいてはシステムの処理能力の低下を招
くおそれがある。
However, in the method of exclusive use of a file through program processing, the exclusive use of the file is achieved by a combination of instructions, so the exclusive use time of the file inevitably becomes longer than necessary, and during that exclusive time, other The probability that the processing device is forced to wait while trying to use the file increases, and this may lead to a decrease in the processing capacity of the system.

本発明の目的はデータ処理装置がファイルを専有する時
間をできるだけ減少させシステムの処理能力を高く維持
するようなデータファイル制御方法を提供することにあ
る。
SUMMARY OF THE INVENTION An object of the present invention is to provide a data file control method that reduces the time that a data processing device uses a file as much as possible and maintains a high system throughput.

次に本発明の一実施例について図で示す。Next, one embodiment of the present invention will be illustrated in the drawings.

ファイルシェアシステムの構成例を2つ、第1図と第2
図に示す。
Two configuration examples of file sharing systems are shown in Figures 1 and 2.
As shown in the figure.

第1図においては2台のデータ処理装置CPUが同一の
チャネル制御装置CHを介してファイル制御装置FCと
接続されてデータファイル装置Fをシェアする構成を示
している。
FIG. 1 shows a configuration in which two data processing devices CPU are connected to a file control device FC via the same channel control device CH and share a data file device F.

第2図においては、2台のデータ処理装置CPUがそれ
ぞれ装置対応のチャネル制御装置CHに接続され、その
2台のチャネル制御装置CHが同一のファイル制御装置
FCを介してデータファイル装置Fをシェアする構成を
示している。
In FIG. 2, two data processing devices CPU are each connected to a channel control device CH corresponding to the device, and the two channel control devices CH share a data file device F via the same file control device FC. This shows the configuration.

実際のファイルシェアシステムはもつと複雑な構造とな
るであろうし、第1図の構或と第2図の構或との組合せ
も考えられる。
An actual file sharing system will likely have a complicated structure, and a combination of the structure shown in FIG. 1 and the structure shown in FIG. 2 is also conceivable.

ファイル制御装置FCの一構戒例を第3図に示す。FIG. 3 shows an example of the structure of the file control device FC.

起動指示があったとき、指示した処理装置の番号を示す
処理装置番号線1は、処理装置番号保持回路2と比較回
路3とに入力される。
When a startup instruction is given, a processing device number line 1 indicating the number of the instructed processing device is input to a processing device number holding circuit 2 and a comparison circuit 3.

コマンド信号線5はコマンドデコーダ6に入力され、イ
ンタロツクを指示するコマンドのデコード信号線7がイ
ンタロツク状態保持回路8に入力される。
A command signal line 5 is input to a command decoder 6, and a decode signal line 7 for a command instructing interlock is input to an interlock state holding circuit 8.

起動信号9は、インクロック状態保持回路8の状態と、
比較回路3の出力信号線4の状態とにより、起動応答信
号11もしくは使用中応答信号10を出力する。
The activation signal 9 is based on the state of the ink clock state holding circuit 8,
Depending on the state of the output signal line 4 of the comparison circuit 3, a startup response signal 11 or an in-use response signal 10 is output.

上記構成に基づいてその作用を説明する。The operation will be explained based on the above configuration.

ファイル制御装置にインタロツクをかけるコマンドを例
えば「テストアンドセット」コマンドとする。
The command that interlocks the file control device is, for example, a "test and set" command.

ある処理装置が、データファイル装置のデータを更新す
る場合、第1の時点でデータを読出し、当該データの更
新処理を行ない、更新後のデータを用意した第2の持点
で「テストアンドセット」コマンドを用いて再び当該デ
ータの読出しを行なうよう指示する。
When a certain processing device updates data in a data file device, it reads the data at the first point, updates the data, and then performs "test and set" at the second point where the updated data is prepared. The command is used to instruct the data to be read again.

この指示があると、起動信号9と共に処理装置番号1と
「テストアンドセット」コマンド5がチャネル制御装置
から送出される。
When this instruction is received, the processing device number 1 and the "test and set" command 5 are sent together with the activation signal 9 from the channel control device.

「テストアンドセット」コマンドはデータ転送に関して
は通常の読出しコマンドと同一動作であるが、コマンド
の実行開始と同時にファイル制御装置をインタロツク状
態にして、「テストアンドセット」コマンドを発行した
処理装置以外からの起動に対しては使用中と応答するの
を特徴とする。
The "Test and Set" command has the same operation as a normal read command in terms of data transfer, but at the same time the command starts executing, the file control device is placed in an interlock state and the "Test and Set" command is transferred from a processing device other than the one that issued the "Test and Set" command. It is characterized in that it responds that it is in use when it is activated.

「テストアンドセット」コマンドの実行が開始されると
、インタロツク状態を保持回路8に保持すると共に処理
装置番号を保持回路2に保持する。
When execution of the "test and set" command is started, the interlock state is held in the holding circuit 8 and the processing device number is held in the holding circuit 2.

「テストアンドセット」コマンドの実行完了後もインタ
ロツク状態は保持され、この状態で処理装置から起動信
号9が送られてくると、処理装置番号1を保持回路2に
保持されている値と比較する。
The interlock state is maintained even after the execution of the "test and set" command is completed, and when the start signal 9 is sent from the processing device in this state, the processing device number 1 is compared with the value held in the holding circuit 2. .

比較結果が不一致であれば、さきに「テストアンドセッ
ト」コマンドを発行した処理装置とは別の処理装置から
の起動であるから例えば使用中応答信号10を返しコマ
ンドの実行を抑止する。
If the comparison results do not match, the activation is from a different processing device than the one that previously issued the "test and set" command, so the in-use response signal 10 is returned, for example, and execution of the command is suppressed.

処理装置番号比較の結果一致しておれば、さきに「テス
トアンドセット」コマンドを発行した処理装置からのコ
マンドであるから、起動応答信号11を返してコマンド
の実行を開始し、起動制御回路12を介して保持回路2
を解除すると共に保持回路8に保持していたインタロツ
ク状態を解除する。
If they match as a result of comparing the processing device numbers, the command is from the processing device that previously issued the "Test and Set" command, so the startup response signal 11 is returned and execution of the command is started, and the startup control circuit 12 Holding circuit 2 through
At the same time, the interlock state held in the holding circuit 8 is released.

ただしあとのコマンドが「テストアンドセット」であれ
ば再びインタロツク状態となる。
However, if the subsequent command is "test and set", the interlock state will be established again.

上記の実施例ではインタロツク中、他の処理装置からの
起動に対しては使用中を応答する形式を示したが、プロ
グラム上の処理をより明確にするために、インタロツク
状態の報告手段を作成し、インタロツク状態として応答
する形式も考えられる。
In the above example, a format was shown in which the interlock is in progress and the in-use response is responded to activation from another processing device, but in order to make the processing in the program more clear, a means for reporting the interlock state was created. , a format that responds as an interlock state is also conceivable.

さて、「テストアンドセット」コマンドでデータが読出
されたら第1の時点で読出したデータと比較し、一致が
とれたことを確認した第3の時点で、更新後のデータを
書込むためのコマンドを発行する。
Now, when the data is read by the "Test and Set" command, it is compared with the data read at the first point, and at the third point when it is confirmed that there is a match, a command is issued to write the updated data. Issue.

以上のような制御方法により、第1の時点と第2の時点
の間に他の処理装置が当該データを更新しておれば、デ
ータ比較で不一致が発見されるから未然に矛盾が防止で
き、また第2の時点から第3の時点は、「テストアンド
セット」コマンドのインタロツクにより、他の処理装置
からのアクセスは不可能なことが保証される。
With the control method described above, if another processing device has updated the data between the first time point and the second time point, a discrepancy will be discovered by data comparison, so it is possible to prevent a discrepancy. Further, from the second time point to the third time point, the interlock of the "test and set" command ensures that access from other processing devices is impossible.

本発明によれば、従来に比べファイル専有時間が少なく
なる効果がある。
According to the present invention, there is an effect that the exclusive time for a file is reduced compared to the conventional method.

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

第1図及び第2図は本発明の一実施例であるシステムの
構成を示す図、第3図はそのファイル制御装置の詳細を
示すブロック図である。 符号の説明、CPU・・・・・・データ処理装置、CH
・・・・・・チャネル制御装置、FC・・・・・・ファ
イル制御装置、F・・・・・・データファイル装置、1
・・・・・・処理装置番号線、2・・・・・・処理装置
番号保持回路、3・・・・・・比較回路、4・・・・・
・比較一致信号線、5・・・・・・コマンド信号線、6
・・・・・・コマンドデコーダ、7・・・・・・コマン
ドデコード信号線、8・・・・・・インタロツク状態保
持回路、9・・・・・・起動信号、10・・・・・・使
用中応答信号、11・・・・・・起動応答信号、 12・・・・・・起動ステージ制 御回路。
1 and 2 are diagrams showing the configuration of a system that is an embodiment of the present invention, and FIG. 3 is a block diagram showing details of the file control device. Explanation of symbols, CPU...Data processing device, CH
...Channel control device, FC...File control device, F...Data file device, 1
...Processing device number line, 2...Processing device number holding circuit, 3...Comparison circuit, 4...
・Comparison match signal line, 5...Command signal line, 6
...Command decoder, 7...Command decode signal line, 8...Interlock state holding circuit, 9...Start signal, 10... In-use response signal, 11... Startup response signal, 12... Startup stage control circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 2以上のデータ処理装置が同一のデータファイルを
共用するシステムのためのデータファイル制御方法にお
いて、あるデータ処理装置がデータファイル中のデータ
を更新する場合、先ず更新しようとするデータをデータ
ファイルから読出し、次に更新しようとした前記データ
を再びデータファイルから読出すとともに当該データフ
ァイルに対する他の処理装置からのアクセスを禁止し、
第1回目と第2回目の前記読出しデータが互いに等しか
ったら当該読出しデータの更新されたデータをデータフ
ァイルに書込むようにしたことを特徴とするデータファ
イルの制御方法。
1. In a data file control method for a system in which two or more data processing devices share the same data file, when a certain data processing device updates data in a data file, it first extracts the data to be updated from the data file. reading the data that was read and then updated from the data file again, and prohibiting access from other processing devices to the data file;
A data file control method characterized in that if the first and second read data are equal to each other, updated data of the read data is written to the data file.
JP51072156A 1976-06-21 1976-06-21 Data file control method Expired JPS5837586B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP51072156A JPS5837586B2 (en) 1976-06-21 1976-06-21 Data file control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP51072156A JPS5837586B2 (en) 1976-06-21 1976-06-21 Data file control method

Publications (2)

Publication Number Publication Date
JPS52155924A JPS52155924A (en) 1977-12-24
JPS5837586B2 true JPS5837586B2 (en) 1983-08-17

Family

ID=13481103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP51072156A Expired JPS5837586B2 (en) 1976-06-21 1976-06-21 Data file control method

Country Status (1)

Country Link
JP (1) JPS5837586B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03287218A (en) * 1990-04-03 1991-12-17 Olympus Optical Co Ltd Endoscope

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5667467A (en) * 1979-11-02 1981-06-06 Nec Corp File system
JPS58127258A (en) * 1982-01-25 1983-07-29 Hitachi Ltd Exclusive controlling system of external storage device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03287218A (en) * 1990-04-03 1991-12-17 Olympus Optical Co Ltd Endoscope

Also Published As

Publication number Publication date
JPS52155924A (en) 1977-12-24

Similar Documents

Publication Publication Date Title
JPS5837586B2 (en) Data file control method
CN110795389B (en) Storage snapshot based copying method, user equipment, storage medium and device
JP3130798B2 (en) Bus transfer device
JP2567111B2 (en) Micro program controller
JP2511544B2 (en) System definition change method
KR100631780B1 (en) Communication method between overlay units and apparatus using same
JPH04225442A (en) Matching property check method for computer file system
JPS6389964A (en) Loading and confirming system for microprogram
JPH0337719A (en) System for expanding master file on main storage device
JP3230944B2 (en) Communication protocol processing method and processing device
JP2872027B2 (en) Process switching control method
JPS6325372B2 (en)
JPS59180755A (en) Tracing system
JPS6048541A (en) Electronic computer system
JPH0683639A (en) Register device
JPS6020771B2 (en) Micro diagnosis method
JPH07219918A (en) System starting method for parallel computer
JPS5938827A (en) Microprocessor ipl system
JPS6349839A (en) Leading system for electronic computer system
JPS62278628A (en) Access method for external memory device
JPH0567099A (en) Document preparing device and document preparing method
JPH11312108A (en) System for replacing transaction synchronization of sub-load module
JPS63201741A (en) Dump information editing and outputting system
JPS63170758A (en) Main storage initial write processing system
JPH01147636A (en) Process retrial system for occurrence of fault