JPS63273940A - Control system for resource management - Google Patents

Control system for resource management

Info

Publication number
JPS63273940A
JPS63273940A JP62109003A JP10900387A JPS63273940A JP S63273940 A JPS63273940 A JP S63273940A JP 62109003 A JP62109003 A JP 62109003A JP 10900387 A JP10900387 A JP 10900387A JP S63273940 A JPS63273940 A JP S63273940A
Authority
JP
Japan
Prior art keywords
database
calculation
resource
lock
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP62109003A
Other languages
Japanese (ja)
Other versions
JP2523628B2 (en
Inventor
Takaaki Seki
関 高明
Hiroyuki Kitajima
北嶋 弘行
Akira Yamamoto
彰 山本
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 Ltd
Original Assignee
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 Ltd filed Critical Hitachi Ltd
Priority to JP62109003A priority Critical patent/JP2523628B2/en
Publication of JPS63273940A publication Critical patent/JPS63273940A/en
Application granted granted Critical
Publication of JP2523628B2 publication Critical patent/JP2523628B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To shorten the processing time for lock release by applying an arithmetic process to the locked resources at the host side via a data base machine and then informing the resources satisfying no arithmetic condition to the host side. CONSTITUTION:A data base managing system 21 of a host computer locks the resources storing the data to undergo the data base arithmetic and transfers the data base arithmetic requests as well as those resources to a data base machine 3. The machine 3 uses a resource ID for access of an arithmetic object and performs the data base arithmetic for the corresponding data stored in an external memory 4 at every resource to undergo an arithmetic operation for check whether some data satisfy the arithmetic conditions or not. If no data satisfies the arithmetic conditions, the resource ID is stored as the resources whose lock is released. When the processing is through with a group of resources, the resource ID to be locked is transferred to the host side. Thus the lock release processing time is shortened.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はリソースの排他制御を行う方式に関する。[Detailed description of the invention] [Industrial application field] The present invention relates to a method for performing exclusive control of resources.

〔従来の技術〕[Conventional technology]

従来方式は、特願昭50−182626号に記載のよう
に、データベース演算処理要求に応じて、データベース
マシンがデータ格納媒体から主記憶装置へ、条件に合致
したレコードを含むブロックと条件に合致したレコード
の存在場所(アドレス)を示す情報を送ることが記載さ
れている。しかし、データベース演算処理要求時、リソ
ースに対するロック制御をデータベース・マシンを使っ
て効率良く行うことについては、配慮されていなかった
。ここで、ロックとは、リソースを利用していることを
表明し、複数のデータベース演算処理単位によるリソー
スの専用、共用をする手段である。
In the conventional method, as described in Japanese Patent Application No. 50-182626, in response to a request for database arithmetic processing, a database machine transfers blocks containing records that meet the conditions and blocks that match the conditions from the data storage medium to the main storage device. It is described that information indicating the location (address) of the record is sent. However, no consideration has been given to efficiently performing lock control on resources using a database machine when a database calculation process is requested. Here, a lock is a means of declaring that a resource is being used and allowing a plurality of database processing units to dedicate or share the resource.

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

上記従来技術は、データベース・マシンを用いたデータ
ベース演算処理において、リソースに対するロック解除
処理をデータベース・マシンから通知を受けて効率良く
行う方式については配慮されておらず、ホスト側で、演
算対象のリソース内のデータが演算されたか、されなか
ったかを判断しなければならないため、リソースのロッ
ク解除処理に時間がかかるという問題があった。
The above conventional technology does not take into consideration a method for efficiently performing lock release processing for resources upon receiving notification from the database machine in database calculation processing using a database machine. There was a problem in that it took a long time to unlock the resource because it had to be determined whether the data in it had been calculated or not.

本発明の目的は、ホスト側でリソースのロック設定をし
たものについて、データベース・マシンがデータベース
演算処理を施した後、リソース(群)の中から演算の条
件を満足しなかったリソース(群)をホスト側へ通知さ
せることにより。
An object of the present invention is to select a resource (group) from among the resources (group) that does not satisfy the conditions for the operation after the database machine performs database calculation processing on a resource that has been locked on the host side. By notifying the host side.

ホスト側でのリソースのロック解除と処理時間の低減を
図ることにある。
The purpose is to unlock resources and reduce processing time on the host side.

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

上記目的は、データベースマシンが、ホスト計算機から
、データベース演算要求、演算対象のロック済リソース
情報(複数)を受けとり、データベース演算時、演算の
条件を満足しなかったリソース情報(ホスト側でロック
しているリソースのID)を集計して行き、それをデー
タベース演算処理終了後、ホスト側の計算機へ送ること
によす達成される。
The above purpose is for the database machine to receive a database operation request and locked resource information (multiple items) to be calculated from the host computer, and when performing database calculations, resource information that does not satisfy the operation conditions (locked on the host side). This is achieved by summing up the IDs of the resources in use, and sending them to the host computer after the database arithmetic processing is completed.

〔作用〕[Effect]

ホスト計算機上でのデータベース管理システムは、デー
タベース演算対象となるデータを格納したリソースに対
し、ロックを施し、それらのリソースとデータベース演
算要求をデータベースマシンへ転送する。データベース
マシンはこのリソースidを演算対象のアクセスのため
に使用する。
A database management system on a host computer locks resources that store data to be subjected to database calculations, and transfers those resources and database calculation requests to the database machine. The database machine uses this resource ID to access the calculation target.

データベースマシンは、データベース演算時、演算対象
となったリソース毎に、演算の条件を満たすデータがあ
るかチェックし、演算の条件を満たすデータがなければ
、ロック解除のリソースとして、リソースIDを記憶し
て行く、1つのデータベース演算処理要求のリソース群
について処理が終了すれば、ロック解除対象となるリソ
ースIDをホスト側へ転送する。ホスト計算機上でのデ
ータベース管理システムは、データベース・マシンから
転送されたロック解除のリソースIDを元に、リソース
のロック解除を行う(ロック解除しなかったリソースは
、当該データベース演算要求のトランザクションが終了
してからデータベース管理システムがロック解除する)
、これにより、リソースのロック解除対象のリソースI
Dをデータベース・マシンから通知され、ロック解除を
行うため、ホスト計算機上でロック解除の対象となった
リソースの選出チェックをする必要がない。
During database calculation, the database machine checks whether there is data that satisfies the calculation conditions for each resource that is the target of the calculation, and if there is no data that satisfies the calculation conditions, it stores the resource ID as a resource to be unlocked. When the processing for the resource group of one database calculation processing request is completed, the resource ID to be unlocked is transferred to the host side. The database management system on the host computer unlocks the resources based on the unlocked resource ID transferred from the database machine. (after which the database management system unlocks it)
, this allows the resource I to be unlocked.
D is notified from the database machine and the lock is released, so there is no need to check the selection of the resource to be unlocked on the host computer.

〔実施例〕〔Example〕

以下1本発明の−、実施例を参照して詳細に説明する。 EMBODIMENT OF THE INVENTION Below, the present invention will be described in detail with reference to embodiments.

実施例の構成を第1図に示す、1は中央処理装置(CP
U)、2は主記憶、3はデータベースマシン、4は外部
記憶装置である。主記憶2内の21はデータベース管理
システムで、データベースマシン3を用いて、データベ
ース演算を行う。
The configuration of the embodiment is shown in FIG. 1, where 1 is a central processing unit (CP).
U), 2 is a main memory, 3 is a database machine, and 4 is an external storage device. Reference numeral 21 in the main memory 2 is a database management system, which uses the database machine 3 to perform database calculations.

