JP2523628B2 - Resource management control method - Google Patents

Resource management control method

Info

Publication number
JP2523628B2
JP2523628B2 JP62109003A JP10900387A JP2523628B2 JP 2523628 B2 JP2523628 B2 JP 2523628B2 JP 62109003 A JP62109003 A JP 62109003A JP 10900387 A JP10900387 A JP 10900387A JP 2523628 B2 JP2523628 B2 JP 2523628B2
Authority
JP
Japan
Prior art keywords
database
resource
lock
data
page
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
Application number
JP62109003A
Other languages
Japanese (ja)
Other versions
JPS63273940A (en
Inventor
高明 関
弘行 北嶋
山本  彰
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)

Description

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

〔従来の技術〕 従来方式は、特願昭59-182626号に記載のように、デ
ータベース演算処理要求に応じて、データベースマシン
がデータ格納媒体から主記憶装置へ、条件に合致したレ
コードを含むブロツクと条件に合致したレコードの存在
場所(アドレス)を示す情報を送ることが記載されてい
る。しかし、データベース演算処理要求時、リソースに
対するロツク制御をデータベース・マシンを使つて効率
良く行うことについては、配慮されていなかつた。ここ
で、ロツクとは、リソースを利用していることを表明
し、複数のデータベース演算処理単位によるリソースの
専用、共用をする手段である。
[Prior Art] As described in Japanese Patent Application No. 59-182626, the conventional method is a block in which a database machine transfers data from a data storage medium to a main storage device in accordance with a database arithmetic processing request, and includes records that meet the conditions. And sending information indicating the location (address) of the record that matches the conditions. However, no attention has been paid to the efficient control of the resource lock by using the database machine when the database operation processing is requested. Here, a lock is a means for expressing that a resource is being used and for dedicating or sharing the resource by a plurality of database operation processing units.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

上記従来技術は、データベース・マシンを用いたデー
タベース演算処理において、リソースに対するロツク解
除処理をデータベース・マシンから通知を受けて効率良
く行う方式については配慮されておらず、ホスト側で、
演算対象のリソース内のデータが演算されたか、されな
かつたかを判断しなければならないため、リソースのロ
ツク解除処理に時間がかかるという問題があつた。
The above-mentioned prior art does not consider a method for efficiently performing the unlock processing for resources in response to the notification from the database machine in the database operation processing using the database machine.
Since it has to be determined whether or not the data in the resource to be operated has been operated, it has been a problem that the unlock processing of the resource takes time.

本発明の目的は、ホスト側でリソースのロツク設定を
したものについて、データベース・マシンがデータベー
ス演算処理を施した後、リソース(群)の中から演算の
条件を満足しなかつたリソース(群)をホスト側へ通知
させることにより、ホスト側でのリソースのロツク解除
と処理時間の低減を図ることにある。
The object of the present invention is to set the resource lock setting on the host side, and after the database machine performs the database calculation processing, select the resource (group) that does not satisfy the calculation condition from among the resource (group). By notifying the host side, the resource is unlocked and the processing time is reduced on the host side.

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

上記目的は、データベースマシンが、ホスト計算機か
ら、データベース演算要求、演算対象のロツク済リソー
ス情報(複数)を受けとり、データベース演算時、演算
の条件を満足しなかつたリソース情報(ホスト側でロツ
クしているリソースのID)を集計して行き、それをデー
タベース演算処理終了後、ホスト側の計算機へ送ること
により達成される。
The purpose of the above is that the database machine receives the database operation request and the locked resource information (more than one) of the operation target from the host computer, and at the time of the database operation, the resource information that does not satisfy the operation condition (locks on the host side). This is achieved by totaling the IDs of existing resources, sending them to the computer on the host side after completing the database processing.

〔作用〕[Action]

