JPH10293712A - File access processing system - Google Patents

File access processing system

Info

Publication number
JPH10293712A
JPH10293712A JP9116112A JP11611297A JPH10293712A JP H10293712 A JPH10293712 A JP H10293712A JP 9116112 A JP9116112 A JP 9116112A JP 11611297 A JP11611297 A JP 11611297A JP H10293712 A JPH10293712 A JP H10293712A
Authority
JP
Japan
Prior art keywords
update
block
lock
information
exclusive control
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.)
Granted
Application number
JP9116112A
Other languages
Japanese (ja)
Other versions
JP3450154B2 (en
Inventor
Seiji Sugiyama
誠治 杉山
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 JP11611297A priority Critical patent/JP3450154B2/en
Publication of JPH10293712A publication Critical patent/JPH10293712A/en
Application granted granted Critical
Publication of JP3450154B2 publication Critical patent/JP3450154B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To eliminate the delay of updating during rollback and to improve throughput in exclusive control at the time of deadlock generation and at the time of program abnormal end by originating a request for unlocking before starting the rollback to an exclusive control means. SOLUTION: In the case that an updating cancellation request is originated from a program 11, an updating cancellation means 18 operates the exclusive control means 13, originates an unlocking request before starting the rollback and rolls back the contents of a gathering file 35 to a data file 34 based on a gathering information table 23. Then, after the completion of the rollback, the exclusive control means 13 is operated and the unlocking request is newly originated. That is, in this system, by originating the request for unlocking before starting the rollback to the exclusive control means 13, even a rollback object block is accessed from the other program.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータにお
けるファイルアクセス処理システムに関し、特に同一の
データファイルを多数のプログラムが矛盾なく参照、更
新する処理に関して有効な排他制御を行なうファイルア
クセス処理システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file access processing system in a computer, and more particularly, to a file access processing system that performs effective exclusive control on a process in which many programs refer to and update the same data file without inconsistency.

【0002】[0002]

【従来の技術】以下、具体的に従来の排他制御方式につ
いて説明する。
2. Description of the Related Art Hereinafter, a conventional exclusive control method will be specifically described.

【0003】従来、ファイルの排他制御は、1つのデー
タファイルを複数のプログラムが同時に更新、参照する
場合、ファイル内容に矛盾が生じないようにデータファ
イルを一定のブロックに分割し、番号付けたブロックを
単位とした排他制御を行っていた。
Conventionally, exclusive control of a file is performed by dividing a data file into certain blocks so as to avoid inconsistency in file contents when a plurality of programs update and refer to one data file at the same time. Exclusive control was performed on a per-unit basis.

【0004】すなわち、更新したブロックは更新ロック
という状態となり、更新ロックされたブロックはプログ
ラムが意識して更新完了指示を出さない限り他のプログ
ラムからは更新、参照できず待ち状態となる。また、参
照したブロックは参照ロックという状態となり、参照ロ
ックされたブロックは同様に更新完了指示を出さない限
り他のプログラムから参照できるが更新することはでき
なかった。
That is, the updated block is in an update locked state, and the updated locked block cannot be updated or referred to by other programs unless the program is conscious of issuing an update completion instruction, and is in a wait state. Also, the referenced block is in a reference lock state, and the reference locked block can be referred to from other programs but cannot be updated unless an update completion instruction is similarly issued.

【0005】ここで、更新完了指示とは、プログラムが
一連の参照、更新を完了してファイル内容が論理的に正
しい時にOSに出すべき指示で、これによりロックされ
ていたブロックは全てアンロックされ、ロックされてい
たブロックに対する他のプログラムからの参照、更新が
可能となる。以下、この更新完了指示のことをチェック
ポイントと記述する。
Here, the update completion instruction is an instruction to be issued to the OS when the program completes a series of reference and update and the file contents are logically correct. All the blocks locked by this are unlocked. Thus, the locked block can be referenced and updated from another program. Hereinafter, this update completion instruction is referred to as a checkpoint.

【0006】上記のことからファイルの排他制御によっ
てデータファイルに対するアクセスに遅延が発生するこ
とがあり、スループット低下の一原因となっていた。こ
の遅延を軽減するため、様々な提案がなされている。
As described above, the access to the data file may be delayed due to the exclusive control of the file, which has been a cause of a decrease in throughput. Various proposals have been made to reduce this delay.

【0007】例えば、特開平3−123946号公報の
「データベースの排他制御方法」では、データファイル
にアクセスするプログラム(=トランザクション)を、
参照及び更新を行う更新プログラムと参照のみ行う検索
プログラムとに分類し、更新プログラムは二相ロックを
用いた多版同時実行制御によって管理し、検索プログラ
ムは基本タイムスタンプ順序を用いた多版同時実行制御
によって管理する構成となっている。
[0007] For example, in Japanese Patent Application Laid-Open No. 3-123946, "Exclusive control method of database", a program (= transaction) for accessing a data file is
Update programs that perform reference and update and search programs that perform only reference are categorized. Update programs are managed by multi-version simultaneous execution control using two-phase locks, and search programs are executed by multi-version simultaneous execution using the basic time stamp order. It is configured to be managed by control.

【0008】二相ロックを用いた多版同時実行制御と
は、あるブロックに対して更新した時は更新前と更新後
の二つの内容を持ち、もし更新ロック中のブロックに対
して参照が行われた場合は、更新前のイメージを参照さ
せ、その更新ロックのアンロック時に参照ロックを保証
ロックと呼ばれる参照も更新も不可能なロックに変更す
る。
The multi-version simultaneous execution control using the two-phase lock means that when a certain block is updated, it has two contents before and after the update, and if the block being updated is referred to, In this case, the image before the update is referred to, and when the update lock is unlocked, the reference lock is changed to a lock called a guaranteed lock that cannot be referenced or updated.

【0009】また、基本タイムスタンプ順序を用いた多
版同時実行制御とは、あるブロックに対する参照時には
リードスタンプと呼ばれる時間情報をブロックの情報と
して格納し、更新時にはライトスタンプと呼ばれる時間
情報をブロックの情報として格納し、またプログラム自
体も開始した時間情報であるタイムスタンプを持ち、こ
れらを用いることにより矛盾なく排他制御を行う。
The multi-version simultaneous execution control using the basic time stamp order means that when a certain block is referred to, time information called a read stamp is stored as block information, and when updated, time information called a write stamp is stored in the block. The information is stored as information, and the program itself also has a time stamp, which is the time information at which the program is started, and exclusive control is performed without contradiction by using the time stamp.

【0010】つまり、ブロックに対する更新毎に新しい
ブロックの内容が累積され、あるブロックに対する参
照、更新はアクセスするプログラムのタイムスタンプよ
り前で最大のライトスタンプを持つものが選択され、そ
れが最新のデータのときに更新を許可し、そのブロック
のリードスタンプがプログラムのタイムスタンプより前
なら更新を許可し、ブロックに対しては同時に更新ロッ
クできないという規則に従う更新時の参照を目的とした
方式である。このようにしてできる限り遅延を少なくす
ることを目的としていた。
That is, the contents of a new block are accumulated every time a block is updated, and for a reference or update to a certain block, the block having the largest write stamp before the time stamp of the accessing program is selected. In this method, the update is permitted when the read stamp of the block is earlier than the time stamp of the program, and the block is referred to at the time of update according to the rule that update lock cannot be performed on the block at the same time. The purpose was to reduce the delay as much as possible.

【0011】また、プログラム異常時のデータファイル
の不完全な更新をなくすため、データファイル更新時に
プログラム毎、データファイル毎に用意された収集ファ
イルに対象ブロックの更新前の内容(以下、更新前イメ
ージと記述)をコピー(以下、収集すると記述)し、プ
ログラム異常時やシステム異常時等に自動でデータファ
イルに書き戻す更新取消(以下ロールバックと記述)の
機能がある。
In order to eliminate incomplete updating of the data file when the program is abnormal, the contents before updating the target block (hereinafter referred to as an image before updating) are stored in a collection file prepared for each program and each data file when updating the data file. (Hereinafter referred to as "collection"), and automatically write back to a data file when a program error or system error occurs.

【0012】ファイルの排他制御と同時にロールバック
の機能が働くとき、ロールバックもデータファイルの更
新の一種であるため、それまで更新ロックしていたブロ
ックはロールバック処理が完了するまでアンロックされ
なかった。
When the rollback function operates simultaneously with the exclusive control of the file, since the rollback is also a kind of data file update, the block which has been locked for update is not unlocked until the rollback processing is completed. Was.

【0013】また、チェックポイントを取ると前述のロ
ックしているブロックのアンロックとともに、収集ファ
イル中の更新前イメージの破棄も行うこととしていた。
このロールバックの機能は、排他制御においてデッドロ
ック(プログラムがブロックを取り合って永久遅延に陥
ること)発生時にも用いられる。
When a check point is taken, the locked image is unlocked and the pre-update image in the collected file is discarded.
This rollback function is also used when a deadlock occurs in the exclusive control (a program takes a block and falls into a permanent delay).

【0014】[0014]

【発明が解決しようとする課題】上述した従来の排他制
御方式では、以下に述べるような種々の問題点を有して
いた。
The above-described conventional exclusive control system has various problems as described below.

【0015】第1の問題点は、あるプログラムのロール
バック中はロールバック中のブロックに更新アクセスで
きず、ロールバックに時間がかかるとスループットが低
下することがあった。その理由は、従来の技術がロール
バックのことを考慮せず、通常の更新と同様に扱ってい
たためである。
A first problem is that during a rollback of a program, the block being rolled back cannot be updated, and if the rollback takes a long time, the throughput may decrease. The reason is that the conventional technology does not consider the rollback and treats it in the same manner as a normal update.

【0016】第2の問題点は、多数の更新プログラムが
同一のファイルにアクセスしている時、更新プログラム
が中止させられる可能性が高くなり、かえって合計処理
時間が長くなることがあった。その理由は、更新プログ
ラムどうしは二相ロックを用いた多版同時実行制御を行
い、更新ロック中のブロックに更新プログラムが参照を
行った場合に更新完了処理時に保証ロックされ、参照し
たブロックを更新しようとすると古い版のブロックを参
照しているため、プログラムを中止せざるをえないから
である。
The second problem is that when a large number of update programs are accessing the same file, the possibility that the update programs are stopped is increased, and the total processing time is rather increased. The reason is that multi-version simultaneous execution control using two-phase lock is performed between update programs, and if the update program refers to a block on which update lock is performed, it is guaranteed locked at the time of update completion processing, and the referenced block is updated If you try to do so, you will have to abort the program because it refers to an old version of the block.

【0017】第3の問題点は、多数のプログラムが同一
のブロックに対してアクセスすると、多数のブロックの
イメージが作成され、データベースのサイズが増大する
場合があった。その理由は、古い版を参照しているプロ
グラムが存在する限り更新ロックが解除されても参照し
ているイメージが残るためである。
A third problem is that when many programs access the same block, images of many blocks are created and the size of the database may increase. The reason is that as long as there is a program that refers to the old version, even if the update lock is released, the referring image remains.

【0018】本発明の目的は、上記従来の問題点を解決
し、ロールバック中のファイル更新の遅延を解消し、デ
ッドロック発生時や、プログラム異常終了時の排他制御
におけるスループット向上を実現するファイルアクセス
処理システムを提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned conventional problems, eliminate delays in file updating during rollback, and improve throughput in exclusive control when a deadlock occurs or when a program terminates abnormally. An access processing system is provided.

【0019】本発明の他の目的は、更新プログラムを中
止しなければならない状態に陥ることをなくし、処理時
間の増加を回避することの可能なファイルアクセス処理
システムを提供することにある。
Another object of the present invention is to provide a file access processing system capable of avoiding a situation in which the update program has to be stopped and avoiding an increase in processing time.

【0020】本発明のさらに他の目的は、ロールバック
に用いる収集ファイルによるデータファイルのサイズの
増大を防止できるファイルアクセス処理システムを提供
することにある。
Still another object of the present invention is to provide a file access processing system capable of preventing an increase in the size of a data file due to a collected file used for rollback.

【0021】[0021]

【課題を解決するための手段】上記目的を達成する本発
明のファイルアクセス処理システムは、データファイル
を分割して番号付けしたブロックを単位とした排他制御
により、複数のプログラムから同時に同一のデータファ
イルのブロックに対して参照または更新のためのロック
要求またはアンロック要求がなされた場合に、アクセス
対象のブロックを前記ブロック番号によって管理し、前
記ブロックのロックとアンロックを行う排他制御手段
と、前記排他制御手段によってロックされた前記ブロッ
クの参照または更新ロックの種別を示すロック情報を登
録する排他制御テーブルと、対象ブロックの更新前に、
前記ブロックの更新前イメージを収集する更新前イメー
ジ収集手段と、収集された前記更新前イメージを格納す
る収集ファイルと、更新により収集された更新前イメー
ジに対応する前記ブロックの情報を格納する収集情報テ
ーブルと、対象ブロックの更新時に、前記収集情報テー
ブルを参照し、対象ブロックの更新前イメージを収集す
べきかをチェックする更新前イメージチェック手段と、
前記データファイルに対する対象ブロックの読み込みあ
るいは書き出しを行うファイル読み書き手段と、更新完
了指示により、ロックしていた対象ブロックをアンロッ
クし更新前イメージを破棄するチェックポイント手段
と、更新取消要求により、更新ロックされたブロックの
アンロックを前記排他制御手段に要求し、前記収集情報
テーブルに基づいて前記収集ファイルのブロックを前記
データファイルに戻す更新取消処理を行なう更新取消手
段とを備える。
A file access processing system according to the present invention, which achieves the above object, comprises a plurality of programs that simultaneously execute the same data file by exclusive control in units of blocks obtained by dividing and numbering the data file. When a lock request or an unlock request for reference or update is made to the block, an exclusive control unit that manages the block to be accessed by the block number, locks and unlocks the block, An exclusive control table for registering lock information indicating the type of reference or update lock of the block locked by the exclusive control means, and before updating the target block,
Pre-update image collecting means for collecting the pre-update image of the block, a collection file storing the collected pre-update image, and collection information storing information of the block corresponding to the pre-update image collected by the update A table and, at the time of updating the target block, referring to the collection information table, and a pre-update image checking means for checking whether to collect a pre-update image of the target block;
File read / write means for reading or writing the target block with respect to the data file, checkpoint means for unlocking the locked target block by the update completion instruction and discarding the pre-update image, and update lock by the update cancel request Update canceling means for requesting the exclusive control means to unlock the obtained block, and performing update canceling processing for returning blocks of the collected file to the data file based on the collected information table.

【0022】請求項2の本発明のファイルアクセス処理
システムは、前記排他制御手段は、参照または更新のた
めのロック要求がなされた場合であって、ロック要求さ
れた前記ブロックのロック情報が他のプログラム用の前
記排他制御テーブルに登録されている場合、前記ロック
要求と前記ロック情報が参照どうしであれば、前記ロッ
ク要求されたブロックのロック情報を前記排他制御テー
ブルに追加し、参照どうしでなければ、前記ロック要求
されたブロックが更新取消処理中であるかをチェック
し、更新取消処理中でなければ、前記ブロックのアンロ
ックを待ち合わせ、更新取消処理中であれば、前記収集
情報テーブルから前記ブロックの前記収集ファイル上の
位置情報を取得し、前記ロック要求が更新であれば、前
記収集情報テーブルの前記ブロックの情報を削除して前
記ロック要求されたブロックのロック情報を前記排他制
御テーブルに追加し、前記ロック要求が参照であれば、
前記ロック要求されたブロックのロック情報を前記排他
制御テーブルに追加することを特徴とする。
According to a second aspect of the present invention, in the file access processing system according to the second aspect of the present invention, the exclusive control unit is configured to execute a lock request for a reference or an update when the lock information of the block for which the lock request has been made is another information. If the lock request and the lock information are registered in the exclusive control table for a program, the lock information of the block for which the lock is requested is added to the exclusive control table, and the reference must be made. For example, it is checked whether the lock-requested block is in the process of canceling the update. If the block is not in the process of canceling the update, the process waits for the unlocking of the block. Acquiring the position information of the block on the collection file, and if the lock request is an update, the collection information table The delete the information of the block by adding lock information of the lock requested block in the exclusive control table, if the lock request is referenced,
The lock information of the block requested to be locked is added to the exclusive control table.

【0023】請求項3の本発明のファイルアクセス処理
システムは、前記排他制御テーブルに、複数の前記プロ
グラム毎に、前記ブロックの参照または更新ロックのロ
ック情報と、更新取消処理中の有無を示す情報を登録す
る複数のテーブルを備え、前記排他制御手段は、前記ロ
ック要求されたブロックが更新取消処理中であるかをど
うかを、前記プログラム毎のテーブルの更新取消処理中
の有無を示す情報によって判別することを特徴とする。
According to a third aspect of the present invention, in the file access processing system, the exclusive control table includes, for each of the plurality of programs, lock information of reference or update lock of the block and information indicating whether update cancellation processing is being performed. The exclusive control means determines whether or not the block requested to be locked is undergoing an update canceling process based on information indicating whether or not the update canceling process is being performed on the table for each program. It is characterized by doing.

【0024】請求項4の本発明のファイルアクセス処理
システムは、前記排他制御テーブルに、複数の前記プロ
グラム毎に、前記ブロックの参照または更新ロックのロ
ック情報と、更新取消処理中の有無を示す情報を登録す
る複数のテーブルを備え、前記排他制御手段は、アンロ
ック要求がなされた場合、更新取消処理前のアンロック
かどうかをチェックし、更新取消処理前のアンロックで
あれば、前記排他制御テーブルのアンロック要求を出し
たプログラムのテーブルに更新取消処理中を示す情報を
追加し、参照ロックしていたブロックについてのみ前記
テーブルの参照ロック情報を削除し、更新取消処理前の
アンロックでなければ、前記排他制御テーブルのアンロ
ック要求を出したプログラムのテーブル上の全ブロック
のロック情報及び更新取消処理中を示す情報を削除する
ことを特徴とする。
According to a fourth aspect of the present invention, in the file access processing system, the exclusive control table includes, for each of the plurality of programs, lock information of block reference or update lock, and information indicating whether update cancellation processing is being performed. A plurality of tables for registering the same. When the unlock request is made, the exclusive control unit checks whether the lock is unlocked before the update cancellation processing. Information indicating that the update is being canceled is added to the table of the program that issued the table unlock request, and the reference lock information of the table is deleted only for the block that has been locked for reference. For example, the lock information of all the blocks on the table of the program that has issued the unlock request of the exclusive control table and And deletes the information indicating that the new cancel processing.

【0025】請求項5の本発明のファイルアクセス処理
システムは、前記排他制御手段は、参照または更新のた
めのロック要求がなされた場合であって、ロック要求さ
れた前記ブロックのロック情報が他のプログラム用の前
記排他制御テーブルに登録されている場合、前記ロック
要求と前記ロック情報が参照どうしであれば、前記ロッ
ク要求されたブロックのロック情報を前記排他制御テー
ブルに追加し、参照どうしでなければ、前記ロック要求
されたブロックが更新取消処理中であるかをチェック
し、更新取消処理中でなければ、前記ブロックのアンロ
ックを待ち合わせ、更新取消処理中であれば、前記収集
情報テーブルから前記ブロックの前記収集ファイル上の
位置情報を取得し、前記ロック要求が更新であれば、前
記収集情報テーブルの前記ブロックの情報を削除して前
記ロック要求されたブロックのロック情報を前記排他制
御テーブルに追加し、前記ロック要求が参照であれば、
前記ロック要求されたブロックのロック情報を前記排他
制御テーブルに追加し、前記更新前イメージチェック手
段は、前記収集情報テーブルに前記ブロックの情報が格
納されていなければ、前記収集情報テーブルに前記ブロ
ックの情報を追加し、前記更新前イメージ収集手段は、
前記収集情報テーブルに追加された前記ブロックの更新
前イメージを、前記他のプログラム用の前記収集ファイ
ルから読み出し、前記ロック要求を出したプログラム用
の前記収集ファイルに書き出し、ファイル読み書き手段
は、更新であれば、前記ブロックを前記データファイル
に書き出し、参照であれば、前記ロック要求を出したプ
ログラム用の前記収集ファイルまたは前記データファイ
ルから前記ブロックを読み込むことを特徴とする。
According to a fifth aspect of the present invention, in the file access processing system according to the fifth aspect of the present invention, the exclusive control unit is configured to execute a lock request for a reference or an update when the lock information of the block for which the lock request has been made is another information. If the lock request and the lock information are registered in the exclusive control table for a program, the lock information of the block for which the lock is requested is added to the exclusive control table, and the reference must be made. For example, it is checked whether the lock-requested block is in the process of canceling the update. If the block is not in the process of canceling the update, the process waits for the unlocking of the block. Acquiring the position information of the block on the collection file, and if the lock request is an update, the collection information table The delete the information of the block by adding lock information of the lock requested block in the exclusive control table, if the lock request is referenced,
The lock information of the block whose lock has been requested is added to the exclusive control table, and the pre-update image check unit, if the information of the block is not stored in the collection information table, stores the information of the block in the collection information table. Adding information, the before-update image collecting means,
The pre-update image of the block added to the collection information table is read from the collection file for the other program, and written to the collection file for the program that issued the lock request. If so, the block is written to the data file, and if it is referenced, the block is read from the collection file or the data file for the program that issued the lock request.

【0026】[0026]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して詳細に説明する。図1を参照すると、
本発明の実施の形態は、プログラム制御により動作する
データ処理装置10と、半導体で構成される主記憶装置
20と、ディスク装置などで構成される補助記憶装置3
0とを備える。
Next, embodiments of the present invention will be described in detail with reference to the drawings. Referring to FIG.
The embodiment of the present invention relates to a data processing device 10 operated by program control, a main storage device 20 composed of a semiconductor, and an auxiliary storage device 3 composed of a disk device or the like.
0.

【0027】データ処理装置10は、プログラム11
と、ファイルアクセス手段12と、排他制御手段13
と、更新前イメージチェック手段14と、更新前イメー
ジ収集手段15と、ファイルI/O手段16と、チェッ
クポイント手段17と、更新取消手段18を備えて構成
される。
The data processing device 10 includes a program 11
, File access means 12 and exclusive control means 13
, A pre-update image checking unit 14, a pre-update image collection unit 15, a file I / O unit 16, a checkpoint unit 17, and an update canceling unit 18.

【0028】主記憶装置20は、排他制御テーブル22
と、収集情報テーブル23とを備える。 また、補助記
憶装置30は、一定の大きさのブロックに分割管理され
ているデータファイル34と、収集ファイル35とを備
える。
The main storage device 20 has an exclusive control table 22
And a collection information table 23. Further, the auxiliary storage device 30 includes a data file 34 divided and managed in blocks of a fixed size, and a collection file 35.

【0029】排他制御テーブル22は、ロックしている
ブロックの情報を格納するためのテーブルであり、ロッ
クしているプログラム毎に、ブロック番号、ロック種別
(参照ロックか更新ロックかを示す)、ロールバック中
を示す表示等の情報を格納している。
The exclusive control table 22 is a table for storing information on locked blocks, and includes, for each locked program, a block number, a lock type (indicating whether reference lock or update lock), and a role. Information such as a display indicating that a back is being performed is stored.

【0030】収集情報テーブル23は、プログラム11
の更新により、更新前イメージ収集手段15が収集した
更新前イメージの情報を格納するためのテーブルであ
り、収集ファイルの位置、収集したブロック番号、それ
に対応する収集ファイルのブロック番号等の情報を格納
している。
The collection information table 23 stores the program 11
Is a table for storing the information of the pre-update image collected by the pre-update image collecting means 15 by the update of the pre-update, and stores information such as the position of the collected file, the collected block number, and the block number of the corresponding collected file. doing.

【0031】収集ファイル35は、プログラム11の更
新により、更新前イメージ収集手段15が収集した更新
前イメージを格納するためのファイルである。
The collection file 35 is a file for storing the pre-update image collected by the pre-update image collection means 15 by updating the program 11.

【0032】プログラム11がデータファイル34に参
照、更新のためにアクセスする時、ファイルアクセス手
段12は最初に排他制御手段13を動作させる。
When the program 11 accesses the data file 34 for reference and update, the file access unit 12 first operates the exclusive control unit 13.

【0033】排他制御手段13は、アクセス対象となる
ブロックの番号を排他制御テーブル22を基にチェック
し、そのブロックがロック可能かどうかの判断をする。
ロック不可能な場合は対象ブロックがアンロックされる
まで待ち状態となり、ロック可能な場合、排他制御テー
ブル22に対象ブロックのブロック番号、ロック種別等
の情報を登録してロックする。
The exclusive control means 13 checks the number of the block to be accessed based on the exclusive control table 22, and determines whether or not the block can be locked.
If the lock is impossible, the process waits until the target block is unlocked. If the lock is possible, information such as the block number and lock type of the target block is registered in the exclusive control table 22 and locked.

【0034】ファイルアクセス手段12は、アクセスの
種類(読み込みか書き出しか)に応じて、読み込みの時
はファイルI/O手段16を動作させ、書き出しの時は
更新前イメージチェック手段14を動作させる。
The file access means 12 operates the file I / O means 16 at the time of reading, and operates the pre-update image checking means 14 at the time of writing, according to the type of access (read or write).

【0035】更新前イメージチェック手段14は、要求
元プログラムに対応する収集情報テーブル23から対象
ブロックの更新前イメージがすでに収集されているかど
うかの判断をする。
The pre-update image checking means 14 determines whether the pre-update image of the target block has already been collected from the collection information table 23 corresponding to the request source program.

【0036】ファイルアクセス手段12は、参照の場合
や、対象ブロックの更新前イメージがすでに収集されて
いる場合は、ファイルI/O手段16を動作させ、まだ
収集されていない場合は更新前イメージ収集手段15を
動作させる。
The file access means 12 operates the file I / O means 16 when referring to or when the pre-update image of the target block has already been collected, and collects the pre-update image when it has not been collected yet. The means 15 is operated.

【0037】更新前イメージ収集手段15は、対象ブロ
ックの内容をデータファイル34から読み込むと共に、
プログラム11に対応する収集ファイル35にその内容
を書き出す。
The pre-update image collection means 15 reads the contents of the target block from the data file 34,
The contents are written to the collection file 35 corresponding to the program 11.

【0038】ファイルI/O手段16は、要求に従って
データファイル34から対象ブロックの内容を読み込ん
だり、データファイル34の対象ブロックにデータを書
き込んだりする。
The file I / O means 16 reads the contents of the target block from the data file 34 or writes data to the target block of the data file 34 according to the request.

【0039】また、プログラム11がチェックポイント
を取った場合、ファイルアクセス手段12はチェックポ
イント手段17を動作させる。
When the program 11 takes a checkpoint, the file access means 12 operates the checkpoint means 17.

【0040】チェックポイント手段17は、排他制御手
段13にアンロック要求を出し、収集ファイル35にあ
る全ての更新前イメージを破棄し、収集情報テーブル2
3を初期化する。
The checkpoint unit 17 issues an unlock request to the exclusive control unit 13, discards all pre-update images in the collection file 35, and deletes the collection information table 2.
3 is initialized.

【0041】また、プログラム11から更新取消要求が
出された場合、更新取消手段18が排他制御手段13を
動作させ、ロールバック開始前のアンロック要求を出
し、収集情報テーブル23に基づいて収集ファイル35
の内容をデータファイル34へロールバックを行い、ロ
ールバック完了後に排他制御手段13を動作させ、改め
てアンロック要求を出す。
When an update cancellation request is issued from the program 11, the update cancellation means 18 operates the exclusive control means 13, issues an unlock request before the start of rollback, and based on the collection information table 23, 35
Is rolled back to the data file 34, and after the rollback is completed, the exclusive control unit 13 is operated, and an unlock request is issued again.

【0042】本発明の実施の形態における特徴は、更新
取消手段18がロックしてあったブロックを、従来技術
ではロールバック終了までアンロックしなかったのに対
し、ロールバック開始前にアンロックする要求を排他制
御手段13に出すことにより、ロールバック対象ブロッ
クにも他プログラムからアクセスを可能とすることであ
る。
A feature of the embodiment of the present invention is that the block locked by the update canceling means 18 is not unlocked until the end of rollback in the prior art, but is unlocked before the start of rollback. By issuing a request to the exclusive control means 13, the rollback target block can be accessed from another program.

【0043】以下に、図1及び図2〜8を参照して上記
のように構成される本発明の実施の形態の動作について
詳細に説明する。
Hereinafter, the operation of the embodiment of the present invention configured as described above will be described in detail with reference to FIG. 1 and FIGS.

【0044】プログラム11がデータファイル34をア
クセスしたり、チェックポイントを取ろうとする要求
は、ファイルアクセス手段12が受け取る。ファイルア
クセス手段12の処理を示す図2において、ファイルア
クセス手段12はこの要求を判定し(ステップ20
1)、参照、更新などのファイルアクセス要求ならば排
他制御手段13を動作させ(ステップ202)、アクセ
ス対象ブロックのロック要求を出し、チェックポイント
要求ならばチェックポイント手段17を動作させる(ス
テップ208)。
A request for the program 11 to access the data file 34 or to take a checkpoint is received by the file access means 12. In FIG. 2 showing the processing of the file access means 12, the file access means 12 determines this request (step 20).
1) If the request is a file access request such as reference or update, the exclusive control means 13 is operated (step 202), a lock request for the access target block is issued, and if the checkpoint request is made, the checkpoint means 17 is operated (step 208). .

