JPH01163848A - Double updating preventing system for disk file - Google Patents

Double updating preventing system for disk file

Info

Publication number
JPH01163848A
JPH01163848A JP62321306A JP32130687A JPH01163848A JP H01163848 A JPH01163848 A JP H01163848A JP 62321306 A JP62321306 A JP 62321306A JP 32130687 A JP32130687 A JP 32130687A JP H01163848 A JPH01163848 A JP H01163848A
Authority
JP
Japan
Prior art keywords
block
update
updating
updated
double
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
JP62321306A
Other languages
Japanese (ja)
Inventor
Mitsuhiro Hanada
光弘 花田
Masaaki Hama
浜 正章
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 Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
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 Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP62321306A priority Critical patent/JPH01163848A/en
Publication of JPH01163848A publication Critical patent/JPH01163848A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the processing efficiency of a whole system by preventing the double updating of a block without an exclusive control from the reading of the block till its writing. CONSTITUTION:In a block 7 to be an updating object, an area to store information which smoothly indicates an updating time or the updating condition of the block 7 of an updating counter part 8, etc., is provided. Based on the information, the double updating of the block 7 from plural processes is prevented, and the exclusive control from the reading till the writing of the block 7 for the block 7 of the updating object or the file including the block is made unnecessary. Thus, the processing efficiency of the whole system is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ファイルの二重更新防止に係り、特にyl数
のプロセスから同時に共用され更新されるディスクに代
表されるランダムアクセス記憶装置上のブロックの二重
更新防止に好適なディスクファイルの二重更新防止方式
に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to prevention of double update of files, and particularly to prevention of double update of files on a random access storage device represented by a disk that is shared and updated simultaneously by yl number of processes. The present invention relates to a disk file double update prevention method suitable for preventing double block updates.

〔従来の技術〕[Conventional technology]

従来の共用ファイルの排他制御方式では、特開昭58−
178455号公報に示されているとおり、読み出しか
ら更新までの間、他の中央処理装置からの読み出しを待
たせる方式を採用していた。このため、読み出しから更
新までの処理時間に比例して処理性能が劣化することに
なっていた。
In the conventional exclusive control method for shared files,
As shown in Japanese Patent No. 178455, a method was adopted in which reading from another central processing unit was made to wait between reading and updating. For this reason, processing performance deteriorates in proportion to the processing time from reading to updating.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

中型から大型の計算機システムでは、中央処理装置中で
複数のプロセスが同時に実行されて、同一のディスクフ
ァイルを共用して使用するケースが多い。特にファイル
を登録するディスクファイルの様なシステムの登録簿は
、必ず共用して使用され、このとき更新を伴う。複数の
プロセスから同一記憶ブロックに同時更新が行われると
、二重更新となるため各プロセスでは、目的のブロック
を主記憶装置に読み込む前に目的のブロックあるいはこ
れを含むファイルに対し排他制御を行った後読み込んで
、主記憶装置上でブロックの内容を更新し、更にこの内
容をディスクファイルに書き込んだ後に該排他制御を解
除する。本方式の場合では、ブロックの読み出しから書
き込みまでの処理時間に依存して排他制御のかかる時間
が決まる。
In medium to large computer systems, multiple processes are often executed simultaneously in the central processing unit and share the same disk file. In particular, system registers such as disk files in which files are registered are always shared and updated. If multiple processes update the same memory block at the same time, it will result in a double update, so each process must take exclusive control over the target block or the file containing it before reading the target block into main memory. The block is then read, the contents of the block are updated on the main storage device, and the contents are further written to a disk file, after which the exclusive control is released. In the case of this method, the time required for exclusive control is determined depending on the processing time from block reading to writing.

従って、この処理時間が長いと排他制御のかかつている
時間が長くなシシステム全体の処理効率低下につながる
という問題がある。
Therefore, if this processing time is long, there is a problem that the exclusive control takes a long time, leading to a decrease in the processing efficiency of the entire system.

本発明の目的は、処理効率低下につながるブロックの読
み込みから書き込みまでの排他制御なしでブロックの二
重更新を防止することにある。
An object of the present invention is to prevent double updating of a block without exclusive control from reading to writing of the block, which would lead to a decrease in processing efficiency.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的は、ディスク上のブロック内にブロックに記憶
されているデータの更新状態の固有性を表わす情報(以
下、更新カウンタと呼ぶ)、例えばブロックの更新時刻
あるいはブロックの更新の度に更新するカウンタを持つ
ことによシ達成される0 〔作用〕 ブロック内の更新カウンタは、ブロックの更新のための
書き込みのとき必ず更新する。この更新カウンタによっ
て、排他制御なしで処理している更新対象のブロックの
読み込みから書き込みまでの間に、他プロセスから該ブ
ロックに更新があったかを判断できる。該ブロックの更
新の書き込みのとき、該ブロックの更新カウンタが読み
込んだときの内容と等しいかを判定し、等しければ更新
した更新カウンタを含む更新データを該ブロックに書き
出し、等しくなければ再度読み込みチャネルに対する命
令(以下、チャネルプログラムと呼ぶ)を該ディスクに
接続されているチャネルに対し発行し、再読み込みされ
た場合は、再度処理し直すことで複数プロセスからの二
重更新を防止することができる。
The above purpose is to collect information (hereinafter referred to as an update counter) that represents the uniqueness of the update state of data stored in a block on a disk, such as a block update time or a counter that is updated each time a block is updated. This is achieved by having 0. [Operation] The update counter in a block is always updated when writing is performed to update the block. Using this update counter, it can be determined whether the block to be updated has been updated by another process between reading and writing of the block being processed without exclusive control. When writing an update to the block, it is determined whether the update counter of the block is equal to the content at the time of reading, and if they are equal, the update data including the updated update counter is written to the block, and if not, it is written to the read channel again. Double updates from multiple processes can be prevented by issuing an instruction (hereinafter referred to as a channel program) to a channel connected to the disk and, if the disk is reread, processing again.