ホスト計算機上でのデータベース管理システムは、デ
ータベース演算対象となるデータを格納したリソースに
対し、ロツクを施し、それらのリソースとデータベース
演算要求をデータベースマシンへ転送する。データベー
スマシンはこのリソースidを演算対象のアクセスのため
に使用する。データベースマシンは、データベース演算
時、演算対象となつたリソース毎に、演算の条件を満た
すデータがあるかチエツクし、演算の条件を満たすデー
タがなければ、ロツク解除のリソースとして、リソース
IDを記憶して行く。1つのデータベース演算処理要求の
リソース群について処理が終了すれば、ロツク解除対象
となるリソースIDをホスト側へ転送する。ホスト計算機
上でのデータベース管理システムは、データベース・マ
シンから転送されたロツク解除のリソースIDを元に、リ
ソースのロツク解除を行う(ロツク解除しなかつたリソ
ースは、当該データベース演算要求のトランザクシヨン
が終了してからデータベース管理システムがロツク解除
する)。これにより、リソースのロツク解除対象のリソ
ースIDをデータベース・マシンから通知され、ロツク解
除を行うため、ホスト計算機上でロツク解除の対象とな
つたリソースの選出チエツクをする必要がない。
The database management system on the host computer locks the resources storing the data to be database-calculated and transfers those resources and the database-calculation request to the database machine. The database machine uses this resource id for accessing the operation target. At the time of database operation, the database machine checks whether there is data that satisfies the operation condition for each resource that is the operation target. If there is no data that satisfies the operation condition, the database machine uses the resource as the unlocking resource.
Remember your ID. When the processing is completed for the resource group of one database operation processing request, the resource ID to be unlocked is transferred to the host side. The database management system on the host computer unlocks the resource based on the resource ID of the unlock that was transferred from the database machine (for the resource that was not unlocked, the transaction of the database operation request ends). Then the database management system unlocks). As a result, the resource ID of the resource to be unlocked is notified from the database machine and unlocked, so there is no need to select the resource to be unlocked on the host computer.

〔実施例〕〔Example〕

以下、本発明の一実施例を参照して詳細に説明する。
実施例の構成を第1図に示す。1は中央処理装置(CP
U)、2は主記憶、3はデータベースマシン、4は外部
記憶装置である。主記憶2内の21はデータベース管理シ
ステムで、データベースマシン3を用いて、データベー
ス演算を行う。データベース管理システム21では、デー
タベース演算の制御を行う、データベース演算管理部21
1、データベース演算の対象となるデータの論理的格納
エリアをリソース(ここでは論理ブロツクであるページ
を1つのリソースとする)として排他制御を行うロツク
管理部212、データベースマシン3から転送される演算
結果及び、ロツク解除対象のリソースid(ページ番号)
の入力を制御するバツフア管理部213、ロツクを施した
リソースを管理するロツク管理ブロツク214、データベ
ース・マシン3から演算結果及びロツク解除対象となる
リソースIDを受けとるバツフア部215から成る。ロツク
管理ブロツク214は、第2図(a)に示すようにロツク
対象となるテーブルのIDページ番号、ロツクモード(以
下の文で説明する)、ロツクしている演算処理要求の数
を示すカウント部、ロツク待ちとなつたデータベース演
算処理要求のID(複数)を格納する構造となつており、
本ブロツクは複数存在する。
Hereinafter, one embodiment of the present invention will be described in detail.
The configuration of the embodiment is shown in FIG. 1 is the 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. In the database management system 21, the database calculation management unit 21 that controls the database calculation
1. A lock management unit 212 that performs exclusive control using a logical storage area of data that is the target of database operation as a resource (here, a page that is a logical block is one resource), an operation result transferred from the database machine 3 And the resource id (page number) of the unlock target
A buffer management unit 213 for controlling the input of a lock resource, a lock management block 214 for managing the locked resource, and a buffer unit 215 for receiving the operation result and the resource ID to be unlocked from the database machine 3. The lock management block 214 is, as shown in FIG. 2A, an ID page number of a table to be locked, a lock mode (described in the following sentence), a count unit indicating the number of locked arithmetic processing requests, It has a structure to store IDs (multiple) of database operation processing requests that are waiting for locking.
There are multiple this block.

