JPS6195450A - Exclusive control system of record - Google Patents

Exclusive control system of record

Info

Publication number
JPS6195450A
JPS6195450A JP59217732A JP21773284A JPS6195450A JP S6195450 A JPS6195450 A JP S6195450A JP 59217732 A JP59217732 A JP 59217732A JP 21773284 A JP21773284 A JP 21773284A JP S6195450 A JPS6195450 A JP S6195450A
Authority
JP
Japan
Prior art keywords
data
record
contents
buffer
changed
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
JP59217732A
Other languages
Japanese (ja)
Inventor
Yuzo Kuwano
桑野 雄三
Masaru Matsumoto
勝 松本
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP59217732A priority Critical patent/JPS6195450A/en
Publication of JPS6195450A publication Critical patent/JPS6195450A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the reliability of data by reading data again immediately before the update of the data and comparing the read data with the contents obtained before change. CONSTITUTION:Data are read from an external storage device 24 to an I/O buffer 22 and transferred to a record storing area 21. After changing the data, the changed data are transferred from a keyboard on a CRT26 to a changed data storing area 23. The same record is read again from the device 24 to the buffer 22 and the contents of the area 21 are compared with that of the buffer 22. When both the contents coincide with each other, the data stored in the area 23 are transferred to the buffer 22. Consequently, the contents of the buffer 22 are written in the device 24. When both the contents are inconsistent, data in the device 24 have been already changed by another program, so that the data in the buffer 22 are not written in the device 24. A message indicating the completion of change is displayed on the screen of the CRT26 to make the operator select the stop of the processing or the continuation of the processing.

Description

【発明の詳細な説明】 (技術分野) 本発明はレコード排他制御方式に関し、特に複数のプロ
グラムが同時に同一ファイル上の同一レコードを処理す
ることが可能な計算機システムにおいて、自ブaグラム
が更新しようとしているデータが他プログラムによって
既に更新されているか否かを検知するレコード排他制御
方式に関する。
[Detailed Description of the Invention] (Technical Field) The present invention relates to a record exclusive control method, and particularly in a computer system in which multiple programs can simultaneously process the same record on the same file, the present invention relates to a record exclusive control method, and particularly in a computer system where multiple programs can simultaneously process the same record on the same file. The present invention relates to a record exclusive control method that detects whether or not the data being updated has already been updated by another program.

(従来技術) 従来、複数のプログラムが同時に同一ファイル上の同一
レコードを処理することが可能な計算機システムにおい
ては、プログラムが特定レコードを外部記憶装置から主
記憶装置(メインメモリ)上に読み込む際に、他プログ
ラムから参照されないようにそのレコードに対して鍵を
かけたり(L−OCK) 、または他プログラムから参
照されてもよい場合は鍵をかけない(UNLOCK) 
 ようにすることができる。プログラムがレコードをロ
ックして読み込むのは、特に複数のプログラムが同時に
同一フアイル金処理する場合においては、デッドロック
(DEAD LOCK ) t−おこす可能性が多いこ
とは衆知である。
(Prior art) Conventionally, in a computer system where multiple programs can simultaneously process the same record on the same file, when a program reads a specific record from an external storage device onto the main storage device (main memory), , lock the record so that it cannot be referenced by other programs (L-OCK), or do not lock it if it is okay for it to be referenced by other programs (UNLOCK)
You can do it like this. It is well known that when a program locks and reads a record, there is a high possibility of deadlock occurring, especially when multiple programs process the same file at the same time.

それに対して、プログラムがレコードをアンロックで読
み込む場合は、デッドロックの可能性は皆無である。し
たがって複数のプログラムが同時に同一ファイル全処理
している大多数のアプリケージ、ンシステムにおいては
、各プログラムはレコードをアンロックで読む方式を採
用している。
On the other hand, if a program reads records unlocked, there is no possibility of deadlock. Therefore, in most application systems in which multiple programs process all of the same file at the same time, each program uses a system in which each program reads records in an unlocked manner.