〔実施例〕〔Example〕

以下、本発明の一実施例に図によシ説明する。 Hereinafter, one embodiment of the present invention will be explained with reference to the drawings.

第1図は、本発明が実現される機器構成、第2図は本発
明の中央処理装置で処理する手順を示すフローチャート
であり、第3図は該ディスク装置に対するチャネルで処
理する本発明のチャネルプログラムの処理手sr示した
ものである。
FIG. 1 is an equipment configuration for realizing the present invention, FIG. 2 is a flowchart showing the procedure of processing by the central processing unit of the present invention, and FIG. 3 is a channel of the present invention processed by the channel for the disk device. This shows the processing procedure of the program.

第1図において、1は中央処理装置であり、入出力の起
動及び演算を行う。2はチャネルであシディスクに対す
る入出力動作を制御し、主記憶装置へのデータの転送を
行う。3は主記憶装置であり、この中にディスク上のブ
ロックを読み込む、又はここから書き込むための4のブ
ロックバッファと更新カウンタ部を退避するための5の
退避領域がある。6はディスクであり、7のブロックが
記録されている。8,9はそれぞれブロックを構成する
更新カウンタ部とデータ部である。
In FIG. 1, numeral 1 denotes a central processing unit, which performs input/output activation and calculations. A channel 2 controls input/output operations to the disk and transfers data to the main storage device. 3 is a main storage device, which includes a block buffer 4 for reading or writing blocks on the disk and a save area 5 for saving an update counter section. 6 is a disk, on which 7 blocks are recorded. Reference numerals 8 and 9 indicate an update counter section and a data section, respectively, which constitute a block.

次に第2図と第5図のフローチャートに基いて第1図の
各部の動作を説明する。第2図においてディスク上に記
録されている更新対象のブロックをブロックバッファに
読み込む(201)。ブロックバッファ中に読み込まれ
たブロックの更新カウンタ部の内容を退避領域に退避す
る( 202 )。ブロックバッファ中のブロックの更
新カウンタ部を更新(例えば、プラス1する)する( 
2OS )。ブロックバッファ中のブロックのデータ部
を更新すべき処理データで更新する( 205 )。第
3図のチャネルプログラムを該ディスクの接続されてい
るチャネルに対して発行する( 205 )。チャネル
では第3図の手順に基づき、該ブロックに位置付ける(
 5at )。第2図の202で退避領域に退避した読
み込み時の更新カウンタとディスク上の該ブロックの更
新カウンタを比較し、201の該ブロックの読み込み時
点以降で他プロセスからの更新があったかを判定する(
 302 )。更新がなければ、更新カウンタは等しく
なシ302のYESの条件となシ、更新があれば不一致
となシ302のNoの条件となる。更新のない502の
YESの条件であれば、ブロックバッファ中の第2図の
202.20!Iで更新した更新カウンタの内容とデー
タ部の内容でディスク上の該ブロックにライトする。他
プロセスから更新があった302ONOの条件では再度
族ブロックの読み込みから処理し直さなければならない
ため、該ブロックの読み込みを行う(304)。次に、
第2図において第3図のチャネルプログラムの実行結果
を調べ、第3図の503でYESの条件であれば、他プ
ロセスからの更新がなかったので処理?終了させ、No
の条件であれば他プロセスの更新があったので処理を仕
直しすため202の手順へ戻る( 206 )。
Next, the operation of each part in FIG. 1 will be explained based on the flowcharts in FIGS. 2 and 5. In FIG. 2, a block to be updated recorded on the disk is read into a block buffer (201). The contents of the update counter section of the block read into the block buffer are saved to a save area (202). Update the update counter section of the block in the block buffer (for example, add 1) (
2OS). The data portion of the block in the block buffer is updated with the processing data to be updated (205). The channel program shown in FIG. 3 is issued to the channel connected to the disk (205). In the channel, position it in the block based on the procedure shown in Figure 3 (
5at). The update counter at the time of reading saved in the save area at 202 in FIG. 2 is compared with the update counter of the block on the disk, and it is determined whether there has been an update from another process since the time when the block was read at 201 (
302). If there is no update, the update counters are equal (YES 302), and if there is an update, they do not match (No 302). If the condition is YES in 502 with no update, 202.20 in FIG. 2 in the block buffer! The contents of the update counter updated in I and the contents of the data section are written to the block on the disk. In the condition of 302 ONO where there has been an update from another process, the process must be restarted from reading the family block, so the block is read (304). next,
In Fig. 2, check the execution results of the channel program in Fig. 3, and if the condition is YES in 503 in Fig. 3, there was no update from another process, so what should be done? End it, No
If the condition is , there has been an update in another process, so the process returns to step 202 to redo the process (206).