【0045】排他制御手段13の処理を示す図3におい
て、起動された排他制御手段13は、ロックかアンロッ
クか要求を判定し(ステップ301)、ロック要求なら
ば排他制御テーブル22の他プログラム用のテーブルに
対象ブロックが存在するかチェックする(ステップ30
2)。排他制御テーブル22の他プログラム用のテーブ
ルに対象ブロックが存在しない場合、すなわち対象ブロ
ックが他プログラムによってロックされていなければア
クセス可能となり、アクセス種別によって排他制御テー
ブル22に更新ロック、あるいは参照ロックとして対象
ブロックを追加する(ステップ303、304、30
5)。
In FIG. 3 showing the processing of the exclusive control means 13, the activated exclusive control means 13 determines whether the request is locked or unlocked (step 301). It is checked whether the target block exists in the table (step 30).
2). If the target block does not exist in the table for the other program of the exclusive control table 22, that is, if the target block is not locked by another program, it becomes accessible, and the exclusive control table 22 is set as a target lock as an update lock or a reference lock depending on the access type. Add a block (steps 303, 304, 30)
5).

【0046】もし、排他制御テーブル22の他のプログ
ラム用テーブルに対象ブロックが存在したとき、参照ど
うしのアクセスは可能であるため、アクセスを許可する
(ステップ306)。更新どうし、あるいは参照と更新
の場合は、対象ブロックを更新ロックしているプログラ
ムにロールバック中の表示があるかどうかチェックし
(ステップ307)、ロールバック中の表示がないもの
がある場合は同時アクセス不可能なため、他プログラム
のブロックのアンロックを待つ(ステップ308)。
If the target block exists in another program table other than the exclusive control table 22, access is permitted because reference-based access is possible (step 306). In the case of updating and reference and updating, it is checked whether or not there is a display indicating that rollback is being performed in the program that is updating and locking the target block (step 307). Since the access is not possible, it waits for the unlock of the block of the other program (step 308).

