JP2610926B2 - Transaction control method - Google Patents
Transaction control methodInfo
- Publication number
- JP2610926B2 JP2610926B2 JP63036490A JP3649088A JP2610926B2 JP 2610926 B2 JP2610926 B2 JP 2610926B2 JP 63036490 A JP63036490 A JP 63036490A JP 3649088 A JP3649088 A JP 3649088A JP 2610926 B2 JP2610926 B2 JP 2610926B2
- Authority
- JP
- Japan
- Prior art keywords
- lock
- update
- commit
- journal
- order
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000000034 method Methods 0.000 title claims description 25
- 239000000872 buffer Substances 0.000 claims description 73
- 238000012360 testing method Methods 0.000 claims description 20
- 239000004575 stone Substances 0.000 claims 1
- 238000012545 processing Methods 0.000 description 43
- 238000010586 diagram Methods 0.000 description 13
- 238000007726 management method Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 238000012384 transportation and delivery Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000007423 decrease Effects 0.000 description 2
- 230000007717 exclusion Effects 0.000 description 2
- 238000007429 general method Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 101100020289 Xenopus laevis koza gene Proteins 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013474 audit trail Methods 0.000 description 1
- 230000006378 damage Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 229920000642 polymer Polymers 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
- 230000003442 weekly effect Effects 0.000 description 1
Landscapes
- Multi Processors (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は,電子計算機のトランザクション制御方式に
関するものである。Description: BACKGROUND OF THE INVENTION The present invention relates to a transaction control system for a computer.
コミット処理は、例えば、岩波講座情報科学−8「情
報の構造とデータベース」(岩波書店、1983年6月10日
発行)(以下、文献1と呼ぶ)の第172頁〜第177頁の
『§5 障害回復』の節で記載されているように、一般
的な概念である。以下に、上記文献1の第173頁第4行
目〜第174頁第14行目に記載の文章を引用する。The commit process is described in, for example, “§§ 172 to 177” of Iwanami Koza Information Science-8 “Information Structure and Database” (Iwanami Shoten, published June 10, 1983) (hereinafter referred to as Reference 1). This is a general concept, as described in the section on Disaster Recovery. In the following, the text described on page 173, line 4 to page 174, line 14 of Reference 1 is cited.
「障害の発生によって論理作業単位の実行が中断され
ると、データベースは首尾一貫しない状態になる。また
実行を終了したあとでは、障害によってその実行結果が
消滅しても、再現可能であってほしい。このように論理
作業単位の概念は、障害回復に重量な役割を果す。"If a failure interrupts the execution of a logical unit of work, the database will be in an inconsistent state. After the execution has been completed, we want to be able to reproduce the result even if the failure destroys the result. Thus, the concept of a logical unit of work plays a significant role in disaster recovery.
(1)論理作業単位は完全に実行されるか、まったく実
行されないかのいずれかでなければならない。(1) A logical unit of work must be either completely executed or not executed at all.
(2)論理作業単位は、初期状態へ復帰可能であるべき
である。(2) The logical work unit should be able to return to the initial state.
(3)論理作業単位の実行は再現可能であるべきであ
る。(3) The execution of a logical unit of work should be reproducible.
(2)′論理作業単位を他とは独立に復帰させるために
は、変更するすべての対象に終りまで専有錠をかけてお
かなければならない。(2) 'In order to return a logical work unit independently of the others, all objects to be changed must be locked until the end.
(3)′論理作業単位が他とは独立に再現可能であるた
めには、参照するすべての対象にも終りまで共有錠をか
けておかなければならない。(3) 'In order for a logical unit of work to be reproducible independently of the others, all objects to be referenced must also be locked to the end.
以下では、(2)′(3)′の施錠規約を大前提とす
る。施錠、解錠は原則としてシステムの責任である。利
用者が論理作業単位の終了を陽に宣言したり、端末使用
の正常終了で暗に論理作業単位が終了すると、解錠が行
われる。このとき、作業域のデータがデータベースに書
き出されて、変更がデータベースに反映される。この解
錠と書出しの操作を付託する(commit)あるいは反映す
るという。」 すなわち、コミット処理は、論理作業単位(ジョブ)
が参照/更新を行っていたデータを解放し、他のジョブ
から利用できるようにするための処理である。具体的に
は、以下の処理を行う。In the following, the locking rule of (2) ′ (3) ′ is a major premise. Locking and unlocking is the responsibility of the system in principle. Unlocking is performed when the user explicitly declares the end of the logical work unit, or when the logical work unit is implicitly ended by the normal end of terminal use. At this time, the data of the work area is written out to the database, and the change is reflected in the database. It is said that this unlocking and writing operation is committed or reflected. That is, the commit process is performed in a logical unit of work (job).
Is a process for releasing the data that has been referenced / updated, and making it available to other jobs. Specifically, the following processing is performed.
(a)データベースファイルの更新 データベースシステムでは、大量のデータを高速に扱
うことができるようにするために、入出力時間のかかる
磁気ディスク装置から必要なデータをデータアクセスの
速い主記憶装置上に展開して利用する。通常、この主記
憶上の領域をバッファと呼ぶ。バッファは磁気ディスク
装置上でデータを保持するブロックに対応した大きさを
持つ。これらのバッファは複数個から成るバッファ群を
構成する。コミット処理が実行された場合、データの更
新があった場合、バッファの情報を磁気ディスク装置上
に書き出す。(A) Updating the database file In the database system, in order to be able to handle a large amount of data at high speed, the necessary data is expanded from the magnetic disk device that requires input / output time to the main storage device that has fast data access. To use. Usually, this area on the main storage is called a buffer. The buffer has a size corresponding to a block for holding data on the magnetic disk device. These buffers constitute a buffer group composed of a plurality of buffers. When the commit processing is executed, and when the data is updated, the information in the buffer is written on the magnetic disk device.
(b)ジャーナルファイルへのチェックポイントの出力 データベースシステム上のデータが破壊されるの防ぐ
ためにジャーナルを出力し、障害発生時に利用するのが
一般的な手法である。ジャーナル出力は、通常二つのも
のを取る。(B) Outputting a checkpoint to a journal file It is a general method to output a journal in order to prevent data on a database system from being destroyed and use it when a failure occurs. Journal output usually takes two things.
・ロールバックジャーナル(更新前ジャーナル) 更新中に処理が異常終了した場合にデータベースが不
完全な状態になるのを防ぐために用いる。ロールバック
ジャーナルはデータの更新前の状態を保持し、異常終了
した場合にこの情報を被せ元の状態にする。したがっ
て、更新処理が完結した場合(つまり、コミット処理
で)、処理が完結したことを示すチェックポイントを出
力する。-Rollback journal (journal before update) This is used to prevent the database from becoming incomplete if the processing ends abnormally during update. The rollback journal retains the state before the data is updated, and covers this information in the event of abnormal termination. Therefore, when the update process is completed (that is, in the commit process), a checkpoint indicating that the process is completed is output.
・ヒストリジャーナル(更新後ジャーナル) データを格納している磁気ディスク装置等が破壊され
ていた場合、破壊直前の状態までに復旧するために利用
する。ヒストリジャーナルは、データの更新後の状態を
保持する。データベースシステムの運用は長時間に渡る
のが一般的であるが、障害対策のためデータベースの内
容をある一定の間隔(週単位、日単位)で磁気テープな
どに吸い上げる。磁気ディスク装置が破壊された場合、
別の磁気ディスク装置に退避した磁気テープの内容を戻
し、ヒストリジャーナルを用いて破壊直前まで復旧す
る。したがって、ヒストリジャーナルに対しても更新が
完了した旨のチェックポイント情報を出力する。-History journal (updated journal) If the magnetic disk device or the like that stores data has been destroyed, it is used to restore it to the state immediately before it was destroyed. The history journal holds the data after the update. The operation of a database system generally lasts for a long time, but the contents of the database are taken up on a magnetic tape or the like at certain intervals (weekly or daily) for troubleshooting. If the magnetic disk drive is destroyed,
The contents of the magnetic tape evacuated to another magnetic disk device are returned, and restored using a history journal until just before destruction. Therefore, checkpoint information indicating that the update has been completed is also output to the history journal.
尚、本発明は、ロールバックジャーナルを対象として
いる。The present invention is directed to a rollback journal.
(c)ロックリストの解放 参照あるいは更新を行っていたデータに対応して、使
用中であることを明示するための情報ロックリストを解
放する。尚、ロックリストについては後述する。(C) Releasing the lock list The information lock list for specifying that the data is being used is released in response to the data that has been referenced or updated. The lock list will be described later.
この種のトランザクション制御方式では,ロールバッ
ク(ROLLBACK)命令にて更新を無効にし,コミット(CO
MMIT)命令にて更新を有効にする制御を行っている。In this type of transaction control method, the update is invalidated by a rollback (ROLLBACK) instruction, and the commit (CO
(MMIT) instruction is used to enable updating.
従来,バッチジョブの場合のCOMMIT命令の発行間隔は
ユーザプログラムにまかされている。Conventionally, the interval at which a COMMIT instruction is issued for a batch job is left to the user program.
次に,従来の技術について図面を用いて詳細に説明す
る。Next, the prior art will be described in detail with reference to the drawings.
第4図は従来技術によるトランザクション制御方式を
説明するための図である。FIG. 4 is a diagram for explaining a conventional transaction control method.
第4図において,従来のトランザクション制御方式
は,操作回数設定手段41,トランザクション操作手段42,
操作回数集計手段43,操作回数判定手段44,及びCOMMIT操
作手段45を有している。In FIG. 4, the conventional transaction control method comprises an operation number setting means 41, a transaction operation means 42,
It has an operation number counting unit 43, an operation number determination unit 44, and a COMMIT operation unit 45.
操作回数設定手段41はトランザクション処理を何回実
行したらCOMMIT命令を実行するか,トランザクション処
理数を設定する。The number-of-operations setting means 41 sets how many times the transaction processing is executed before executing the COMMIT instruction or sets the number of transaction processings.
トランザクション操作手段42はトランザクション処理
を行う。操作回数集計手段43は静止点が確立されてから
のトランザクションの実行回数をカウントする。操作回
数判定手段44は操作回数集計手段43によってカウントさ
れたトランザクション処理の回数と操作回数設定手段41
によって予め,設定されているトランザクション処理回
数とを比較する。操作回数判定手段44は,操作回数集計
手段43によってカウントされたトランザクション処理の
回数が操作回数設定手段41によって設定されているトラ
ンザクション処理回路を越えた場合,COMMIT操作手段45
に通知する。COMMIT操作手段45はCOMMIT命令を実行す
る。The transaction operation means 42 performs transaction processing. The operation count totaling means 43 counts the number of times the transaction has been executed since the stationary point was established. The number-of-operations determination means 44 is the number of transaction processes counted by the number-of-operations counting means 43 and the number-of-operations setting means 41
Is compared with a preset transaction processing count. When the number of transaction processes counted by the operation count totaling unit 43 exceeds the transaction processing circuit set by the operation count setting unit 41, the operation count determining unit 44
Notify. The COMMIT operation means 45 executes a COMMIT instruction.
操作回数設定手段41により,トランザクション処理の
回数を色々変更し,最適なCOMMIT命令の実行間隔が見つ
かるまで,繰り返し試行し最適と思われるトランザクシ
ョン処理回数を設定する。The number of times of transaction processing is changed in various ways by the operation number setting means 41, and the number of times of transaction processing is considered to be optimal by repeatedly trying until the optimum execution interval of the COMMIT instruction is found.
トランザクションの概念の明確なコミニュケーション
ジョブの場合,ユーザプログラムからCOMMIT命令を実行
する地点をトランザクションの終了時点とすることがで
き,ユーザプログラムから,あるいはシステムで容易に
定めることができる。しかしながら,バッチジョブの場
合,トランザクションの終了時点が最適なCOMMIT命令時
点とはかぎらず,トランザクションを何回か繰り返し実
行した後にCOMMIT命令を実行する。この方式では,COMMI
T命令を実行する間隔を試行錯誤で見付け出さなければ
ならない。また,見付け出した間隔が最適間隔である保
証はなく,COMMIT命令の実行が送れることにより,排他
待ち,排他エラーが発生したり,あるいは,ロックリス
トのオーバーフロー,ジャーナルファイルのオーバーフ
ローなどでプログラムが異常終了することがある。ま
た,逆にCOMMIT命令の実行間隔が短いと,COMMIT命令ご
とに,ファイルへの実更新によるファイルI/Oの増加,
ロックリストの開放処理に伴うCPUの増加によりシステ
ムのスループットを低下させる原因になる。In the case of a communication job in which the concept of the transaction is clear, the point at which the COMMIT instruction is executed from the user program can be the end point of the transaction, and can be easily determined from the user program or the system. However, in the case of a batch job, the end time of the transaction is not always the time of the optimal COMMIT instruction, and the COMMIT instruction is executed after the transaction is repeatedly executed several times. In this method, COMMI
The interval at which the T instruction is executed must be found by trial and error. In addition, there is no guarantee that the found interval is the optimum interval, and the execution of the COMMIT instruction causes an exclusive wait, an exclusive error, or an error in the program due to lock list overflow, journal file overflow, etc. It may end. Conversely, if the execution interval of the COMMIT instruction is short, the file I / O increases due to the actual update to the file for each COMMIT instruction,
An increase in the number of CPUs associated with the lock list release processing causes a decrease in system throughput.
本発明の目的は、データベースシステムの運用におい
て、COMMIT命令を適切なタイミングで実行することがで
きるようにして、業務プログラムのロックの競合による
待ち合わせ、排他エラー、ジャーナルのオーバーフロー
などを未然に防ぐことにより、データベースシステムの
スループットを向上することにある。An object of the present invention is to make it possible to execute a COMMIT instruction at an appropriate timing in the operation of a database system, thereby preventing queuing due to contention for a lock of a business program, an exclusive error, an overflow of a journal, and the like. Another object of the present invention is to improve the throughput of a database system.
本発明は,ROLLBACK命令にて更新を無効にし,COMMIT命
令にて更新を有効にするトランザクション制御を行うデ
ータベースシステムにおいて,COMMIT命令の実行が必要
か否かの問い合わせを行い,その結果でCOMMIT処理を行
うテストCOMMIT手段と,ジャーナルの出力量でCOMMIT命
令の実行が必要か否か判定するジャーナル出力量判定手
段と,ロックリストの保持量でCOMMIT命令の実行が必要
か否か判定するロックリスト保持量判定手段と,更新ロ
ックリストの保持した量でCOMMIT命令が必要か否か判定
する更新ロック保持量判定手段とを有するトランザクシ
ョン制御方式である。The present invention inquires whether execution of a COMMIT instruction is necessary in a database system that performs transaction control in which update is invalidated by a ROLLBACK instruction and update is enabled by a COMMIT instruction, and the COMMIT processing is performed based on the result. The test COMMIT means to be performed, the journal output amount judgment means for judging whether the execution of the COMMIT instruction is necessary based on the journal output amount, and the lock list holding amount for judging whether the execution of the COMMIT instruction is necessary based on the lock list holding amount This is a transaction control method that includes a determination unit and an update lock holding amount determination unit that determines whether a COMMIT instruction is required based on the amount held by the update lock list.
以下,本発明の実施例について図面を参照して詳細に
説明する。Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
第1図は参照すると,本発明の一実施例によるトラン
ザクション制御方式は,テストCOMMIT手段1,ジャーナル
出力量判定手段2,ロックリスト保持量判定手段3,更新ロ
ック保持量判定手段4から構成されている。Referring to FIG. 1, the transaction control system according to one embodiment of the present invention comprises a test COMMIT unit 1, a journal output amount judgment unit 2, a lock list holding amount judgment unit 3, and an update lock holding amount judgment unit 4. I have.
テストCOMMIT手段1はCOMMIT命令を実行すべきか否か
問い合わせを行い,問い合わせの結果,COMMIT命令を実
行すべきであると指示があった場合,COMMIT命令を実行
する。ジャーナル出力量判定手段2は,ジャーナルの出
力量からCOMMIT命令を実行すべきか否か判定する。ロッ
クリスト保持量判定手段3はロックリスト保持量からCO
MMIT命令を実行すべきか否か判定する。更新ロック保持
量判定手段4は更新ロックリストの保持量からCOMMIT命
令を実行すべきか否か判定する。The test COMMIT means 1 inquires whether a COMMIT instruction should be executed, and if the query indicates that the COMMIT instruction should be executed, executes the COMMIT instruction. The journal output amount determination means 2 determines whether or not to execute a COMMIT instruction based on the journal output amount. The lock list holding amount determination means 3 calculates the CO from the lock list holding amount
Determines whether to execute the MMIT instruction. The update lock holding amount determination unit 4 determines whether or not to execute the COMMIT instruction based on the holding amount of the update lock list.
第2図はジャーナル制御テーブルを表す図である。ジ
ャーナル制御テーブル21はジャーナルファイル22のジャ
ーナルアロケーション情報23とジャーナル出力情報24を
所持している。ジャーナルアロケーション情報23はジャ
ーナルファイルの容量25とジャーナルタイプ26を所持し
ている。ジャーナルタイプはジャーナルが共有ジャーナ
ルが私有ジャーナルかの識別子である。また,ジャーナ
ル出力情報24は静止点からのジャーナル出力量27を所持
している。FIG. 2 is a diagram showing a journal control table. The journal control table 21 has journal allocation information 23 and journal output information 24 of a journal file 22. The journal allocation information 23 has a journal file capacity 25 and a journal type 26. The journal type is an identifier indicating whether the journal is a shared journal or a private journal. The journal output information 24 has a journal output amount 27 from the stationary point.
第3図はロックリストテーブルを表す図である。ジョ
ブ管理リスト31はジョブ単位に作成されるテーブルであ
り,ジョブが保持しているロックリスト保持数32と更新
ロックリスト保持数33と更新バッファ数34を保持してい
る。また,ロックリストプールテーブル35はロックリス
ト37を格納するためにあり,システムで共通で使用され
る。FIG. 3 is a diagram showing a lock list table. The job management list 31 is a table created for each job, and holds a lock list holding number 32, an update lock list holding number 33, and an update buffer number 34 held by a job. The lock list pool table 35 is for storing the lock list 37, and is commonly used in the system.
次に,本発明の動作について図面を用いて説明する。 Next, the operation of the present invention will be described with reference to the drawings.
テストCOMMIT手段1はトランザクションの終了時点
で,COMMIT命令を実行すべきか否か問い合わせを行う。
問い合わせの結果,COMMIT命令を実行するよう指示を受
けたときは,テストCOMMIT手段1はCOMMIT命令を実行す
る。COMMIT命令の実行が必要がないと指示された場合,
テストCOMMIT手段1はCOMMIT命令の実行を行わない。At the end of the transaction, the test COMMIT unit 1 inquires whether a COMMIT instruction should be executed.
As a result of the inquiry, when an instruction to execute the COMMIT instruction is received, the test COMMIT means 1 executes the COMMIT instruction. If it is indicated that execution of the COMMIT instruction is not necessary,
The test COMMIT means 1 does not execute the COMMIT instruction.
次に、ジャーナルについて説明する。上記文献1の第
174頁第21行〜第25行には以下のことが記述されてい
る。Next, the journal will be described. Reference 1
On page 174, lines 21 to 25, the following is described.
「論理作業単位を復帰、再現するおもな手段は控え
(log,audit trail,journalともいう)である。控えに
は、各論理作業単位が対象を変更する様子を逐一記録す
る。論理作業単位を復帰させるためには、それが変更し
た対象の変更直前の値(before image)を実行と逆の順
番にたどって、もとの状態を復元すればよい。これを後
退復帰(rollback)という。」 この記述から類推されるように、ジャーナルは、コミ
ット処理で作業領域での変更がデータベースに反映され
る直前に出力させておく必要がある。また、コミット処
理が完了すると、ロールバック処理を目的としたジャー
ナルは不要となり、前記のジャーナル領域を別のジャー
ナル領域として再利用可能となり、ジャーナルファイル
のオーバーフローを防ぐことができる。"The main means of restoring and reproducing a logical work unit is a copy (also called log, audit trail, or journal). In the copy, each logical work unit changes its target one by one. To restore the original state, the original state can be restored by tracing the value (before image) immediately before the change of the object changed by the change in the reverse order of execution, and this is called a rollback. As can be inferred from this description, the journal needs to be output immediately before changes in the work area are reflected in the database in the commit process. Further, when the commit process is completed, the journal for the purpose of the rollback process becomes unnecessary, the journal area can be reused as another journal area, and the overflow of the journal file can be prevented.
ジャーナル出力量判定手段2はジャーナル制御テーブ
ル21のジャーナルファイルの容量25と静止点からのジャ
ーナル出力量27を比較し,COMMIT命令を実行すべきか否
かを判定する。判定の基準はジャーナルタイプ26によっ
て異なり,共有ジャーナルの場合,バッチジョブであれ
ば,静止点からのジャーナル出力量27がジャーナルファ
イルの容量25の20パーセントを越えたとき,コミニュケ
ーションジョブであれば,静止点からのジャーナル出力
量27がジャーナルファイルの容量25の10パーセントを越
えたときに,ジャーナル出力量判定手段2はCOMMIT命令
の実行を指示する。私有ジャーナルの場合,ジョブがバ
ッチ型,コミニュケーション型に限らずに,静止点から
のジャーナル出力量27がジャーナルファイルの容量25の
80パーセントを越えたときに,ジャーナル出力量判定手
段2はCOMMIT命令を実行を指示する。The journal output amount determination means 2 compares the journal file capacity 25 of the journal control table 21 with the journal output amount 27 from the quiesce point to determine whether to execute the COMMIT instruction. The judgment criteria differ depending on the journal type 26. In the case of a shared journal, if the batch job is a batch job, the journal output 27 from the quiesce point exceeds 20% of the journal file capacity 25, and if it is a communication job, the quiesce When the journal output amount 27 from the point exceeds 10% of the journal file capacity 25, the journal output amount determination means 2 instructs execution of a COMMIT instruction. In the case of private journals, the amount of journal output 27 from the quiesce point is not limited to batch-type and communication-type jobs.
When it exceeds 80%, the journal output amount determination means 2 instructs execution of a COMMIT instruction.
上記文献1の第174頁第5行目〜第8行目に
「(2)′論理作業単位を他とは独立に復帰させるため
には、変更するすべての対象に終りまで専有錠をかけて
おかなければならない。(3)′論理作業単位が他とは
独立に再現可能であるためには、参照するすべての対象
にも終りまで共有錠をかけておかなければならない。」
と記述されているように、専有、あるいは共有を行うた
めの施錠/解錠操作が必要である。この施錠/解錠処理
は、通常システムが共有して参照できる作業空間上にリ
ストという形で情報を残す。この施錠の情報を「ロック
リスト」という。同様に専有錠を「更新ロックリスト」
という。また、ロックリストを管理する作業空間を「ロ
ックリストプール」と呼ぶ。例えば、ACOSソフトウェア
ACOS−2/FF RIQS説明書(NEC,昭和62年3月第7版)
(以下、文献2と呼ぶ)の第61頁「2.2.2 常駐テーブ
ルサイズの決定」の節に記述されている「LOCKテーブ
ル」がこれに相当する。On page 174, line 5 to line 8 of the above document 1, "(2) 'In order to restore the logical work unit independently of the others, lock all the objects to be changed with the exclusive lock until the end. (3) 'In order for a logical unit of work to be reproducible independently of the rest, all objects to be referenced must also be locked to the end. "
As described above, a locking / unlocking operation for exclusive use or sharing is required. This locking / unlocking process normally leaves information in the form of a list on a work space that can be shared and referenced by the system. This locking information is called a “lock list”. Similarly, the exclusive lock is called "update lock list".
That. The work space for managing the lock list is called a “lock list pool”. For example, ACOS software
ACOS-2 / FF RIQS Manual (NEC, March 1987 7th Edition)
The “LOCK table” described in the section “2.2.2 Determining the resident table size” on page 61 of this document (hereinafter referred to as Document 2) corresponds to this.
ロックリスト保持量判定手段3はロックリストテーブ
ルのロックリストプールテーブル35のロックリストプー
ルのロックリスト数36とロックリスト保持数32とを比較
し,COMMIT命令を実行すべきか否かを判定する。バッチ
ジョブの場合,ロックリスト保持数32がロックリストプ
ールのロックリスト数36の20パーセントを越えたとき,
コミニュケーションジョブであれば,静止点からのロッ
クリスト保持数32がロックリストプールのロックリスト
数36の10パーセントを越えたときに,ロックリスト保持
量判定手段3はCOMMIT命令を実行を指示する。The lock list holding amount determination means 3 compares the number of lock lists 36 of the lock list pool in the lock list pool table 35 of the lock list table with the number of held lock lists 32 to determine whether or not to execute the COMMIT instruction. For a batch job, if the number of lock lists held 32 exceeds 20% of the number of lock lists 36 in the lock list pool,
In the case of a communication job, when the number 32 of lock lists retained from the quiesce point exceeds 10% of the number 36 of lock lists in the lock list pool, the lock list retained amount determination means 3 instructs execution of a COMMIT instruction.
上記文献2の第61頁3行目〜第9行目に、「更新バッ
ファ」に関して以下のように記述されている。The third to ninth lines of page 61 of the above-mentioned document 2 describe the “update buffer” as follows.
「更新系の命令実行時、指定されたレコードを含むブ
ロックがシステムバッファに存在しない場合は、そのブ
ロックをシステムバッファに読み込む。もし、既にシス
テムバッファに更新命令の対象となるブロックが、参照
バッファとして存在していれば、そのバッファを利用し
更新する。このバッファを更新バッファとよぶ。"When an update instruction is executed, if the block containing the specified record does not exist in the system buffer, the block is read into the system buffer. If the block to be updated by the update instruction already exists in the system buffer as a reference buffer, If it exists, it updates using that buffer, which is called the update buffer.
更新バッファは、更新命令を実行したアクティビティ
に占有され、他のアクティビティから利用することはで
きない。ただし、占有しているアクティビティからCOMM
IT/ROLLBACK命令が発行されると複数のアクティビティ
により共有利用が可能となる。」 本発明に於ける「更新バッファ」は、上記説明に基づ
くものである。また、更新バッファを占有して利用する
ジョブを「固有ジョブ」と称する。「固有ジョブ」につ
いて、少し詳細に説明する。磁気ディスク装置から主記
憶装置上に読み込んだデータ、つまりバッファ領域は、
データベースシステムを利用するジャブが共有して利用
することによって、磁気ディスク装置に対する入力回数
を削減できる。しかしながら、更新途中のデータを他の
ジョブから参照あるいは更新できないため、このような
状態にあるバッファは固有のジョブが占有して利用する
ことになる。このジョブを固有ジョブと呼ぶ。The update buffer is occupied by the activity that has executed the update instruction and cannot be used by other activities. However, from the occupying activity COMM
When the IT / ROLLBACK instruction is issued, it can be shared by multiple activities. The "update buffer" in the present invention is based on the above description. A job that occupies and uses the update buffer is referred to as a “unique job”. The “unique job” will be described in some detail. The data read from the magnetic disk device onto the main storage device, that is, the buffer area,
By sharing and using a jab that uses the database system, the number of inputs to the magnetic disk device can be reduced. However, since data being updated cannot be referenced or updated by another job, the buffer in such a state is occupied and used by a unique job. This job is called a unique job.
更新ロック保持量判定手段4は更新ロックリスト保持
数33と更新バッファ数34とを比較し,COMMIT命令を実行
すべきか否かを判定する。判定方法としては更新ロック
リスト保持数33が更新バッファ数34の1.5倍を越えたと
きに,更新ロック保持量判定手段4はCOMMIT命令の実行
を指示する。更新バッファ数34はデータベースシステム
で共有する入出力のためのバッファ領域を固有ジョブが
占有して使用するバッファ数であり,更新ロックリスト
保持数33が更新バッファ数34の1.5倍を越えると,バッ
ファのヒット率が下がり,COMMIT命令の実行を遅らせる
必要はなくなる。The update lock holding amount determination means 4 compares the update lock list holding number 33 with the update buffer number 34 to determine whether or not to execute the COMMIT instruction. As a determination method, when the update lock list holding number 33 exceeds 1.5 times the update buffer number 34, the update lock holding amount determining unit 4 instructs execution of a COMMIT instruction. The number of update buffers 34 is the number of buffers used by private jobs occupying the buffer area for I / O shared by the database system. If the number of update lock lists 33 exceeds 1.5 times the number 34 of update buffers, The hit rate of the COMMIT instruction is reduced, and it is not necessary to delay the execution of the COMMIT instruction.
以下に、販売管理業務を例に用いて本発明を詳細に説
明する。Hereinafter, the present invention will be described in detail using a sales management operation as an example.
販売管理業務は、受注処理業務、在庫引当業務に大別
される。販売管理業務で利用するデータベースシステム
は、受注番号表、顧客表、受注伝票表、在庫マスタ表と
それらに付随する索引キーシステムから構成される。Sales management operations are roughly divided into order processing operations and inventory allocation operations. The database system used in the sales management business includes an order number table, a customer table, an order slip table, an inventory master table, and an index key system associated therewith.
受注番号表、顧客表、受注伝票表、在庫マスタ表の各
々の表は、複数の項目からなるレコードの重合体であ
る。Each of the order number table, customer table, order slip table, and inventory master table is a polymer of a record including a plurality of items.
受注番号表は、払出済みの受注番号、および在庫引当
済み受注番号からなる。払出済み受注番号、在庫引当済
みの受注番号は最初はいずれも0である。The order number table is composed of order numbers that have been paid out and order numbers that have been allocated to stock. At first, both the paid-out order number and the stock-ordered order number are 0.
顧客表は、顧客番号、顧客名、当月売上金額、先月売
上金額、およびその他顧客の住所など顧客に関する情報
を管理する項目がある。特定の顧客レコードへの読み込
みを高速にするために、顧客番号と顧客名に対して索引
キーがある。索引キーは、顧客番号、もしくは顧客名の
項目の値を取り出して値の大きい順に並べるためのもの
で、後述する磁気ディスク上の顧客レコードの格納アド
レスをポインタ値として保持する。索引キーを利用して
顧客番号、あるいは顧客名の項目の値を参照することに
より、該当するレコードを高速にアクセスすることが可
能である。特に、顧客番号は顧客毎に決められた通し番
号で顧客を一意に決定することができる。The customer table has items for managing customer information such as customer number, customer name, current month sales amount, last month sales amount, and other customer addresses. There are index keys for customer numbers and customer names to speed up reading into a particular customer record. The index key is for taking out the value of the item of the customer number or the customer name and arranging the values in descending order of value, and holds the storage address of the customer record on the magnetic disk described later as a pointer value. By referring to the value of the item of the customer number or the customer name using the index key, the corresponding record can be accessed at high speed. In particular, the customer number can be uniquely determined by a serial number determined for each customer.
受注伝票表は、受注番号、営業担当者、顧客番号、商
品名、受注個数、受付日、納期などの項目がある。受注
伝票レコードへの読み込みを高速に行うために、受注番
号に索引キーがある。The order receipt slip table includes items such as an order number, a sales representative, a customer number, a product name, an order quantity, a reception date, and a delivery date. The order number has an index key in order to read the order slip record at high speed.
在庫マスタ表は、商品、商品コード、在庫数、発注
点、平均納期、発注数、発注先などの項目がある。在庫
マスタ表の特定のレコードをアクセスを高速にするため
に、商品名、商品コードに顧客表と同様な索引キーがつ
いている。The stock master table includes items such as a product, a product code, a stock quantity, an order point, an average delivery date, an order quantity, and an order destination. In order to speed up access to a specific record in the inventory master table, an index key similar to the customer table is attached to the product name and product code.
受注番号表、顧客表、受注伝票表、在庫マスタ表の各
々のレコードは、表毎にまとめて磁気ディスク装置に格
納する。The records of the order number table, customer table, order slip table, and inventory master table are collectively stored for each table and stored in the magnetic disk device.
第5図は、磁気ディスク装置を説明する図である。 FIG. 5 is a diagram illustrating a magnetic disk drive.
磁気ディスク装置は、レコード盤を複数枚重ねたよう
な記憶領域を持つ。レコード盤相当の円盤上に閉じた円
周上に記憶領域を持ち、これをトラックと呼ぶ。複数枚
のレコード盤上の垂直上の同心円上に位置するトラック
の集合をシリンダと呼ぶ。このシリンダが、レコード盤
上の外側から中心に向けて複数ある。The magnetic disk device has a storage area in which a plurality of record disks are stacked. It has a storage area on a closed circle on a disk equivalent to a record disk, and this is called a track. A set of tracks located on concentric vertical circles on a plurality of record disks is called a cylinder. There are a plurality of cylinders from the outside on the record disk toward the center.
第6図は、この磁気ディスク装置に、販売管理業務の
データベースシステムを格納したイメージを示す図であ
る。FIG. 6 is a diagram showing an image in which a database system for sales management business is stored in the magnetic disk device.
問題を簡略にするため、データベースが管理するブロ
ックサイズを4096バイトの固定とすると、1トラックに
4ブロックを格納することができる。余った領域は利用
できない。ブロックは磁気ディスク装置から手記憶装置
へレコードを読み込む、あるいは主記憶装置から磁気デ
ィスク装置へレコードを書き込むときの単位である。40
96バイトのブロックに受注番号表、顧客表、受注伝票表
のレコードが格納される。ただし、データベースシステ
ムがブロックを管理する領域としてブロック内の96バイ
トを占有し、残りの4000バイトに各々の表のレコードが
格納されるものとする。To simplify the problem, if the block size managed by the database is fixed at 4096 bytes, four blocks can be stored in one track. The surplus area is not available. The block is a unit for reading a record from the magnetic disk device to the hand storage device or writing a record from the main storage device to the magnetic disk device. 40
Records of the order number table, customer table, and order slip table are stored in a 96-byte block. However, it is assumed that the database system occupies 96 bytes in the block as an area for managing the block, and records of each table are stored in the remaining 4000 bytes.
第7図は、受注処理業務の処理を説明する流れ図であ
る。FIG. 7 is a flowchart for explaining the processing of the order receiving business.
まず、受注番号表から受注番号レコードを読み出し
(101)、該レコード内の振出済み受注番号の値に1加
算(102)して、該レコードに書き戻す(103)。First, an order number record is read from the order number table (101), the value of the issued order number in the record is incremented by 1 (102), and the record is written back to the record (103).
次に、顧客名をキーにして顧客表から該当する顧客レ
コードを読み出す(104)。Next, a corresponding customer record is read from the customer table using the customer name as a key (104).
次に、受注番号、取得した顧客レコードの顧客番号の
他、営業担当者、商品名、個数、納期等を入力し(10
5)、受注伝票レコードに書き込む(106)。Next, in addition to the order number and the customer number of the acquired customer record, the sales person, product name, quantity, delivery date, etc. are input (10
5) Write in order receipt record (106).
101〜106の終了後、テストCOMMIT手段1を実行する
(107)。After completion of steps 101 to 106, the test COMMIT means 1 is executed (107).
その後、更に受注処理があるか判定し(108)、ある
場合には101に戻り、ない場合にはCOMMITを行う(10
9)。Thereafter, it is determined whether or not there is further order processing (108). If there is, processing returns to 101, and if not, COMMIT is performed (10
9).
受注処理業務は複数の営業員がデータベースシステム
に繋がった端末から同時に実行するコミニュケーション
ジョブである。営業員は端末の画面上から1回に最大10
件のデータを同時にエントリすることができる。また、
受注処理業務は営業時間の9:00から17:00の間に行われ
る。受注処理を行うアプリケーションプログラムを受注
1、受注2、・・・、受注nと表す。The order processing task is a communication job that is executed simultaneously by a plurality of sales personnel from a terminal connected to the database system. Up to 10 sales representatives at a time from the terminal screen
Data can be entered at the same time. Also,
Order processing is performed between 9:00 and 17:00 during business hours. The application programs that perform the order processing are represented as order 1, order 2,..., Order n.
第8図は、在庫引当業務の処理を説明する流れ図であ
る。FIG. 8 is a flowchart for explaining the processing of the inventory allocation business.
まず、受注番号表から受注番号レコードを読み出し
(111)、在庫引当済み受注番号をキーとして、在庫引
当が完了していない受注伝票表の先頭の受注伝票レコー
ドに位置づける(112)。First, the order number record is read from the order number table (111), and the order number with inventory allocation is used as a key to position the order number record at the top of the order form table for which inventory allocation has not been completed (112).
次に、受注伝票表から受注伝票レコードを読み込み
(113)、商品名をキーとして在庫マスタ表から該当す
る在庫マスタレコードを読み出す(114)。Next, the order receipt record is read from the order receipt table (113), and the corresponding stock master record is read from the inventory master table using the product name as a key (114).
次に、在庫マスタレコードの在庫数から受注伝票レコ
ードの受注個数を減算し(115)、減算後の在庫数が発
注点以下(116)になった場合には、発注処理を行う(1
17)。Next, the order quantity of the order slip record is subtracted from the stock quantity of the stock master record (115). If the stock quantity after subtraction becomes equal to or less than the order point (116), order processing is performed (1).
17).
次に、在庫数がマイナス(118)で、かつ在庫マスタ
レコードの平均納期よりも受注伝票レコードの納期が早
い(119)場合には、アラームを出力し(120)、在庫レ
コードを書き戻す(121)。Next, when the stock quantity is minus (118) and the delivery time of the order receipt record is earlier than the average delivery time of the stock master record (119), an alarm is output (120) and the stock record is written back (121). ).
111〜121の終了後、テストCOMMIT手段1を実行する
(122)。After the completion of 111 to 121, the test COMMIT means 1 is executed (122).
その後、未処理の発注伝票がないか判断し(123)、
未処理の発注伝票がある場合には発注伝票を発注番号順
に読み出して113に戻り、ない場合には受注番号レコー
ドの在庫引当済みの受注番号に最後に処理を行った受注
番号を代入した(124)後、COMMITを行う(125)。After that, it is determined whether there is any outstanding order slip (123),
If there is an unprocessed order slip, the order slips are read out in order of the order number and the process returns to 113. If not, the order number that has been processed last is substituted for the stock-allocated order number in the order number record (124 After that, COMMIT is performed (125).
在庫引当業務は、1日に12時、15時、17時の3回、一
括に行うバッチジョブである。在庫引当業務を行うアプ
リケーションプログラムは1個であり、在庫1と表す。The stock allocation business is a batch job performed at one time, three times a day at 12:00, 15:00, and 17:00. There is one application program that performs the inventory allocation business, and is represented as inventory 1.
レコードの参照は、予めデータシステムが確保したバ
ッファ上で行われる。このバッファは複数個用意され、
参照対象のレコードが含まれるブロックは、最初の入力
要求時に磁気ディスク装置からバッファに読み込まれ
る。該バッファに読み込まれたレコードの内、業務プロ
グラムが要求したレコードだけが該業務プログラムが利
用できる主記憶上にコピーされる。バッファの参照に先
立ち、参照ロックを掛ける。参照ロックが掛からない場
合にはバッファを参照できない。ロックに関する操作は
後述する。The record is referred to on a buffer secured by the data system in advance. This buffer is prepared in plurals,
The block containing the record to be referenced is read from the magnetic disk device to the buffer at the time of the first input request. Of the records read into the buffer, only the records requested by the business program are copied onto the main storage that can be used by the business program. Lock the reference before referring to the buffer. If the reference lock is not locked, the buffer cannot be referenced. Operations related to locking will be described later.
また、業務プログラムからレコードの更新要求があっ
た場合、更新されたレコードのイメージを該レコードが
以前バッファ上で占めていた領域に書き戻す。このと
き、バッファ上の更新前のイメージをジャーナルレコー
ドとして出力する。ジャーナル操作に関しては後述す
る。また、バッファの更新に先立ち、更新ロックを掛け
る。更新ロックが掛からない場合にはバッファを更新で
きない。更新ロックに関しても後述する。When a business program issues a record update request, the image of the updated record is written back to the area previously occupied by the record on the buffer. At this time, the image before update on the buffer is output as a journal record. The journal operation will be described later. Prior to updating the buffer, an update lock is obtained. If the update lock is not held, the buffer cannot be updated. The update lock will also be described later.
更に、業務プログラムからレコードの登録が要求され
た場合、該登録要求が初めての場合には、新たに未使用
のバッファを確保し、登録要求されたレコードのイメー
ジを転送する。また、レコードの登録に先立ち、更新ロ
ックを掛ける。既にレコード登録用のバッファが取得済
みの場合には、該バッファ上の未使用領域にレコードの
イメージを転送する。レコードを格納するのに十分な領
域がない場合には、新たに未使用のバッファを確保し、
登録要求されたレコードのイメージを転送する。バッフ
ァの確保に先立ち、更新ロックが必要である。Further, when a record registration is requested from the business program, and when the registration request is made for the first time, a new unused buffer is secured and an image of the record requested to be registered is transferred. Prior to record registration, an update lock is applied. If a buffer for record registration has already been acquired, the image of the record is transferred to an unused area on the buffer. If there is not enough space to store the record, allocate a new unused buffer,
Transfer the image of the record requested to be registered. An update lock is required before allocating a buffer.
新たにバッファを確保する場合には、データベースフ
ァイルを格納する磁気ディスク装置上の未使用なブロッ
クが1対1の関係で確保される。確保されたブロックの
イメージは、ジャーナルレコードとして出力される。デ
ータベースファイル上のブロックは、各ブロックが未使
用ブロックか使用済みブロックであるかが、空き管理ブ
ロック情報によって管理されている。データベースシス
テムは、新しいブロックを確保する際にこの空きブロッ
ク情報を参照して未使用なブロックを取得し、取得した
ブロックに対する空き領域管理情報を使用済みに変更す
る。When a new buffer is reserved, unused blocks on the magnetic disk device for storing the database file are reserved in a one-to-one relationship. The image of the secured block is output as a journal record. Regarding the blocks on the database file, whether each block is an unused block or a used block is managed by free management block information. When allocating a new block, the database system refers to the free block information to obtain an unused block, and changes the free space management information for the obtained block to used.
データベースシステムが管理するバッファは、同時に
動作する複数の業務プログラムが共有あるいは排他して
利用する。参照をしているバッファは同時に動作する他
の業務プログラムから参照可能である。更新しているバ
ッファは他の業務プログラムからの参照および更新を拒
否し排他的に利用する。後者の更新しているバッファを
更新バッファと呼ぶ。The buffer managed by the database system is shared or used exclusively by a plurality of business programs operating simultaneously. The referring buffer can be referred to by other business programs that operate simultaneously. The updated buffer rejects reference and update from other business programs and uses it exclusively. The latter updating buffer is called an update buffer.
データベースファイルへの更新イメージの反映は、ト
ランザクションの実行中にバッファが不足しない限り、
COMMIT命令が実行された時点で行われる。また、ロール
バック処理が実行された場合、バッファ上で更新した内
容はキャンセルされ、トランザクションは失敗に終わ
る。COMMIT命令あるいはROLLBACK処理が完了した時点
で、参照ロック、更新ロックは解放される。The update image is reflected in the database file unless the buffer runs out during the execution of the transaction.
This is performed when the COMMIT instruction is executed. When the rollback processing is executed, the contents updated on the buffer are cancelled, and the transaction ends in failure. The reference lock and update lock are released when the COMMIT instruction or ROLLBACK processing is completed.
業務プログラムから新たに別のブロックに含まれるレ
コードの参照や、新たにレコードの書き込みが要求され
た場合、予め確保したバッファでは不足することがあ
る。この場合には、利用が終了した参照バッファを利用
し、別のブロックの読み込みや、新たにレコードを登録
するための出力用のブロックのバッファとして利用す
る。ところが、ある業務プログラムが1トランザクショ
ンで多量の更新処理を行った場合、例えば在庫引当業務
において、在庫引当が完了していない受注伝票レコード
が大量にあり1トランザクションで111〜123の操作を繰
り返し行った場合、バッファ不足時に参照バッファだけ
を順番に解放して再利用することになり、データベース
システムが管理するバッファは、いずれは在庫引当業務
の更新バッファだけの状態になる。これを防ぐために、
業務プログラム毎に利用できる更新バッファ数34を決
め、これを越える場合には、バッファの内容を磁気ディ
スク装置上のデータベースファイルに書き戻し、バッフ
ァを解放することができる。When a business program newly requests a record included in another block or newly writes a record, the buffer secured in advance may be insufficient. In this case, the used reference buffer is used, and is used as a buffer of an output block for reading another block or registering a new record. However, when a certain business program performs a large amount of update processing in one transaction, for example, in the inventory allocation business, there are a large number of order receipt records for which inventory allocation has not been completed, and operations 111 to 123 were repeatedly performed in one transaction. In this case, when the buffers are insufficient, only the reference buffers are sequentially released and reused, and the buffers managed by the database system eventually become only the update buffers for the inventory allocation business. To prevent this,
The number of available update buffers 34 is determined for each business program. If the number of update buffers is exceeded, the contents of the buffers can be written back to the database file on the magnetic disk device to release the buffers.
バッファの内容を磁気ディスク装置への書き戻すのに
先立ち、更新前イメージがジャーナルとして出力され
る。もし、ロールバック処理が実行された場合、更新前
イメージのジャーナルを利用し、磁気ディスク装置上の
ブロックのイメージをトランザクション実行前の時点ま
でに復旧する。Prior to writing back the contents of the buffer to the magnetic disk device, the pre-update image is output as a journal. If the rollback processing is executed, the image of the block on the magnetic disk device is restored to the time before the execution of the transaction by using the journal of the image before update.
受注処理業務同士あるいは在庫引当業務との間におい
て、更新の発生する受注番号表、受注伝票表で競合が発
生する。つまり、これらの表のレコードを参照、更新、
登録する際にロックを掛け、他の業務からの参照や更新
を排他する必要がある。A conflict occurs between the order processing operations or the inventory allocation operation in the order number table and the order slip table that are updated. This means that you can browse, update,
It is necessary to lock at the time of registration and exclude reference and update from other business.
ロックの種類として参照ロックと更新ロックがある。
参照ロックはレコードを参照する場合に掛かり、他の業
務からの参照は許し、他からの更新は待ち合わせる。更
新ロックはレコードを更新する場合に掛かり、他の業務
からの参照および更新を待ち合わせる。参照ロック、更
新ロックは、各業務がCOMMIT命令、あるいはROLLBACK命
令を実行した時点で解放される。There are reference locks and update locks as lock types.
The reference lock is applied when referring to a record, allows reference from another business, and waits for update from another. The update lock is used when updating a record, and waits for reference and update from another business. The reference lock and update lock are released when each task executes a COMMIT command or a ROLLBACK command.
ロックは参照あるいは更新したブロック単位に掛か
る。したがって、1つのブロックに複数のレコードが格
納されている場合、そのブロック内に含まれる最初のレ
コードがアクセスされたときに、ロックされる。ロック
はロックリスト37で管理される。ロックリスト37は、ロ
ックの種別と、業務プログラムの識別子と、管理対象の
レコードが格納されるブロックの磁気ディスク上の格納
アドレス(これをロックキーと呼ぶ)と、シノニムチェ
ーンとからなるリストデータである。ロックの種別は、
参照ロックは1、更新ロックは2、ウェイトした場合、
参照ロックは3、更新ロックは4で示す。業務プログラ
ムの識別は、受注1、受注2、・・・、受注n、在庫1
である。磁気ディスク上の格納アドレスは表のシリアル
番号と表内のブロック番号からなる。The lock is applied to the referenced or updated block. Therefore, when a plurality of records are stored in one block, the lock is performed when the first record included in the block is accessed. Locks are managed in a lock list 37. The lock list 37 is list data including a lock type, a business program identifier, a storage address of a block in which a record to be managed is stored on a magnetic disk (this is called a lock key), and a synonym chain. is there. The lock type is
Reference lock is 1, update lock is 2, if wait,
The reference lock is indicated by 3, and the update lock is indicated by 4. The identification of the business program is order 1, order 2,..., Order n, inventory 1.
It is. The storage address on the magnetic disk is composed of the serial number in the table and the block number in the table.
販売管理業務で利用するデータベースの表のシリアル
番号を以下のようにする。受注番号表は1、顧客表は
2、受注伝票表は3、在庫マスタ表は4とする。例え
ば、受注処理(101〜106)を実行した場合、(1、受注
1、1、1、null)、(1、受注1、2、1000、nul
l)、(3、受注1、2、100、null)、(2、受注1、
1、1、null)のようなロックリスト37を生成する。The serial number of the database table used for sales management work is as follows. The order number table is 1, the customer table is 2, the order slip table is 3, and the stock master table is 4. For example, when the order processing (101 to 106) is executed, (1, order 1,1,1,1, null), (1, order 1,2,1000, null)
l), (3, orders 1, 2, 100, null), (2, orders 1,
A lock list 37 such as (1, 1, null) is generated.
ロックキーをハッシュキーとしてハッシングしてロッ
クリストプールテーブル35にロックリスト37を管理す
る。ハッシュキーとはテーブル上に大量にあるリストデ
ータを高速に検索する一般的な手法である。ハッシング
を行う専用のハードウェア命令が、コンピュータのCPU
の一機能として用意されている。ハッシング命令は、ハ
ッシュキーとして抽出されたリストデータ上の任意の領
域をハッシングして、テーブル内にリストデータを分散
して格納する。ハッシングした値をもとにテーブル内に
リストデータを格納する。The lock list 37 is managed in the lock list pool table 35 by hashing using the lock key as a hash key. The hash key is a general method for searching a large amount of list data on a table at high speed. Dedicated hardware instructions for hashing are executed by the computer CPU.
It is provided as one of the functions. The hashing instruction hashes an arbitrary area on the list data extracted as a hash key, and stores the list data in a distributed manner in a table. The list data is stored in the table based on the hashed value.
もし、ハッシングした結果に基づきリストデータを格
納しようとしたときに、既にリストデータが格納済みで
あった場合、オーバフロー領域にリストデータを格納
し、格納済みのリストデータからポイントする。If the list data is already stored when attempting to store the list data based on the hashing result, the list data is stored in the overflow area, and the stored list data is pointed to.
ロック手段は、レコードの参照、更新、追加などの操
作の延長上で動作する。例えば、受注処理業務の受注番
号表を参照する(101)処理や、顧客レコードを読む(1
04)処理において参照ロックの登録処理を行い、受注処
理業務の受注番号レコードを書き戻す(103)処理や、
受注伝票レコードを書き込む(106)処理において更新
ロックの登録処理を行う。ロック手段は、ロックリスト
37を利用することにより、待ち合わせあるいはデッドロ
ックを検出する。ここでは、ロックリスト37の登録につ
いて説明する。The lock means operates as an extension of operations such as record reference, update, and addition. For example, referring to the order number table of the order processing business (101) or reading the customer record (1
04) In the process, the reference lock is registered and the order number record of the order processing is written back (103).
In the process of writing the order slip record (106), the update lock is registered. The lock means is a lock list
By using 37, waiting or deadlock is detected. Here, registration of the lock list 37 will be described.
第9図は、ロックリストの登録状況を説明する図であ
る。FIG. 9 is a diagram for explaining the registration status of the lock list.
以下に、ロックリスト保持量判定手段3と更新ロック
保持量判定手段4の動作を受注業務と在庫引当業務を利
用して説明する。Hereinafter, the operation of the lock list holding amount determination unit 3 and the update lock holding amount determination unit 4 will be described using an order receiving business and a stock allocation business.
受注業務の開始時、ジョブ管理リスト31はロックリス
ト保持数32、更新ロックリスト保持数33は0で初期化さ
れている。また、更新バッファ数34は業務プログラムの
動作環境の指定により決定し、例えば20とする。この20
という数字はデータベースシステムで利用できるバッフ
ァの総数を200とし、受注処理業務が同時に最大動作に1
0個動作することを前提としている。At the start of the order receiving operation, the job management list 31 is initialized with the lock list holding number 32 and the updated lock list holding number 33 is initialized with 0. The number of update buffers 34 is determined by designating the operation environment of the business program, and is set to 20, for example. This 20
Means that the total number of buffers available in the database system is 200, and
It is assumed that there is no operation.
受注業務が受注番号表を参照する(101)ことにより
参照ロックが掛かる。その際に、ロックリスト37を1個
生成し、ロックリスト保持数32に1を加算する(1にな
る)。受注番号レコードの振出済み受注番号の値に1加
算(102)して、該レコード書き戻す(103)際に、更新
ロックリスト保持数33に1を加算する(1になる)。顧
客名をキーにして顧客表から該当する顧客レコードを読
み出す(104)際に、ロックリスト37を更に1個作成
し、ロックリスト保持数32を2にする。受注番号、取得
した顧客レコードの顧客番号の他、営業担当者、商品
名、個数、納期などを入力し(105)、受注伝票レコー
ドに書き込む(106)際に、更新のロックリスト37を1
個作成し、ロック保持数32が3、更新ロックリスト保持
数33が2になる。The reference lock is set by the order receiving operation referring to the order number table (101). At this time, one lock list 37 is generated, and 1 is added to the lock list holding number 32 (to 1). One is added to the value of the issued order number of the order number record (102), and when the record is rewritten (103), 1 is added to the updated lock list holding number 33 (to 1). When a corresponding customer record is read from the customer table using the customer name as a key (104), one more lock list 37 is created and the number of lock list holdings 32 is set to two. In addition to the order number and the customer number of the acquired customer record, the sales representative, the product name, the quantity, the delivery date, etc. are input (105), and when the information is written to the order slip record (106), the updated lock list 37 is set to 1
In this case, the number of locks held is 32, and the number of held lock lists 33 is 2.
すなわち、受注業務が最初のテストCOMMIT手段1を実
行する(107)際には、ロックリスト保持数32は3、更
新ロックリスト保持数33は2である。That is, when the order receiving service executes the first test COMMIT means 1 (107), the number of held lock lists 32 is 3, and the number of held updated lock lists 33 is 2.
該テストCOMMIT手段1に起動されたロックリスト保持
量判定手段3は、ロックリスト保持数32がロックリスト
プールのロックリスト数36の2000に対して、10%以下で
あるので、コミット命令の実行は不要と判断する。判断
基準に10%を用いたのは、同時に動作するコミニュケー
ションジョブの最大数を10と想定したものである。動作
環境の条件によってこの指標が変わる場合もある。同様
に、更新ロック保持量判定手段3も、更新ロックリスト
保持数33が更新バッファ数34の1.5倍以下であるので、C
OMMIT命令の実行は不要と判断する。判断基準に1.5倍を
用いたのは、更新バッファ数34の値を越えて更新ロック
リストを保持した場合に、更新バッファの書き出しが頻
繁に発生するのを緩和するためのものである。The lock list holding amount determination means 3 started by the test COMMIT means 1 determines that the lock list holding number 32 is 10% or less of 2000 of the lock list pool lock list number 36, so that the execution of the commit instruction is Judge as unnecessary. The reason why 10% is used as the criterion is that the maximum number of communication jobs that operate simultaneously is assumed to be 10. This index may change depending on the conditions of the operating environment. Similarly, the update lock holding amount determination unit 3 also determines that the update lock list holding number 33 is 1.5 times or less the update buffer number 34,
It is determined that execution of the OMMIT instruction is unnecessary. The reason for using 1.5 times as the criterion is to reduce the occurrence of frequent writing of the update buffer when the update lock list is held beyond the value of the update buffer number of 34.
受注業務が2度目に受注番号表を参照した(101)時
には、すでにロック済み(実際には更新ロック)である
ので、新たにロックリストは生成しない。受注番号レコ
ードを書き戻す(103)際にも、新たなロックリストは
生成しない。顧客レコードは100ブロックに分散して格
納しているので、顧客レコードを読む(104)際には、
別ブロックに格納されている顧客レコードを読む可能性
が強い。ここでは、新たに別ブロックの顧客レコードの
読み込みが発生したとして、ロックリスト37を作成す
る。ロックリスト保持数33をカウントアップして4にす
る。受注伝票レコードは1ブロックに40個格納できるの
で、受注伝票レコードを書き込む(105)際に、新たに
更新ロックは発生しない。When the order receiving service refers to the order number table for the second time (101), a new lock list is not generated because it is already locked (actually, update lock). When writing back the order number record (103), a new lock list is not generated. Because customer records are distributed and stored in 100 blocks, when reading customer records (104),
It is likely to read customer records stored in another block. Here, the lock list 37 is created on the assumption that a customer record of another block is newly read. The number of lock list holdings 33 is counted up to 4. Since 40 order slip records can be stored in one block, a new update lock does not occur when the order slip record is written (105).
2回目のテストCOMMIT手段1を実行する(107)際に
は、ロックリスト保持数32は4、更新ロックリスト保持
数33は2である。そのため、ロックリスト保持量判定手
段3、および更新ロック保持量判定手段4はCOMMIT命令
の実行は不要と判断する。When the second test COMMIT means 1 is executed (107), the lock list holding number 32 is 4 and the updated lock list holding number 33 is 2. Therefore, the lock list holding amount determination unit 3 and the update lock holding amount determination unit 4 determine that execution of the COMMIT instruction is unnecessary.
以降、3回目以降から10回目までのテストCOMMIT手段
1を実行する(107)際の、ロックリスト保持数32、更
新ロックリスト保持数33の状態を第10図の(A)に示
す。これによると、ロックリスト保持量判定手段3、更
新ロック保持量判定手段4ともCOMMITの実行は不要と判
断するので、テストCOMMIT手段1は一度もCOMMITを実行
しない。受注伝票をすべて処理した後、108で1回だけC
OMMIT命令を実行する。108におけるCOMMIT命令の実行に
より、ロックリスト保持数32、更新ロックリスト保持数
33は0にクリアされる。FIG. 10A shows the state of the lock list holding number 32 and the updated lock list holding number 33 when the test COMMIT means 1 is executed from the third time to the tenth time (107). According to this, since the lock list held amount determination unit 3 and the updated lock held amount determination unit 4 determine that execution of COMMIT is unnecessary, the test COMMIT unit 1 never executes COMMIT. After processing all sales orders, only once at 108 C
Execute the OMMIT instruction. Execution of COMMIT instruction in 108, 32 lock lists held, updated lock list held
33 is cleared to 0.
この例では、受注処理業務は1画面上の受注エントリ
処理が完了するまで、COMMIT命令の実行は行われず、1
画面にエントリした受注データをすべて処理した時点で
COMMIT命令が実行されることになる。ロックリスト保持
量3の判断基準を20%としたのは、パッチジョブはコミ
ニュケーションジョブとは異なり、端末との通信処理を
行なわず、同じCPUを利用しながら、かつデータベース
に関しては多くの作業が可能であるためである。そこで
コミニケーションジョブの2倍とした。In this example, the order processing business does not execute the COMMIT instruction until the order entry processing on one screen is completed.
When all order data entered on the screen has been processed
The COMMIT instruction will be executed. The reason why the judgment criteria of the lock list holding amount 3 is set to 20% is that, unlike the communication job, the patch job does not perform communication processing with the terminal, uses the same CPU, and can perform a lot of work on the database. This is because Therefore, the communication job was doubled.
一方、在庫引当業務のロックリスト保持数32、更新ロ
ックリスト保持数33について考察する。在庫引当業務の
更新バッファ数を20とする。On the other hand, the lock list holding number 32 and the updated lock list holding number 33 of the inventory allocation business will be considered. Assume that the number of update buffers for the inventory allocation business is 20.
在庫引当業務が受注番号を参照する(111)ことによ
り、参照ロックが掛かる。また、商品名をキーとして在
庫マスタ表から該当する在庫マスタレコードを読み出す
(114)際に、参照ロックが掛かり、在庫レコードを書
き戻す(121)際には、更新ロックが掛かる。The reference lock is set when the stock allocation business refers to the order number (111). Further, when the corresponding stock master record is read from the stock master table using the product name as a key (114), a reference lock is applied, and when the stock record is written back (121), an update lock is applied.
テストCOMMIT手段1を実行する(122)際の、ロック
リスト保持数32、および更新ロックリスト保持数33は、
第10図の(B)のようになる。24回目のテストCOMMIT手
段1の実行まで、ロックリスト保持数32はロックリスト
プール36の20%以下であるため、ロックリスト保持量判
定手段3はCOMMIT命令の実行は不要と判断し、更新ロッ
クリスト保持数33も更新バッファ数34の1.5倍を越えな
いので更新ロックリスト保持量判断手段4もCOMMIT命令
の実行は不要と判断し、25回目で更新ロック保持数33が
更新バッファ数34の1.5倍を越えるため、更新ロック保
持量判定手段4がCOMMIT命令の実行が必要と判断し、CO
MMIT命令が実行される。これにより、ロックリスト保持
数32、更新ロックリスト保持数33は0にクリアされる。When the test COMMIT means 1 is executed (122), the lock list holding number 32 and the update lock list holding number 33 are:
The result is as shown in FIG. Until the 24th execution of the test COMMIT unit 1, the lock list holding number 32 is 20% or less of the lock list pool 36, so the lock list holding amount determination unit 3 determines that the execution of the COMMIT instruction is unnecessary, and the update lock list Since the number 33 of holdings does not exceed 1.5 times the number 34 of update buffers, the update lock list holding amount determination means 4 also determines that execution of the COMMIT instruction is unnecessary, and the number 33 of update locks is 1.5 times the number 34 of update buffers at the 25th time. , The update lock holding amount determination means 4 determines that execution of the COMMIT instruction is necessary, and
The MMIT instruction is executed. As a result, the lock list holding number 32 and the updated lock list holding number 33 are cleared to zero.
例えば、在庫引当業務を受注処理業務と並行に行うの
ではなく、受注処理業務が終了した17:00以降に開始す
る場合を想定する。このとき、データベースシステムで
利用できるバッファ数200に対して、在庫引当業務の更
新バッファ数34を160個に再設定する。受注伝票レコー
ドの顧客情報および在庫情報にデータを入力するため
に、顧客表および在庫マスタ表をランダムにアクセスし
たとすると、受注伝票レコードを100件処理した段階
で、顧客表および在庫マスタ表の全ブロックを一度は入
力し、顧客表のブロックに対するロックリスト37と在庫
マスタの全ブロックに対するロックリスト37を生成す
る。在庫マスタのロックリストは更新ロックリストであ
る。一方、受注伝票は3ブロックを入力するのでロック
リスト37が3個、受注伝票番号表は1ブロックを入力す
るのでロックリスト37が1個発生する。この時点で、ロ
ックリスト保持数32は204個、更新ロックリスト保持数3
3は100個である。更新ロック保持量判定手段4は、更新
ロック保持数が240=160×1.5を越えるまでCOMMITを実
行しない。更新は在庫マスタレコードに対するものだけ
なので、既にすべての在庫マスタレコードを更新済みで
あり、この条件を満足することはない。したがって、テ
ストCOMMIT手段1を実行する(122)際には、ロックリ
スト保持量手段2による判定が有効になる。For example, it is assumed that the inventory allocation business is not performed in parallel with the order processing, but is started after 17:00 when the order processing is completed. At this time, the update buffer number 34 of the inventory allocation business is reset to 160 for the 200 buffers available in the database system. Assuming that the customer table and inventory master table are randomly accessed to enter data in the customer information and inventory information of the order receipt record, at the stage when 100 order receipt records have been processed, all of the customer table and inventory master table A block is entered once, and a lock list 37 for blocks in the customer table and a lock list 37 for all blocks in the inventory master are generated. The lock list of the stock master is an update lock list. On the other hand, three lock lists 37 are generated because three blocks are input for the order receipt slip, and one lock list 37 is generated because one block is input for the order slip number table. At this point, the number of held lock lists 32 is 204, and the number of updated lock lists is 3
3 is 100 pieces. The update lock hold amount determination unit 4 does not execute COMMIT until the number of update lock holds exceeds 240 = 160 × 1.5. Since the update is only for the stock master record, all the stock master records have already been updated, and this condition is not satisfied. Therefore, when the test COMMIT means 1 is executed (122), the determination by the lock list holding amount means 2 becomes valid.
新規にロックリスト37が生成されるのは、受注伝票レ
コードが含まれるブロックを新たに読み込んだ場合であ
り、40件に1個増える。したがって、受注伝票レコード
を7961件処理したときに初めてロックリスト保持数32が
400個を越え、ロックリスト保持量判定手段3がコミッ
トが必要と判断する。このように、シングル運用で特定
のジョブがデータベースの諸元を占有できる場合は、コ
ストの高いCOMMIT処理をなるべく少なくすることができ
る。The lock list 37 is newly generated when a block including an order slip record is newly read, and one lock list is added to 40 blocks. Therefore, when 7961 order receipt records are processed, the lock list holds 32 for the first time.
When the number exceeds 400, the lock list holding amount determination unit 3 determines that commit is necessary. As described above, when a specific job can occupy the specifications of the database in the single operation, the costly COMMIT processing can be reduced as much as possible.
以上、ジャーナルに関する考慮なしで進めたが、635
メガバイトの記憶容量を持つ磁気ディスク装置の1台す
べてをジャーナルファイルで占有するようなデータベー
スシステムの環境においては、COMMIT処理を実行するか
どうかを判断するのにジャーナルの使用量を考慮するこ
とは不要である。The above proceeded without consideration of the journal.
In a database system environment where the entire magnetic disk unit with a megabyte storage capacity is occupied by the journal file, it is not necessary to consider the journal usage to determine whether to execute COMMIT processing. It is.
つまり、更新対象の表である受注伝票、在庫マスタ表
は全体で2600ブロック、10.4メガバイトの容量であり、
ジャーナルレコードに制御部分が付加されても、ジャー
ナルファイルがオーバーフローする恐れはない。In other words, the order receipt and inventory master table, which are the tables to be updated, have a total capacity of 2600 blocks and 10.4 megabytes,
Even if the control part is added to the journal record, there is no possibility that the journal file overflows.
以下に、635メガバイトの容量を有する磁気ディスク
において、ジャーナルファイルに小さなサイズを割り当
てた場合の受注処理業務、在庫引当業務の動作を考慮す
る。In the following, the operations of the order receiving service and the inventory allocation service when a small size is assigned to the journal file in a magnetic disk having a capacity of 635 megabytes will be considered.
第11図は、ジャーナルファイルの内容を示す図であ
る。FIG. 11 is a diagram showing the contents of a journal file.
これをみると、可変長レコードをトラック上に順次格
納して行く。レコードの更新、レコードの登録によっ
て、更新バッファ上の更新前のレコードのイメージをジ
ャーナルレコードとして出力する。ジャーナルレコード
は、ヘッダー部と更新前イメージからなる可変長レコー
ドである。ヘッダー部は、ジャーナルレコード出力日
時、業務プログラムの識別、表名、ブロック相対番号、
ブロック内相対位置、およびイメージ長の48バイトから
なる。Looking at this, variable length records are sequentially stored on the track. By updating the record and registering the record, the image of the record on the update buffer before the update is output as a journal record. The journal record is a variable length record including a header part and an image before update. The header part is the journal record output date and time, business program identification, table name, block relative number,
It consists of a relative position within the block and an image length of 48 bytes.
受注処理業務の103で作成されるジャーナルレコード
は、ヘッダ部が48バイト、更新前イメージが20バイト、
合計68バイトである。また、106で作成されるジャーナ
ルレコードは、新たにブロックを確保した場合、ヘッダ
部48バイト、更新前イメージが4096バイト、合計4144バ
イトである。これらのジャーナル出力量が静止点からジ
ャーナル出力量27に積算される。また、COMMIT命令を実
行するとCOMMITジャーナルとして20バイト出力する。The journal record created in 103 of the order processing business has a header part of 48 bytes, a pre-update image of 20 bytes,
The total is 68 bytes. When a new block is secured, the journal record created in 106 has a header part of 48 bytes and a pre-update image of 4096 bytes, for a total of 4144 bytes. These journal output amounts are added to the journal output amount 27 from the stationary point. When the COMMIT instruction is executed, 20 bytes are output as a COMMIT journal.
同様に、在庫引当業務の121で作成されるジャーナル
レコードは、ヘッダ部が48バイト、更新前イメージが20
0バイト、合計248バイトである。Similarly, the journal record created in 121 of the inventory allocation business has a header part of 48 bytes and a pre-update image of 20 bytes.
0 bytes, for a total of 248 bytes.
受注処理業務と在庫引当業務を同時に実行した場合に
出力されるジャーナルの最大量は、約41キロバイト=41
44×10+248であり、よほどジャーナルファイルを小さ
く、割り当てなければジャーナルオーバフローが発生す
ることがないが、在庫引当業務を受注処理業務終了後に
実行した場合、約20メガバイト=7961×248バイトのジ
ャーナルが出力される。バッチジョブのジャーナル量判
定手段2の判定基準を20%とした場合、ジャーナルファ
イルを100メガバイト以上大きく割り当てと置かない
と、7961件の処理を行う前にジャーナル量判定手段2
は、COMMIT命令が必要と判断する。また、私有ジャーナ
ルを利用した場合、25メガバイト以上の割り当てが必要
である。The maximum amount of journal output when the order processing and inventory allocation tasks are executed simultaneously is about 41 kilobytes = 41
It is 44 x 10 + 248, so the journal file is very small, and there is no journal overflow if it is not allocated. Is done. If the judgment criterion of the batch job journal amount judging means 2 is set to 20%, the journal file judging means 2 must be allocated to the journal file by 100 MB or more before processing the 7961 items.
Determines that a COMMIT instruction is required. If you use a private journal, you need to allocate more than 25 megabytes.
以上説明したように,本発明によるトランザクション
制御方式は,ユーザプログラムからのいかなる考慮も必
要なく,容易に適当な間隔でCOMMIT命令を実行すること
ができる。As described above, the transaction control method according to the present invention can easily execute the COMMIT instruction at an appropriate interval without any consideration from the user program.
適当な間隔でCOMMIT命令が実行されると,COMMIT命令
の実行が遅れることによる,排他待ち,排他エラーの発
生頻度を下げたり,ロックリストのオーバーフロー,あ
るいは,ジャーナルファイルのオーバーフローでプログ
ラムが異常終了することを防ぐことができる。また,逆
にCOMMIT命令の実行間隔が短いと,COMMIT命令ごとに,
ファイルへの実更新によるファイルI/Oの増加,ロック
リストの開放処理に伴うCPUの増加によりシステムのス
ループットが低下するが,本発明によるトランザクショ
ン制御方式では,これを防ぎ,システムのスループット
を向上させることができる。If the COMMIT instruction is executed at an appropriate interval, the execution of the COMMIT instruction will be delayed, causing the program to terminate abnormally due to waiting for exclusion, reducing the frequency of exclusion errors, overflowing the lock list, or overflowing the journal file. Can be prevented. Conversely, if the execution interval of the COMMIT instruction is short,
Although the system throughput decreases due to an increase in file I / O due to the actual update to the file and an increase in the CPU accompanying the release processing of the lock list, the transaction control method according to the present invention prevents this and improves the system throughput. be able to.
第1図は本発明の一実施例によるトランザクション制御
方式の構成を示すブロック図,第2図はジャーナル制御
テーブルを表す図,第3図はロックリストテーブルを表
す図,第4図は従来のトランザクション制御方式の構成
を示すブロック図、第5図は磁気ディスク装置の構造を
説明する図、第6図は磁気ディスク装置に販売管理業務
のデータベースシステムを格納したイメージを示す図、
第7図は受注処理業務の処理を説明する流れ図、第8図
は在庫引当業務の処理を説明する流れ図、第9図はロッ
クリストの登録状況を説明する図、第10図はロックリス
ト保持数と更新ロックリスト保持数の関係を説明する
図、第11図はジャーナルファイルの内容を示す図であ
る。 1……テストCOMMIT手段,2……ジャーナル出力量判定手
段,3……ロックリスト保持量判定手段,4……更新ロック
保持量判定手段,21……ジャーナル制御テーブル,22……
ジャーナルファイル,23……ジャーナルアロケーション
情報,24……ジャーナル出力情報,25……ジャーナルファ
イルの容量,26……ジャーナルタイプ,27……静止点から
のジャーナル出力量,31……ジョブ管理リスト,32……ロ
ックリスト保持数,33……更新ロックリスト保持数,34…
…更新バッファ数,35……ロックリストプールテーブル,
36……ロックリストプールのロックリスト数,37……ロ
ックリスト,41……操作回数設定手段,42……トランザク
ション操作手段,43……操作回数集計手段,44……操作回
数判定手段,45……COMMIT操作手段。FIG. 1 is a block diagram showing the configuration of a transaction control system according to an embodiment of the present invention, FIG. 2 is a diagram showing a journal control table, FIG. 3 is a diagram showing a lock list table, and FIG. FIG. 5 is a block diagram showing the configuration of the control system, FIG. 5 is a diagram for explaining the structure of the magnetic disk device, FIG.
FIG. 7 is a flow chart for explaining the processing of the order receiving business, FIG. 8 is a flow chart for explaining the processing of the inventory allocation business, FIG. 9 is a view for explaining the registration status of the lock list, and FIG. And FIG. 11 is a diagram showing the contents of a journal file. 1 ... Test COMMIT means, 2 ... Journal output amount judgment means, 3 ... Lock list holding amount judgment means, 4 ... Update lock holding amount judgment means, 21 ... Journal control table, 22 ...
Journal file, 23 ... journal allocation information, 24 ... journal output information, 25 ... journal file capacity, 26 ... journal type, 27 ... journal output amount from stationary point, 31 ... job management list, 32 …… Lock list holding number, 33 …… Updated lock list holding number, 34…
… Number of update buffers, 35 …… Lock list pool table,
36: number of lock lists in a lock list pool, 37: lock list, 41: operation number setting means, 42: transaction operation means, 43 ... operation number totaling means, 44 ... operation number determination means, 45 ... … COMMIT operation means.
Claims (1)
ミット命令にて更新を有効にする電子計算機のトランザ
クション制御方式において、テストコミット手段(1)
と、静止点からのジャーナルの出力量(27)がジャーナ
ルファイル(22)の容量(25)に対し所定量に達してい
るときコミット命令の実行が必要であると判定するジャ
ーナル出力量判定手段(2)と、ロックリストの保持数
(32)がロックリストプールテーブル(35)におけるロ
ックリストプールのロックリスト数(36)に対し所定数
に達しているときコミック命令の実行が必要であると判
定するロックリスト保持量判定手段(3)と、更新ロッ
クリストの保持数(33)が更新バッファ数(34)に対し
所定数に達しているときコミット命令が必要であると判
定する更新ロックリスト保持量判定手段(4)とを有
し; テストコミット手段(1)はコミット命令の実行が必要
か否かの問い合わせを判定手段(2)ないし(4)に行
い、判定手段(2)ないし(4)はその判定出力により
テストコミット手段(1)に対しコミット命令の実行を
指示することを特徴とするトランザクション制御方式。In a transaction control system of an electronic computer in which an update is invalidated by a rollback instruction and an update is validated by a commit instruction, test commit means (1)
And a journal output amount determination unit (j) which determines that execution of a commit command is necessary when the output amount (27) of the journal from the quiesce point has reached a predetermined amount with respect to the capacity (25) of the journal file (22). 2) and when the number of lock list holdings (32) reaches a predetermined number with respect to the number of lock lists (36) of the lock list pool in the lock list pool table (35), it is determined that the execution of the comic instruction is necessary. A lock list holding amount judging means (3), and an update lock list holding judging that a commit instruction is required when the number of held update lock lists (33) reaches a predetermined number with respect to the number of update buffers (34). The test committing means (1) makes an inquiry to the determining means (2) to (4) as to whether the execution of the commit instruction is necessary, and the determining means (2) Stone (4) transaction control method, characterized by instructing the execution of the commit instruction to test commit unit (1) by the determination output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63036490A JP2610926B2 (en) | 1988-02-20 | 1988-02-20 | Transaction control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63036490A JP2610926B2 (en) | 1988-02-20 | 1988-02-20 | Transaction control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH01213738A JPH01213738A (en) | 1989-08-28 |
JP2610926B2 true JP2610926B2 (en) | 1997-05-14 |
Family
ID=12471264
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63036490A Expired - Lifetime JP2610926B2 (en) | 1988-02-20 | 1988-02-20 | Transaction control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2610926B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01202633A (en) * | 1988-02-08 | 1989-08-15 | Minolta Camera Co Ltd | Radiation thermometer |
JP2913591B2 (en) * | 1990-09-26 | 1999-06-28 | 株式会社日立製作所 | How to get an online journal |
US8549504B2 (en) * | 2010-09-25 | 2013-10-01 | Intel Corporation | Apparatus, method, and system for providing a decision mechanism for conditional commits in an atomic region |
-
1988
- 1988-02-20 JP JP63036490A patent/JP2610926B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH01213738A (en) | 1989-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8868577B2 (en) | Generic database manipulator | |
US7805423B1 (en) | System and method for quiescing select data modification operations against an object of a database during one or more structural operations | |
US5317731A (en) | Intelligent page store for concurrent and consistent access to a database by a transaction processor and a query processor | |
US6070170A (en) | Non-blocking drain method and apparatus used to reorganize data in a database | |
US6772177B2 (en) | System and method for parallelizing file archival and retrieval | |
US7243088B2 (en) | Database management system with efficient version control | |
US6732123B1 (en) | Database recovery to any point in time in an online environment utilizing disaster recovery technology | |
US7111001B2 (en) | Event driven transaction state management with single cache for persistent framework | |
US5687372A (en) | Customer information control system and method in a loosely coupled parallel processing environment | |
US7089564B2 (en) | High-performance memory queue | |
US5682507A (en) | Plurality of servers having identical customer information control procedure functions using temporary storage file of a predetermined server for centrally storing temporary data records | |
US20020004799A1 (en) | High availability database system using live/load database copies | |
US5790868A (en) | Customer information control system and method with transaction serialization control functions in a loosely coupled parallel processing environment | |
US6823348B2 (en) | File manager for storing several versions of a file | |
US7506002B2 (en) | Efficient deletion of archived data | |
US20110099347A1 (en) | Managing allocation and deallocation of storage for data objects | |
EP0747812A2 (en) | Customer information control system and method with API start and cancel transaction functions in a loosely coupled parallel processing environment | |
JPH10283228A (en) | System for compressing log stream of multi-system environment | |
JP2610926B2 (en) | Transaction control method | |
US6556994B1 (en) | Method and system for improving concurrency through early release of unnecessary locks | |
JPH01112444A (en) | Data access system | |
JPH0559463B2 (en) | ||
JPH03123946A (en) | Exclusive control method for data base | |
KR100630213B1 (en) | Log Priority Output Protocol Execution using Data Buffer Control Block in Data Storage System | |
JPH04324541A (en) | Network system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EXPY | Cancellation because of completion of term |