データベース管理システム21では、データベース演算
の制御を行う、データベース演算管理部211、データ
ベース演算の対象となるデータの論理的格納エリアをリ
ソース(ここでは論理ブロックであるページを1つのリ
ソースとする)として排他制御を行うロック管理部21
2、データベースマシン3から転送される演算結果及び
、ロック解除対象のリソースid(ページ番号)の入力
を制御するバッファ管理部213、ロックを施したリソ
ースを管理するロック管理ブロック214゜データベー
ス・マシン3から演算結果及びロック解除対象となるリ
ソースIDを受けとるバッファ部215から成る。ロッ
ク管理ブロック214は。
In the database management system 21, a database calculation management unit 211, which controls database calculations, excludes the logical storage area of data that is the target of database calculations as a resource (here, a page, which is a logical block, is one resource). Lock management unit 21 that performs control
2. Buffer management unit 213 that controls input of calculation results transferred from database machine 3 and resource ID (page number) to be unlocked; lock management block 214 that manages locked resources; database machine 3; The buffer section 215 receives the calculation result and the resource ID to be unlocked. The lock management block 214 is.

第2図(a)に示すようにロック対象となるテーブルの
IDページ番号、ロックモード(以下の文で説明する)
、ロックしている演算処理要求の数を示すカウント部、
ロック待ちとなったデータベース演算処理要求のID(
?II数)を格納する楢造となっており1本ブロックは
複数存在する。
As shown in Figure 2 (a), the ID page number of the table to be locked and the lock mode (explained in the following text)
, a count section that indicates the number of locked arithmetic processing requests;
ID of the database operation processing request that was waiting for the lock (
? It has a structure that stores the number (II number), and there are multiple blocks in one block.

一方、データベースマシン3内は、CPUIからのデー
タベース演算要求を受付ける演算要求受付部31、受付
けたデータベース演算要求情報を格納するため、複数ブ
ロックからなる演算要求情報格納ブロック35、ホスト
計算機側からデータベース演算要求にもとづいて、演算
要求情報格納ブロック内のデータベース演算要求情報を
取り出し、外部記憶装置4上にある該当データのデータ
ベース演算を行うデータベース演算部32、外部記憶装
置4上にある演算対象のレコード(ページに対応)を入
力し、データ格納バッファ部37へ格納するアクセス処
理制御部33.演算の対象としてアクセスしたページの
うち演算の条件を満足するデータを含まなかったページ
番号を格納するリソースID管理ブロック36、データ
ベース演算結果格納バラフッ部37内にあるデータベー
ス演算結果及び、リソ−スミd管理ブロック内にあるペ
ージ番号(ロック解除対象となる)を主記憶2に転送す
るデータ転送制御部34からなる。データベース演算結
果格納バッファ部37は、第3図に示すように、外部記
憶装置からのページを格納するページ番号格納用バッフ
ァ371(複数)演算結果格納用バッファ372(複数
)からなり、各々のバッファには、どの演算処理要求に
該当するかを示す演算処理要求IDの格納エリアを持つ
On the other hand, inside the database machine 3, there is a calculation request reception unit 31 that receives database calculation requests from the CPUI, a calculation request information storage block 35 consisting of a plurality of blocks for storing received database calculation request information, and a calculation request information storage block 35 that receives database calculation requests from the host computer side. Based on the request, the database calculation unit 32 retrieves the database calculation request information in the calculation request information storage block and performs database calculations on the corresponding data on the external storage device 4, and the record to be calculated on the external storage device 4 ( access processing control unit 33 .corresponding to the page) and stores it in the data storage buffer unit 37 . A resource ID management block 36 that stores page numbers that do not contain data that satisfies the calculation conditions among pages accessed as calculation targets, database calculation results in the database calculation result storage balance section 37, and resource ID It consists of a data transfer control unit 34 that transfers the page number (to be unlocked) in the management block to the main memory 2. As shown in FIG. 3, the database computation result storage buffer section 37 consists of page number storage buffers 371 (plurality) and computation result storage buffers 372 (plurality) for storing pages from an external storage device. has a storage area for an arithmetic processing request ID indicating which arithmetic processing request it corresponds to.

外部記憶装置4上のデータベース41には、テーブルが
格納されており、テーブルは、複数のカラムからなるも
のをローと呼び、このローの集合からなる。このテーブ
ルは、ページと呼ばれる論理的アクセス単位からなり、
ローは、このページ内に格納される。
A database 41 on the external storage device 4 stores a table, and a table is made up of a set of rows, each consisting of a plurality of columns called rows. This table consists of logical access units called pages.
Rows are stored within this page.

次に、上述のごとき構成における一実施例をデータベー
ス管理システム21のロック管理部212の処理を中心
に説明する。ここでのロック管理部212は、データベ
ース演算処理要求をデータベース・マシン3へ発行する
前に、演算の対象となったリソースであるページ群(こ
こではページのみとする)を他のトランザクション(デ
ータベースをアクセスし、演算処理を行う論理的な実行
単位)がアクセスすることにより、データの一賞性を失
うことを防ぐための排他制御を行っている。
Next, an embodiment of the above-described configuration will be described, focusing on the processing of the lock management section 212 of the database management system 21. Before issuing a database operation processing request to the database machine 3, the lock management unit 212 transfers a group of pages (in this case, only pages) that are the resources targeted for operation to another transaction (database machine 3). Exclusive control is performed to prevent data from losing its uniqueness due to access by a logical execution unit that performs arithmetic processing.

先ず、データベース管理システム21内で、あるテーブ
ルについてデータベース演算を施せという処理要求が発
生する。データベース演算管理部211は、データベー
ス演算処理要求をデータベースマシン3へ送る前に、ロ
ック管理部212へ制御を渡す、ロック管理部212は
、当該トランザクションがアクセスするテーブルにおい
て、まず、データベース・マシン3に演算を行わせるペ
ージ群のページ番号とテーブルIDおよびロックモード
(他のデータベース演算処理要求と共用してページアク
セス可能か、否かを示す1例えば。
First, within the database management system 21, a processing request is generated to perform a database operation on a certain table. Before sending the database calculation processing request to the database machine 3, the database calculation management unit 211 passes control to the lock management unit 212. For example, the page number and table ID of the page group on which the calculation is to be performed, and the lock mode (one that indicates whether or not the page can be accessed in common with other database calculation processing requests.

これらのモードを示すため、共用アクセス可は、“1”
、共用アクセス不可は“2”をセットする)。
To indicate these modes, shared access is “1”
, set “2” to prohibit shared access).

ロック要求元の演算処理要求IDをデータベース演算管
理部211から受けとり、以下の状況に応じて、ページ
単位に全てのページのロック処理を行う。
The arithmetic processing request ID of the lock request source is received from the database arithmetic management unit 211, and all pages are locked on a page-by-page basis according to the following situations.

1)同一テーブルID、ページ番号を格納したロック管
理ブロック214がない場合、空きのロック管理ブロッ
ク214を確保し、そこヘロツクしたいテーブル10.
ページ番号、ロックモードをセットし、同ロック管理ブ
ロック214のカウント部の値を1にする。これにより
、当該ページはロックしたことになる。
1) If there is no lock management block 214 that stores the same table ID and page number, secure a free lock management block 214 and select the table 10. to which you want to lock.
The page number and lock mode are set, and the value of the count section of the lock management block 214 is set to 1. This means that the page is locked.