【0047】対象ブロックを更新ロックしているプログ
ラム全てにロールバック中の表示がある場合は、同時ア
クセス可能となり、対象ブロックの収集ファイル35上
の位置を収集情報テーブル23から得る(ステップ30
9)。そして、アクセス種別をチェックして参照する場
合は排他制御テーブル22に参照ロックとして追加し
(ステップ310、304)、更新する場合はそのブロ
ックに対してロールバックが行われないようにするた
め、他プログラムの収集情報テーブル23上の対象ブロ
ックの情報を削除し(スブップ311)、排他制御テー
ブル22に更新ロックとして追加する(ステップ30
5)。
If there is a display indicating that rollback is in progress for all programs that have updated and locked the target block, simultaneous access is possible, and the position of the target block on the collection file 35 is obtained from the collection information table 23 (step 30).
9). If the access type is checked and referred to, it is added as a reference lock to the exclusive control table 22 (steps 310 and 304). If the access type is updated, the block is not rolled back. The information of the target block on the collection information table 23 of the program is deleted (step 311) and added as an update lock to the exclusive control table 22 (step 30).
5).

【0048】また、ステップ301においてアンロック
要求ならば、ロールバック開始前のアンロックかどうか
をチェックし(ステップ312)、ロールバック開始前
のアンロックならば排他制御テーブル22上の対象プロ
グラムにロールバック中の表示を追加して参照ロックし
ていたブロックだけは排他制御テーブル22から削除し
てアンロックし(ステップ314)、そうでなければ排
他制御テーブル上の対象プログラムの全ブロックの情報
及びロールバック中の表示を削除し(ステップ31
3)、ロックしていたブロックをアンロックする。処理
が完了したらファイルアクセス手段12に戻る。
If the request is an unlock request in step 301, it is checked whether the lock is unlocked before the start of rollback (step 312). If the lock is unlocked before the start of rollback, the target program on the exclusive control table 22 is rolled. Only the blocks that have been back-locked by adding the display being backed are deleted from the exclusive control table 22 and unlocked (step 314); otherwise, information and rolls of all blocks of the target program on the exclusive control table Delete the display being backed up (step 31)
3) Unlock the locked block. When the processing is completed, the process returns to the file access unit 12.