〔発明の効果〕〔Effect of the invention〕

本発明によれば、複数のプロセスから、同一のディスク
上のファイルを共用して更新するときにファイル中にあ
るブロックの更新のための読み込みから書き込みまでの
期間、他のプロセスを止めるための排他制御が不要とな
りシステム全体の処理効率が向上する。
According to the present invention, when a file on the same disk is shared and updated by multiple processes, the period from reading to writing to update a block in the file is exclusive to stop other processes. This eliminates the need for control and improves the processing efficiency of the entire system.

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

第1図は、本発明の一実施例の機器構成図、第2図は中
央処理装置が行う処理手順のフローチャート、第3図は
チャネルの処理手r@を示すフローチャートである。 1・・・中央処理装置、 2・・・チャネル、3・・・
主記憶装置、   4・・・ブロックバッファ、5・・
・退避領域、    6・・・ディスク、7・・・ブロ
ック、     8・・・更新カウンタ部、9・・・デ
ータ部。 7 ブロック 8  更幻つンタモ東 纂  2  図          q  チーブ町名
 3 M
FIG. 1 is an equipment configuration diagram of an embodiment of the present invention, FIG. 2 is a flowchart of a processing procedure performed by a central processing unit, and FIG. 3 is a flowchart showing a channel processing procedure. 1... Central processing unit, 2... Channel, 3...
Main storage device, 4...Block buffer, 5...
- Save area, 6...Disk, 7...Block, 8...Update counter section, 9...Data section. 7 Block 8 Saragen Tsuntamo Tosho 2 Figure q Chibu town name 3 M

Claims (1)

【特許請求の範囲】[Claims] 1、一つ又は複数の中央処理装置で同時に動作する複数
のプロセスから、ランダムアクセス記憶装置上に記憶さ
れているブロックが同時にアクセスされて、更新され得
るデータ処理システムにおいて、更新対象のブロック内
に更新時の時刻あるいは更新カウンタ等のブロックの更
新状態を一意的に示す情報を格納する領域を設け、該情
報に基づき、複数のプロセスからのブロックの二重更新
を防ぎ更新対象のブロックあるいはこれを含むファイル
に対するブロックの読み出しから書き込みまでの排他制
御を不要とすることを特徴とするディスクファイルの二
重更新防止方式。
1. In a data processing system in which a block stored on a random access storage device may be simultaneously accessed and updated by multiple processes operating simultaneously on one or more central processing units, in a block to be updated. An area is provided to store information that uniquely indicates the update status of a block, such as the time of update or an update counter, and based on this information, double updates of blocks from multiple processes can be prevented and the block to be updated or this A disk file double update prevention method characterized by eliminating the need for exclusive control from block reading to block writing for a file containing the file.
JP62321306A 1987-12-21 1987-12-21 Double updating preventing system for disk file Pending JPH01163848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62321306A JPH01163848A (en) 1987-12-21 1987-12-21 Double updating preventing system for disk file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62321306A JPH01163848A (en) 1987-12-21 1987-12-21 Double updating preventing system for disk file

Publications (1)

Publication Number Publication Date
JPH01163848A true JPH01163848A (en) 1989-06-28

Family

ID=18131102

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62321306A Pending JPH01163848A (en) 1987-12-21 1987-12-21 Double updating preventing system for disk file

Country Status (1)

Country Link
JP (1) JPH01163848A (en)

Similar Documents

Publication Publication Date Title
JP2776335B2 (en) How to write variable-length sequential records
JPH03160534A (en) Access control system for shared file
JPH02148235A (en) Data drawback system
JPH02234242A (en) Partial write control system
JPH01163848A (en) Double updating preventing system for disk file
JP2785451B2 (en) Storage control method and device
JPH0793101A (en) Data backup device
JP3022011B2 (en) Data backup system
JPH0259837A (en) Data recovery processing system
JPH0447350A (en) Main storage read/response control
JPS6069759A (en) Control system for disk cache memory
JPH04205518A (en) Disk device control system
JPS63301337A (en) Data file managing system
JPS61276040A (en) File access system
JPH01188966A (en) Magnetic disk controller containing cache
JPH0468431A (en) Magnetic disk controller
JPS5985556A (en) File control system
JPS5985560A (en) File management device
JPS61213920A (en) Control system for disk file
JPH04167033A (en) File processor
JPS62229344A (en) Data storing system
JPH02213962A (en) Cache memory control system for disk cache
JPS6278638A (en) File recording and control system
JPH03158943A (en) Buffer storage/transfer system
JPH04111026A (en) Write system for updating history information to data base