一方、データベースマシン3内は、CPU1からデータベ
ース演算要求を受付ける演算要求受付部31、受付けたデ
ータベース演算要求情報を格納するため、複数ブロツク
からなる演算要求情報格納ブロツク35、ホスト計算機側
からデータベース演算要求にもとづいて、演算要求情報
格納ブロツク内のデータベース演算要求情報を取り出
し、外部記憶装置4上にある該当データのデータベース
演算を行うデータベース演算部32、外部記憶装置4上に
ある演算対象のレコード(ページに対応)を入力し、デ
ータ格納バツフア部37へ格納するアクセス処理制御部3
3、演算の対象としてアクセスしたページのうち演算の
条件を満足するデータを含まなかつたページ番号を格納
するリソースID管理ブロツク36、データベース演算結果
格納バツフア部37内にあるデータベース演算結果及び、
リソースid管理ブロツク内にあるページ番号(ロツク解
除対象となる)を主記憶2に転送するデータ転送制御部
34からなる。データベース演算結果格納バツフア部37
は、第3図に示すように、外部記憶装置からのページを
格納するページ番号格納用バツフア371(複数)演算結
果格納用バツフア372(複数)からなり、各々のバツフ
アには、どの演算処理要求に該当するかを示す演算処理
要求IDの格納エリアを持つ。外部記憶装置4上のデータ
ベース41には、テーブルが格納されており、テーブル
は、複数のカラムからなるものをローと呼び、このロー
の集合からなる。このテーブルは、ページと呼ばれる論
理的アクセス単位からなり、ローは、このページ内に格
納される。
On the other hand, in the database machine 3, a calculation request receiving unit 31 that receives a database calculation request from the CPU 1, a calculation request information storage block 35 composed of a plurality of blocks for storing the received database calculation request information, and a database calculation request from the host computer side. Based on this, the database operation request information in the operation request information storage block is taken out, and the database operation unit 32 for performing the database operation of the corresponding data in the external storage device 4, the record to be operated in the external storage device 4 (page Access processing control unit 3 for storing the data in the data storage buffer unit 37.
3, a resource ID management block 36 that stores a page number that does not include data that satisfies the calculation condition of the pages accessed as the calculation target, the database calculation result in the database calculation result storage buffer unit 37, and
Data transfer control unit that transfers the page number in the resource id management block (which is to be unlocked) to the main memory 2.
It consists of 34. Database calculation result storage buffer 37
As shown in FIG. 3, it comprises page number storage buffers 371 (plurality) for storing pages from an external storage device and calculation result storage buffers 372 (plurality), and which computation processing request is issued to each buffer. It has a storage area for a calculation request ID that indicates whether or not A table is stored in the database 41 on the external storage device 4, and the table is made up of a plurality of columns and is called a row. This table consists of logical access units called pages, and rows are stored within this page.

次に、上述のごとき構成における一実施例をデータベ
ース管理システム21のロツク管理部212の処理を中心に
説明する。ここでのロツク管理部212は、データベース
演算処理要求をデータベース・マシン3へ発行する前
に、演算の対象となつたリソースであるページ群(ここ
ではページのみとする)を他のトランザグシヨン(デー
タベースをアクセスし、演算処理を行う論理的な実行単
位)がアクセスすることにより、データの一貫性を失う
ことを防ぐための排他制御を行つている。先ず、データ
ベース管理システム21内で、あるテーブルについてデー
タベース演算を施せという処理要求が発生する。データ
ベース演算管理部211は、データベース演算処理要求を
データベースマシン3へ送る前に、ロツク管理部212へ
制御を渡す。ロツク管理部212は、当該トランザクシヨ
ンがアクセスするテーブルにおいて、まず、データベー
ス・マシン3に演算を行わせるページ群のページ番号と
テーブルIDおよびロツクモード(他のデータベース演算
処理要求と共用してページアクセス可能か、否かを示
す、例えば、これらのモードを示すため、共用アクセス
可は、“1",共用アクセス不可は“2"をセツトする)、
ロツク要求元の演算処理要求IDをデータベース演算管理
部211から受けとり、以下の状況に応じて、ページ単位
に全てのページのロツク処理を行う。
Next, an example of the above-mentioned configuration will be described focusing on the processing of the lock management unit 212 of the database management system 21. Before issuing the database operation processing request to the database machine 3, the lock management unit 212 here sets the page group (here, only pages), which is the resource targeted for the operation, to another transaction ( Exclusive control is performed to prevent loss of data consistency by accessing the database and accessing by the logical execution unit that performs arithmetic processing. First, in the database management system 21, a processing request for performing a database operation on a certain table occurs. The database operation management unit 211 passes control to the lock management unit 212 before sending the database operation processing request to the database machine 3. In the table accessed by the transaction, the lock management unit 212 firstly sets the page number and table ID of the page group to be operated by the database machine 3 and the lock mode (the page can be accessed in common with other database operation processing requests. Or not, for example, to show these modes, set "1" for shared access enabled, "2" for shared access disabled),
The arithmetic processing request ID of the lock request source is received from the database arithmetic management unit 211, and the locking processing of all pages is performed in page units according to the following situations.

1)同一テーブルID、ページ番号を格納したロツク管理
ブロツク214がない場合、空きのロツク管理ブロツク214
を確保し、そこへロツクしたいテーブルID、ページ番
号、ロツクモードをセツトし、同ロツク管理ブロツク21
4のカウント部の値を1にする。これにより、当該ペー
ジはロツクしたことになる。
1) If there is no lock management block 214 storing the same table ID and page number, an empty lock management block 214
Secure, set the table ID, page number, and lock mode you want to lock to, and set the lock management block 21
Set the value of the count part of 4 to 1. As a result, the page is locked.