【0049】図2において、ファイルアクセス手段12
は、排他制御手段13から戻ると、アクセスの種類に応
じて参照ならファイルI/O手段16を動作させ(ステ
ップ203、207)、更新なら更新前イメージチェッ
ク手段14を動作させる(ステップ204)。
In FIG. 2, the file access means 12
Returns from the exclusion control means 13 and operates the file I / O means 16 for reference according to the type of access (steps 203 and 207), and operates the pre-update image check means 14 for update (step 204).

【0050】更新前イメージチェック手段14の処理を
示す図4において、更新前イメージチェック手段14
は、収集情報テーブル23に更新対象ブロックの情報が
あるかどうかチェックし(ステップ401)、対象ブロ
ックの情報がない場合は更新前イメージを収集する必要
があるため、収集情報テーブル23に対象ブロックの情
報を追加し(ステップ402)、対象ブロックの情報が
ある場合は何もせずにファイルアクセス手段12に戻
る。
In FIG. 4 showing the processing of the pre-update image checking means 14, the pre-update image checking means 14 is used.
Checks whether there is information on the block to be updated in the collection information table 23 (step 401). If there is no information on the block to be updated, it is necessary to collect a pre-update image. The information is added (step 402), and if there is information on the target block, the process returns to the file access means 12 without doing anything.

【0051】図2において、ファイルアクセス手段12
は、更新前イメージチェック手段14から戻ると、更新
前イメージを収集済みならばファイルI/O手段16を
動作させ(ステップ205、207)、更新前イメージ
を収集する必要があるなら更新前イメージ収集手段15
を動作させる(ステップ206)。
In FIG. 2, the file access means 12
Returns from the pre-update image checking means 14 to operate the file I / O means 16 if the pre-update image has been collected (steps 205 and 207), and to collect the pre-update image if it is necessary to collect the pre-update image. Means 15
Is operated (step 206).

【0052】更新前イメージ収集手段15の処理を示す
図5において、更新前イメージ収集手段15は、対象ブ
ロックが他プログラム用の収集ファイル35に存在する
かどうかチェックし(ステップ501)、収集ファイル
35に存在する場合は、対象ブロックの更新前イメージ
をその収集ファイルから読み込み(ステップ502)、
収集ファイル35に存在しない場合は対象ブロックをデ
ータファイル35から読み込む(ステップ504)。そ
れぞれ読み込んだ更新前イメージは収集ファイル35に
書き出し(ステップ503)、ファイルアクセス手段1
2に戻る。
In FIG. 5 showing the processing of the pre-update image collection means 15, the pre-update image collection means 15 checks whether the target block exists in the collection file 35 for another program (step 501). , The pre-update image of the target block is read from the collection file (step 502),
If it does not exist in the collection file 35, the target block is read from the data file 35 (step 504). The read pre-update image is written to the collection file 35 (step 503), and the file access unit 1
Return to 2.

【0053】図2において、ファイルアクセス手段12
は、更新前イメージ収集手段15から戻ったらファイル
I/O手段16を動作させる。
In FIG. 2, the file access means 12
Operates the file I / O unit 16 after returning from the pre-update image collection unit 15.

【0054】ファイルI/O手段16の処理を示す図6
において、ファイルI/O手段16は、まず参照かどう
かをチェックし(ステップ601)、参照の場合は、対
象ブロックの存在するファイルに従って、対象ブロック
が収集ファイル35にある場合は収集ファイル35から
(ステップ602、603)、データファイル34にあ
る場合はデータファイル34から読み込む(ステップ6
02、ステップ604)。また、更新する場合はデータ
ファイル34の対象ブロックへ書き出す(ステップ60
5)。
FIG. 6 showing the processing of the file I / O means 16
, The file I / O means 16 first checks whether or not the target block is a reference (step 601). (Steps 602 and 603) If it is in the data file 34, it is read from the data file 34 (Step 6).
02, step 604). If the data file 34 is to be updated, it is written to the target block of the data file 34 (step 60).
5).

【0055】図2において、ファイルアクセス手段12
は、プログラム11からチェックポイント要求を受ける
と、チェックポイント手段17を動作させる(ステップ
208)。
In FIG. 2, the file access means 12
Receives the checkpoint request from the program 11, operates the checkpoint unit 17 (step 208).

【0056】チェックポイント手段17の処理を示す図
7において、チェックポイント手段17は、まず排他制
御手段13を動作させ(ステップ701)、ロックして
いた全ブロックをアンロックする。次に、収集情報テー
ブル23を初期化して(ステップ702)、更新前イメ
ージを全て破棄する。
In FIG. 7 showing the processing of the check point means 17, the check point means 17 first operates the exclusive control means 13 (step 701) to unlock all locked blocks. Next, the collection information table 23 is initialized (step 702), and all pre-update images are discarded.

【0057】次に、更新取消手段18の動作を図8に基
づいて示す。プログラム11の異常終了時等に、自動あ
るいはプログラム11が意識してデータファイル14に
対する更新取消要求を出した時、更新取消手段18が動
作する。
Next, the operation of the update canceling means 18 will be described with reference to FIG. When the program 11 issues an update cancellation request for the data file 14 automatically or when the program 11 is conscious, for example, when the program 11 ends abnormally, the update cancellation means 18 operates.

【0058】更新取消手段18は、まず排他制御手段1
3を動作させ(ステップ801)、ロールバック開始前
のアンロック要求を出し、参照、更新でロックしてあっ
たブロックを他プログラムからアクセス可能とした後、
ロールバックを行う。すなわち、収集情報テーブル23
にあるブロックを一つずつ順に収集ファイル35からデ
ータファイル34へ書き戻す(ステップ802)。そし
て、ロールバックが完了したら排他制御手段13を動作
させ(ステップ803)、アンロック要求を出し、ロッ
クしていたブロックを実際に排他制御テーブル22から
削除させる。
The update canceling means 18 firstly receives the exclusive control means 1
3 (step 801), issues an unlock request before the start of rollback, and makes the block locked by reference and update accessible from other programs.
Perform a rollback. That is, the collection information table 23
Are sequentially written back from the collection file 35 to the data file 34 one by one (step 802). Then, when the rollback is completed, the exclusive control means 13 is operated (step 803), an unlock request is issued, and the locked block is actually deleted from the exclusive control table 22.

