JPS62145349A - Intersystem data base sharing system - Google Patents

Intersystem data base sharing system

Info

Publication number
JPS62145349A
JPS62145349A JP60285514A JP28551485A JPS62145349A JP S62145349 A JPS62145349 A JP S62145349A JP 60285514 A JP60285514 A JP 60285514A JP 28551485 A JP28551485 A JP 28551485A JP S62145349 A JPS62145349 A JP S62145349A
Authority
JP
Japan
Prior art keywords
lock
data
subsystem
resource
data resource
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
JP60285514A
Other languages
Japanese (ja)
Inventor
Atsushi Nitta
淳 新田
Kyoichi Suzuki
恭一 鈴木
Takashi Sumiyoshi
住吉 孝史
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 JP60285514A priority Critical patent/JPS62145349A/en
Publication of JPS62145349A publication Critical patent/JPS62145349A/en
Pending legal-status Critical Current

Links

Landscapes

  • Hardware Redundancy (AREA)
  • Multi Processors (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To allow systems to share data bases with a small communication overhead by providing plural data processors with subsystems which access common data resources respectively and lock managers. CONSTITUTION:Respective host computers 1-3 include operating systems 11-13, lock managers 21-23, and subsystems 31-36 one to one and common data resources are stored in common file devices 61-66. The common file devices 61-66 are connected to the host computers 1-3 and the subsystems 31-36 send lock requests to the lock managers 21-23 to acquire locks for the common data resources and then access the common data resources through the operating systems 11-13. The locks are made in block units. The subsystems 31-36 are equipped with buffer pools 41-46 and journal files 51-56.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、システム間データベース共用方式に関し、特
にデータ資源の整合性を保証しながら効率的なアクセス
を行うための共用データアクセス制御方式に関するもの
である。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to an inter-system database sharing method, and in particular to a shared data access control method for efficient access while guaranteeing the consistency of data resources. be.

〔発明の背景〕[Background of the invention]

複数のデータ処理装置が、ブロック単位での排他制御を
行いながら共用データ資源をアクセスする方式としては
、例えば、特開昭57−64850号公報および特開昭
57−64861号公報に記載されているように、2台
のデータ処理装置を通信装置で結合し、ロック情報を相
互に授受しながら制御する方式が知られている。すなわ
ち、この方式では、共用データ資源に対して指命を発行
する前に、ロックが付与されることにより排他制御を行
う。また、共用データの使用が不要になると、ロック解
除要求を行って、排他制御を中止する。しかし、これら
の方式では、データ処理装置およびコングルーアンス・
クラスごとに関心ビン1〜を設けることにより、2台の
データ処理装置間の通信オーバヘッドを低減させるよう
に工夫がなされているが、3台以上のデータ処理装置が
共用データ*源にアクセスする場合については、何も配
慮されていない。
A method in which a plurality of data processing devices access a shared data resource while performing exclusive control on a block basis is described in, for example, Japanese Patent Laid-Open No. 57-64850 and Japanese Patent Laid-Open No. 57-64861. A method is known in which two data processing apparatuses are connected through a communication device and controlled while exchanging lock information with each other. That is, in this method, exclusive control is performed by granting a lock before issuing an instruction to a shared data resource. Furthermore, when the shared data no longer needs to be used, a lock release request is made and exclusive control is discontinued. However, these methods require data processing equipment and congruence.
Efforts have been made to reduce the communication overhead between two data processing devices by providing interest bins 1 to 1 for each class, but when three or more data processing devices access a shared data* source No consideration has been given to this.

また、その池の例としては、特開昭59−81748号
公報に記載されているように、排他制御を行うための特
別な制御装置を、データ処理装置とは別途に設ける方式
がある。すなわち、この方式では、データ処理装置は共
用データを使用する前に、共用データを管理する制御装
置に対してロックブロック命令を発行することにより、
排他制御を行い、またデータの利用が不要になると、制
御装置にアンロック命令を発行することにより、使用中
の解除を行う。さらに、この方式では、3台以上のデー
タ処理装置による共用データ資源へのアクセスが可能と
なり、また排他制御を専用制御装置に任せることにより
データ処理装置の処理オーバヘッドを低減できる。しか
し、この方式では、特別な制御装置が必要であり、しか
もこの制御装置がシステム全体の性能および信顆性上の
ボI・ルネツクになるという問題がある。
Further, as an example of such a system, there is a system in which a special control device for performing exclusive control is provided separately from the data processing device, as described in Japanese Patent Laid-Open No. 59-81748. In other words, in this method, before using the shared data, the data processing device issues a lock block instruction to the control device that manages the shared data.
Exclusive control is performed, and when data no longer needs to be used, an unlock command is issued to the control device to release the data from use. Furthermore, this method allows three or more data processing devices to access shared data resources, and by entrusting exclusive control to a dedicated control device, the processing overhead of the data processing devices can be reduced. However, this method requires a special control device, and there is a problem in that this control device becomes the key to the performance and reliability of the entire system.

また、上記従来例においては、サブシステムが管理する
バッファプール中のデータ内容が有効か、無効かを判断
する方法に関して、公報には何も記載がない。データ内
容が有効か無効か判断する方法がない場合には、各サブ
システムはデータ資源へアクセスするごとに、ファイル
装置への入出力を行う必要があり、データ資源(ブロッ
ク)のバッファリングの効果が期待できなくなる。
Further, in the above-mentioned conventional example, the publication does not contain any information regarding a method for determining whether the data contents in the buffer pool managed by the subsystem are valid or invalid. If there is no way to determine whether the data content is valid or invalid, each subsystem must perform input/output to the file device each time it accesses the data resource, and the effect of buffering the data resource (block) is can no longer be expected.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、このような従来の問題を改善し、複数
のデータ処理装置がファイル装置上のデータ資源を共用
してアクセスする場合に、通信オーバヘッドが少なく、
かつ特別なハードウェアを必要としないで排他制御を行
うことができるシステム間データベース共用方式を提供
することにある。また、本発明の他の目的は、共用デー
タ資源をアクセスする複数サブシステムが各々管理する
バッファプール中のデータの内容が、有効か無効かを判
断できるようなシステム間データベース共用方式を提供
することにある。また、本発明の他の目的は、サブシス
テムの故障、通信装置の故障、データ処理装置の故障等
、各種の故障に対して、データ*源の整合比を保証する
ために、データ資源を選択的にアクセス禁止にするよう
なシステム間データベース共用方式を提供することにあ
る。
An object of the present invention is to improve such conventional problems, and to reduce communication overhead when multiple data processing devices share and access data resources on a file device.
Another object of the present invention is to provide an inter-system database sharing method that can perform exclusive control without requiring special hardware. Another object of the present invention is to provide an inter-system database sharing method that allows multiple subsystems accessing shared data resources to determine whether the content of data in buffer pools managed by each subsystem is valid or invalid. It is in. Another object of the present invention is to select data resources in order to guarantee the consistency ratio of data*sources against various types of failures such as subsystem failures, communication equipment failures, and data processing equipment failures. The object of the present invention is to provide an inter-system database sharing method that prohibits access.

さらに、本発明の他の目的は、データ処理装置が故障し
た場合、そのデータ処理装置上のロックマネージャが行
っていた機能を、他のデータ処理装置上のロックマネー
ジャにより速やかに代行できるようなシステム間データ
ベース共用方式を提供することにある。
Furthermore, another object of the present invention is to provide a system in which, when a data processing device fails, the lock manager on another data processing device can quickly perform the function performed by a lock manager on that data processing device. The objective is to provide a method for sharing databases between users.

〔発明の概要〕[Summary of the invention]

上記目的を達成するために、本発明のシステム間データ
ベース共用方式は、複数のデータ処理装置と、該データ
処理装置を相互接続する通信装置と、上記複数データ処
理装置により共用されるデータ資源を記憶するファイル
装置とを有し、上記データ処理装置は、各々上記共用デ
ータ資源にアクセスする単数ないし複数のサブシステム
と、該サブシステムの共用データ資源へのアクセスに対
する排他制御を行うロックマネージャを含むことに特徴
がある。また、本発明において、共用データ資源は、論
理的に分割され、各分割されたデ−夕資源の集合ごとに
マスタとなるデータ処理装置が定められ、共用データ資
源に対するロック要求がロック対象資源のマスタである
データ処理装口上のロックマネージャに送られて、そこ
で排他制御が行われる。
In order to achieve the above object, the inter-system database sharing method of the present invention includes a plurality of data processing devices, a communication device that interconnects the data processing devices, and a storage system for storing data resources shared by the plurality of data processing devices. wherein the data processing device includes one or more subsystems that each access the shared data resource, and a lock manager that exercises exclusive control over the subsystem's access to the shared data resource. There are characteristics. Furthermore, in the present invention, the shared data resource is logically divided, a data processing device is determined as a master for each set of divided data resources, and a lock request for the shared data resource is handled by a lock target resource. It is sent to the lock manager on the master data processing device, where exclusive control is performed.

また、本発明では、各ロックマネージャは、自系がマス
タである共用データ資源に対して、どのサブシステムが
最新の更新を行ったかを記憶する手段を有し、サブシス
テムからのロック要求に対する応答情報として、上記記
憶手段に基づいて。
Furthermore, in the present invention, each lock manager has means for storing which subsystem has made the latest update to the shared data resource of which it is the master, and responds to lock requests from subsystems. As information, based on the above storage means.

ロック要求元サブシステムが管理するバッファプール中
のデータ内容が有効か、無効かを通知する。
Notifies whether the data content in the buffer pool managed by the lock requesting subsystem is valid or invalid.

また、本発明では、各ロックマネージャは、サブシステ
ムの故障や通信装置の故障が発生した場合に、データ資
源の!’9性を保証するようにロックを保留して、i!
!択的にデータ資源をアクセス禁止にする。さらに、本
発明では、各ロックマネージャがデータ処理装置の故障
で動作不能となった場合に、故障したデータ処理装置が
マスタである共用データ資源に関して、別のデータ処理
装置が新たなマスタとなることにより、共用データ資バ
(へのアクセスが、続行できる。
In addition, in the present invention, each lock manager is able to manage data resources in the event of a failure of a subsystem or a failure of a communication device. '9Hold the lock to ensure sex, i!
! Selectively prohibit access to data resources. Furthermore, in the present invention, if each lock manager becomes inoperable due to a failure of a data processing device, another data processing device becomes the new master for the shared data resource for which the failed data processing device is the master. This allows access to shared data resources to continue.

C発明の実施例〕 以下、本発明の実施例を、図面により洋画に説明する。Example of invention C] Embodiments of the present invention will be described below with reference to drawings.

第1UAは、本発明の一実施例を示すコンピュータシス
テムのブロック図である。
The first UA is a block diagram of a computer system illustrating an embodiment of the present invention.

第1図においては、3台のデータ処理Fj ’111 
r2.3上で動作する6個のサブシステム31〜36が
、ファイル装置61〜66を共用してアクセスする例が
示されている。データ処理装置(以下、ホストまたはホ
ストコンピュータと呼ぶ)は1通信装置4を介して相互
接続される。通信装置4としては、チャネルran g
合装置(CTCA)、通ずコ装置等がある。各ホストコ
ンピュータは、1つのオペレーティングシステム(11
〜13)、1つのロックマネージャ(21〜23)、1
つまたは複数のサブシステム(31〜36)を含む。共
用データ資源は、共用ファイル装置(61〜66)に記
憶されている。共用ファイル装置(61〜66)は、各
ホストコンピュータ(1〜3)に接続され、サブシステ
ム(31〜36)はロックマネージャ(21〜23)に
ロック要求を行って、共用データFt源に対するロック
を獲得した後、オペレーティングシステム(11〜13
)を介して共用データ資源にアクセスする。ロックは、
ブロック屯位に行われる。各サブシステム(31〜36
)は、各々バッファプール(41〜46)およびジャー
ナルファイル(51〜56)を偏えている。
In Figure 1, three data processing machines Fj '111
An example is shown in which six subsystems 31 to 36 operating on r2.3 share and access file devices 61 to 66. Data processing devices (hereinafter referred to as hosts or host computers) are interconnected via one communication device 4 . As the communication device 4, the channel
There are several types of equipment, such as CTCA (transportation equipment) and communication equipment (CTCA). Each host computer has one operating system (11
~13), 1 lock manager (21~23), 1
one or more subsystems (31-36). Shared data resources are stored in shared file devices (61-66). The shared file devices (61-66) are connected to each host computer (1-3), and the subsystems (31-36) make lock requests to the lock managers (21-23) to obtain locks on the shared data Ft source. After acquiring the operating system (11-13
) to access shared data resources. The lock is
It is done in block position. Each subsystem (31 to 36
) bias the buffer pools (41-46) and journal files (51-56), respectively.

共用データ資源は、論理的な資源グループに分割され、
各々の資源グループごとにマスタとなるホストコンピュ
ータが定められる。本実施例では。
Shared data resources are divided into logical resource groups and
A master host computer is determined for each resource group. In this example.

共用ファイル装[61,62に記憶されている共用デー
タ資源を資源グループA、共用ファイル装fi1i1[
63,64に記憶されている共用データ資源を資源グル
ープB、共用ファイル装fiff65.66に記tごさ
れている共用データ資源を52gグループCとし、資源
グループAのマスタをホストl、資源グループBのマス
タをホスト2.資源グループCのマスタをポスト3とし
て説明する。資源グループの分類とマスタのi#肖では
任意であり、例えば。
The shared data resources stored in the shared file device [61 and 62 are stored in the resource group A and the shared file device fi1i1[
The shared data resources stored in files 63 and 64 are grouped into resource group B, the shared data resources stored in shared file system fiff65 and 66 are grouped into 52g group C, the master of resource group A is set to host l, and resource group B is set to 52g. Host the master of 2. The master of resource group C will be explained as post 3. The resource group classification and master i#portion are arbitrary, for example.

1つのホストが2つ以上の資源グループのマスタとなっ
てもよいし、マスタとなる資源グループを1つも持たな
いホストがあってもよい。また、資源グループの数とホ
ストの数が一致していなくてもよい。資源グループの分
類とマスタの割当ては、後述するようにシステムの性能
に応じてWRMできる。
One host may be the master of two or more resource groups, or there may be a host that does not have any resource group that is the master. Furthermore, the number of resource groups and the number of hosts do not need to match. Classification of resource groups and assignment of masters can be performed by WRM according to system performance, as described later.

実際にロック要求を発行するのは、各サブシステムの管
理下で動作するトランザクションである。
What actually issues lock requests is a transaction that operates under the control of each subsystem.

トランザクションには、各サブシステム内で一意的な識
別子が付けられており、この識別子とサブシステムの識
別子を組合せることにより、トランザクションをシステ
ム内で一意に識別できる。各トランザクションは、同一
ホストコンピュータ上のロックマネージヤレニ対してロ
ック要求を行う。
A transaction is assigned a unique identifier within each subsystem, and by combining this identifier with the subsystem identifier, a transaction can be uniquely identified within the system. Each transaction makes a lock request to a lock manager on the same host computer.

要求を受けたロックマイ・−ジャは、ロック対象データ
資源(ブロック〕のマスタが自系であれば、必要な排他
制御処理を行い、ロック対象データ資源(ブロック)の
マスタが他系であれば、マスタのホストコンピュータへ
ロック要求を転送する。
The lock miger that receives the request performs the necessary exclusive control processing if the master of the data resource (block) to be locked is the master of the own system, and if the master of the data resource (block) to be locked is the master of the other system. , forwards the lock request to the master host computer.

ロック要求元トランザクションは、ロック対象データ資
源のマスタがどのホストコンピュータであるかを、意識
する必要はない。上述の説明から明らかなように、各ロ
ックマネージャは、ロック対象データ資源のマスタのホ
ストコンピュータとのみ通(ごを行えばよく、その他の
ホストコンピュータに連絡を行わくでもよい。いま、n
台のホストコンピュータからなるシステムを考えて、共
用データ資源をn等分にグループ分けして、各ホス1−
コンピュータをマスタとして割当てるとする。あるホス
トコンピュータ上のサブシステムが、全ての共用データ
資源に均等な確率でアクセスを行うものとすると、その
サブシステムが発行する1回のロック要求に伴って発生
する通イコ回数の期待値Cは1次式で表わされ、nには
大きく依存しない。
The lock requesting transaction does not need to be aware of which host computer is the master of the data resource to be locked. As is clear from the above description, each lock manager only needs to communicate with the master host computer of the data resource to be locked, and may also communicate with other host computers.
Consider a system consisting of 1 host computer, divide the shared data resources into n equal groups, and divide the shared data resources into n equal groups.
Suppose you assign a computer as the master. Assuming that a subsystem on a host computer accesses all shared data resources with equal probability, the expected value C of the number of equalizations that occur with one lock request issued by that subsystem is It is expressed by a linear equation and does not depend greatly on n.

C=  (n−1,)  X  (1/n)=1−  
(1/n)もし、マスタを定めずに、全てのロックマネ
ージャが同一のロック情報を持つような方式であれば。
C= (n-1,) X (1/n)=1-
(1/n) If there is a system in which all lock managers have the same lock information without specifying a master.

C= n −1 となり、通信オーバヘッドはnと共に比例的に増大する
であろう。また、ロック要求元サブシステムの凪するホ
ストコンピュータがマスタである資源に対しては、通信
はそもそも発生しない。従って、サブシステムの共用デ
ータ資源に対するアクセスに局所性があることが予め判
明している場合には、そのサブシステムが主にアクセス
する共用データ資源のマスタを、そのサブシステムの属
するホストコンピュータに割り当てることにより、通信
オーバヘッドを減小させることが可能である。
C= n −1 and the communication overhead will increase proportionally with n. Moreover, no communication occurs in the first place for resources whose master is the host computer of the lock requesting subsystem. Therefore, if it is known in advance that access to a shared data resource by a subsystem has locality, the master of the shared data resource mainly accessed by that subsystem is assigned to the host computer to which that subsystem belongs. By doing so, it is possible to reduce communication overhead.

第2図は、第1図におけるロックマネージャのブロック
図である。第2図により、排他制御の手順を詳述する。
FIG. 2 is a block diagram of the lock manager in FIG. 1. The exclusive control procedure will be explained in detail with reference to FIG.

便宜上、ホストコンピュータ1上のサブシステム31が
、ロックマネージャ21にロック要求を発行する場合を
考える。
For convenience, let us consider a case where the subsystem 31 on the host computer 1 issues a lock request to the lock manager 21.

(a)資源グループAに屈する共用データ資源に対する
ロック要求の場合: この場合には、ロック対象データ資源のマスタ。
(a) In the case of a lock request for a shared data resource yielding to resource group A: In this case, the master of the data resource to be locked.

はホス[−コンピュータ1であるため1通信は発生しな
で。ロックマネージャ21は、ロック要求を受けると、
資源グループ管理テーブル130.資源ハツシュテーブ
ル151をたどって、資源テーブル1第1をサーチする
。1つの資源テーブルが1つのロック対象データ資源(
ブロック)に対応する。要求されたロック対象のデータ
資源に対応する′rCFXテーブルを作成して、資源ハ
ツシュテーブル151からのチェーンにつなぐ。資源ハ
シシュテーブル151は、資源名称を検索キーとして。
Since it is a host [-computer 1], no communication occurs. When the lock manager 21 receives a lock request,
Resource group management table 130. Following the resource hash table 151, the first resource table 1 is searched. One resource table has one lock target data resource (
block). A 'rCFX table corresponding to the requested data resource to be locked is created and connected to the chain from the resource hash table 151. The resource hashish table 151 uses the resource name as a search key.

ハツシング法により資源テーブルをサーチするためのテ
ーブルである。次に、ロックマネージャ21は1個々の
ロック要求に対応したロックテーブル181を作成し、
資源テーブルからのチェーンにつなぐ。また、ロックテ
ーブルは、トランザクションに対応するトランザクショ
ンテーブル141からのチェーンにもつながれている。
This is a table for searching resource tables using the hashing method. Next, the lock manager 21 creates a lock table 181 corresponding to each lock request,
Connect to the chain from the resource table. The lock table is also connected to a chain from the transaction table 141 corresponding to the transaction.

上記2つのチェーンにより、ロックテーブルがどの1−
ランザクジョンのどのデータ資源に対するロック要求に
対応したものであるかが表現される。ロック要求は、対
象データ資源に他のロックがかかつていないか、もしく
は他のロックがかかつていたとしても、そのロックモー
ドが要求ロックモードと両立する場合には、直ちに許可
される。ロック対象データ資源に対して、要求ロックモ
ードと両立しないモードのロックが既にかかつている場
合には、そのロック要求は、先jテするロックが解放さ
れるまで待たされる。本実施例では、5種類のロックモ
ードを匣用し5モ一ド間の両立性は、第3UAのマトリ
クスに従うものとする。モードの設定の方法は、第3図
に示す以外の任意のものでもよい。
The above two chains allow the lock table to
It expresses which data resource of the runzaktion the lock request corresponds to. A lock request is granted immediately if no other locks exist on the subject data resource, or if the lock mode is compatible with the requested lock mode, even if other locks exist. If the data resource to be locked is already locked in a mode that is incompatible with the requested lock mode, the lock request is made to wait until the previous lock is released. In this embodiment, five types of lock modes are used, and compatibility among the five modes is determined according to the matrix of the third UA. The mode setting method may be any method other than that shown in FIG.

(b)資源グループ已に属する共用データ資源に対する
ロック要求の場合: この場合、ロックマネージャ21は、資源グループ管理
テーブル130を参照して、ロック対圧データ資源のマ
スタがホス1−コンピュータ2であることを判断し、オ
ペレーティングシステム11の提供する通信機能を使用
してホストコンピュータ2上のロックマネージャ22に
ロック要求を転送する。転送されたロック要求を受けた
ロックマイ・−ジャ22では、(a)の場合と同じよう
な処理を行い、ロックが許可された時点で、その旨の応
答をホス1−コンピュータl上のロックマネージャ21
に送信する。応答を受信したロックマネージャ21は、
資源クループ管理テーブル130、資源ハツシュテーブ
ル152をたどって、資源テーブル173をサーチ(資
源テーブルがない場合には、新たに作成)し、ロックテ
ーブル184を作成してチェーンをつなぐ。ここで、注
意すべきことは、この場合に、ロック要求に対応したテ
ーブルが、ロック要求元サブシステムと同一ホストコン
ピュータ上のロックマネージャ21とロック対象資源の
マスタのホストコンピュータ上のロックマネージャ22
とで2重に設定されるということである。このことは、
後述のバックアップ系によるロック情報の再構成に関係
する。サブシステム31が、資源グループCに属する共
用データ資源に対してロック要求を発行する場合も、上
記の説明と同じである。
(b) In the case of a lock request for a shared data resource belonging to a resource group: In this case, the lock manager 21 refers to the resource group management table 130 and determines that the master of the lock pressure data resource is the host 1-computer 2. The lock request is transferred to the lock manager 22 on the host computer 2 using the communication function provided by the operating system 11. Upon receiving the transferred lock request, the lock miger 22 performs the same process as in case (a), and when the lock is granted, sends a response to that effect and transfers the lock on the host 1-computer l. manager 21
Send to. The lock manager 21 that received the response,
The resource group management table 130 and the resource hash table 152 are followed, the resource table 173 is searched (if the resource table does not exist, a new one is created), and the lock table 184 is created to connect the chain. What should be noted here is that in this case, the table corresponding to the lock request is stored in the lock manager 21 on the same host computer as the lock request source subsystem and the lock manager 21 on the master host computer of the lock target resource.
This means that it is set twice. This means that
This is related to the reconfiguration of lock information by the backup system, which will be described later. The above explanation is also the same when the subsystem 31 issues a lock request for a shared data resource belonging to resource group C.

次に、各サブシステムのバッファプール(41〜46)
の内容の同期の方法について、説明する。
Next, each subsystem's buffer pool (41 to 46)
This section explains how to synchronize the contents of .

各サブシステム(31〜36)は、各々バッファプール
(41〜46)を使用して、共用データ資源へのアクセ
スを行う。サブシステムは、アクセス対象のデータ資源
(ブロック)が既にバッファプール中に存在する場合に
は、共用ファイル装@(61〜66)との間で入出力を
行うことがなく、バッファプール中のデータ内容を使用
し、アクセス対象のデータ資g(ブロック)がバッファ
プール中にない場合のみ入出力を行うようにすることに
よって、共用ファイル装Et(61〜66)に対する入
出力回数を減小させている。ところが、バッファプール
は、サブシステムごとに独立して保有するため、本発明
に関するような複数ホストコンピュータによるデータ資
源の共用環境下では、自サブシステムのバッファプール
中のデータ内容か必すしも最新のものではない(他のサ
ブシステt1で、そのデータ資源を更新してしまった)
という事態が起こり得る。ロックマネージャ(21〜2
3)は、ロック要求に対する応答情報として、他サブシ
ステムで更新が発生した(従って、バッファプール中の
ブロックの内容は無効である)ことを、ロック要求元サ
ブシステムに通知する。これにより、サブシステムは、
共用ファイル装置(61〜66)に対する入出力を1個
々のアクセスごとにではなく、必要な場合、すなわち、
アクセス対象データ資源(ブロック)がバッファプール
中にない場合、およびアクセス対象データ資源がバッフ
ァプール中にあるが、他サブシスチムニ更新が行われた
ため、その内容が無効になっている場合のみ行えばよく
なる。
Each subsystem (31-36) uses a respective buffer pool (41-46) to access shared data resources. If the data resource (block) to be accessed already exists in the buffer pool, the subsystem does not perform input/output with the shared file device @ (61 to 66), and the data in the buffer pool is By using the contents and performing input/output only when the data resource g (block) to be accessed is not in the buffer pool, the number of input/outputs to the shared file device Et (61 to 66) can be reduced. There is. However, since the buffer pool is held independently for each subsystem, in an environment in which data resources are shared by multiple host computers as in the case of the present invention, the data contents in the buffer pool of the local subsystem are not always the latest. (The data resource has been updated in another subsystem t1)
Such a situation may occur. Lock manager (21-2
3) notifies the lock requesting subsystem that an update has occurred in another subsystem (therefore, the contents of the block in the buffer pool are invalid) as response information to the lock request. This allows the subsystem to
I/O to the shared file device (61-66) is performed not for each individual access, but when necessary, i.e.
This only needs to be done if the data resource (block) to be accessed is not in the buffer pool, or if the data resource to be accessed is in the buffer pool but its contents have been invalidated because it has been updated by another subsystem chimney.

上記応答情報を与えるため、ロックマネージャ(21〜
23)は、自ホストコンピュータがマスタである資源グ
ループに対して、更新同期マツプ(161〜163)を
設定し、各サブシステムの更新処理を記憶する。本実施
例では、更新同期マツプは、N個のエントリより成り、
各エントリは4バイトである。Nは資源名称をキーとし
てハシシンクを行ったときのハツシュスペース(ハツシ
ュ値の集合)の大きさに対応するものであり、システム
定義で指定する。Nの値は、更新処理を記憶するデータ
資源の単位(Nが大きいほど、細かい単位で更新が記憶
できる)と、更新同期マツプのために必要なメモリ(N
が大きいほど多くのメモリが必要である)の兼ね合いで
決定されるへきものである。更新同期マツプの各エント
リは、本実施例では4バイト(32ビツト)より成り、
各ビットが1つのサブシステムに対応する。第1図に示
すシステムでは、6個のサブシステムが稼動しているた
め、32ビツトのうちの6ビツトが実際に使用される。
In order to provide the above response information, the lock manager (21~
23) sets an update synchronization map (161 to 163) for the resource group of which the own host computer is the master, and stores update processing of each subsystem. In this embodiment, the update synchronization map consists of N entries,
Each entry is 4 bytes. N corresponds to the size of the hash space (set of hash values) when hash sync is performed using the resource name as a key, and is specified in the system definition. The value of N is determined by the unit of data resource that stores update processing (the larger N is, the more detailed the update can be stored) and the memory required for the update synchronization map (N
(The larger the value, the more memory is required). In this embodiment, each entry in the update synchronization map consists of 4 bytes (32 bits).
Each bit corresponds to one subsystem. In the system shown in FIG. 1, six subsystems are in operation, so six of the 32 bits are actually used.

上記ビットが1であることは、そのビットに対応するサ
ブシステムが該当エントリに対応するハツシュ値を持つ
データ資源を自系のバッファプール中に保有している場
合、そのデータの内容が有効であることを意味する。
If the above bit is 1, if the subsystem corresponding to that bit has a data resource with a hash value corresponding to the corresponding entry in its own system's buffer pool, the contents of that data are valid. It means that.

ここで、更新同期マツプの使用方法を詳述する。Here, we will explain in detail how to use the update synchronization map.

ロックマネージャは、サフソスアム力1らのロック要;
1〈を許可するときに、ロック対象データ資源のハシシ
ュ値に対応する更新同期マツプのエントリ中の上記サブ
システムに対応するビットを1にする。同時に、北記ロ
ック要求がデータ資源を更新するためのロック(第3図
のSU、 PU、EXモー1−のロックがこれに相当す
る)であれば、上記エントリ中の他のビットを全て0に
する。ロック要求元サブシステムに対しては、上記ビッ
ト操作を行う置市の該当するビットの状Jぷを応答情報
として伝える。このビットの値が1であれば、該当デー
タ資源に対してロック要求元サブシステムが前回行った
ロック要求から今回のロック要求までの間に、他サブシ
ステムがそのデータ資源に対して更新処理を行っていな
いことを意味し、ロック要求元サブシステムのバッファ
プール中にそのデータ資源が存在する場合、その内容は
有効である。
The lock manager is a lock manager for Safsoam force 1, etc.;
1<, the bit corresponding to the subsystem in the update synchronization map entry corresponding to the hash value of the data resource to be locked is set to 1. At the same time, if the lock request described above is a lock for updating data resources (corresponding to the SU, PU, and EXMo1 locks in Figure 3), all other bits in the above entry are set to 0. Make it. The lock requesting subsystem is informed of the state of the corresponding bit in the bit that performs the bit manipulation as response information. If the value of this bit is 1, another subsystem has performed update processing on the data resource between the previous lock request made by the lock requesting subsystem and the current lock request. If the data resource exists in the buffer pool of the lock requesting subsystem, its contents are valid.

逆に、このビットの値が0であれば、該当データ資源に
対して他サブシステムが更新を行った可能性があること
を意味し、ロック要求元サブシステムはデータ資源の内
容を必ず共用ファイル装置から読み込まなければならな
い。以上のような方法を用いれば、各サブシステムが行
うバッファリングの効果を損なうことなく、データ資源
をサブシステム間で共用できるようになる。
Conversely, if the value of this bit is 0, it means that another subsystem may have updated the corresponding data resource, and the lock requesting subsystem must always store the contents of the data resource in the shared file. Must be read from the device. By using the above method, data resources can be shared between subsystems without impairing the effectiveness of buffering performed by each subsystem.

次に、システム内で、各種の故障が発生した場合の対策
を述べる。故障には1次の3種類が考えられる。(a)
サブシステムの故障、(b)通信装置の故障、(c)ホ
ストコンピュータの故障(オペレーティングシステムの
故障を含む)以下、上記3種類の故障が発生した場合の
ロックマネージャの動作を述べる。これにより、故障が
発生しても、データ資源の整合性を保ちながら。
Next, we will discuss countermeasures when various types of failures occur within the system. There are three types of failures: primary. (a)
Subsystem failure (b) communication device failure; (c) host computer failure (including operating system failure) The operation of the lock manager when the above three types of failure occur will be described below. This allows you to maintain the integrity of your data resources even if a failure occurs.

システムの運転を効率的に継続することができる。The system can continue to operate efficiently.

先ず、サブシステムの故障の場合には、共用データ資源
に対するアクセスが完結していないため、データの内容
に矛盾が含まれている可能性がある。
First, in the case of a subsystem failure, since access to the shared data resource is not completed, there is a possibility that the contents of the data may contain inconsistencies.

従って、故障したサブシステムがロックを保有していた
共用データ資源をアクセス禁止にして、データの復元処
理が完了するまでその禁止状態を保持する必要がある。
Therefore, it is necessary to prohibit access to the shared data resource that was held by the failed subsystem and maintain this prohibited state until the data restoration process is completed.

今、第2図をロックマネージャ21のブロック図として
、サブシステム31が故障した場合を想定す・る。他の
ロックマネージャの処理や他のサブシステムが故障した
場合の処理も、全て同じように行われる。サブシステム
の故障は、本実施例では、別途設けられたサブシステム
の監視モニタにより検出してロックマネージャに通知す
る。上記監視モニタは、本発明の構成要1牛には含まれ
ない。
Now, using FIG. 2 as a block diagram of the lock manager 21, assume that the subsystem 31 fails. Processing of other lock managers and processing when other subsystems fail are all performed in the same way. In this embodiment, a subsystem failure is detected by a separately provided subsystem monitor and notified to the lock manager. The above-mentioned monitoring monitor is not included as one component of the present invention.

ロックマネージャ21がサブシステム31の故障を検出
すると、サブシステム管理テーブル120、トランザク
ションテーブル141.142をたどってサブシステム
31が保有するロックに対応するロックテーブル181
,182,184゜185をサーチする。次に、上記ロ
ックテーブル中にロック保留ステータスを設定し、同時
に上記ロックの対象データ資源に対応する資源テーブル
1第1.172,173,174にも保留ステータスお
よび保留したロックのモードを記録する。
When the lock manager 21 detects a failure in the subsystem 31, it traces the subsystem management table 120 and the transaction tables 141 and 142 and creates a lock table 181 corresponding to the lock held by the subsystem 31.
, 182, 184°185. Next, the lock pending status is set in the lock table, and at the same time, the pending status and the pending lock mode are also recorded in resource table 1 No. 1.172, 173, and 174 corresponding to the data resource to be locked.

以後、保留ステータスにあるデータ資源に対して保留さ
れたロックのモードと両立しないロック要求が他サブシ
ステムから発行された場合、ロックマネージャ21はそ
のロック要求を拒絶する。上記ロックの保留は、サブシ
ステム31が回復してデータ復元処理を完了した時点で
5その旨をサブシステム31がロックマネージャ21に
報告することにより解除される。以上の処理により、サ
ブシステムが故障した場合、矛盾を有する可能性のある
共用データ資源に対するアクセスを禁止することが可能
となる。
Thereafter, if another subsystem issues a lock request that is incompatible with the mode of the lock held for the data resource in the pending status, the lock manager 21 rejects the lock request. The suspension of the lock is released by the subsystem 31 reporting this to the lock manager 21 when the subsystem 31 recovers and completes the data restoration process. Through the above processing, in the event of a subsystem failure, it is possible to prohibit access to shared data resources that may have inconsistencies.

次に、通信装置の故障の場合のロックマネージャの動作
を述べる。便宜上、通信装置4が故障してホストコンピ
ュータ1とホストコンピュータ2との連絡が不可能にな
ったものとして、ロックマネージャ21の動作を述べる
。ロックマネージャ21は通信不能相手ホストコンピュ
ータ2がマスタであるデータ資g(資源グループBに属
するデータ資源〕に対する自ホストコンピュータ1上の
サブシステム31.32からのロック要求を拒絶するこ
とにより、サブシステム31.32に対して5i:源グ
ループBへのアクセスを禁止する。同時に、ロックマネ
ージャ21は、通信不能相手ホストコンピュータ2上の
サブシステム33.34が、白系がマスタであるデータ
資、原(資源グループAに屈するデータ資源)に対して
保有しているロックを保留状態とし、保留されたロック
と両立しないロック要求を拒絶する。上記のアクセス禁
止状態とロックの保留状態は、通信装置の故障が回復し
た時点で解除される。ホストコンピュータ1とホストコ
ンピュータ2の間の通(iが回復すると、ロックマネー
ジャ21とロックマネージャ22は相互に自系上のトラ
ンザクションの状態を相手に報告する。例えば、I−ラ
ンザクジョンテーブル141に対応するトランザクショ
ンが、通信装置の故障中に終了していたとすると、その
トランザクションは、保有しているロック181,18
4を解放するが、ロック184の解放は、ロック対象デ
ータ資源173のマスタであるホストコンピュータ2に
は連絡できない。通信回復時に、互いのトランザクショ
ンの状態を報告することにより、ロックマネージャ22
はトランザクション141の終了を認識し、自系のテー
ブルからロックテーブル184に対応するテーブルを解
放する。このようにして、ロックマイ・−ジャ間のテー
ブルのずれが解消できる。以上の処理により1通信i1
2百が故障した場合、データ資源の内容に矛盾が発生し
ないようにサブシステムからのアクセスを禁止し。
Next, the operation of the lock manager in the case of a communication device failure will be described. For convenience, the operation of the lock manager 21 will be described assuming that the communication device 4 has failed and communication between the host computers 1 and 2 has become impossible. The lock manager 21 rejects the lock request from the subsystems 31 and 32 on its own host computer 1 for the data resource g (data resource belonging to resource group B) that is mastered by the host computer 2 with which it is unable to communicate. 5i: Forbids access to source group B for 31.32.At the same time, the lock manager 21 prohibits access to source group B. At the same time, the lock manager 21 prohibits the subsystems 33. The lock held for the data resource (data resource that yields to resource group A) is placed in a pending state, and lock requests that are incompatible with the held lock are rejected. When i recovers, the communication between host computer 1 and host computer 2 is released. When i recovers, lock manager 21 and lock manager 22 mutually report the status of transactions on their own system to the other. For example, , the transaction corresponding to the I-transaction table 141 is terminated while the communication device is out of order.
4, but the release of the lock 184 cannot be communicated to the host computer 2, which is the master of the locked data resource 173. Upon communication recovery, the lock managers 22
recognizes the end of transaction 141 and releases the table corresponding to lock table 184 from its own tables. In this way, table misalignment between the lock miger and the lock miger can be eliminated. With the above processing, 1 communication i1
200, access from subsystems is prohibited to prevent inconsistencies in the contents of data resources.

故障の回復とともにロックマネージャ間の整合性を回復
させることが可能である。
It is possible to restore consistency between lock managers while recovering from a failure.

最後に、ホストコンピュータの故障(オペレーティング
システムの故障を含む)の場合のロックマネージャの動
作を述べる。ホストコンピュータ1が故障したとすると
、ロックマネージャ21は動作できなくなるため、他の
ホストコンピュータ上のサブシステム33,34,35
.36は、ホストコンピュータlがマスタであるデータ
FC@(資源グループへ二屈するデータ資源)にアクセ
スが不可能となる。ホストコンピュータ1の故障が回復
するまで、上記アクセス不可能状態が続くことは、デー
タ資源の不用性の視点からは望ましくない。
Finally, we describe the operation of the lock manager in the event of host computer failure (including operating system failure). If the host computer 1 fails, the lock manager 21 will no longer be able to operate, so the subsystems 33, 34, 35 on other host computers will fail.
.. 36 becomes inaccessible to the data FC@ (data resource that doubles over to the resource group) of which the host computer l is the master. It is undesirable for the inaccessible state to continue until the failure of the host computer 1 is recovered from the viewpoint of the unavailability of data resources.

そのため、ロックマネージャ21 (これを、オリジナ
ル系と呼ぶ)に対してバックアップ系を設け、ロックマ
ネージャ21が動作不能になったときには、バックアッ
プ系が新たに資源グループAのマスタとなり、資源グル
ープAに屈するデータ資源に対するアクセスが続行でき
るようにする。
Therefore, a backup system is provided for the lock manager 21 (this is called the original system), and when the lock manager 21 becomes inoperable, the backup system becomes the new master of resource group A and submits to resource group A. Enable continued access to data resources.

オリジナル系に対するバックアップ系の選定の方法は、
任意である。本実施例では、ホストコンピュータ1のバ
ックアップ系をホストコンピュータ2.ホストコンピュ
ータ2のバックアップ系をホストコンピュータ3、ホス
トコンピュータ3のバックアップ系をホストコンピュー
タ1と1便宜止定める。従って、ホストコンピュータl
が故障した場合、資源グループAに関する排他制御は、
ホストコンピュータ2上のロックマネージャ22が行う
ことになる。
The method for selecting a backup system for the original system is as follows.
Optional. In this embodiment, the backup system of the host computer 1 is the host computer 2. For convenience, the backup system of the host computer 2 is designated as the host computer 3, and the backup system of the host computer 3 is designated as the host computer 1. Therefore, the host computer l
If resource group A fails, exclusive control regarding resource group A is
The lock manager 22 on the host computer 2 will do this.

ここで問題となるのは、ロックマネージャ22は、新た
に資源グループAのマスタの機能を果そうとする場合、
動作不能となった時点でロックマネージャ21が管理し
ていたロック情報と同じ情報を持つ必要があるというこ
とである。既に述へたように、サブシステムが保有して
いるロック情報は、ロック対象資源のマスタとなるホス
トコンピュータがサブシステムの動作をするホストコン
ピュータと異なる場合には、双方のホストコンピュータ
上のロックマネージャで同一のロック情報を2重に持っ
ている。説明に即して述べると、サブシステム33.3
4が資源グループAに屈するデータ資源にかけているロ
ック情報はロックマネージャ21と23が保有している
。従って、ロックマネージャ22は、ロックマネージャ
23と通信を行うことにより、サブシステム33.34
゜35.36が資源グループAに属するデータ資源にか
けているロックの情報を再構成することができる。以上
の説明により、故障したホストコンピュータ上で動作し
ていたサブシステムが、自ホストコンピュータがマスタ
であるデータ資源グループAに屈する資源にかけていた
ロックの情報を再構成する手段があれば、バンクアップ
系のロックマ不−ンヤ22は全ての必要なロック情報を
再購1戊できることがわかる。
The problem here is that when the lock manager 22 attempts to newly perform the function of the master of resource group A,
This means that it is necessary to have the same information as the lock information that the lock manager 21 was managing at the time it became inoperable. As mentioned above, if the host computer that is the master of the resource to be locked is different from the host computer that operates the subsystem, the lock information held by the subsystem is shared by the lock managers on both host computers. has the same lock information twice. For purposes of discussion, subsystem 33.3
The lock managers 21 and 23 hold information on the lock placed on the data resource by the resource group A. Therefore, the lock manager 22 communicates with the lock manager 23 so that the subsystems 33.34
It is possible to reconstruct the information on the locks held by 35.36 on the data resources belonging to resource group A. Based on the above explanation, if there is a means for the subsystem operating on the failed host computer to reconfigure the information on the locks that the local host computer has placed on the resources that are subject to data resource group A, which is the master, the bankup system It can be seen that the lock manager 22 can repurchase all necessary lock information.

」二記のようなロック情報再構成の手段として、本実施
例では、2種類の手段を用意している。この2種類の手
段のうち、いずれか一方だけを使用するか、2種類を併
用してf3頼性の向上を図るか、またはいずれも使用せ
す、従ってマスタに対するバックアップを設けないかは
、個々のシステムの特性に応してシステム管理者が決定
すればよい。
In this embodiment, two types of means are prepared as means for reconfiguring lock information as described in 2. It is up to each individual whether to use only one of these two methods, to use both methods together to improve f3 reliability, or to use both methods and therefore not provide a backup for the master. The system administrator may decide this based on the characteristics of the system.

第・1図は、ロック情報再構成の第1の手段の説明図で
ある。この手段では、ロックマネージャ2Iが、自ホス
トコンピュータ上のサブシステム31.32からの資源
クループAに居する共用データ資源に対するロック要求
もしくはアンロック要求を受け、ロックを許可もしくは
解放する場合、そのことをバックアップ系のロックマネ
ージャ22に連絡する。ロックマネージャ22は、上記
連絡にもとづいて、サブシステム31.32が資源グル
ープAに凰する共用データ資源にかけているロックに関
して、対応したテーブル群を設定する。
FIG. 1 is an explanatory diagram of the first means for reconfiguring lock information. With this means, when the lock manager 2I receives a lock request or an unlock request for a shared data resource residing in resource group A from a subsystem 31 or 32 on its own host computer, and grants or releases the lock, is communicated to the backup lock manager 22. Based on the above communication, the lock manager 22 sets a corresponding table group regarding the locks that the subsystems 31 and 32 have placed on the shared data resources belonging to the resource group A.

この手段では、バンクアップ系のロックマネージャ22
は、必要なロック情報をオリジナル系のロックマネージ
ャ21と同一のテーブルの形で保有しているため、ロッ
ク情報の再構成が必要になった場合でも、何等特別な処
理を必要としない。ただし、この方式では、通常のサブ
システム動作時の通fごオーバヘラ1−が増大する。
With this method, the bank-up type lock manager 22
Since the lock manager 21 retains the necessary lock information in the same table format as the original lock manager 21, no special processing is required even if the lock information needs to be reconfigured. However, this method increases the throughput overhead during normal subsystem operation.

次に、第5図は、ロック情報再構成の第2の手段の説明
図である。各サブシステムは、各種の故障発生時にデー
タ資源を無矛盾な状態に回復できるようにするため、管
理下のトランザクションが行う更新処理を、ジャーナル
ファイルに記録している。従って、サブシステムのジャ
ーナルファイルを読めば、そのサブシステムが更新中で
あるデータ*源(すなわち、更新のためのロックをかけ
ているデータ資源)が特定できる。ここで、問題にして
いるロック情報の再構成は、故障したホストコンピュー
タ上で動作していたサブシステムの保有するロックに関
するものであるため、参照のためのロックは、無視して
よい。何故ならば、そのサブシステムはホストコンピュ
ータの故障と共に動作しなくなるので、そのサブシステ
ムが更新処理中のデータ資源には矛盾が含まれている可
能性があるため、他のサブシステムからのアクセスを禁
止する必要があるが、そのサブシステムが参照だけを行
っていたデータ資源には矛盾は含まれないため、ロック
情報を再構成してアクセス禁止にしなくてもよいからで
ある。
Next, FIG. 5 is an explanatory diagram of a second means for reconfiguring lock information. Each subsystem records update processing performed by managed transactions in a journal file so that data resources can be restored to a consistent state when various types of failures occur. Therefore, by reading a subsystem's journal file, it is possible to identify the data*source that the subsystem is updating (ie, the data resource that is locked for update). Here, the reconfiguration of lock information in question relates to locks held by subsystems that were operating on the failed host computer, so locks for reference can be ignored. This is because the subsystem will stop working if the host computer fails, and the data resources that the subsystem is updating may contain inconsistencies, so access from other subsystems will not be possible. This is because, although it is necessary to prohibit access, there is no conflict in the data resource that the subsystem has only referenced, so there is no need to reconfigure the lock information to prohibit access.

第5図の場合、バックアップ系のロックマネージャ22
は、ホストコンピュータ1の故障を検出すると、サブシ
ステム31.32のジャーナルファイル5 ] + 5
2を読み、仕掛り中のトランザクションのジャーナルレ
コードより、サブシステム31.32が更新処理中の資
源グループAに属するデータ資源を求め、そのデータ資
源に対応する資源テーブルとロックテーブルを作成して
保留状態とする。この手段では、ロック情報の再構成が
必要となった場合に、サブシステムのジャーナルファイ
ルを読んでテーブルを設定するという処理が必要となる
が、通常のサブシステム動作時には、余分なオーバヘッ
ドはかからない。なお、ロックマネージャ22がジャー
ナルファイル51.52を読むことができるためには、
ジャーナルファイルIQ置51 、 52がホストコン
ピュータ2と接続されている必要があるが、第1図には
示されていない。
In the case of Figure 5, the backup lock manager 22
When detecting a failure in host computer 1, journal file 5 of subsystem 31.32 + 5
2, subsystems 31 and 32 find the data resource belonging to resource group A that is being updated from the journal record of the transaction in progress, create a resource table and a lock table corresponding to that data resource, and hold it. state. With this method, when lock information needs to be reconfigured, it is necessary to read the subsystem's journal file and set up the table, but no extra overhead is incurred during normal subsystem operation. Note that in order for the lock manager 22 to be able to read the journal files 51 and 52,
Journal file IQ locations 51 and 52 must be connected to the host computer 2, but are not shown in FIG.

第6図から第12図までは、本発明によるロック、アン
ロックの手順のフローチャートである。
6 to 12 are flowcharts of locking and unlocking procedures according to the present invention.

第6図において、各トランザクションは、同一ホストコ
ンピュータ上のロックマネージャに対してロック要求を
行う。ロック要求元に対応したトランザクションテーブ
ルをサーチし、なければ新たに作成する(ステップ10
01)、ロック対象データ資源の居する資源グループテ
ーブルをサーチする(ステップ1002)。ロック対象
データ資源のマスタが自系であれば(ステップ1003
)、ロック対象データ資源に対応する資源テーブルをサ
ーチし、なければ新たに作成する(ステップ1004)
。また、データ資源が保存されており、要求ロックモー
ドと両立しないならば(ステンプ1005)、エラーリ
ターン/エラ一応答送信を行い、両立するならば、ロッ
クテーブルを作成してチェーンを設定する(ステップ1
006)。
In FIG. 6, each transaction makes a lock request to a lock manager on the same host computer. Search for the transaction table corresponding to the lock request source, and if it does not exist, create a new one (Step 10)
01), the resource group table containing the data resource to be locked is searched (step 1002). If the master of the data resource to be locked is the own system (step 1003
), searches for the resource table corresponding to the data resource to be locked, and if it does not exist, creates a new one (step 1004)
. Also, if the data resource is saved and is incompatible with the request lock mode (step 1005), an error return/error response is sent, and if it is compatible, a lock table is created and a chain is set (step 1005). 1
006).

第7図では、ロックが即時許可されるならば(ステップ
1007)、更新同期マツプのエントリをサーチして、
ビット状!ぷを応答領域にセットする(ステップ+00
9)。また、ロックが許可できなければ、許可されるま
でロック要求を待たせる(ステップ1008)。更新同
期マツプエントリ中のロック要求元サブシステムに対応
するピッ1−を○Nにする(ステップ1010)。また
In FIG. 7, if the lock is granted immediately (step 1007), an entry in the update synchronization map is searched,
Bit-like! Set pu in the response area (step +00
9). If the lock cannot be granted, the lock request is made to wait until the lock is granted (step 1008). The pin 1- corresponding to the lock request source subsystem in the update synchronization map entry is set to N (step 1010). Also.

更新のためのロック要求であれば、更新同期マツプエン
トリ中の他のサブシステムに対応するピッ1−をクリア
する(ステップ1011.1012)。
If it is a lock request for update, the pins corresponding to other subsystems in the update synchronization map entry are cleared (steps 1011 and 1012).

第8図においては、第4図の方式のバックアップ系があ
り、かつ自系サブシステムからのロック要求である場合
には、テーブル変更情報(ロック許可)をバックアップ
系に連絡する(ステップ1013.1014)。また、
他系上のサブシステムからのロック要求である場合には
、正常応答を要求元に送信する(ステップ1015,1
.016)。一方、白系がマスタのデータ資源に対する
ロック要求でない場合には、第9図において、ロック要
求をロック対象データ資源のマスタのホス1−に転送し
て応答を待つ(ステップ10 ] 7)。正フ;ヤ応答
でなければ、エラーリターンを送出しくステップ101
.8)、正常応答であれば、ロック対象データ資源に対
応する資源テーブルをサーチし、なければ新たに作成す
る(ステップ1019)。
In FIG. 8, if there is a backup system using the method shown in FIG. 4 and the lock request is from the local subsystem, table change information (lock permission) is communicated to the backup system (steps 1013 and 1014). ). Also,
If the lock request is from a subsystem on another system, a normal response is sent to the request source (step 1015, 1
.. 016). On the other hand, if the white type is not a lock request for the master data resource, in FIG. 9, the lock request is transferred to the master host 1- of the data resource to be locked and a response is waited for (step 10). If the response is not correct, send an error return step 101
.. 8) If there is a normal response, search the resource table corresponding to the data resource to be locked, and if not, create a new one (step 1019).

次に、ロックテーブルを作成してチェーンを設定する(
ステップ1020)。
Next, create a lock table and set up the chain (
Step 1020).

次に、アンロックの場合には、第10図に示すように、
解放すべきロックに対応するロックテーブルをサーチす
る(ステップ1.021)。その場合、自系がマスタの
データ資源にかけられているロックであり(ステップ1
022)、また、第4図の方式のバックアップ系であり
、かつ自系サブシステムからのアンロック要求であれば
(ステップ1023)、テーブル変更(ロック解放)を
バックアップ系に通知する(ステップ1024)。
Next, in the case of unlocking, as shown in Figure 10,
Search the lock table corresponding to the lock to be released (step 1.021). In that case, the lock is on the master's data resource (step 1).
022), and if the system is a backup system using the method shown in Figure 4 and the unlock request is from the own subsystem (step 1023), the table change (lock release) is notified to the backup system (step 1024). .

第4図のバンクアップ系で自系サブシステムからのアン
ロック要求でないときには、ロックテーブルを解放する
(ステップ1025)。また、第11図に示すように、
そのデータ資源にかかつている最後のロックの解放であ
るときには(ステップ1026)、資源テーブルを解放
する(ステップ1027)。また、最後のロックの解放
でなければ、そのデータ資源に対する待ち状態のロック
要求があるときには(ステップ1028)、このアンロ
ック要求により許可が可能となった待ち状店のロック要
求について、待ちを解除する(ステップ1029)。
If the unlock request is not from the own subsystem in the bank-up system shown in FIG. 4, the lock table is released (step 1025). Furthermore, as shown in Fig. 11,
When the last lock on the data resource is released (step 1026), the resource table is released (step 1027). In addition, if the last lock is not released, if there is a pending lock request for the data resource (step 1028), the pending lock request for the pending store that can be granted by this unlock request is released. (step 1029).

また、第12図において、自系がマスタのデータ資源に
かけられているロックでない場合には(ステップ102
2)、アンロック要求を対象データ資源のマスタのホス
トに転送する(ステップ1030)。次に、ロックテー
ブルを解放する(ステップ1031)。そのデータ資源
にかかつている最後のロックの解放であれば(ステップ
1032)、資源テーブルを解放する(ステップ103
3)。
In addition, in FIG. 12, if the own system is not locked on the master's data resource (step 102
2) forwarding the unlock request to the master host of the target data resource (step 1030); Next, the lock table is released (step 1031). If the last lock on the data resource is released (step 1032), the resource table is released (step 103).
3).

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

以上説明したように、本発明によれば、複数データ処理
装置によるデータ資源の共用が、特別なハードウェアを
用いることなく、かつデータ処理装置の台数にあまり依
存しない少ない通信オーバヘッドにより実現できるので
、経済的で高性能なデータベース共用システムを構築で
きる。また。
As explained above, according to the present invention, data resources can be shared by multiple data processing devices without using special hardware and with a small communication overhead that does not depend much on the number of data processing devices. An economical and high-performance database sharing system can be constructed. Also.

本発明によれば、各サブシステムはバッファプール中の
データの有効性を判断できるので、データ資源の共用環
境下でもバッファリング手法を用いることができる。ま
た、各種の故障が発生した場合、データ資源を選択的に
アクセス禁止にできるので、データの保全性を保つこと
ができ、さらにロックマネージャが動作不能になった場
合、他のロックマネージャにより速やかに処理が代行さ
れるので、システムの信頼性、可用性を高めることがで
きる。
According to the present invention, since each subsystem can determine the validity of data in the buffer pool, buffering techniques can be used even in an environment where data resources are shared. In addition, in the event of any type of failure, access to data resources can be selectively prohibited, ensuring data integrity.Furthermore, if a lock manager becomes inoperable, other lock managers can quickly Since the processing is delegated, the reliability and availability of the system can be improved.

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

第1図は本発明の一実施例を示すコンピュータシステム
のブロック図、第2図は第1図のロックマネージャの内
部ブロック図、第3図は本発明におけるロックモー1−
の両立性マトリクスを示す図、第1図、第5図は本発明
におけるバックアップ系の設定の例を示す図、第6図か
ら第12図までの各図は本発明の一実施例を示すロック
、アンロックの手順を示すフローチャー1−である。 1.2,3:データ処理装置、4:通信装置、II、1
2,13:オペレーティングシステム、21.22,2
3:ロックマネージャ、31〜36:サブシステム、4
1〜46:バッファプール、51〜56:ジャーナルフ
ァイル、61〜66:共用ファイル装置、100:ホス
ト管理テーブル。 120:サブシステム管理テーブル、141.i42、
+43=トランザクシヨンテーブル、151.152,
153:資源ハツシュテーブル、161.162,16
3:更新同期マツプ、1第1〜175:資源テーブル、
181〜186二ロツ第 1 区 第 2 図 O:雨空する × :両立(lい 第4− 図 力 5 図 昭 6 口 )何  り  し1 茅 2 図 第 lO図 第 11  図 fII、’  ロ
FIG. 1 is a block diagram of a computer system showing an embodiment of the present invention, FIG. 2 is an internal block diagram of the lock manager in FIG. 1, and FIG. 3 is a lock mode 1-1 in the present invention.
Figures 1 and 5 are diagrams showing examples of backup system settings in the present invention, and Figures 6 to 12 are diagrams showing locks showing one embodiment of the present invention. , is a flowchart 1- showing the unlocking procedure. 1.2, 3: Data processing device, 4: Communication device, II, 1
2,13: Operating system, 21.22,2
3: Lock manager, 31-36: Subsystem, 4
1-46: Buffer pool, 51-56: Journal file, 61-66: Shared file device, 100: Host management table. 120: Subsystem management table, 141. i42,
+43=transaction table, 151.152,
153: Resource hash table, 161.162,16
3: Update synchronization map, 1st to 175: Resource table,
181-186 Nirotsu 1st Ward 2nd Figure O: Rain and sky ×: Compatibility (1st 4th - Figure 5 Figuresho 6th) Dorishi 1 Thatch 2 Figure 1O Figure 11 Figure fII, 'Ro

Claims (2)

【特許請求の範囲】[Claims] (1)複数のデータ処理装置と、該データ処理装置を相
互接続する通信装置と、該データ処理装置により共用さ
れるデータ資源を記憶するファイル装置とを備え、かつ
上記データ処理装置は各々、上記共用データ資源へアク
セスする単数ないし複数のサブシステムと、該サブシス
テムの共用データ資源へのアクセスに対する排他制御を
行うロックマネージャとを具備したコンピュータシステ
ムにおいて、上記共用データ資源を論理的に分割し、各
分割されたデータ資源の集合ごとにマスタとなるデータ
処理装置を定めるとともに、上記各ロックマネージャに
、自系がマスタである共用データ資源に対して、どのサ
ブシステムが最新の更新を行ったかを記憶する手段を具
備し、共用データ資源に対するロック要求が、ロック対
象データ資源のマスタであるデータ処理装置上のロック
マネージャに転送されると、該ロックマネージャはロッ
ク要求に対する応答情報として、上記記憶手段にもとづ
き、ロック要求元サブシステムが管理するバッファプー
ル中のデータ内容が有効か否かを通知して、排他制御を
行うことを特徴とするシステム間データベース共用方式
(1) A plurality of data processing devices, a communication device that interconnects the data processing devices, and a file device that stores data resources shared by the data processing devices; In a computer system comprising one or more subsystems that access a shared data resource and a lock manager that exercises exclusive control over the subsystem's access to the shared data resource, logically dividing the shared data resource, In addition to determining the master data processing device for each set of divided data resources, each lock manager is informed of which subsystem has made the latest update to the shared data resource of which its own system is the master. When a lock request for a shared data resource is transferred to a lock manager on a data processing device that is a master of the data resource to be locked, the lock manager stores the storage means as response information to the lock request. An inter-system database sharing method is characterized in that a lock requesting subsystem performs exclusive control by notifying whether the data contents in a buffer pool managed by the subsystem are valid or not.
(2)上記ロックマネージャは、サブシステムや通信装
置が故障した場合には、データ資源の整合性を保持する
ようにロックを保留して、選択的にデータ資源をアクセ
ス禁止にし、かつデータ処理装置の故障により動作不能
となった場合には、故障したデータ処理装置がマスタで
あった共用データ資源に関して別個のデータ処理装置が
新たにマスタとなることを特徴とする特許請求の範囲第
1項記載のシステム間データベース共用方式。
(2) In the event of a failure in a subsystem or communication device, the lock manager suspends locks to maintain the integrity of the data resource, selectively prohibits access to the data resource, and If the shared data resource becomes inoperable due to a failure, a separate data processing device becomes the new master for the shared data resource for which the failed data processing device was the master. intersystem database sharing method.
JP60285514A 1985-12-20 1985-12-20 Intersystem data base sharing system Pending JPS62145349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60285514A JPS62145349A (en) 1985-12-20 1985-12-20 Intersystem data base sharing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60285514A JPS62145349A (en) 1985-12-20 1985-12-20 Intersystem data base sharing system

Publications (1)

Publication Number Publication Date
JPS62145349A true JPS62145349A (en) 1987-06-29

Family

ID=17692512

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60285514A Pending JPS62145349A (en) 1985-12-20 1985-12-20 Intersystem data base sharing system

Country Status (1)

Country Link
JP (1) JPS62145349A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01211140A (en) * 1988-02-16 1989-08-24 Internatl Business Mach Corp <Ibm> Data resources accessing
JPH0312773A (en) * 1989-06-09 1991-01-21 Fujitsu Ltd Recovery processing system for local abnormality in data base processing
JPH03135639A (en) * 1989-06-30 1991-06-10 Digital Equip Corp <Dec> Digital data management system
JPH08147205A (en) * 1994-11-18 1996-06-07 Nec Corp Disk sharing system
US5619691A (en) * 1990-10-19 1997-04-08 Hitachi, Ltd. File sharing method and system for multiprocessor system
WO2012147203A1 (en) * 2011-04-28 2012-11-01 三菱電機株式会社 System controller and program

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01211140A (en) * 1988-02-16 1989-08-24 Internatl Business Mach Corp <Ibm> Data resources accessing
JPH0312773A (en) * 1989-06-09 1991-01-21 Fujitsu Ltd Recovery processing system for local abnormality in data base processing
JPH03135639A (en) * 1989-06-30 1991-06-10 Digital Equip Corp <Dec> Digital data management system
US5619691A (en) * 1990-10-19 1997-04-08 Hitachi, Ltd. File sharing method and system for multiprocessor system
JPH08147205A (en) * 1994-11-18 1996-06-07 Nec Corp Disk sharing system
WO2012147203A1 (en) * 2011-04-28 2012-11-01 三菱電機株式会社 System controller and program
JP5558632B2 (en) * 2011-04-28 2014-07-23 三菱電機株式会社 System controller, equipment system and program
US9488970B2 (en) 2011-04-28 2016-11-08 Mitsubishi Electric Corporation System controller and program

Similar Documents

Publication Publication Date Title
US8145873B2 (en) Data management method for network storage system and the network storage system built thereof
US7194467B2 (en) Using whole-file and dual-mode locks to reduce locking traffic in data storage systems
US6249879B1 (en) Root filesystem failover in a single system image environment
JP5567342B2 (en) Network data storage system and data access method thereof
US7454422B2 (en) Optimization for transaction failover in a multi-node system environment where objects&#39; mastership is based on access patterns
US6247139B1 (en) Filesystem failover in a single system image environment
JP5254611B2 (en) Metadata management for fixed content distributed data storage
EP2176756B1 (en) File system mounting in a clustered file system
US6421787B1 (en) Highly available cluster message passing facility
US4399504A (en) Method and means for the sharing of data resources in a multiprocessing, multiprogramming environment
KR100974156B1 (en) Apparatus, system, and method for file system serialization reinitialization
US6457098B1 (en) Methods and apparatus for coordinating shared multiple raid controller access to common storage devices
US7376651B2 (en) Virtual storage device that uses volatile memory
US7774568B2 (en) Clustered snapshots in networks
US20090094243A1 (en) Method for managing lock resources in a distributed storage system
US9652346B2 (en) Data consistency control method and software for a distributed replicated database system
JPS62197858A (en) Inter-system data base sharing system
KR100450400B1 (en) A High Avaliability Structure of MMDBMS for Diskless Environment and data synchronization control method thereof
US7702757B2 (en) Method, apparatus and program storage device for providing control to a networked storage architecture
JP3222125B2 (en) Database sharing method between systems
JPS62145349A (en) Intersystem data base sharing system
JP2685530B2 (en) How to manage shared data
US20080133863A1 (en) Map shuffle-allocation map protection without extra i/o&#39;s using minimal extra disk space
US20060106996A1 (en) Updating data shared among systems
EP0049423B1 (en) Multiprocessor system