しかしながら、自プログラムが特定のレコードをアンロ
ックで読み、そのレコード全処理している間に、他プロ
グラムがそのレコードの内容を変更し、外部記憶装置に
出力したならば、次に自プログラムがそのレコードの内
容を変更し出力すると、先に他プログラムが変更した内
容(情報)が消失するだけでなく、そのレコードに関わ
りのある他ファイルのデータ内容にまで悪影響を残して
いた。
However, if another program changes the contents of that record and outputs it to an external storage device while the own program reads a particular record in an unlocked state and processes all of the records, then the own program When the contents of a record are changed and output, not only the contents (information) previously changed by other programs are lost, but also the data contents of other files related to the record are adversely affected.

たとえば、従来のレコード排他制御方式は第3図に示す
ようK、主メモリ10上のプログラム11とプログラム
12がファイル15aとファイル15bl共用されてい
る(ただし、この場合ファイル15bは間接的に共用さ
れているファイル15aの関連ファイル)。まず、プロ
グラム11はファイル15aの特定レコードをアンロッ
クで読み込む。
For example, in the conventional record exclusive control method, as shown in FIG. related file of file 15a). First, the program 11 reads a specific record of the file 15a in an unlocked manner.

CRT 16 aのキーボードから内容を変更している
ときに、プログラム12が同じレコードをロックで読み
込み、CRT16bのキーボードからファイル15bの
キー値t−″1″から2″に変更し、ファイル15aに
書き戻したとする。このとき、ファイル15bのキー値
″2″のレコードはプログラム12によシ内容が修正さ
れているものとする。最後にプログラム11がファイル
15aに書き戻すと、ファイル15aの中のファイル1
5bのキー値は12″から1″に戻ることになる。ファ
イル15b の中のキー値が121のレコードはファイ
ル15aの中のどのレコードからもチェーンされないと
すると、プログラム12から変更されたことがわからな
くなってしまう。
While changing the contents from the keyboard of the CRT 16a, the program 12 reads the same record with a lock, changes the key value t-"1" to 2" in the file 15b from the keyboard of the CRT 16b, and writes it to the file 15a. At this time, it is assumed that the record with the key value "2" in the file 15b has been modified by the program 12.Finally, when the program 11 writes back to the file 15a, the contents of the record in the file 15a are modified. File 1
The key value of 5b will return from 12'' to 1''. If a record with a key value of 121 in file 15b is not chained to any record in file 15a, the program 12 will not know that it has been changed.

このように、従来のレコード排他制御方式はデータの信
ぴょう性が顕しく疑しいものとなる欠点を有していた。
As described above, the conventional record exclusive control method has the drawback that the authenticity of data becomes clearly questionable.

(発明の目的) 本発明は従来のレコード排他制御方式の欠点を除去する
と共に変更前のデータを保存し、変更データを外部記憶
装置に出力する直前で、再びデータをメインメモリ上に
読み込み、保存してあった変更前のデータと比較し、違
いがあればその旨を示し、全く同じであれば変更データ
を外部記憶装置に出力することにより、データの信ぴょ
う性を高めるようにしたレコード排他制御方式を提供す
ることKある。
(Objective of the Invention) The present invention eliminates the drawbacks of the conventional record exclusive control method, saves the data before the change, and immediately before outputting the changed data to the external storage device, reads the data again into the main memory and saves it. Record exclusive control that improves the reliability of data by comparing it with the data before the change, indicating if there is a difference, and outputting the changed data to an external storage device if it is exactly the same. It is possible to provide a method.

(発明の構成) 本発明によれば、複数のプログラムが同時に走行可能な
計算機システムにおいて、複数のプログラムが同時に同
一の外部記憶装置に存在する同一ファイル上のデータを
更新する場合に、自プログラムがある特定レコードの内
容を参照している間に、他プログラムから同じレコード
の内容が変更されたかどうかを判断し、変更されていな
ければ自プaグラムがそのレコードを変更して外部記憶
装置上に出力し、変更されているならば自プログラム側
にレコードの内容が既に他プログラムによシ変更されて
いる旨全示す手段金有するレコード排他制御方式が得ら
れる。
(Structure of the Invention) According to the present invention, in a computer system in which a plurality of programs can run simultaneously, when the plurality of programs simultaneously update data on the same file existing in the same external storage device, the own program While referring to the contents of a specific record, determine whether the contents of the same record have been changed by another program, and if the contents have not been changed, the program itself changes the record and stores it on the external storage device. A record exclusive control system can be obtained which has a means to completely indicate to the own program that the contents of the record have already been changed by another program if the contents of the record have been output and changed.