2)同一テーブルID、ページ番号を格納したロツク管理
ブロツク214が既に存在する場合において、当ロツク管
理ブロツク214にセツトされているページが共用アクセ
ス可(ロツクモード=“1")で、当ロツク要求元のロツ
クモードも共用アクセス可、かつ、ロツク要求待ちのデ
ータベース演算要求がなければ(ロツク管理ブロツク21
4内にロツク要求待ち演算処理要求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 the lock request source The lock mode is also accessible in common, and if there is no database operation request waiting for the lock request (lock management block 21
No lock request waiting operation processing request ID is set in 4), and 1 is added to the count section of the lock management block 214. As a result, the page is also locked.

上記に示す条件以外の場合は、当ページについて、該
データベース演算要求をロツク待ちにする。このため、
ロツク要求のページ番号を格納したロツク管理ブロツク
214内にロツク要求待ちの演算処理要求IDをセツトす
る。以上のロツク処理が、当データベース演算要求の全
ページについて完了し、ロツク待ちが1つもなければ、
ロツク完了をデータベース演算管理211へ報告する。も
し、1つのページでもロツク待ちが発生するとロツク完
了になるまで、データベース演算管理部211へリターン
しない。データベース演算管理部211はページ番号等の
リソース情報をロツク管理部212へ渡し、前述のロツク
処理の実行により、データベースマシンへのデータベー
ス演算要求が許可されれば、データベースマシン3へ、
データベース演算要求を発行する。
In the case other than the above-mentioned conditions, the database operation request is locked on this page. For this reason,
A lock management block that stores the page number of the lock request.
The operation request ID waiting for the lock request is set in 214. If the above lock processing is completed for all pages of this database operation request and there is no lock wait,
The completion of the lock is reported to the database operation management 211. If a lock wait occurs even for one page, it does not return to the database operation management unit 211 until the lock is completed. The database operation management unit 211 passes the resource information such as the page number to the lock management unit 212, and if the database operation request to the database machine is permitted by the execution of the lock processing described above, the database operation is sent to the database machine 3.
Issue a database operation request.

データベースマシン3では、以下の処理を行う。演算
要求受付部31が、演算の条件、演算対象となるリソース
情報(テーブル)IDページ番号(複数)のみ)と当該リ
ソースが存在する外部記憶装置4上の格納アドレス等を
データベース管理システム21側から受けとり、空きの演
算要求情報格納ブロツク35に格納する。データベース演
算部32は、演算要求情報格納ブロツク35から、演算対象
となるリソースの外部記憶装置4上の格納アドレスを取
り出し、アクセス処理制御部33へ渡して、当該テーブル
のページを入力するよう要求する。アクセス処理制御部
33は、データベース演算部32から受取つた外部記憶装置
4上の格納アドレスをもとに、外部記憶装置4上から、
当演算対象となるページを取り出し、37のデータ格納バ
ツフア内の空きのページ格納用バツフア371へ格納す
る。この後、データベース演算部32ページ番号とページ
を格納したバツフアのバツフアIDを渡し、ページ入力の
完了を報告する。データベース演算部32は、アクセス処
理制御部33からのページ番号、バツフアidをもとに、当
該データベース演算の条件を演算要求情報格納ブロツク
35から取り出し、データ格納バツフア部37内の該当バツ
フアIDのページ格納用バツフア371内にあるページにつ
いて、演算の条件を満足するデータが存在するか判定す
る。条件を満足するデータがあれば、そのデータについ
て演算を施し、データ格納バツフア部37の当該演算処理
要求ID対応の演算結果格納用バツフア372に格納する。
ここで、格納可能な当演算処理要求ID対応の演算結果格
納用バツフア372がなければ、空きの演算結果格納用バ
ツフア372を確保し、そこへ演算結果を格納する。も
し、条件を満足するデータが当該ページ内になければ、
当該ページ番号とテーブルIDを当該データベース演算処
理要求ID対応のリソースID管理ブロツク36に格納する。
もし、ページ番号の格納可能なリソースID管理ブロツク
がなければ、空きのものを確保して、ページ番号をセツ
トする。このとき、ブロツク識別のため、当該演算処理
要求IDを確保したリソースID管理ブロツク36に格納す
る。以上に述べた、外部記憶装置4上の演算対象のペー
ジを入力し、ページ内データの演算処理を、当該演算要
求情報格納ブロツク35内にある全リソース(全ページ)
分行つた後、データ転送制御部34に制御を渡し、データ
格納バツフア部37内の該当演算結果格納用バツフア372
内のデータ及び、該当演算処理要求id対応の全リソース
ID管理ブロツク内のページ番号、テーブルIDをホスト計
算機側のデータベース管理システム21のバツフア部215
へ転送する。転送終了後、データベース演算部32は、当
該演算処理要求ID用の演算要求情報格納ブロツク35、リ
ソースID管理ブロツク36群、ほかに、同演算処理要求id
対応のデータ格納バツフア部37のページ番号格納用バツ
フア371、演算結果格納用バツフア372を空きにする。こ
の後、データベース演算部32は、演算要求情報格納ブロ
ツク35を調べ、他の演算処理要求情報があれば、その処
理に移る。
The database machine 3 performs the following processing. From the database management system 21 side, the calculation request receiving unit 31 determines the calculation condition, the resource information (table) ID page number (plurality) to be calculated, and the storage address on the external storage device 4 in which the resource exists. It is received and stored in the empty operation request information storage block 35. The database operation unit 32 retrieves the storage address of the resource to be operated on the external storage device 4 from the operation request information storage block 35, passes it to the access processing control unit 33, and requests it to input the page of the table. . Access processing control unit
33 indicates, from the external storage device 4, based on the storage address on the external storage device 4 received from the database calculation unit 32,
The page to be calculated is taken out and stored in an empty page storage buffer 371 in the data storage buffer 37. After this, the page number of the database operation unit 32 and the buffer ID of the buffer storing the page are passed, and the completion of page input is reported. Based on the page number and buffer id from the access processing control unit 33, the database operation unit 32 determines the conditions of the database operation concerned by the operation request information storage block.
It is extracted from 35 and it is determined whether or not there is data satisfying the operation condition for the page in the page storage buffer 371 of the corresponding buffer ID in the data storage buffer unit 37. If there is data that satisfies the conditions, the data is calculated and stored in the calculation result storage buffer 372 of the data storage buffer unit 37 corresponding to the calculation processing request ID.
If there is no operation result storage buffer 372 corresponding to this operation processing request ID that can be stored, an empty operation result storage buffer 372 is secured and the operation result is stored there. If there is no data that satisfies the conditions on the page,
The page number and the 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 that can store the page number, secure an empty resource ID and set the page number. At this time, in order to identify the block, the arithmetic processing request ID is stored in the secured resource ID management block 36. All the resources (all pages) in the calculation request information storage block 35 are input by inputting the page to be calculated on the external storage device 4 and calculating the data in the page.
After the division, the control is transferred to the data transfer control unit 34, and the corresponding operation result storage buffer 372 in the data storage buffer unit 37 is stored.
Data and all resources corresponding to the corresponding processing request id
The page number and table ID in the ID management block are stored in the buffer section 215 of the database management system 21 on the host computer side.
Transfer to After the transfer is completed, the database operation unit 32 displays the operation request information storage block 35 for the operation request ID, the resource ID management block 36 group, and the operation request id
The page number storage buffer 371 and the operation result storage buffer 372 of the corresponding data storage buffer unit 37 are made empty. After that, the database operation unit 32 checks the operation request information storage block 35, and if there is other operation processing request information, moves to that processing.

一方、データベース管理システム21のバツフア管理部
は、データベースマシンから、当該データベース演算処
理要求用バツフアに、演算結果および、演算対象となら
なかつたページ番号(複数)およびテーブルIDを受信す
ると、データベース演算管理部211へ通知する。データ
ベース演算管理部211は、当該データベース演算用にロ
ツクした当該テーブルのページをロツク解除するため、
当データベース演算対応のページ番号(複数)とテーブ
ルIDをバツフア部215から取得し、それをロツク管理部2
12へ渡すことにより、ロツク解除を要求する。ロツク管
理部212は、渡されたテーブルIDと、ページ番号(複
数)を取り込み、同一情報を持つロツク管理ブロツク21
4を求め、ロツクの解除処理を全ページについて行う。
ロツクの解除は、1ページ単位に行い以下の条件に対応
して個々の処理を行う。
On the other hand, the buffer management unit of the database management system 21 receives the calculation result and the page numbers (plurality) and table IDs that are not the calculation target from the database machine in the database calculation request buffer, and then performs the database calculation management. Notify part 211. The database operation management unit 211 unlocks the page of the table locked for the database operation,
The page number (plural) and table ID corresponding to this database calculation are acquired from the buffer unit 215, and the lock management unit 2
Request to unlock by passing to 12. The lock management unit 212 takes in the passed table ID and page number (plural), and has the same information as the lock management block 21.
4 is obtained, and the lock release process is performed for all pages.
The lock is released page by page, and individual processing is performed according to the following conditions.

1)ロツク解除対象となつているデータベース演算要求
のみが、当ページのロツクをかけている場合(ロツク管
理ブロツク214のカウント部=1)で、当ページに対し
てのロツク待ちの演算処理要求がなければ(ロツク管理
ブロツク214内にロツク待ち演算処理要求idが1つもセ
ツトされていない)当該ロツク管理ブロツク214を空き
にする。これにより、当ページのロツクが解除されたこ
とになる。
1) When only the database operation request to be unlocked is locked on this page (count section of lock management block 214 = 1), there is an operation request waiting for lock on this page. If not (no lock waiting operation request id is set in the lock management block 214), the lock management block 214 is made empty. This means that the lock on this page has been released.