【0059】上述したように、本発明の実施の形態によ
れば、ロールバック開始前にそれまでロックしていたブ
ロックをアンロックし、ロールバック対象ブロックは収
集ファイルに対してアクセスさせることにより、ロール
バック対象ブロックへの同時更新が可能となる。
As described above, according to the embodiment of the present invention, before the rollback starts, the locked block is unlocked, and the rollback target block is made to access the collected file. Simultaneous update to the rollback target block becomes possible.

【0060】従来では、ロールバック中はロールバック
対象ブロックにはロールバック完了まで参照、更新等の
アクセスができず、特開平3−123946号公報の方
法でも、参照プログラムは参照しかできず待ち状態とな
り、更新プログラムが参照、更新しようとすると更新プ
ログラムが中止されることになっていたが、本実施の形
態による方式では、そのような遅延がなくなり、ロール
バック中の排他制御のスループットが向上するものであ
る。
Conventionally, during rollback, the block to be rolled back cannot be accessed until the rollback is completed, such as access to the update or the like. Therefore, even in the method disclosed in Japanese Patent Application Laid-Open No. 3-123946, the reference program can only be referred to and cannot be accessed. Thus, when the update program is referred to and attempts to update, the update program is stopped. In the method according to the present embodiment, such a delay is eliminated, and the throughput of exclusive control during rollback is improved. Things.

【0061】また、本実施の形態による方式は、ロール
バック対象ブロックに対するアクセス時、参照はもちろ
ん、更新もロールバック対象の収集ファイルに対しては
参照しかせず、かつそのブロックのアクセス時の内容は
ロールバック完了後の内容と同一であるため、ファイル
内容の論理的正当性は保たれ、ファイル内容の矛盾は発
生しない。さらに、ロールバックの機能を利用すること
により、新たにファイルスペースをとる必要がなく、補
助記憶装置の容量を圧迫しない。
In the method according to the present embodiment, when accessing the block to be rolled back, not only the update but also the collection file to be rolled back cannot be referred to, and the contents at the time of access to the block cannot be updated. Is the same as the content after the rollback is completed, the logical validity of the file content is maintained, and no inconsistency of the file content occurs. Further, by using the rollback function, it is not necessary to take up a new file space, and the capacity of the auxiliary storage device is not reduced.

【0062】[0062]

【実施例】以下本発明の一実施例について図を参照しな
がら詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below in detail with reference to the drawings.

【0063】本実施例においては、図1のプログラム1
1に含まれるプログラム11a、11b、11zが図1
2に示す内容の同一のデータファイル34(ブロック番
号21〜35で構成される)をアクセスしており、図9
はその時の排他制御テーブル22の内容を示している。
In this embodiment, the program 1 shown in FIG.
1 include programs 11a, 11b, and 11z shown in FIG.
9 accesses the same data file 34 (consisting of block numbers 21 to 35) having the contents shown in FIG.
Indicates the contents of the exclusive control table 22 at that time.

【0064】ここで、プログラム11aはデータファイ
ル34のブロック番号23、25、26にそれぞれアク
セス済みであり、プログラム11bはブロック番号2
7、29にそれぞれアクセス済みである。また、プログ
ラム11zはブロック番号30、31、32にアクセス
した後、プログラムが異常終了し、ロールバックを開始
した状態であるとする。同様に、図10は収集情報テー
ブル23の内容を、図11は収集ファイル35の内容を
それぞれ示している。
Here, the program 11a has already accessed the block numbers 23, 25 and 26 of the data file 34, and the program 11b has the block number 2
7 and 29 have already been accessed. It is also assumed that the program 11z is in a state where, after accessing the block numbers 30, 31, and 32, the program ends abnormally and rollback is started. Similarly, FIG. 10 shows the contents of the collection information table 23, and FIG. 11 shows the contents of the collection file 35, respectively.

【0065】図1及び図9〜12の状態の時、プログラ
ム11zは更新取消手段18を動作させ、さらに更新取
消手段18は排他制御手段13を動作させ(ステップ8
01)、ロールバック開始前のアンロック要求を出し、
それが完了した直後を表している。つまり、排他制御手
段13がアンロック要求であり(ステップ301)、ロ
ールバック開始前のアンロックのため(ステップ31
2)、排他制御テーブル22のプログラム11z用のテ
ーブルにロールバック中の表示をつけて参照ロックして
いたブロックだけは排他制御テーブル22から削除して
アンロックし(ステップ314)、更新取消手段18に
戻った状態である。
In the states shown in FIGS. 1 and 9 to 12, the program 11z operates the update canceling means 18, and the update canceling means 18 operates the exclusive control means 13 (step 8).
01), issue an unlock request before the start of rollback,
Immediately after it is completed. That is, the exclusive control means 13 is an unlock request (step 301), and is unlocked before the rollback is started (step 31).
2) Only the blocks that have been roll-backed in the table for the program 11z in the exclusive control table 22 with the reference locked are deleted from the exclusive control table 22 and unlocked (step 314), and the update canceling means 18 It is the state returned to.

【0066】同様に図示の状態の時、プログラム11a
がデータファイル34のブロック番号31を参照しよう
とした時、ファイルアクセス手段12は排他制御手段1
3を動作させる(ステップ201、202)。排他制御
手段13はロック要求であるため(ステップ301)、
排他制御テーブル22にブロック番号31があるかを調
べる(ステップ302)。このとき、排他制御テーブル
22のプログラム11z用のテーブルにブロック番号3
1は存在するため、ロールバック中の表示を調べると
(ステップ306、307)、ロールバック中の表示が
あり、アクセス可能となる。
Similarly, in the state shown in FIG.
When the file access unit 12 tries to refer to the block number 31 of the data file 34, the file access unit 12
3 is operated (steps 201 and 202). Since the exclusive control means 13 is a lock request (step 301),
It is checked whether the exclusive control table 22 has the block number 31 (step 302). At this time, the block number 3 is stored in the table for the program 11z in the exclusive control table 22.
Since the number 1 exists, when the display during rollback is checked (steps 306 and 307), there is a display during rollback, and access is possible.

【0067】そして、実際にアクセスすべき収集ファイ
ル上の位置を収集情報テーブル23zから取得し(ステ
ップ309)、最後に排他制御テーブル22のプログラ
ム11a用のテーブルにブロック番号31を参照として
追加し(ステップ304)、ファイルアクセス手段12
に戻る。
Then, the position on the collection file to be actually accessed is acquired from the collection information table 23z (step 309), and finally, the block number 31 is added as a reference to the program 11a table of the exclusive control table 22 ( Step 304), file access means 12
Return to

【0068】ファイルアクセス手段12は、アクセス種
別が参照のため(ステップ203)、ファイルI/O手
段16を動作させる(ステップ207)。ファイルI/
O手段16はアクセスは参照であり(ステップ60
1)、ブロック番号31は収集ファイル35z上に存在
するため(ステップ602)、収集ファイル35zから
データファイル34のブロック番号31に対応するブロ
ック番号42zを読み込み(ステップ303)、プログ
ラム11aに戻る。
The file access means 12 operates the file I / O means 16 because the access type is referred to (step 203) (step 207). File I /
The O means 16 refers to the access (step 60).
1) Since the block number 31 exists in the collection file 35z (step 602), the block number 42z corresponding to the block number 31 of the data file 34 is read from the collection file 35z (step 303), and the process returns to the program 11a.

【0069】同様に図示の状態の時、プログラム11b
がデータファイル34のブロック番号22を参照しよう
とした時、ファイルアクセス手段12はまず排他制御手
段13を動作させる(ステップ201、202)。排他
制御手段13は、ロック要求であるため(ステップ30
1)、排他制御テーブル22にブロック番号22がある
かを調べる(スブップ302)。ブロック番号22は存
在しないため、排他制御テーブル22のプログラム11
b用のテーブルにブロック番号22を参照として追加し
(ステップ303,304)、ファイルアクセス手段1
2に戻る。
Similarly, in the state shown in FIG.
When the user attempts to refer to the block number 22 of the data file 34, the file access means 12 first operates the exclusive control means 13 (steps 201 and 202). The exclusive control unit 13 determines that the request is a lock request (step 30).
1) It is checked whether or not the exclusive control table 22 has the block number 22 (step 302). Since the block number 22 does not exist, the program 11 of the exclusive control table 22
The block number 22 is added to the table for b as a reference (steps 303 and 304), and the file access means 1 is added.
Return to 2.

【0070】ファイルアクセス手段12は、アクセスが
参照であるため(ステップ203)、ファイルI/O手
段16を動作させる(ステップ207)。ファイルI/
O手段16はアクセス種別が参照であり(ステップ60
1)、ここで対象ブロックはデータファイル34に存在
するため(ステップ602)、データファイル34から
ブロック番号22の内容を読み込み(ステップ60
4)、プログラム11bに戻る。
The file access means 12 operates the file I / O means 16 (step 207) because the access is a reference (step 203). File I /
The O means 16 refers to the access type (step 60).
1) Since the target block exists in the data file 34 (step 602), the content of the block number 22 is read from the data file 34 (step 60).
4) Return to the program 11b.

【0071】同様に図示の状態の時、プログラム11a
がブロック番号32を更新しようとした時、ファイルア
クセス手段12は排他制御手段13を動作させる(ステ
ップ201、202)。排他制御手段13はロック要求
であるため(ステップ301)、排他制御テーブル22
にブロック番号32があるかチェックする(ステップ3
02)。ブロック番号32はプログラム11z用のテー
ブルにあり、さらにロールバック中の表示が付いている
ため(ステップ306、307)、アクセス可能と判断
する。
Similarly, in the state shown in FIG.
When the user attempts to update the block number 32, the file access unit 12 operates the exclusive control unit 13 (steps 201 and 202). Since the exclusive control means 13 is a lock request (step 301), the exclusive control table 22
Check if there is a block number 32 (step 3
02). Since the block number 32 is in the table for the program 11z and further has a display indicating that rollback is being performed (steps 306 and 307), it is determined that the access is possible.