(実施例) 次に本発明の実施例について図面を参照して説明する。(Example) Next, embodiments of the present invention will be described with reference to the drawings.

第1図を参照すると、本発明の一実施例は、複数のプロ
グラムが同時に走行可能な計算機システムにおいて、複
数のプログラムが存在する外部記憶装置と、この外部記
憶装置に接続され、各プログラムを持つ主記憶装置25
と、各メツセージを表示するCRTディスプレイとを含
む。
Referring to FIG. 1, one embodiment of the present invention is a computer system in which a plurality of programs can run simultaneously. Main storage device 25
and a CRT display for displaying each message.

主記憶装置25にはレコード保存エリア21と、レコー
ドI10バッフ丁22と変更データ保存エリア23金持
ち、外部記憶装置24からデータ全貌み込んだり、逆に
外部記憶装置24に書き込んだりする機能を有し、更に
主記憶装置25上でのデータを移送したシする機能を有
している。
The main storage device 25 has a record storage area 21, a record I10 buffer 22, a modified data storage area 23, and a function to import all data from the external storage device 24, and conversely write it to the external storage device 24. Furthermore, it has a function of transferring data on the main storage device 25.

第2図は本実施例の動作を示す流れ図で、これを参照し
てその動作を説明すると、まず外部記憶装置24からデ
ータをレコード110717丁22に読ミ込む。レコー
ドI10バッファ22ではレコード保存エリア21にデ
ータを移送する。次にCRT26のキーボードからのデ
ータ変更によりそのデータを変更データ保存エリア23
に移送する。
FIG. 2 is a flowchart showing the operation of this embodiment. The operation will be explained with reference to this flowchart. First, data is read from the external storage device 24 into the record 110717-22. The record I10 buffer 22 transfers data to the record storage area 21. Next, the data is changed by changing the data from the keyboard of the CRT 26 in the data storage area 23.
Transfer to.

再び同じレコードを外部記憶装置24からレコードI1
0バッファ22に読み込む。レコード保存エリア21の
内容とレコードI10バッファ22の内容とが比較され
、全く同一であれば変更データ保存エリア23に保存し
てあったデータをレコードI10バッファ22に移送す
る。これKよりレコードI10バッファ22の内容は外
部記憶装置24に書き込まれる。
The same record is transferred again from the external storage device 24 to record I1.
0 buffer 22. The contents of the record storage area 21 and the contents of the record I10 buffer 22 are compared, and if they are exactly the same, the data stored in the changed data storage area 23 is transferred to the record I10 buffer 22. From this K, the contents of the record I10 buffer 22 are written to the external storage device 24.