2)複数の演算処理要求が当ページにロツクをかけてい
る(当該ロツク管理ブロツク214のカウント部の値が2
以上)場合、カウント部から1差し引く。これにより、
当ページのロツクが解除されたことになる。
2) A plurality of arithmetic processing requests are locking this page (the value of the count part of the lock management block 214 is 2).
In the above case, 1 is subtracted from the counting section. This allows
This means that the lock on this page has been released.

3)ロツク解除対象となつているデータベース演算要求
のみが当ページのロツクをかけていて(カウント部の値
が1)、当ページのロツク待ちデータベース演算要求が
あれば、(ロツク管理ブロツク214内にロツク待ち演算
処理要求idがセツトされている)、最初にロツク待ちに
なつたデータベース演算要求のロツク待ちを解除する
(ロツク管理ブロツク内の該当ロツク待ち演算処理要求
idをクリアする)。
3) If only the database operation request to be unlocked is locked on this page (the value of the count section is 1), and if there is a lock wait database operation request on this page (in the lock management block 214, Releases the lock wait of the database operation request that was first in the lock wait (the lock wait operation request is in the lock management block).
clear the id).

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

以上、1つのデータベース演算処理要求に対する演算
対象のテーブルのページ群のロツク設定、解除をデータ
ベースマシンを用いて行う実施例について述べた。この
実施例については、ロツクの設定、解除対象リソースを
ページとして述べたが、他に、テーブル、ページ内の1
ローについても、上記と同様の手順で行える。
The embodiment has been described above in which the locking and unlocking of the page group of the table to be operated for one database operation processing request is performed using the database machine. In this embodiment, the resource for setting and releasing the lock is described as a page.
For rows, the same procedure as above can be used.