2)同一テーブルID、ページ番号を格納したロック管
理ブロック214が既に存在する場合において、当ロッ
ク管理ブロック214にセットされているページが共用
アクセス可(ロックモード=“1”)で、当ロック要求
元のロックモードも共用アクセス可、かつ、ロック要求
待ちのデータベース演算要求がなければ(ロック管理ブ
ロック214内にロック要求待ち演算処理要求IDがセ
ットされていない)、当ロック管理ブロック214のカ
ウント部に1加算する。これにより、当該ページもロッ
クしたことになる。
2) If a lock management block 214 storing the same table ID and page number already exists, the page set in this lock management block 214 is shared accessible (lock mode = "1"), and this lock request If the original lock mode is also shared access and there is no database calculation request waiting for a lock request (the lock request waiting calculation processing request ID is not set in the lock management block 214), the count section of the lock management block 214 Add 1 to This means that the page is also locked.

上記に示す条件以外の場合は、当ページについて、該デ
ータベース演算要求をロック待ちにする。
In cases other than the conditions shown above, the database calculation request for this page is placed in a lock wait state.

このため、ロック要求のページ番号を格納したロック管
理ブロック214内にロック要求待ちの演算処理要求I
Dをセットする6以上のロック処理が、当データベース
演算要求の全ページについて完了し、ロック待ちが1つ
もなければ、ロック完了をデータベース演算管理211
へ報告する。もし、1つのページでもロック待ちが発生
するとロック完了になるまで、データベース演算管理部
211ヘリターンしない、データベース演算管理部21
1はページ番号等のリソース情報をロック管理部212
へ渡し、前述のロック処理の実行により、データベース
マシンへのデータベース演算要求が許可されれば、デー
タベースマシン3へ、データベース演算要求を発行する
Therefore, the calculation processing request I that is waiting for the lock request is stored in the lock management block 214 that stores the page number of the lock request.
If 6 or more lock processes that set D have been completed for all pages of this database calculation request and there is no lock waiting, the database calculation management 211 indicates that the lock has been completed.
Report to. If a lock wait occurs for even one page, the database calculation management unit 21 does not return to the database calculation management unit 211 until the lock is completed.
1 locks resource information such as page numbers to the lock management unit 212
If the database calculation request to the database machine is permitted by executing the above-described locking process, the database calculation request is issued to the database machine 3.