もし、レコード保存エリア21の内容とレコードI10
バッファ22の内容が比較されたときに一致しない場合
は、外部記憶装置24上のデータは他プログラムにより
既に変更されているため、レコードI/Qバッファ22
のデータは外部記憶装置24上へは書き込まれず、CR
T26の画面上に[データは既に他プログラムにより変
更されている」旨のメツセージ全表示し、操作者に処理
打切または処理続行いずれかを選択させる。
If the contents of record storage area 21 and record I10
If the contents of the buffer 22 do not match when compared, the data on the external storage device 24 has already been changed by another program, so the record I/Q buffer 22
The data is not written to the external storage device 24 and is
The message ``The data has already been changed by another program'' is displayed on the screen of T26, and the operator is asked to choose whether to abort the process or continue the process.

このように本実施例においては他のプログラムにより変
更されたデータに対しその後の処置を操作者に委ねる機
能を持つようKL、データの信ぴょう性をもたせる。
As described above, in this embodiment, the KL is provided with a function of entrusting the operator with subsequent treatment of data changed by another program, thereby providing credibility to the data.

(発明の効果) 本発明は以上説明したように、データ金更新する直前に
再度データを読み込んで、変更前の内容と比較すること
Kよりデータの信ぴょう性金損なわないようにする効果
がある。
(Effects of the Invention) As described above, the present invention is more effective in preventing damage to the reliability of data by re-reading the data immediately before updating the data and comparing it with the contents before the change.

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

第1図は本発明の一実施例の構成を示す図、第2図は本
発明の一実施例の動作を示す流れ図、第3図は従来の方
式を示す図でちる。 10・・・・・・主メモリ、11・・・・・・プログラ
ム、12・・・・・・プログラム、15a、15b・・
・・・・ファイル、21・・・・・・レコード保存エリ
ア、22・・・・・・レコードI/。 バッファ、23・・・・・・変更データ保存エリア、2
4・・・・・・外部記憶装置、25・・・・・・主記憶
装置、26・・・・・・CRTディスプレイ。
FIG. 1 is a diagram showing the configuration of one embodiment of the present invention, FIG. 2 is a flow chart showing the operation of one embodiment of the present invention, and FIG. 3 is a diagram showing a conventional system. 10... Main memory, 11... Program, 12... Program, 15a, 15b...
...File, 21...Record storage area, 22...Record I/. Buffer, 23...Change data storage area, 2
4... External storage device, 25... Main storage device, 26... CRT display.

Claims (1)

【特許請求の範囲】[Claims] 複数のプログラムが同時に走行可能な計算機システムに
おいて、複数のプログラムが同時に同一の外部記憶装置
に存在する同一ファイル上のデータを更新する場合に、
自プログラムがある特定レコードの内容を参照している
間に、他プログラムから同じレコードの内容が変更され
たかどうかを判断し、変更されていなければ自プログラ
ムがそのレコードを変更して外部記憶装置上に出力し、
変更されているならば自プログラム側にレコードの内容
が既に他プログラムにより変更されている旨のメッセー
ジを示す手段を有することを特徴とするレコード排他制
御方式。
In a computer system where multiple programs can run simultaneously, when multiple programs simultaneously update data on the same file that exists in the same external storage device,
While your own program is referencing the contents of a specific record, determine whether the contents of the same record have been changed by another program, and if the contents have not been changed, your own program will change that record and store it on the external storage device. Output to
A record exclusive control system characterized by having means for displaying a message on the own program side to the effect that the contents of the record have already been changed by another program if the contents of the record have been changed.
JP59217732A 1984-10-17 1984-10-17 Exclusive control system of record Pending JPS6195450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59217732A JPS6195450A (en) 1984-10-17 1984-10-17 Exclusive control system of record

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59217732A JPS6195450A (en) 1984-10-17 1984-10-17 Exclusive control system of record

Publications (1)

Publication Number Publication Date
JPS6195450A true JPS6195450A (en) 1986-05-14

Family

ID=16708874

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59217732A Pending JPS6195450A (en) 1984-10-17 1984-10-17 Exclusive control system of record

Country Status (1)

Country Link
JP (1) JPS6195450A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5850043A (en) * 1981-09-09 1983-03-24 Fujitsu Ltd System for controlling updating of commonly used file of dialogue type data processing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5850043A (en) * 1981-09-09 1983-03-24 Fujitsu Ltd System for controlling updating of commonly used file of dialogue type data processing system

Similar Documents

Publication Publication Date Title
JPH04229355A (en) Data access method and data processing system
JPH06250906A (en) Backup/recovery system for data developed in main storage device
JPH03160534A (en) Access control system for shared file
JPH02148235A (en) Data drawback system
JPH05225076A (en) Method and device for managing common information
JPS6195450A (en) Exclusive control system of record
JPH0793101A (en) Data backup device
JPS63115251A (en) Disk cache controller
JPH0235537A (en) Multiple volume update control system
JP2892429B2 (en) I / O controller
JP3056566B2 (en) FIFO table memory and control method therefor
JPS61276040A (en) File access system
JP2507399B2 (en) Database equipment
JPS5815877B2 (en) Buffer memory control method
JPH06168079A (en) Data backup system
JPH01188966A (en) Magnetic disk controller containing cache
JPH02257282A (en) Table preparation processor
JPH03125238A (en) Information control system
JPH04209044A (en) Data base control system
JP2000010944A (en) Multiprocessor disk array controller
JPH03127115A (en) Floppy disk write data securing system
JPH01163848A (en) Double updating preventing system for disk file
JPS62113231A (en) Virtual disk control system for extended storage device
JPH03246741A (en) Synchronous controller
JPH04239346A (en) Filing device for data with attribute