〔発明の効果〕〔The invention's effect〕

本発明によれば、ロツクしたリソースの解除時、デー
タベースマシンから、ロツク解除対象となつたリソース
情報を受取り、そのリソース情報で示すリソースのロツ
ク解除をホスト側のデータベース管理システムで行えば
よい。このため、ホスト側でロツク解除対象のリソース
を検出する必要がなくなるため、ロツク解除処理の効率
化及び、CPU使用時間の低減ができるという効果があ
る。
According to the present invention, at the time of releasing a locked resource, the resource information to be unlocked may be received from the database machine, and the resource indicated by the resource information may be unlocked by the database management system on the host side. For this reason, there is no need for the host to detect the resource to be unlocked, and there is an effect that the efficiency of unlocking processing can be improved and the CPU usage time can be reduced.

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

第1図は、本発明の一実施例の概略構成を示す図であ
る。第2図は、ロツク管理ブロツク214、第3図はデー
タ格納バツフア部37のそれぞれ詳細説明図である。 3……データベースマシン、21……データベース管理シ
ステム、32……データベース演算部、36……リソースid
管理ブロツク、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 operation unit, 36 ... Resource id
Management block, 212 ... Lock management section, 214 ... Lock management block.

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】中央処理装置とデータベースを格納する外
部記憶装置との間に接続され、前記中央処理装置からの
指示に従って前記外部記憶装置内のデータを対象とする
データベース演算を行なうデータベースマシンを有する
計算機システムのリソース管理制御方式において、前記
中央処理装置からデータベース演算の対象となるリソー
スをロックして前記データベースマシンにデータベース
演算を指示し、前記データベースマシンで前記指示に応
じて前記リソース内のデータに対する演算を行ない、前
記演算の条件を満たすデータを含まないリソースを判別
し、該判別の結果に基づいて、前記データベースマシン
から前記演算の条件を満たすデータを含まないリソース
のロックを解除するための情報を前記中央処理装置に転
送し、前記ロックを解除するための情報に基づいて、前
記中央処理装置が前記演算の条件を満たすデータを含ま
ないリソースのロックを解除することを特徴とするリソ
ース管理制御方式。
1. A database machine which is connected between a central processing unit and an external storage unit for storing a database and which performs a database operation for data in the external storage unit in accordance with an instruction from the central processing unit. In a resource management control method for a computer system, the central processing unit locks a resource that is a target of a database operation and instructs the database machine to perform the database operation, and the database machine responds to data in the resource according to the instruction. Information for performing an operation, determining a resource that does not include data that satisfies the operation condition, and unlocking the resource that does not include the data that satisfies the operation condition from the database machine based on the result of the determination. To the central processing unit and lock the Based on the information for releasing, resource management control system by the central processing unit, characterized in that to unlock the resource that does not contain the data that satisfies the operation.
【請求項2】前記リソースは、前記データベースを構成
するデータの論理的、または物理的な格納領域であるこ
とを特徴とする特許請求の範囲第1項記載のリソース管
理制御方式。
2. The resource management control system according to claim 1, wherein the resource is a logical or physical storage area of data constituting the database.
【請求項3】前記ロックを解除するための情報は、前記
演算の条件を満たすデータを含まないリソースを識別す
るリソースIDを含んでなることを特徴とする特許請求の
範囲第1項記載のリソース管理制御方式。
3. The resource according to claim 1, wherein the information for releasing the lock includes a resource ID for identifying a resource that does not include data that satisfies the condition of the operation. Management control method.
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 JPS63273940A (en) 1988-11-11
JP2523628B2 true 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
JPS63273940A (en) 1988-11-11