【0072】ブロック番号32の収集ファイル35上の
位置(収集ファイル35zのブロック番号43z)を収
集情報テーブル23zから取得し(ステップ309)、
そのブロックはロールバックされないように収集情報テ
ーブル23zからブロック番号32の情報を削除し(ス
テップ310、311)、最後に排他制御テーブル22
のプログラム11a用のテーブルヘブロック番号32を
更新として追加し(ステップ305)、ファイルアクセ
ス手段12へ戻る。
The position of the block number 32 on the collection file 35 (the block number 43z of the collection file 35z) is obtained from the collection information table 23z (Step 309).
The information of the block number 32 is deleted from the collection information table 23z so that the block is not rolled back (steps 310 and 311).
The block number 32 is added to the table for the program 11a as an update (step 305), and the process returns to the file access means 12.

【0073】ファイルアクセス手段12は、更新である
ため、更新前イメージチェック手段14を動作させる
(ステップ203、204)。更新前イメージチェック
手段14は、収集情報テーブル23aの全ての情報を調
べるが、ブロック番号32は登録されていないため(ス
テップ401)、収集情報テーブル23aにブロック番
号32を追加し(ステップ402)、ファイルアクセス
手段12に戻る。
The file access unit 12 operates the pre-update image check unit 14 because the update is an update (steps 203 and 204). The pre-update image checking means 14 checks all the information in the collection information table 23a, but since the block number 32 is not registered (step 401), adds the block number 32 to the collection information table 23a (step 402). The process returns to the file access means 12.

【0074】ファイルアクセス手段12は、ブロック番
号32が収集されていないため、更新前イメージ収集手
段15を動作させる(ステップ205、206)。更新
前イメージ収集手段15は、ブロック番号32を収集フ
ァイル35zのブロック番号43zから読み込み、その
内容を収集ファイル35aのブロック番号43aに書き
出し(ステップ501、502、503)、ファイルア
クセス手段12に戻る。ファイルアクセス手段12は、
ファイルI/O手段16を動作させ(ステップ20
7)、データファイル34を更新する。
Since the block number 32 has not been collected, the file access means 12 operates the pre-update image collecting means 15 (steps 205 and 206). The pre-update image collection unit 15 reads the block number 32 from the block number 43z of the collection file 35z, writes the content into the block number 43a of the collection file 35a (steps 501, 502, 503), and returns to the file access unit 12. The file access means 12
The file I / O means 16 is operated (step 20).
7) Update the data file 34.

【0075】ファイルI/O手段16は、更新であるた
め、プログラム11aで指定された内容をデータファイ
ル34のブロック番号32へ書き出し(ステップ60
1、605)、プログラム4aに戻る。
The file I / O means 16 writes the contents specified by the program 11a to the block number 32 of the data file 34 (step 60).
1, 605), and returns to the program 4a.

【0076】図示の状態の時、プログラム11bがブロ
ック番号21に書き出し要求を出した時、ファイルアク
セス手段12は排他制御手段13を動作させる(ステッ
プ201、202)。排他制御手段13は、ロック要求
であるため(ステップ301)、排他制御テーブル22
を調べるが(ステップ302)、ブロック番号21は存
在しないため、アクセス可能と判断する。更新であるた
め(ステップ303)、排他制御テーブル22のプログ
ラム11b用のテーブルにブロック番号21を更新とし
て追加し(ステップ305)、ファイルアクセス手段1
2に戻る。
In the state shown, when the program 11b issues a write request to the block number 21, the file access means 12 operates the exclusive control means 13 (steps 201 and 202). Since the exclusive control unit 13 is the lock request (step 301), the exclusive control table 22
Is checked (step 302), but since the block number 21 does not exist, it is determined that access is possible. Since this is an update (step 303), the block number 21 is added as an update to the table for the program 11b of the exclusive control table 22 (step 305), and the file access unit 1
Return to 2.

【0077】ファイルアクセス手段12は、次に更新前
イメージチェック手段14を動作させる(ステップ20
3、204)。更新前イメージチェック手段14は、収
集情報テーブル23bの全ての情報を調べ、ブロック番
号21は登録されていないため(ステップ401)、収
集情報テーブル23bにブロック番号21を追加し(ス
テップ402)、ファイルアクセス手段12に戻る。
Next, the file access means 12 operates the pre-update image checking means 14 (step 20).
3, 204). The pre-update image check unit 14 checks all information in the collection information table 23b, and adds the block number 21 to the collection information table 23b (Step 402) because the block number 21 is not registered (Step 401). Return to the access means 12.

【0078】ファイルアクセス手段12は、ブロック番
号21が収集されていないため、更新前イメージ収集手
段15を動作させる(ステップ205、206)。更新
前イメージ収集手段15は、ブロック番号21をデータ
ファイル34から読み込み、その内容を収集ファイル3
5bのブロック番号43bに書き出し(ステップ50
1、504、503)、ファイルアクセス手段12に戻
る。
Since the block number 21 has not been collected, the file access unit 12 operates the pre-update image collection unit 15 (steps 205 and 206). The pre-update image collection unit 15 reads the block number 21 from the data file 34 and
5b is written to the block number 43b (step 50).
1, 504, 503), and returns to the file access means 12.

【0079】ファイルアクセス手段12は、ファイルI
/O手段16を動作させ(ステップ207)、データフ
ァイル34を更新する。ファイルI/O手段16は更新
であるため(ステップ601)、プログラム11bで指
定された内容をデータファイル34のブロック番号21
へ書き出し(ステップ605)、プログラム11bに戻
る。
The file access means 12 stores the file I
The / O means 16 is operated (step 207), and the data file 34 is updated. Since the file I / O means 16 is an update (step 601), the contents specified by the program 11b are stored in the block number 21 of the data file 34.
(Step 605), and returns to the program 11b.

【0080】図示の状態の時、プログラム11aがブロ
ック番号25を更新しようとした時、ファイルアクセス
手段12は、排他制御手段13を動作させる(ステップ
201、202)。排他制御手段13は、ロック要求で
あるため(ステップ301)、排他制御テーブル22を
調べると、ブロック番号26はプログラム11aしかブ
ロック番号25をロックしていないため、アクセス可能
と判断する(ステップ302)。そして、更新であるた
め(ステップ303)、排他制御テーブル22のプログ
ラム11a用のテーブルにブロック番号25を更新ロッ
クとして追加するが、既にテーブルに存在するため、何
もせず(ステップ305)にファイルアクセス手段12
に戻る。
In the state shown, when the program 11a attempts to update the block number 25, the file access means 12 operates the exclusive control means 13 (steps 201 and 202). The exclusive control unit 13 checks the exclusive control table 22 because the lock request is a lock request (step 301), and determines that the block number 26 is accessible because only the program 11a locks the block number 25 (step 302). . Then, because the update is an update (step 303), the block number 25 is added as an update lock to the table for the program 11a in the exclusive control table 22, but since the table already exists, nothing is done (step 305) and the file access is performed. Means 12
Return to

【0081】ファイルアクセス手段12は、次に更新前
イメージチェック手段14を動作させる(ステップ20
3、204)。更新前イメージチェック手段14は、収
集情報テーブル23aの全ての情報を調べ、ブロック番
号25が登録されているため(ステップ401)、何も
せずにファイルアクセス手段12に戻る。
Next, the file access means 12 operates the pre-update image checking means 14 (step 20).
3, 204). The pre-update image check unit 14 checks all the information in the collection information table 23a, and returns to the file access unit 12 without doing anything because the block number 25 is registered (step 401).

【0082】ファイルアクセス手段12は、ブロック番
号25が既に収集されているため(ステップ205)、
ファイルI/O手段16を動作させる(ステップ20
7)。ファイルI/O手段16は更新であるため(ステ
ップ601)、プログラム11aで指定された内容をデ
ータファイル34のブロック番号25へ書き出し(ステ
ップ606)、プログラム11aに戻る。
Since the file access means 12 has already collected the block number 25 (step 205),
Operate the file I / O means 16 (step 20)
7). Since the file I / O means 16 is an update (step 601), the contents specified by the program 11a are written to the block number 25 of the data file 34 (step 606), and the program returns to the program 11a.

【0083】図示の状態の時、プログラム11bがブロ
ック番号25を更新しようとした時、ファイルアクセス
手段12は、排他制御手段13を動作させる(ステップ
201、202)。排他制御手段13は、ロック要求で
あるため(ステップ301)、排他制御テーブル22を
調べると、ブロック番号25はプログラム11a用のテ
ーブルに存在し(ステップ302)、参照どうしでなく
(ステップ306)、ロールバック中の表示はないため
(ステップ307)、プログラム11aがブロック番号
25をアンロックするまで待ち状態となる(ステップ3
08)。
In the state shown, when the program 11b attempts to update the block number 25, the file access means 12 operates the exclusive control means 13 (steps 201 and 202). The exclusive control unit 13 checks the exclusive control table 22 because the request is a lock request (step 301). When the exclusive control unit 13 checks the exclusive control table 22, the block number 25 is present in the table for the program 11a (step 302). Since there is no display indicating that the rollback is in progress (step 307), the program 11a waits until the program 11a unlocks the block number 25 (step 3).
08).

【0084】同様に図示の状態の時、プログラム11a
がチェックポイントを取った時、ファイルアクセス手段
12は、チェックポイント要求であるため(ステップ2
01)、チェックポイント手段17を動作させる(ステ
ップ208)。チェックポイント手段17はまず排他制
御手段13を動作させ(ステップ701)、アンロック
要求を出す。排他制御手段13は、アンロック要求であ
るがロールバック開始前ではないため(スブップ31
2)、排他制御テーブル22のプログラム11aのテー
ブルにロックされていたブロック番号23、25、26
の情報を削除する(ステップ313)ことによって、ロ
ックしていた全てのブロックをアンロックして、チェッ
クポイント手段17に戻る。チェックポイント手段17
は、次に収集情報テーブル23aに登録されていたブロ
ック番号26、26の情報を削除する(ステップ70
2)ことによって、収集情報テーブル23aの情報を初
期化し、もしプログラム11aが異常終了してもロール
バックによりデータファイル34の収集ファイルにあっ
たブロックの内容は書き戻されないようにした上でプロ
グラム11aに戻る。
Similarly, in the state shown in FIG.
Takes a checkpoint, the file access means 12 determines that the request is a checkpoint request (step 2).
01), the checkpoint unit 17 is operated (step 208). The checkpoint unit 17 first operates the exclusive control unit 13 (step 701) and issues an unlock request. The exclusive control unit 13 determines that the unlock request is made before the rollback is started (step 31).
2), the block numbers 23, 25, 26 locked to the table of the program 11a of the exclusive control table 22
(Step 313), all the locked blocks are unlocked, and the process returns to the checkpoint unit 17. Checkpoint means 17
Deletes the information of the block numbers 26, 26 registered in the collection information table 23a next (step 70).
2) By doing so, the information in the collection information table 23a is initialized, and if the program 11a terminates abnormally, the contents of the blocks in the collection file of the data file 34 are not written back by rollback, and the program 11a Return to