データベースマシン3では、以下の処理を行う。The database machine 3 performs the following processing.

演算要求受付部31が、演算の条件、演算対象となるリ
ソース情報(テーブル)IDページ番号(複数)のみ)
と当該リソースが存在する外部記憶袋[14上の格納ア
ドレス等をデータベース管理システム21側から受けと
り、空きの演算要求情報格納ブロック35に格納する。
The calculation request receiving unit 31 receives only the calculation conditions, the resource information (table) ID page number (multiple) to be calculated)
and the storage address on the external storage bag [14 where the resource exists are received from the database management system 21 side, and stored in the empty computation request information storage block 35.

データベース演算部32は、演算要求情報格納ブロック
35から。
The database calculation unit 32 receives data from the calculation request information storage block 35.

演算対象となるリソースの外部記憶袋ff!4上の格納
アドレスを取り出し、アクセス処理制御部33へ渡して
、当該テーブルのページを入力するよう要求する。アク
セス処理制御部33は、データベース演算部32から受
取った外部記憶装置14上の格納アドレスをもとに、外
部記憶装置14上から、当演算対象となるページを取り
出し、37のデータ格納バッファ内の空きのページ格納
用バッファ371へ格納する。この後、データベース演
算部32ページ番号とページを格納したバッファのバッ
ファIDを渡し、ページ入力の完了を報告する。
External storage bag for the resource to be calculated ff! 4, and passes it to the access processing control unit 33 to request input of the page of the table. Based on the storage address on the external storage device 14 received from the database calculation section 32, the access processing control section 33 retrieves the page to be subjected to the calculation from the external storage device 14, and stores the page in the data storage buffer 37. It is stored in the empty page storage buffer 371. Thereafter, the page number and the buffer ID of the buffer storing the page are passed to the database calculation unit 32, and the completion of page input is reported.

データベース演算部32は、アクセス処理制御部33か
らのページ番号、バッファidをもとに、当該データベ
ース演算の条件を演算要求情報格納ブロック35から取
り出し、データ格納バラフッ部37内の該当バッファI
Dのページ格納用バッファ371内にあるページについ
て、演算の条件を満足するデータが存在するか判定する
0条件を満足するデータがあれば、そのデータについて
演算を施し、データ格納バッファ部37の当該演算処理
要求ID対応の演算結果格納用バッファ372に格納す
る。ここで、格納可能な当演算処理要求ID対応の演算
結果格納用バッファ372がなければ、空きの演算結果
格納用バッファ372を確保し、そこへ演算結果を格納
する。もし、条件を満足するデニタが当該ページ内にな
ければ、当該ページ番号とテーブルIDを当該データベ
ース演算処理要求ID対応のリソースID管理ブロック
36に格納する。もし、ページ番号の格納可能なリソー
スID管理ブロックがなければ、空きのものを確保して
、ページ番号をセットする。このとき、ブロック識別の
ため、当該演算処理要求IDを確保したリソースID管
理ブロック36に格納する0以上に述べた。外部記憶袋
[4上の演算対象のページを入力し、ページ内データの
演算処理を、当該演算要求情報格納ブロック35内にあ
る全リソース(全ページ)分行った後、データ転送制御
部34に制御を渡し、データ格納バラフッ部37内の該
当演算結果格納用バッファ372内のデータ及び、該当
演算処理要求id対応の全リソースID管理ブロック内
のページ番号、テーブルIDをホスト計算機側のデータ
ベース管理システム21のバッファ部215へ転送する
。転送終了後、データベース演算部32は、当該演算処
理要求ID用の演算要求情報格納ブロック35.リソー
スID管理ブロック36群、ほかに、同演算処理要求i
d対応のデータ格納バッファ部37のページ番号格納用
バッファ371.演算結果格納用バッファ372を空き
にする。この後、データベース演算部32は、演算要求
情報格納ブロック35を調べ、他の演算処理要求情報が
あれば、その処理に移る。
The database calculation unit 32 retrieves the conditions for the database calculation from the calculation request information storage block 35 based on the page number and buffer ID from the access processing control unit 33, and stores the conditions in the corresponding buffer I in the data storage balance unit 37.
For the page in the page storage buffer 371 of D, it is determined whether there is data that satisfies the calculation conditions.If there is data that satisfies the 0 condition, the calculation is performed on that data, and the corresponding data in the data storage buffer section 37 is The result is stored in the calculation result storage buffer 372 corresponding to the calculation processing request ID. Here, if there is no computation result storage buffer 372 corresponding to the computation processing request ID that can be stored, an empty computation result storage buffer 372 is secured and the computation result is stored therein. If there is no monitor that satisfies the conditions in the page, the page number and table ID are stored in the resource ID management block 36 corresponding to the database operation request ID. If there is no resource ID management block capable of storing a page number, a free one is secured and a page number is set. At this time, for block identification, the arithmetic processing request ID is stored in the reserved resource ID management block 36 as described above. After inputting the page to be calculated on the external storage bag [4] and performing calculation processing on the data in the page for all resources (all pages) in the calculation request information storage block 35, the data transfer control unit 34 The control is passed and the data in the corresponding calculation result storage buffer 372 in the data storage buffer section 37, the page numbers and table IDs in all resource ID management blocks corresponding to the corresponding calculation processing request ID are transferred to the database management system on the host computer side. The data is transferred to the buffer section 215 of No. 21. After the transfer is completed, the database calculation unit 32 stores the calculation request information storage block 35. for the calculation processing request ID. In addition to the resource ID management block 36 group, the same calculation processing request i
Page number storage buffer 371 of the data storage buffer unit 37 corresponding to d. The calculation result storage buffer 372 is made empty. Thereafter, the database calculation unit 32 checks the calculation request information storage block 35, and if there is any other calculation processing request information, it moves on to that process.

一方、データベース管理システム21のバッファ管理部
は、データベースマシンから、当該データベース演算処
理要求用バッファに、演算結果および、演算対象となら
なかったページ番号(複数)およびテーブルIDを受信
すると、データベース演算管理部211へ通知する。デ
ータベース演算管理部211は、当該データベース演算
用にロックした当該テーブルのページをロック解除する
ため、当データベース演算対応のページ番号(複数)と
テーブルIDをバッファ部215から取得し。
On the other hand, when the buffer management unit of the database management system 21 receives the calculation results, page numbers (plurality) and table IDs that were not subject to calculation from the database machine into the database calculation processing request buffer, the buffer management unit of the database management system 21 manages the database calculation processing. Department 211 is notified. The database calculation management unit 211 acquires page numbers (plurality) and table ID corresponding to the database calculation from the buffer unit 215 in order to unlock the page of the table locked for the database calculation.

それをロック管理部212へ渡すことにより、ロック解
除を要求する。ロック管理部212は、渡されたテーブ
ルIDと、ページ番号(複数)を取り込み、同一情報を
持つロック管理ブロック214を求め、ロックの解除処
理を全ページについて行う、ロックの解除は、1ペ一ジ
単位に行い以下の条件に対応して個々の処理を行う。
By passing it to the lock management unit 212, a lock release is requested. The lock management unit 212 takes in the passed table ID and page number(s), finds a lock management block 214 having the same information, and performs lock release processing on all pages. Each process is performed in accordance with the following conditions.

l)ロック解除対象となっているデータベース演算要求
のみが、当ページのロックをかけている場合(ロック管
理ブロック214のカウント部=1)で、当ページに対
してのロック待ちの演算処理要求がなければ(ロック管
理ブロック214内にロック待ち演算処理要求idが1
つもセットされていない)当該ロック管理ブロック21
4を空きにする。これにより、当ページのロックが解除
されたことになる。
l) If only the database calculation request that is the target of unlocking is locking this page (the count part of the lock management block 214 = 1), and the calculation processing request that is waiting for the lock for this page is If not (the lock waiting calculation request ID is 1 in the lock management block 214)
lock management block 21 (not always set)
Leave 4 blank. This means that this page is unlocked.