Similar Documents

Publication Publication Date Title
US5060144A (en) Locking control with validity status indication for a multi-host processor system that utilizes a record lock processor and a cache memory for each host processor
US5734909A (en) Method for controlling the locking and unlocking of system resources in a shared resource distributed computing environment
US5852747A (en) System for awarding token to client for accessing first data block specified in client request without interference due to contention from other client
US5493668A (en) Multiple processor system having software for selecting shared cache entries of an associated castout class for transfer to a DASD with one I/O operation
US6516393B1 (en) Dynamic serialization of memory access in a multi-processor system
US6813623B2 (en) Method and apparatus for chunk based transaction logging with asynchronous input/output for a database management system
JP2622654B2 (en) Arbitration method and apparatus for multiple requests
EP0260862A2 (en) Move-out queue buffer
US5432929A (en) Storage subsystem having a modifiable key-lock
JPH05128072A (en) Inter-system exclusive control system
US6381681B1 (en) System and method for shared memory protection in a multiprocessor computer
JP2523628B2 (en) Resource management control method
JPS63228335A (en) Event information and reception processing system in computer system
US5404549A (en) Method for efficient access of data stored in a nexus table using queue tag indexes in a table portion
JPS5827255A (en) Controlling system of file used for plural electronic computers in common
EP0297895B1 (en) Apparatus and method using lockout for synchronization of access to main memory signal groups in a multiprocessor data processing system
KR100611739B1 (en) PARALLEL RESOURCE Allocation AND freeing METHOD IN JOURNALING FILE SYSTEM OF MULTI-PROCESSOR ENVIRONMENT
JPH0559463B2 (en)
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
JPH01246645A (en) Delayed journal merge system
JP3381652B2 (en) Lock control method
JP2903536B2 (en) Data transfer device
JP2615046B2 (en) Record addition processing method
JPH0351912A (en) Spool area return system for each data set