【0085】図示の状態の後、プログラム11zが動作
させた更新取消手段18は、収集情報テーブル23zに
登録してあるブロック(ブロック番号30、31、3
2)を一つずつ順に収集ファイル35zからデータファ
イル34へ書き戻す(スブップ801)。収集情報テー
ブルに存在した全てのブロックのデータを書き戻した
後、排他制御手段13を動作させ(ステップ803)、
アンロック要求を出す。
After the state shown in the figure, the update canceling means 18 operated by the program 11z stores the blocks (block numbers 30, 31, 3) registered in the collection information table 23z.
2) is sequentially written back from the collection file 35z to the data file 34 one by one (step 801). After writing back the data of all the blocks existing in the collection information table, the exclusive control means 13 is operated (step 803).
Issue an unlock request.

【0086】排他制御手段13は、アンロック要求であ
り(ステップ301)、ロールバック開始前でないため
(ステップ312)、排他制御テーブル22のプログラ
ム11z用のテーブルを削除し、ロールバック中の表示
を消し(ステップ313)、プログラム11zは終了す
る。
The exclusive control means 13 deletes the table for the program 11z of the exclusive control table 22 and displays the message indicating that the rollback is being performed because the request is for unlocking (step 301) and the rollback is not started (step 312). Erase (step 313), the program 11z ends.

【0087】以上好ましい実施の形態と実施例をあげて
本発明を説明したが、本発明は必ずしも上記実施の形態
及び実施例の内容に限定されない。
Although the present invention has been described with reference to the preferred embodiments and examples, the present invention is not necessarily limited to the contents of the above embodiments and examples.

【0088】[0088]

【発明の効果】以上説明したように本発明の排他制御方
式によれば、以下に述べるような効果が得られる。
According to the exclusive control system of the present invention as described above, the following effects can be obtained.

【0089】第1に、あるプログラムがロールバック中
のブロックに対する更新と他のプログラムによる同一ブ
ロックへの同時アクセスが可能となり、スループット向
上が実現される。その理由は、ロールバックの開始前に
ロールバックするブロックを全てアンロックし、他のプ
ログラムからのそのブロックに対するアクセスは収集フ
ァイルに対して行うためである。
First, it is possible for a program to update a block being rolled back and to simultaneously access the same block by another program, thereby improving throughput. The reason is that all the blocks to be rolled back are unlocked before the rollback starts, and the access to the blocks from other programs is performed to the collected file.

【0090】第2に、従来のような更新プログラムを中
止しなければならない状態に陥ることがなく、更新プロ
グラムの中止による処理時間の増加を回避することがで
きる。その理由は、二相ロックを用いた多版同時実行制
御を用いず、古いブロックの内容を参照することがない
ためである。
Second, it is possible to avoid an increase in the processing time due to the suspension of the update program, without falling into a state in which the update program must be discontinued as in the related art. The reason is that the multi-version simultaneous execution control using the two-phase lock is not used, and the contents of the old block are not referred to.

【0091】第3に、従来のようなデータファイルのサ
イズの増大が発生しないことである。その理由は、ロー
ルバックに用いる収集ファイルを利用して参照を行なう
ため、更新するたびに新たにファイルスペースを確保す
る必要がないためである。
Third, there is no increase in the size of the data file as in the prior art. The reason is that since the reference is performed using the collected file used for rollback, it is not necessary to secure a new file space every time the update is performed.

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

【図1】 本発明の実施の形態によるファイルアクセス
処理システムの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a file access processing system according to an embodiment of the present invention.

【図2】 本発明の実施の形態によるファイルアクセス
処理システムのファイルアクセス手段の処理を示すフロ
ーチャートである。
FIG. 2 is a flowchart showing processing of a file access unit of the file access processing system according to the embodiment of the present invention.

【図3】 本発明の実施の形態によるファイルアクセス
処理システムの排他制御手段の処理を示すフローチャー
トである。
FIG. 3 is a flowchart showing processing of an exclusive control unit of the file access processing system according to the embodiment of the present invention.

【図4】 本発明の実施の形態によるファイルアクセス
処理システムの更新前イメージチェック手段の処理を示
すフローチャートである。
FIG. 4 is a flowchart showing a process of a pre-update image check unit of the file access processing system according to the embodiment of the present invention.

【図5】 本発明の実施の形態によるファイルアクセス
処理システムの更新前イメージ収集手段の処理を示すフ
ローチャートである。
FIG. 5 is a flowchart showing a process of a pre-update image collection unit of the file access processing system according to the embodiment of the present invention.

【図6】 本発明の実施の形態によるファイルアクセス
処理システムのファイルI/O手段の処理を示すフロー
チャートである。
FIG. 6 is a flowchart showing processing of a file I / O means of the file access processing system according to the embodiment of the present invention.

【図7】 本発明の実施の形態によるファイルアクセス
処理システムのチェックポイント手段の処理を示すフロ
ーチャートである。
FIG. 7 is a flowchart showing a process of a check point unit of the file access processing system according to the embodiment of the present invention.

【図8】 本発明の実施の形態によるファイルアクセス
処理システムの更新取消手段の処理を示すフローチャー
トである。
FIG. 8 is a flowchart showing a process of an update canceling unit of the file access processing system according to the embodiment of the present invention.

【図9】 本発明の実施の形態によるファイルアクセス
処理システムの排他制御テーブルの内容を例示した図で
ある。
FIG. 9 is a diagram illustrating contents of an exclusive control table of the file access processing system according to the embodiment of the present invention;

【図10】 本発明の実施の形態によるファイルアクセ
ス処理システムの収集情報テーブルの内容を例示した図
である。
FIG. 10 is a diagram exemplifying the contents of a collection information table of the file access processing system according to the embodiment of the present invention.

【図11】 本発明の実施の形態によるファイルアクセ
ス処理システムの収集ファイルの内容を例示した図であ
る。
FIG. 11 is a diagram illustrating contents of a collection file of the file access processing system according to the embodiment of the present invention;

【図12】 本発明の実施の形態によるファイルアクセ
ス処理システムのデータファイルの内容を例示した図で
ある。
FIG. 12 is a diagram illustrating contents of a data file of the file access processing system according to the embodiment of the present invention;

【符号の説明】[Explanation of symbols]

