JPH0324643A - Page assigning system for data base - Google Patents

Page assigning system for data base

Info

Publication number
JPH0324643A
JPH0324643A JP1159310A JP15931089A JPH0324643A JP H0324643 A JPH0324643 A JP H0324643A JP 1159310 A JP1159310 A JP 1159310A JP 15931089 A JP15931089 A JP 15931089A JP H0324643 A JPH0324643 A JP H0324643A
Authority
JP
Japan
Prior art keywords
page
database
processing
transaction
management table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1159310A
Other languages
Japanese (ja)
Inventor
Yukiyoshi Shibata
柴田 幸良
Kenichi Kitamura
健一 北村
Ichiro Yokoyama
一郎 横山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP1159310A priority Critical patent/JPH0324643A/en
Publication of JPH0324643A publication Critical patent/JPH0324643A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve through-put by assigning pages for storing records, and when an allocated page is used for another transaction, assigning another page without waiting the end of the transaction. CONSTITUTION:When the existence of an assignable page can be checked in data base processing, the exclusive logic processing of the assignable page is checked. Then, the result of the trial is checked and whether the page is used for another transaction or not is decided. When the page is used, the search starting position of the page control table is corrected and researched. When the page is not being used by another transaction, the stage flag of the page in the page control table is updated to end the page assignment processing of the data base. Even when the page assignment requests to the data base are generated from plural transactions, processing can be continued without executing exclusive control queuing processing.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベースのページ割当て方式に関し,特
に、複数のトランザクションから共に参照および更新が
可能なデータベースを有するデータベース処理システム
において、トランザクション処理の同時実行性を高めた
データベースのページ割当て方式に関するものである. 〔従来の技術〕 1つのデータベースに対して、複数のトランザクション
から共に参照および更新の処理が可能であり,かつデー
タベースのページ単位に排他制御を行える排他制御機構
を有するデータベース処理システムにおいては,データ
ベースの一貫性を保証するため、あるトランザクション
で更新したぺ一ジは当該トランザクションの終了まで排
他ロックし、他のトランザクションからの参照および更
新を抑止する必要がある.ここでは、データベースの各
々のページを管理するためページ管理テーブルが設けら
れており,1つのトランザクションの処理において、レ
コードを格納するため任意のぺ−ジ割当て要求が発生す
ると、ページ管理テーブルを参照して、ページ割当ての
処理を行う.ページ割当ての処理を行う場合,ページの
2重割当てを抑止するため,排他制御用マクロ命令のE
NQマクロを発行して、他のトランザクションに対する
排他制御を行う(特開昭54−39543号公報参照)
.また、共用資源の排他制御をページ管理テーブルで行
う方式では、該当ページが他のトランザクションに割当
て中の場合にはWAITマクロを発行して,該当ページ
が使用可能になるまで待つ待ち処理を行う(特開昭60
−238939号公報参照).このため、トランザクシ
ョンの同時実行性が低下する. 〔発明が解決しようとする課題〕 ところで、上述のように、従来のデータベース処理シス
テムにおいては、各トランザクションにデータベースの
ページを割当てる場合に、排他制御による待ちが発生す
る点について考慮されていない.このため,オーバヘッ
ドが増大し,オンラインシステムのスループットが向上
しないという問題があった. 本発明は,上記問題点を解決するためになされたもので
ある. 本発明の目的は、複数のトランザクションから共に参照
および更新が可能なデータベースを有するデータベース
処理システムにおいて、トランザクション処理の同時実
行性を高めたデータベースのページ割当て方式を提供す
ることにある.本発明の他の目的は、複数のトランザク
ションから共に参照および更新の処理が可能なデータベ
ースを有するデータベース処理システムにおいて、デー
タベースの任意のページ割当てを行うとき、排他制御に
よる待ちを抑止することによって,オンラインシステム
のスループットを向上させることにある. 本発明の前記ならびにその他の目的と新規な特徴は,本
明細書の記述及び添付図面によって明らかになるであろ
う. 〔課題を解決するための手段〕 上記目的を達成するため、本発明においては、複数のト
ランザクションから共に参照および更新が可能なデータ
ベースを有するデータベース処理システムにおいて、デ
ータベースの各々のページに対応して使用状態を示す使
用状態情報を記憶するページ管理テーブルを設け、任意
のページを割当て可能な場合、ページ管理テーブルの使
用状態情報を参照して、レコードを格納するページの割
当てを行い,割当てられたページが他のトランザクショ
ンで使用中の場合には、他のトランザクションの終了を
待たずに別のページを割当てることを特徴とする. 〔作用〕 前記手段によれば、データベース処理システムにおいて
、データベースの各々のページに対応して使用状態を示
す使用状態情報を記憶するページ管理テーブルが設けら
れる.レコードを格納するデータベースのページの割当
てを行う場合、ページ管理テーブルの使用状態情報を参
照して、レコードを格納するページの割当てを行う.こ
のページの割当て処理において、割当てられたページが
他のトランザクションで使用中の場合,他のトランザク
ションの終了を待たずに別のページを割当てる. このように,データベースにレコードの追加要求があり
,オーバフロー等によって,・レコードの格納ページを
割当てるとき、排他制御を行わず、ページ管理テーブル
を参照し,ページ管理テーブルから割当てたページが他
のトランザクションにより使用中で排他ロックされてい
る場合には、当該ページの排他制御のための待ち処理に
入らず,別のページを割当て処理を行うようにする.す
なわち、レコードの格納ページを割当てるとき,ページ
管理テーブルには排他制御を行わず、ページ管理テーブ
ルから割当てられたページに対して排他ロックを試行し
、他のトランザクションによって排他ロックされている
場合には,当該ページをスキップした別のページを割当
てる. これにより、複数のトランザクションの処理で同時にデ
ータベースのページ割当てが発生しても、排他待ちを抑
止できるので、オンラインシステムのスループットを向
上させることができる.〔実施例〕 以下,本発明の一実施例を図面を用いて具体的に説明す
る. なお、実施例を説明するための全図において、同一要素
のものは同一符号を付け、その繰り返しの説明は省略す
る. 第1図は、本発明の一実施例にかかるデータベース処理
システムの要部の構成を示すブロック図である.第1図
において、1はデータベース処理システムのデータ処理
装置、2はシステム制御部,3は言語解析部,4はデー
タベース操作部である.また、5は端末装置、11はデ
ータベース,12はぺ−ジ管理テーブルである.ページ
管理テーブル12には、データベース11の各々のペー
ジに対応する管理情報が記録されている.図示しないが
、端末装置5は、データ処理装11l1とオンライン接
続されており、トランザクションにおけるデータベース
処理の要求をデータ処理装IIIに送出し,データ処理
装w1が処理を行う.このデータベース処理は,データ
ベース操作部4がページ管理テーブル12を参照して,
データベース11に対して行う.第2図は,本実施例に
おけるページ管理テープルの構威例を示す図である.第
2図に示すように、ページ管理テーブル12は、データ
ベース11の各ページに対応するページデータ12aと
、当該ページが使用中であるかどうかを示す使用中ビッ
ト12bおよび対応ページにレコードを追加する領域が
十分にあることを示す追加可能ビット12cの2ビット
の使用状態情報とが記録されているテーブルである.例
えば、該当ページが空きページの場合、使用中ビット1
2bおよび追加可能ビット12cともに“0”と表示さ
れる.レコードが格納されているページの場合には、使
用中ビット12bに“1”が表示され、また、レコード
を追加する領域が十分にあるときは,追加可能ビット1
2oに“0”が表示され,そうでないときは,追加可能
ビット12Cに“1”が表示される. 第3図は,データベース処理におけるページ割当て処理
を示すフローチャートである.第2図および第3図を参
照して、データベースのページ割当て処理の説明を行う
.トランザクション処理において,データベースにレコ
ードを格納するべ−ジ割当てが発生すると,まず、ステ
ップ21において,ページ管理テーブル12をサーチし
,追加可能ビット12Qの“O”ビットを検出して、対
応するデータベースのページを割当て可能なページとす
る処理を行う.次に、ステップ22において,割当て可
能なページがあったかチェックし、割当て可能なページ
がなければエラー処理に進む.また、ステップ22にお
いて,割当て可能なページがあることをチェックできた
場合、ステップ23に進み、割当て可能な当該ページに
対する排他ロック処理を試行する.次にステップ24に
おいて、排他ロックを試行した結果をチェックし,当該
べ−ジが他のトランザクションで使用されているか否を
判定する.当該ページが他のトランザクションで使用さ
れている場合,排他ロック処理は威功しないので、ステ
ップ26に進み、ページ管理テーブルのサーチ開始位置
を補正する処理を行い,再び、ステップ21からの処理
を行う.また,ステップ24の判定処理において、当該
ページが他のトランザクションで使用中でない場合,ス
テンプ25に進み、ページ管理テーブルの当該ページの
状態フラグ(使用状態情報)を更新して、データベース
のページ割当て処理を終了する.以上,本発明を実施例
にもとづき具体的に説明したが,本発明は、前記実施例
に限定されるものではなく,その要旨を逸脱しない範囲
において種々変更可能であることは言うまでもない.〔
発明の効果〕 以上、説明したように、本発明のページ割当て方式によ
れば,複数のトランザクションから同時にデータベース
のページ割当て要求が発生しても,排他制御の待ち処理
を行うことなく、処理を続行できるので、オンラインシ
ステムのスループットを向上させることができる.
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a database page allocation method, and in particular, to a database processing system having a database that can be referenced and updated by multiple transactions. This paper concerns a database page allocation method that improves execution performance. [Prior Art] In a database processing system that has an exclusive control mechanism that allows multiple transactions to simultaneously refer to and update one database and to perform exclusive control on a page-by-page basis of the database, In order to guarantee consistency, pages updated by a certain transaction must be exclusively locked until the end of that transaction to prevent them from being referenced or updated by other transactions. Here, a page management table is provided to manage each page of the database, and when a request to allocate an arbitrary page to store a record occurs in the processing of one transaction, the page management table is referred to. Then, perform page allocation processing. When performing page allocation processing, in order to prevent double allocation of pages, the exclusive control macro instruction E
Execute exclusive control over other transactions by issuing an NQ macro (see Japanese Patent Laid-Open No. 54-39543)
.. In addition, in a method that performs exclusive control of shared resources using a page management table, if the page in question is being allocated to another transaction, a WAIT macro is issued and wait processing is performed to wait until the page becomes available. Tokukai 1986
(Refer to Publication No.-238939). This reduces the concurrency of transactions. [Problems to be Solved by the Invention] As mentioned above, conventional database processing systems do not take into consideration the fact that waiting due to exclusive control occurs when allocating database pages to each transaction. Therefore, there was a problem that the overhead increased and the throughput of the online system did not improve. The present invention has been made to solve the above problems. An object of the present invention is to provide a database page allocation method that increases the concurrency of transaction processing in a database processing system that has a database that can be referenced and updated by multiple transactions. Another object of the present invention is to suppress waiting due to exclusive control when allocating arbitrary pages of the database in a database processing system having a database that can be referenced and updated by multiple transactions. The purpose is to improve system throughput. The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings. [Means for Solving the Problems] In order to achieve the above object, in the present invention, in a database processing system that has a database that can be referenced and updated by multiple transactions, a method is used corresponding to each page of the database. A page management table is provided to store usage status information indicating the status, and if any page can be allocated, refer to the usage status information in the page management table, allocate the page to store the record, and assign the allocated page. If a page is being used by another transaction, another page is allocated without waiting for the other transaction to finish. [Operation] According to the above means, in the database processing system, a page management table is provided that stores usage state information indicating the usage state corresponding to each page of the database. When allocating database pages to store records, refer to usage status information in the page management table and allocate pages to store records. In this page allocation process, if the allocated page is being used by another transaction, another page is allocated without waiting for the other transaction to finish. In this way, when there is a request to add a record to the database and there is an overflow, etc. - When allocating a record storage page, the page management table is referenced without exclusive control, and the page allocated from the page management table is used by other transactions. If the page is in use and has an exclusive lock, it does not enter the waiting process for exclusive control of the page, but instead performs the process of allocating another page. In other words, when allocating a record storage page, exclusive control is not applied to the page management table, but an exclusive lock is attempted on the page allocated from the page management table, and if the page is exclusively locked by another transaction, , allocate another page that skips that page. As a result, even if database pages are allocated simultaneously during the processing of multiple transactions, exclusive waits can be suppressed, and the throughput of the online system can be improved. [Example] Hereinafter, an example of the present invention will be explained in detail with reference to the drawings. In all the figures for explaining the embodiments, the same elements are given the same reference numerals, and repeated explanations will be omitted. FIG. 1 is a block diagram showing the configuration of main parts of a database processing system according to an embodiment of the present invention. In FIG. 1, 1 is a data processing device of a database processing system, 2 is a system control section, 3 is a language analysis section, and 4 is a database operation section. Further, 5 is a terminal device, 11 is a database, and 12 is a page management table. The page management table 12 records management information corresponding to each page of the database 11. Although not shown, the terminal device 5 is connected online to the data processing device 11l1, and sends a request for database processing in a transaction to the data processing device III, and the data processing device w1 performs the processing. This database processing is performed by the database operation unit 4 referring to the page management table 12.
Perform this on database 11. Figure 2 is a diagram showing an example of the structure of the page management table in this embodiment. As shown in FIG. 2, the page management table 12 includes page data 12a corresponding to each page of the database 11, an in-use bit 12b indicating whether the page is in use, and a record added to the corresponding page. This is a table in which 2-bit usage status information of the addable bit 12c indicating that there is sufficient area is recorded. For example, if the page in question is a free page, the in-use bit is 1.
2b and the addable bit 12c are both displayed as "0". If the page stores a record, “1” is displayed in the in-use bit 12b, and if there is enough space to add a record, the addable bit 1 is displayed.
"0" is displayed in 2o, and if not, "1" is displayed in the addable bit 12C. Figure 3 is a flowchart showing page allocation processing in database processing. The database page allocation process will be explained with reference to FIGS. 2 and 3. In transaction processing, when a page allocation for storing a record in the database occurs, first, in step 21, the page management table 12 is searched, the "O" bit of the addable bit 12Q is detected, and the corresponding database is allocated. Performs processing to make the page allocatable. Next, in step 22, a check is made to see if there is an allocatable page, and if there is no allocatable page, the process proceeds to error processing. Furthermore, if it is checked in step 22 that there is an allocatable page, the process proceeds to step 23 and an exclusive lock process is attempted for the allocatable page. Next, in step 24, the result of the exclusive lock attempt is checked to determine whether the page in question is being used by another transaction. If the page in question is being used by another transaction, exclusive lock processing will not be effective, so proceed to step 26, perform processing to correct the search start position of the page management table, and repeat the processing from step 21. .. In addition, in the determination process of step 24, if the page is not being used by another transaction, the process advances to step 25, where the status flag (usage status information) of the page in the page management table is updated, and the database page allocation process is performed. Terminate. Although the present invention has been specifically explained above based on examples, it goes without saying that the present invention is not limited to the above-mentioned examples and can be modified in various ways without departing from the gist thereof. [
[Effects of the Invention] As explained above, according to the page allocation method of the present invention, even if database page allocation requests occur simultaneously from multiple transactions, processing can be continued without waiting for exclusive control. Therefore, the throughput of the online system can be improved.

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

第1図は、本発明の一実施例にかかるデータベース処理
システムの要部の構成を示すブロック図,第2図は、本
実施例におけるページ管理テーブルの構成例を示す図、 第3図は,データベース処理におけるページ割当て処理
を示すフローチャートである.図中,1・・・データ処
理装置、2・・・システム制御部,3・・・言語解析部
、4・・・データベース操作部、5・・・端末装置,1
1・・・データベース、12・・・ページ管理テーブル
FIG. 1 is a block diagram showing the configuration of the main parts of a database processing system according to an embodiment of the present invention, FIG. 2 is a diagram showing an example of the configuration of a page management table in this embodiment, and FIG. It is a flowchart showing page allocation processing in database processing. In the figure, 1... data processing device, 2... system control unit, 3... language analysis unit, 4... database operation unit, 5... terminal device, 1
1...Database, 12...Page management table.

Claims (1)

【特許請求の範囲】[Claims] 1、複数のトランザクションから共に参照および更新が
可能なデータベースを有するデータベース処理システム
において、データベースの各々のページに対応して使用
状態を示す使用状態情報を記憶するページ管理テーブル
を設け、任意のページを割当て可能な場合に、ページ管
理テーブルの使用状態情報を参照して、レコードを格納
するページの割当てを行い、割当てられたページが他の
トランザクションで使用中の場合には、他のトランザク
ションの終了を待たずに別のページを割当てることを特
徴とするデータベースのページ割当て方式。
1. In a database processing system that has a database that can be referenced and updated by multiple transactions, a page management table is provided that stores usage state information indicating the usage state of each page of the database, and any page can be If allocation is possible, allocate a page to store the record by referring to the usage status information in the page management table, and if the allocated page is being used by another transaction, terminate the other transaction. A database page allocation method characterized by allocating another page without waiting.
JP1159310A 1989-06-20 1989-06-20 Page assigning system for data base Pending JPH0324643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1159310A JPH0324643A (en) 1989-06-20 1989-06-20 Page assigning system for data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1159310A JPH0324643A (en) 1989-06-20 1989-06-20 Page assigning system for data base

Publications (1)

Publication Number Publication Date
JPH0324643A true JPH0324643A (en) 1991-02-01

Family

ID=15691007

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1159310A Pending JPH0324643A (en) 1989-06-20 1989-06-20 Page assigning system for data base

Country Status (1)

Country Link
JP (1) JPH0324643A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0619770A (en) * 1992-06-29 1994-01-28 Pfu Ltd Data update processing method for common file
JP2006251990A (en) * 2005-03-09 2006-09-21 Fujitsu Ltd Database reorganization program and database reorganization method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0619770A (en) * 1992-06-29 1994-01-28 Pfu Ltd Data update processing method for common file
JP2006251990A (en) * 2005-03-09 2006-09-21 Fujitsu Ltd Database reorganization program and database reorganization method

Similar Documents

Publication Publication Date Title
US7653791B2 (en) Realtime-safe read copy update with per-processor read/write locks
JP3733695B2 (en) Database management system
EP0389242B1 (en) Data base processing system using multiprocessor system
JPH01251258A (en) Shared area managing system in network system
JPH10301834A (en) Management method for shared memory
JP3113841B2 (en) Parallel transaction processing system
US6502122B1 (en) Method and apparatus for executing transaction programs in parallel
JPH05128072A (en) Inter-system exclusive control system
JPH07262071A (en) Data base system and load distribution control method
JPH0324643A (en) Page assigning system for data base
US5918243A (en) Computer mechanism for reducing DASD arm contention during parallel processing
US5062046A (en) Multiple processor system having a correspondence table for transferring processing control between instruction processors
US5797138A (en) Buffer management method using buffer locking mechanism in storage system for supporting multi-user environment
JPH02122365A (en) Processor assignment system
JP3511935B2 (en) File writing method in multi-thread program
JPH09265405A (en) Exclusive access method for shared resource
JPS61134844A (en) Share space control system for storage device
KR100312910B1 (en) Method for expanding transaction isolation phase in database management system
JPH04139545A (en) Data base updating processing system
JPH03148733A (en) Shared memory area allocating and processing system
JPH0492930A (en) Exclusive control processor
KR100486854B1 (en) System and Mothod Messaging order based global concurrency control in multidatabase systems
JPS63113637A (en) Exclusive processing system for hash table entry
JPH02171952A (en) Dispatching system for multiprocessor
JPH0973435A (en) Test system for closely coupled multiprocessor system