2)複数の演算処理要求が当ページにロックをかけてい
る(当該ロック管理ブロック214のカウント部の値が
2以上)場合、カウント部から1差し引く、これにより
、当ページのロックが解除されたことになる。
2) If multiple arithmetic processing requests have locked this page (the value in the count field of the lock management block 214 is 2 or more), subtract 1 from the count field, and this unlocks the page. It turns out.

3)ロック解除対象となっているデータベース演算要求
のみが当ページのロックをかけていて(カウント部の値
が1)、当ページのロック待ちデータベース演算要求が
あれば、(ロック管理ブロック214内にロック待ち演
算処理要求idがセットされている)、最初にロック待
ちになったデータベース演算要求のロック待ちを解除す
る(ロック管理ブロック内の該当ロック待ち演算処理要
求idをクリアする)。
3) If only the database operation request to be unlocked has locked this page (the value of the count field is 1), and there is a database operation request waiting for this page to be locked, (in the lock management block 214) (the lock-waiting arithmetic processing request ID is set), the database arithmetic processing request that first became lock-waiting is released from lock-waiting (the corresponding lock-waiting arithmetic processing request ID in the lock management block is cleared).

以上のロック解除処理により、ロック待ちのページがな
くなったデータベース演算要求があればデータベース演
算管理部211へ、ロック解除終了の報告とともに、ロ
ック待ちの解除されたデータベース演算処理要求をデー
タベースマシンへ発行することの許可も報告する。
As a result of the above lock release processing, if there is a database calculation request for which there are no more pages waiting to be locked, the database calculation management unit 211 is notified of the completion of lock release, and a database calculation request for which the lock wait has been released is issued to the database machine. Also report permission.

以上、1つのデータベース演算処理要求に対する演算対
象のテーブルのページ群のロック設定、解除をデータベ
ースマシンを用いて行う実施例について述べた。この実
施例については、ロックの設定、解除対象リソースをペ
ージとして述べたが、他に、テーブル、ページ内の10
−についても、上記と同様の手順で行える。
An embodiment has been described above in which a database machine is used to set and release a lock on a page group of a table to be computed in response to one database computation processing request. In this embodiment, the lock setting and release target resources are described as pages, but in addition, there are tables and 10
- can also be performed using the same procedure as above.

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

本発明によれば、ロックしたリソースの解除時。 According to the present invention, when a locked resource is released.

データベースマシンから、ロック解除対象となったリソ
ース情報を受取り、そのリソース情報で示すリソースの
ロック解除をホスト側のデータベース管理システムで行
えばよい、このため、ホスト側でロック解除対象のリソ
ースを検出する必要がなくなるため、ロック解除処理の
効率化及び、CPU使用時間の低減ができるという効果
がある。
All you need to do is to receive the resource information to be unlocked from the database machine and use the database management system on the host side to unlock the resource indicated by that resource information.For this reason, the host side detects the resource to be unlocked. Since this is no longer necessary, the lock release process can be made more efficient and the CPU usage time can be reduced.

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

第1図は1本発明の一実施例の概略構成を示す図である
。第2図は、ロック管理ブロック214゜第3図はデー
タ格納バッファ部37のそれぞれ詳細説明図である。 3・・・データベースマシン、21・・・データベース
管理システム、32・・・データベース演算部、36・
・・リソ−スミd管理ブロック、212・・・ロック管
理部、214・・・ロック管理ブロック。
FIG. 1 is a diagram showing a schematic configuration of an embodiment of the present invention. FIG. 2 is a detailed explanatory diagram of the lock management block 214 and FIG. 3 is a detailed explanatory diagram of the data storage buffer unit 37. 3... Database machine, 21... Database management system, 32... Database calculation unit, 36.
. . . Resource management block, 212 . . . Lock management section, 214 . . . Lock management block.

Claims (1)

【特許請求の範囲】 1、データベースマシンを接続した計算機上で、データ
ベース管理システムが稼動するシステム構成において、
データベース演算対象となるリソース(データを格納し
た論理的、もしくは物理的格納エリア及び論理的意味を
持つデータ群)をホスト側計算機上のデータベース管理
システムが、あらかじめロックし、当該リソース内のデ
ータについて、データベース・マシンが演算を施した後
、演算の条件を満たすデータがなかつたリソースについ
ては、ロックの解除をホスト側へ通知することを特徴と
するリソース管理制御方式。 (ロックとは、リソースを利用していることを表明し、
複数のデータベース演算処理単位によるリソースの専有
、共用をする手段である)。
[Claims] 1. In a system configuration in which a database management system runs on a computer connected to a database machine,
The database management system on the host computer locks the resources subject to database calculations (logical or physical storage areas that store data and groups of data with logical meaning) in advance, and A resource management control method characterized in that after a database machine performs an operation, a host side is notified of lock release for resources for which there is no data that satisfies the conditions of the operation. (A lock indicates that a resource is being used,
(It is a means for exclusive use and sharing of resources by multiple database processing units).
JP62109003A 1987-05-06 1987-05-06 Resource management control method Expired - Lifetime JP2523628B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62109003A JP2523628B2 (en) 1987-05-06 1987-05-06 Resource management control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62109003A JP2523628B2 (en) 1987-05-06 1987-05-06 Resource management control method

Publications (2)

Publication Number Publication Date
JPS63273940A true JPS63273940A (en) 1988-11-11
JP2523628B2 JP2523628B2 (en) 1996-08-14

Family

ID=14499103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62109003A Expired - Lifetime JP2523628B2 (en) 1987-05-06 1987-05-06 Resource management control method

Country Status (1)

Country Link
JP (1) JP2523628B2 (en)

Also Published As

Publication number Publication date
JP2523628B2 (en) 1996-08-14

Similar Documents

Publication Publication Date Title
US4733352A (en) Lock control for a shared storage in a data processing system
US7636816B2 (en) Global address space management
US8001333B2 (en) Memory management in a shared memory system
US6813623B2 (en) Method and apparatus for chunk based transaction logging with asynchronous input/output for a database management system
US5721870A (en) Lock control for a shared main storage data processing system
EP0428006B1 (en) Multilevel locking system and method
US20100115195A1 (en) Hardware memory locks
JP4746838B2 (en) Partitioning database ownership between different database servers to control access to the database
US6189007B1 (en) Method and apparatus for conducting a high performance locking facility in a loosely coupled environment
US6076126A (en) Software locking mechanism for locking shared resources in a data processing system
US20080082622A1 (en) Communication in a cluster system
CN112053149A (en) Method and device for preventing repeated payment, electronic equipment and readable storage medium
JPH05128072A (en) Inter-system exclusive control system
US6529933B1 (en) Method and apparatus for locking and unlocking a semaphore
JPS63273940A (en) Control system for resource management
JPH0277868A (en) Inter-system data base sharing method
JP2804478B2 (en) Task control system and online transaction system
JPS5827255A (en) Controlling system of file used for plural electronic computers in common
US7139856B2 (en) Use of set-by-read and set-by-write registers as semaphores
JPH04112260A (en) Data base processor by multiprocessor
KR100314879B1 (en) Method for managing lock for mdbms
US20040243751A1 (en) Method for resource access co-ordination in a data processing system, data processing system and computer program
JP3036468B2 (en) Exclusive control processing device, exclusive control processing method, and storage medium storing exclusive control processing program
JP3037241B2 (en) Lock control device
JPH05233415A (en) Transaction lock control method