10 データ処理装置 20 主記憶装置 30 補助記憶装置 11 プログラム 11a〜11z プログラム 12 ファイルアクセス手段 13 排他制御手段 14 更新前イメージチェック手段 15 更新前イメージ収集手段 16 ファイル1/0手段 17 チェックポイント手段 18 更新取消手段 22 排他制御テーブル 23 収集情報テーブル 23a〜23z プログラム毎の収集情報テーブル 34 データファイル 35 収集ファイル 35a〜35z プログラム毎の収集ファイル REFERENCE SIGNS LIST 10 data processing device 20 main storage device 30 auxiliary storage device 11 program 11 a-11 z program 12 file access means 13 exclusive control means 14 pre-update image check means 15 pre-update image collection means 16 file 1/0 means 17 checkpoint means 18 update Canceling means 22 Exclusive control table 23 Collection information table 23a to 23z Collection information table for each program 34 Data file 35 Collection file 35a to 35z Collection file for each program

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 データファイルを分割して番号付けした
ブロックを単位とした排他制御により、複数のプログラ
ムから同時に同一のデータファイルのブロックに対して
参照または更新のためのロック要求またはアンロック要
求がなされた場合に、アクセス対象のブロックを前記ブ
ロック番号によって管理し、前記ブロックのロックとア
ンロックを行う排他制御手段と、 前記排他制御手段によってロックされた前記ブロックの
参照または更新ロックの種別を示すロック情報を登録す
る排他制御テーブルと、 対象ブロックの更新前に、前記ブロックの更新前イメー
ジを収集する更新前イメージ収集手段と、 収集された前記更新前イメージを格納する収集ファイル
と、 更新により収集された更新前イメージに対応する前記ブ
ロックの情報を格納する収集情報テーブルと、 対象ブロックの更新時に、前記収集情報テーブルを参照
し、対象ブロックの更新前イメージを収集すべきかをチ
ェックする更新前イメージチェック手段と、 前記データファイルに対する対象ブロックの読み込みあ
るいは書き出しを行うファイル読み書き手段と、 更新完了指示により、ロックしていた対象ブロックをア
ンロックし更新前イメージを破棄するチェックポイント
手段と、 更新取消要求により、更新ロックされたブロックのアン
ロックを前記排他制御手段に要求し、前記収集情報テー
ブルに基づいて前記収集ファイルのブロックを前記デー
タファイルに戻す更新取消処理を行なう更新取消手段と
を備えることを特徴とするファイルアクセス処理システ
ム。
1. A lock request or an unlock request for referring to or updating a block of the same data file from a plurality of programs is simultaneously performed by exclusive control in units of blocks obtained by dividing and numbering a data file. In this case, an exclusive control unit that manages a block to be accessed by the block number and locks and unlocks the block, and indicates a type of reference or update lock of the block locked by the exclusive control unit An exclusive control table for registering lock information; a pre-update image collecting means for collecting a pre-update image of the block before a target block is updated; a collection file for storing the collected pre-update image; The information of the block corresponding to the updated pre-update image is stored. A collection information table, a pre-update image check unit that refers to the collection information table at the time of updating the target block, and checks whether to collect an image before update of the target block; and reads or writes the target block to the data file. File read / write means to be executed, checkpoint means for unlocking a target block locked by an update completion instruction and discarding a pre-update image, and exclusive control means for unlocking an update-locked block by an update cancellation request And an update canceling unit for performing an update canceling process for returning the blocks of the collection file to the data file based on the collection information table.
【請求項2】 前記排他制御手段は、参照または更新の
ためのロック要求がなされた場合であって、ロック要求
された前記ブロックのロック情報が他のプログラム用の
前記排他制御テーブルに登録されている場合、 前記ロック要求と前記ロック情報が参照どうしであれ
ば、前記ロック要求されたブロックのロック情報を前記
排他制御テーブルに追加し、 参照どうしでなければ、前記ロック要求されたブロック
が更新取消処理中であるかをチェックし、更新取消処理
中でなければ、前記ブロックのアンロックを待ち合わ
せ、更新取消処理中であれば、前記収集情報テーブルか
ら前記ブロックの前記収集ファイル上の位置情報を取得
し、前記ロック要求が更新であれば、前記収集情報テー
ブルの前記ブロックの情報を削除して前記ロック要求さ
れたブロックのロック情報を前記排他制御テーブルに追
加し、前記ロック要求が参照であれば、前記ロック要求
されたブロックのロック情報を前記排他制御テーブルに
追加することを特徴とする請求項1に記載のファイルア
クセス処理システム。
2. The exclusive control unit according to claim 1, wherein a lock request for reference or update is issued, and the lock information of the block for which the lock is requested is registered in the exclusive control table for another program. If the lock request and the lock information refer to each other, the lock information of the lock-requested block is added to the exclusive control table. If not, the update of the lock-requested block is canceled. Check whether the process is in progress, wait for the unlocking of the block if not in the update canceling process, and if the update canceling process is in progress, obtain the position information of the block on the collection file from the collection information table If the lock request is an update, the information of the block in the collection information table is deleted and the lock request is issued. The lock information of a block to which the lock is requested is added to the exclusive control table, and if the lock request is a reference, the lock information of the block for which the lock is requested is added to the exclusive control table. File access processing system.
【請求項3】 前記排他制御テーブルに、複数の前記プ
ログラム毎に、前記ブロックの参照または更新ロックの
ロック情報と、更新取消処理中の有無を示す情報を登録
する複数のテーブルを備え、 前記排他制御手段は、前記ロック要求されたブロックが
更新取消処理中であるかをどうかを、前記プログラム毎
のテーブルの更新取消処理中の有無を示す情報によって
判別することを特徴とする請求項2に記載のファイルア
クセス処理システム。
3. The exclusive control table includes a plurality of tables for registering, for each of the plurality of programs, lock information of reference or update lock of the block and information indicating whether or not update cancellation processing is being performed. 3. The control unit according to claim 2, wherein the control unit determines whether or not the block requested to be locked is in the process of canceling the update, based on information indicating whether or not the update of the table of each program is in the process of canceling the update. File access processing system.
【請求項4】 前記排他制御テーブルに、複数の前記プ
ログラム毎に、前記ブロックの参照または更新ロックの
ロック情報と、更新取消処理中の有無を示す情報を登録
する複数のテーブルを備え、 前記排他制御手段は、アンロック要求がなされた場合、
更新取消処理前のアンロックかどうかをチェックし、 更新取消処理前のアンロックであれば、前記排他制御テ
ーブルのアンロック要求を出したプログラムのテーブル
に更新取消処理中を示す情報を追加し、参照ロックして
いたブロックについてのみ前記テーブルの参照ロック情
報を削除し、 更新取消処理前のアンロックでなければ、前記排他制御
テーブルのアンロック要求を出したプログラムのテーブ
ル上の全ブロックのロック情報及び更新取消処理中を示
す情報を削除することを特徴とする請求項1に記載のフ
ァイルアクセス処理システム。
4. The exclusive control table includes a plurality of tables for registering, for each of the plurality of programs, lock information of reference or update lock of the block and information indicating whether or not update cancellation processing is being performed. The control means, when an unlock request is made,
Check whether it is unlocked before the update cancellation processing, if it is unlocked before the update cancellation processing, add information indicating that the update cancellation processing is being performed to the table of the program that issued the unlock request of the exclusive control table, The reference lock information of the table is deleted only for the block that has been reference locked. If the lock is not unlocked before the update cancellation processing, the lock information of all blocks on the table of the program that issued the unlock request of the exclusive control table 2. The file access processing system according to claim 1, wherein the information indicating that the update is being canceled is deleted.
【請求項5】 前記排他制御手段は、参照または更新の
ためのロック要求がなされた場合であって、ロック要求
された前記ブロックのロック情報が他のプログラム用の
前記排他制御テーブルに登録されている場合、 前記ロック要求と前記ロック情報が参照どうしであれ
ば、前記ロック要求されたブロックのロック情報を前記
排他制御テーブルに追加し、 参照どうしでなければ、前記ロック要求されたブロック
が更新取消処理中であるかをチェックし、更新取消処理
中でなければ、前記ブロックのアンロックを待ち合わ
せ、更新取消処理中であれば、前記収集情報テーブルか
ら前記ブロックの前記収集ファイル上の位置情報を取得
し、前記ロック要求が更新であれば、前記収集情報テー
ブルの前記ブロックの情報を削除して前記ロック要求さ
れたブロックのロック情報を前記排他制御テーブルに追
加し、前記ロック要求が参照であれば、前記ロック要求
されたブロックのロック情報を前記排他制御テーブルに
追加し、 前記更新前イメージチェック手段は、前記収集情報テー
ブルに前記ブロックの情報が格納されていなければ、前
記収集情報テーブルに前記ブロックの情報を追加し、 前記更新前イメージ収集手段は、前記収集情報テーブル
に追加された前記ブロックの更新前イメージを、前記他
のプログラム用の前記収集ファイルから読み出し、前記
ロック要求を出したプログラム用の前記収集ファイルに
書き出し、 前記ファイルI/O手段は、更新であれば、前記ブロッ
クを前記データファイルに書き出し、参照であれば、前
記ロック要求を出したプログラム用の前記収集ファイル
または前記データファイルから前記ブロックを読み込む
ことを特徴とする請求項1に記載のファイルアクセス処
理システム。
5. The exclusive control unit, wherein a lock request for reference or update is made, and the lock information of the block for which the lock is requested is registered in the exclusive control table for another program. If the lock request and the lock information refer to each other, the lock information of the lock-requested block is added to the exclusive control table. If not, the update of the lock-requested block is canceled. Check whether the process is in progress, wait for the unlocking of the block if not in the update canceling process, and if the update canceling process is in progress, obtain the position information of the block on the collection file from the collection information table If the lock request is an update, the information of the block in the collection information table is deleted and the lock request is issued. Adding the lock information of the block to the exclusive control table; if the lock request is a reference, adding the lock information of the lock-requested block to the exclusive control table; If the information of the block is not stored in the information table, the information of the block is added to the collection information table, and the pre-update image collection unit calculates the pre-update image of the block added to the collection information table. Reading from the collection file for the other program, writing to the collection file for the program that issued the lock request, the file I / O means, if the update, writes the block to the data file; If referenced, the collection file for the program that issued the lock request Other file access processing system according to claim 1, characterized in that reading the blocks from the data file.
JP11611297A 1997-04-18 1997-04-18 File access processing system Expired - Fee Related JP3450154B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11611297A JP3450154B2 (en) 1997-04-18 1997-04-18 File access processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11611297A JP3450154B2 (en) 1997-04-18 1997-04-18 File access processing system

Publications (2)

Publication Number Publication Date
JPH10293712A true JPH10293712A (en) 1998-11-04
JP3450154B2 JP3450154B2 (en) 2003-09-22

Family

ID=14678997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11611297A Expired - Fee Related JP3450154B2 (en) 1997-04-18 1997-04-18 File access processing system

Country Status (1)

Country Link
JP (1) JP3450154B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001344142A (en) * 2000-05-31 2001-12-14 Nec Corp Multiprogram processor and file roll-back method used for it
JP2014178831A (en) * 2013-03-14 2014-09-25 Nec Corp Information processor, database access method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001344142A (en) * 2000-05-31 2001-12-14 Nec Corp Multiprogram processor and file roll-back method used for it
US6988112B2 (en) 2000-05-31 2006-01-17 Nec Corporation Multi-program processing system and rollback method for file used therefor
JP2014178831A (en) * 2013-03-14 2014-09-25 Nec Corp Information processor, database access method, and program

Also Published As

Publication number Publication date
JP3450154B2 (en) 2003-09-22

Similar Documents

Publication Publication Date Title
US9336258B2 (en) Reducing database locking contention using multi-version data record concurrency control
KR100862661B1 (en) Method for deferred logging and apparatus thereof
JP3763992B2 (en) Data processing apparatus and recording medium
US5778388A (en) Method of processing a synchronization point in a database management system to assure a database version using update logs from accumulated transactions
US7702660B2 (en) I/O free recovery set determination
US6343296B1 (en) On-line reorganization in object-oriented databases
US5845292A (en) System and method for restoring a distributed checkpointed database
JP2559959B2 (en) How to update records by multiple asynchronous processes
US9922086B1 (en) Consistent query of local indexes
JPH0212460A (en) Parallel accessing to index tree
JPH07175700A (en) Database management system
Graefe A survey of B-tree logging and recovery techniques
JPH0812631B2 (en) Database transaction and query processing system
EP0295424A2 (en) Method for managing subpage concurrency control and partial transaction rollback in a transaction-oriented system of the write-ahead logging type
Mohan et al. An efficient and flexible method for archiving a data base
Lomet Simple, robust and highly concurrent B-trees with node deletion
Mohan et al. Algorithms for flexible space management in transaction systems supporting fine-granularity locking
CN113220490A (en) Transaction persistence method and system for asynchronous write-back persistent memory
Kumar et al. Database recovery
JP4139613B2 (en) Data processing method
JP3450154B2 (en) File access processing system
JP3107094B2 (en) Method and apparatus for shortening shared buffer lock period
Jaluta et al. Recoverable B+-trees in centralized database management systems
JP2004341926A (en) Database management system and database management program
Alonso et al. Reducing recovery constraints on locking based protocols

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees