JPH09292999A - Transaction exclusive system in cluster system - Google Patents
Transaction exclusive system in cluster systemInfo
- Publication number
- JPH09292999A JPH09292999A JP8130966A JP13096696A JPH09292999A JP H09292999 A JPH09292999 A JP H09292999A JP 8130966 A JP8130966 A JP 8130966A JP 13096696 A JP13096696 A JP 13096696A JP H09292999 A JPH09292999 A JP H09292999A
- Authority
- JP
- Japan
- Prior art keywords
- transaction
- execution right
- host computer
- host
- execution
- 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
Links
- 238000012545 processing Methods 0.000 claims abstract description 37
- 238000000034 method Methods 0.000 claims description 15
- 238000004891 communication Methods 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 12
- 238000012546 transfer Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 230000008901 benefit Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000007717 exclusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Multi Processors (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、クラスタシステム
に関し、特にクラスタシステムでトランザクション処理
を行う情報処理システムに関し、特にトランザクション
の排他制御方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cluster system, and more particularly to an information processing system for performing transaction processing in the cluster system, and more particularly to a transaction exclusive control system.
【0002】[0002]
【従来の技術】従来のマルチプロセッサシステムにおけ
るタスクのスケジューリング方式の一例として、例えば
特開平6−119300号公報には、余分な処理用オー
バヘッドを生じることなく、資源を効率よく利用するタ
スクのスケジューリング方式を提供することを目的とし
て、各タスクがスケジューラに自分の処理特性を知ら
せ、この処理特性を利用可能な資源に応じて、スケジュ
ーラプログラムを用いて使用する資源を選択するタスク
のスケジューリング方式が記載されている。2. Description of the Related Art As an example of a task scheduling method in a conventional multiprocessor system, for example, Japanese Patent Laid-Open No. 6-119300 discloses a task scheduling method for efficiently using resources without causing extra processing overhead. The task scheduling method is described in which each task informs the scheduler of its own processing characteristics, and the resources to be used are selected by the scheduler program according to the available resources. ing.
【0003】また、特開平1−205369号公報に
は、複数のコンピュータの内ジョブを実行するコンピュ
ータを決定する手段において、ジョブ制御限度に含む情
報に基づきジョブを実行するコンピュータを自動的に指
定する手段を有することにより、システム構成を意識す
ることなくシステムを有効に利用することができるよう
にしたシステムとして、投入されたジョブの実行クラス
の情報により、自動的にジョブを実行するコンピュータ
を決定するようにした多重コンピュータ方式の構成が提
案されている。Further, in Japanese Patent Laid-Open No. 1-205369, in a means for determining a computer to execute a job among a plurality of computers, a computer to execute the job is automatically designated based on the information included in the job control limit. As a system having means, the system can be effectively used without being aware of the system configuration, and the computer that automatically executes the job is determined from the information of the execution class of the submitted job. Such a multi-computer type configuration has been proposed.
【0004】さらに、例えば特開昭63−271538
号公報には、疎結合多重システムにおけるジョブ自動運
転制御方式として、ジョブスケジュール定義情報を共用
記憶装置に記憶しておき、論理ホストシステム対応のジ
ョブスケジュール定義情報に従ってジョブを自動運転す
る方式が提案されている。Further, for example, Japanese Patent Laid-Open No. 63-271538.
Japanese Patent Publication proposes a method of automatically operating a job according to the job schedule definition information corresponding to a logical host system by storing the job schedule definition information in a shared storage device as a job automatic operation control method in a loosely coupled multiple system. ing.
【0005】このように、複数のコンピュータ(または
プロセッサ等の処理主体)がある場合に、どのコンピュ
ータで処理を行うかに関しての方式として、従来各種方
式が存在している。As described above, when there are a plurality of computers (or processing subjects such as processors), various types of conventional methods have been used as methods for determining which computer performs the processing.
【0006】[0006]
【発明が解決しようとする課題】しかし、上述した従来
の複数コンピュータにおける実行コンピュータ決定方式
においては、利用者プログラム側で排他制御を行わなけ
ればならないという、問題点を有している。この理由
は、上記したいずれの公報に記載の方式においても、排
他処理の必要な一連のトランザクションを順序よく処理
する機構が設けられていないことによる。However, the above-described execution computer determination method for a plurality of computers has a problem that exclusive control must be performed on the user program side. The reason for this is that none of the methods described in the above publications has a mechanism for sequentially processing a series of transactions requiring exclusive processing.
【0007】コンピュータシステムでトランザクション
を実行する場合、トランザクションを同時に実行すると
データベースの矛盾を生じるような場合には、データベ
ースの排他処理を行う必要がある。In the case of executing transactions in a computer system, it is necessary to perform exclusive processing of the database if the database inconsistency occurs when the transactions are executed simultaneously.
【0008】その際、プログラムを単純とするため、こ
の排他制御処理を、プログラムでは行わず、トランザク
ションを実行するタスクを1つに限定することにより、
同時に動作するトランザクションを1つとして排他制御
を行う手法がある。これを、「シングルタスクトランザ
クション」と呼ぶ。At this time, in order to simplify the program, the exclusive control process is not performed by the program, and the task that executes the transaction is limited to one.
There is a method of performing exclusive control with one transaction operating at the same time. This is called a "single task transaction".
【0009】ところで、複数のホストコンピュータから
構成され、この複数のホストコンピュータがデータベー
スを共有している形態のクラスタシステムでは、クラス
タを構成する各ホストコンピュータにおいて、それぞれ
トランザクションが実行されるため、クラスタを構成す
るホストコンピュータの数だけ、トランザクションが同
時に実行される可能性があることになる。[0009] By the way, in a cluster system in which a plurality of host computers are shared and a database is shared by the plurality of host computers, transactions are executed in each of the host computers that compose the cluster. Transactions may be executed simultaneously depending on the number of host computers to be configured.
【0010】このため、上記したシングルタスクトラン
ザクションの機能を使用できず、その結果、排他処理を
プログラムに組み込む等の必要があり、利用者プログラ
ムの変更修正に加えて排他処理のための制御を複雑化し
ていた。Therefore, the function of the single task transaction described above cannot be used, and as a result, it is necessary to incorporate exclusive processing into the program, and in addition to modification and modification of the user program, control for exclusive processing is complicated. Had changed.
【0011】本発明は、上記事情に鑑みてなされたもの
であって、その目的は、実行権のあるホストコンピュー
タの1つのタスクのみでトランザクションを実行するこ
とにより、利用者プログラムでの共有データベースアク
セス時の排他制御を不要とし、例えばシングルシステム
からクラスタシステムに移行する際に、利用者プログラ
ムの変更を不要とし、保守性及び信頼性を特段に向上す
ることを可能としたクラスタシステムを提供することに
ある。The present invention has been made in view of the above circumstances, and an object thereof is to execute a transaction by only one task of a host computer having an execution right to access a shared database in a user program. To provide a cluster system that does not require exclusive control at the time, does not need to change user programs when moving from a single system to a cluster system, and can significantly improve maintainability and reliability. It is in.
【0012】また、本発明は、クラスタシステムで実行
することにより、トランザクションを実行しているホス
トコンピュータがダウンした場合にも、他のホストコン
ピュータでリカバリ処理が働くため、信頼性が向上する
クラスタシステムを提供することを目的とする。Further, according to the present invention, by executing in a cluster system, even if a host computer executing a transaction goes down, recovery processing works on another host computer, so that the reliability is improved. The purpose is to provide.
【0013】[0013]
【課題を解決するための手段】前記目的を達成するた
め、本発明は、複数のホストコンピュータから構成さ
れ、該複数のホストコンピュータがデータベースを共有
し、オンライントランザクション処理を行うクラスタシ
ステムにおいて、いずれのホストコンピュータが実行権
を持っているかを記憶する実行権記憶手段と、前記実行
権記憶手段に記憶される実行権を保有するホストコンピ
ュータの情報を変更する実行権変更手段と、トランザク
ション入力手段から入力されたトランザクションを識別
する、トランザクション識別処理手段と、前記トランザ
クション識別処理手段で単一のホストコンピュータで処
理するトランザクションであると識別されたトランザク
ションについて、該当するホストコンピュータに実行権
があるか否かを前記実行権記憶手段を参照してチェック
する実行権チェック手段と、前記実行権チェック手段で
該ホストコンピュータするに実行権がある場合にトラン
ザクションを実行するトランザクション実行手段と、前
記実行権チェック手段のチェック時に実行権を獲得して
いるホストコンピュータがない場合には実行権を獲得す
る実行権獲得手段と、前記トランザクション識別処理手
段で実行不可能なトランザクションと判断された場合に
実行権を解放する実行権解放手段と、他のホストコンピ
ュータが動作中か否かを監視する他ホストの監視手段
と、ホストコンピュータ間のデータ転送を行うホスト間
通信手段と、トランザクション情報等を記憶する共有記
憶手段と、を含むトランザクション排他制御方式を提供
する。In order to achieve the above object, the present invention provides a cluster system comprising a plurality of host computers, the plurality of host computers sharing a database and performing online transaction processing. Execution right storing means for storing whether the host computer has the execution right, execution right changing means for changing the information of the host computer having the execution right stored in the execution right storing means, and input from the transaction input means The transaction identification processing means for identifying the generated transaction and whether the corresponding host computer has the execution right for the transaction identified by the transaction identification processing means as a transaction to be processed by a single host computer. The fruit Execution right checking means for referring to the right storing means, transaction executing means for executing a transaction when the host computer has the execution right by the execution right checking means, and execution at the time of checking the execution right checking means Execution right acquisition means for acquiring the execution right when there is no host computer that has acquired the right, and execution right release means for releasing the execution right when the transaction identification processing means determines that the transaction cannot be executed. And a monitoring means for another host that monitors whether or not another host computer is operating, an inter-host communication means for transferring data between the host computers, and a shared storage means for storing transaction information and the like. Provides an exclusive control method.
【0014】[0014]
【発明の実施の形態】本発明の発明の実施の形態につい
て図面を参照して、説明する。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described with reference to the drawings.
【0015】図1は、本発明の実施の形態の構成例をブ
ロック図にて示したものである。なお、図1において、
複数のコンピュータとして、説明の容易のため2台のコ
ンピュータが示されており、また図面作成の都合上、一
つのホストコンピュータAの内部構成が示されており、
他のホストコンピュータBの構成はホストコンピュータ
Aの内部構成と同様に構成されているものとする。FIG. 1 is a block diagram showing a configuration example of an embodiment of the present invention. In FIG. 1,
As a plurality of computers, two computers are shown for ease of explanation, and for the convenience of drawing, the internal configuration of one host computer A is shown.
The configuration of the other host computer B is assumed to be the same as the internal configuration of the host computer A.
【0016】図1を参照すると、本発明の実施の形態に
おいて、ホストコンピュータAは、どのホストコンピュ
ータが実行権を持っているかを記憶する実行権記憶手段
1と、実行権記憶手段1の実行権保有ホストコンピュー
タの情報を変更する実行権変更手段2と、トランザクシ
ョン入力手段Cから入力されたトランザクションを識別
する、トランザクション識別処理手段3とトランザクシ
ョン識別処理手段3で単一のホストコンピュータで処理
するトランザクションであると識別されたトランザクシ
ョンに関し、該当ホストコンピュータに実行権があるか
どうかを、実行権記憶手段1を参照してチェックする、
実行権チェック手段4と、を備えている。Referring to FIG. 1, in the embodiment of the present invention, a host computer A has an execution right storing means 1 for storing which host computer has an execution right, and an execution right for the execution right storing means 1. A transaction processed by a single host computer by the transaction identification processing unit 3 and the transaction identification processing unit 3 for identifying the transaction input from the transaction input unit C and the execution right changing unit 2 for changing the information of the owned host computer. For the transaction identified as existing, whether or not the host computer has the execution right is checked by referring to the execution right storage means 1.
The execution right check means 4 is provided.
【0017】さらに、本発明の実施の形態は、実行権チ
ェック手段4で該当ホストコンピュータに実行権がある
場合にトランザクションを実行する、トランザクション
実行手段5と、実行権チェック手段4のチェック時に実
行権を獲得しているホストコンピュータがない場合に実
行権を獲得する実行権獲得手段6と、トランザクション
識別処理手段3で実行不可能なトランザクションと判断
された場合に実行権を解放する実行権解放手段7と、他
のホストコンピュータが動作中かどうかを監視する、他
ホスト監視手段8と、ホストコンピュータ間のデータ転
送を行う、ホスト間通信手段9およびトランザクション
情報等を記憶する共有記憶手段10と、を備えている。Further, in the embodiment of the present invention, the execution right checking means 4 executes the transaction when the host computer has the execution right, and the execution right checking means 4 executes the execution right at the time of checking. Execution right acquisition means 6 that acquires the execution right when there is no host computer that has acquired the execution right, and execution right release means 7 that releases the execution right when the transaction identification processing means 3 determines that the transaction cannot be executed. And another host monitoring means 8 for monitoring whether or not another host computer is operating, an inter-host communication means 9 for performing data transfer between host computers, and a shared storage means 10 for storing transaction information and the like. I have it.
【0018】ここで、実行権記憶手段1は、全ホストコ
ンピュータで共有してもよいし、各ホストコンピュータ
で持ってもよい。また、実行権は、クラスタシステムに
唯一としてもよいし、あるカテゴリごとに分けられたク
ラスという概念ごとにあるものとしてもよい。Here, the execution right storage means 1 may be shared by all the host computers or may be owned by each host computer. Further, the execution right may be unique to the cluster system, or may be present for each concept of classes divided into certain categories.
【0019】図2は、本発明の実施の形態の動作を説明
するための流れ図である。図1の構成ブロック図及び図
2の流れ図を参照して、本発明の実施の形態の処理フロ
ーを以下に説明する。FIG. 2 is a flowchart for explaining the operation of the embodiment of the present invention. The processing flow of the embodiment of the present invention will be described below with reference to the configuration block diagram of FIG. 1 and the flowchart of FIG.
【0020】例えばトランザクション入力手段Cからト
ランザクションが入力されると、ホストコンピュータA
のトランザクション識別処理手段3において、このトラ
ンザクションが実行可能か否かをチェックする(ステッ
プ21)。For example, when a transaction is input from the transaction input means C, the host computer A
The transaction identification processing means 3 checks whether or not this transaction can be executed (step 21).
【0021】入力されたトランザクションが実行不可能
であった場合は、実行権解放手段7を起動し(ステップ
22)、トランザクションが他のホストコンピュータで
実行可能なように、必要情報を共有記憶手段10に格納
する(ステップ23)。If the input transaction cannot be executed, the execution right releasing means 7 is activated (step 22), and necessary information is shared by the shared storage means 10 so that the transaction can be executed by another host computer. (Step 23).
【0022】実行権解放手段7は、実行権変更手段2を
起動し、自ホストコンピュータの実行権を解放するよう
要求する。The execution right releasing means 7 activates the execution right changing means 2 and requests to release the execution right of the own host computer.
【0023】実行権変更手段2は実行権記憶手段1を参
照し、自ホストコンピュータに実行権があれば、実行権
を「解放状態」に書き換え、ホスト間通信手段9により
実行権を解放したことを他のホストコンピュータに通知
する。The execution right changing means 2 refers to the execution right storing means 1 and, if the own host computer has the execution right, rewrites the execution right to the "released state" and releases the execution right by the inter-host communication means 9. To other host computers.
【0024】一方、自ホストコンピュータが実行権を持
っていない場合は、何もしない。On the other hand, if the own host computer does not have the execution right, nothing is done.
【0025】トランザクションが実行可能な場合は、さ
らに、トランザクション識別処理手段3で排他処理が必
要なトランザクション(以下「シングルホストトランザ
クション」と呼ぶ)であるか否かを判断する(ステップ
24)。If the transaction can be executed, the transaction identification processing means 3 further determines whether or not the transaction requires exclusive processing (hereinafter referred to as "single host transaction") (step 24).
【0026】ステップ24の判定において、シングルホ
ストトランザクションでなかった場合は、トランザクシ
ョン実行手段5によりトランザクションを実行する(ス
テップ27)。If it is determined in step 24 that the transaction is not a single host transaction, the transaction execution means 5 executes the transaction (step 27).
【0027】一方、ステップ24の判定において、シン
グルホストトランザクションであった場合には、実行権
チェック手段4が起動され、自ホストコンピュータに実
行権があるか否かをチェックする。On the other hand, if it is determined in step 24 that the transaction is a single host transaction, the execution right checking means 4 is activated to check whether or not the own host computer has the execution right.
【0028】実行権チェック手段4は実行権記憶手段1
を参照し、どのホストコンピュータが実行権を持ってい
るかチェックする(ステップ25)。The execution right checking means 4 is the execution right storing means 1
To check which host computer has the execution right (step 25).
【0029】ステップ25の判定において、自ホストコ
ンピュータが実行権を持っていれば、トランザクション
実行手段5によりトランザクションを実行する(ステッ
プ27)。If it is determined in step 25 that the host computer has the execution right, the transaction execution means 5 executes the transaction (step 27).
【0030】一方、どのホストコンピュータも実行権を
持っていない場合には、実行権獲得手段6を起動し、実
行権を獲得する(ステップ26)。On the other hand, when none of the host computers has the execution right, the execution right acquisition means 6 is activated to acquire the execution right (step 26).
【0031】実行権獲得手段6は、実行権変更手段2を
起動し、実行権記憶手段1に記憶されている実行権を自
ホストコンピュータとなるように書き換え、ホスト間通
信手段9により自コンピュータが実行権を獲得した旨を
他のホストコンピュータに通知する。ただし、このと
き、すでに他のホストコンピュータが実行権を獲得して
いた場合には、トランザクションが他のホストコンピュ
ータで実行可能なように、必要情報を共有記憶手段10
に格納する(ステップ23)。The execution right acquisition means 6 activates the execution right changing means 2 and rewrites the execution right stored in the execution right storage means 1 so as to become the own host computer. Notify other host computers that the execution right has been acquired. However, at this time, if another host computer has already acquired the execution right, the necessary information is shared by the shared storage means 10 so that the transaction can be executed by the other host computer.
(Step 23).
【0032】そして、実行権が獲得できたら、トランザ
クション実行手段5によりトランザクションを実行する
(ステップ27)。他のホストコンピュータが実行権を
持っている場合も、トランザクションが他のホストコン
ピュータで実行可能なように、必要情報を共有記憶手段
10に格納する(ステップ23)。また必要に応じて、
ホスト間通信手段9によりトランザクションを共有記憶
手段10に格納したことを他のホストコンピュータに通
知する。When the execution right is acquired, the transaction execution means 5 executes the transaction (step 27). Even if another host computer has the execution right, the necessary information is stored in the shared storage means 10 so that the transaction can be executed by the other host computer (step 23). Also, if necessary,
The inter-host communication means 9 notifies other host computers that the transaction has been stored in the shared storage means 10.
【0033】また、他ホスト監視手段8は、全ホストコ
ンピュータで、一定時間ごとにホスト間通信手段9によ
り、自ホストが動作中である旨の情報を他の全ホストコ
ンピュータに通知する。Further, the other host monitoring means 8 notifies all the other host computers of the information that the own host is operating by the inter-host communication means 9 at regular intervals in all the host computers.
【0034】この通知が、既定の時間以上こないホスト
コンピュータについて、ダウンしたとみなし、実行権変
更手段2により、実行権記憶手段1に記憶されているダ
ウンしたとみなされたホストコンピュータが持っている
実行権を無効にする。この既定の時間は、上記の一定時
間でもよいし、任意の時間でもよい。The host computer, which has not received this notification for a predetermined time or more, considers it to be down, and the execution right changing means 2 stores it in the execution right storing means 1 which is considered to be down. Disable the execute right. This predetermined time may be the above-mentioned fixed time or an arbitrary time.
【0035】さらに、ホスト間通信手段9により、他ホ
ストコンピュータからの実行権の獲得や解放の通知を受
け取った場合には、実行権変更手段2により、実行権記
憶手段1の実行権情報を書き換えることにより、実行権
の管理を行う。Further, when the inter-host communication means 9 receives a notification of acquisition or release of the execution right from another host computer, the execution right changing means 2 rewrites the execution right information in the execution right storage means 1. Therefore, the execution right is managed.
【0036】本発明の実施の形態においては、このよう
に、実行権チェック手段4で実行権をチェックし、1つ
のホストコンピュータのみで、トランザクションを実行
することを可能とし、シングルタスクトランザクション
を、クラスタシステムに移行する際にも、プログラムの
変更なしに移行可能とするという利点を備えている。In the embodiment of the present invention, the execution right check means 4 checks the execution right as described above, and the transaction can be executed by only one host computer. It has the advantage that it can be migrated without changing the program when migrating to the system.
【0037】また、他ホスト監視手段8により他のホス
トコンピュータの状態を監視して、実行権を持つホスト
コンピュータのダウンを検出し、実行権変更手段2によ
り実行権を持つホストコンピュータを変更することによ
り、クラスタシステムの特性である運用性の向上が期待
できる。The other host monitoring means 8 monitors the status of other host computers to detect the down of the host computer having the execution right, and the execution right changing means 2 changes the host computer having the execution right. Therefore, improvement of operability, which is a characteristic of the cluster system, can be expected.
【0038】[0038]
【実施例】次に、上記した本発明の実施の形態を更に詳
細に説明すべく、本発明の一実施例を図面を参照して詳
細に説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, one embodiment of the present invention will be described in detail with reference to the drawings in order to explain the above-described embodiment of the present invention in more detail.
【0039】図3は、上記した本発明の実施の形態を在
庫管理システムに適用した場合の一例を示す図である。FIG. 3 is a diagram showing an example in which the above-described embodiment of the present invention is applied to an inventory management system.
【0040】例えば、ホストコンピュータ3Aと3Bの
2台のホストコンピュータおよびトランザクション入力
手段として端末C1,C2からなる在庫管理システムを
考える。For example, consider an inventory management system including two host computers, host computers 3A and 3B, and terminals C1 and C2 as transaction input means.
【0041】2台のホストコンピュータ3Aおよび3B
は、データベース310aおよびトランザクション格納
ファイル310bを共有している。Two host computers 3A and 3B
Share a database 310a and a transaction storage file 310b.
【0042】データベース310aの一例は、図4に示
すように、品名41および数量42からなる。As shown in FIG. 4, an example of the database 310a includes a product name 41 and a quantity 42.
【0043】またトランザクション情報格納ファイル3
10bの一例は、図5に示すように、品名51、数量5
2および入/出庫情報53からなる。Transaction information storage file 3
An example of 10b is, as shown in FIG.
2 and entry / exit information 53.
【0044】実行権記憶手段31Aおよび31Bに記憶
されている実行権保有ホストコンピュータ情報は、最初
は、実行権保有ホストコンピュータは存在しない状態に
設定されている。ここで、端末C1からホストコンピュ
ータ3Aに、品名「aaa」が10個出庫されるシング
ルホストトランザクションが入力された場合を考える。The execution right possessing host computer information stored in the execution right possessing means 31A and 31B is initially set so that there is no execution right possessing host computer. Here, consider a case where a single host transaction in which ten product names “aaa” are delivered from the terminal C1 to the host computer 3A.
【0045】入力されたトランザクションは、トランザ
クション識別処理手段33Aでトランザクションが実行
可能か否かをチェックする。そして、トランザクション
が実行可能ならば、シングルホストトランザクションか
否かのチェックが行われ、シングメホストトランザクシ
ョンであるため、実行権チェック手段34Aが起動され
る。With respect to the input transaction, the transaction identification processing means 33A checks whether or not the transaction can be executed. Then, if the transaction is executable, it is checked whether it is a single host transaction, and since it is a single host transaction, the execution right checking means 34A is activated.
【0046】ホストコンピュータ3Aの実行権チェック
手段34Aは、実行権記憶手段31Aを参照し、どのホ
ストコンピュータが実行権を持っているかチェックす
る。The execution right checking means 34A of the host computer 3A refers to the execution right storing means 31A to check which host computer has the execution right.
【0047】最初のトランザクションであるため、どの
ホストコンピュータも実行権を持っていない。Since it is the first transaction, no host computer has the execution right.
【0048】このため、ホストコンピュータ3Aは、実
行権獲得手段36Aを起動する。実行権獲得手段36A
は、実行権変更手段32Aを起動し、実行権記憶手段3
1Aに記憶してある実行権をホストコンピュータ3Aで
あるように書き換え、ホスト間通信手段39Aにより実
行権を獲得したことを他のホストコンピュータ3Bに通
知する。Therefore, the host computer 3A activates the execution right acquisition means 36A. Execution right acquisition means 36A
Activates the execution right changing means 32A, and executes the execution right storing means 3
The execution right stored in 1A is rewritten to be the host computer 3A, and the inter-host communication means 39A notifies the other host computer 3B that the execution right has been acquired.
【0049】ここで、ホストコンピュータ3Bのホスト
間通信手段39Bが起動され、ホストコンピュータ3A
が実行権を獲得したことが通知されたため、実行権変更
手段32Bを起動し、実行権記憶手段31Bに記憶され
ている実行権保有ホストコンピュータがホストコンピュ
ータ3Aであるように書き換える。Here, the inter-host communication means 39B of the host computer 3B is activated, and the host computer 3A
Since it has been notified that the execution right has been acquired, the execution right changing means 32B is activated, and the execution right holding host computer stored in the execution right storing means 31B is rewritten so as to be the host computer 3A.
【0050】ホストコンピュータ3Aでは、実行権が獲
得できたため、トランザクション実行手段35Aにより
トランザクションを実行する。In the host computer 3A, since the execution right has been acquired, the transaction executing means 35A executes the transaction.
【0051】このトランザクションは、品名「aaa」
が10個出庫されるようなトランザクションであるの
で、まずデータベース310aから品名「aaa」のレ
コードを読み出す。その際、品名「aaa」の在庫は1
00個であるので、ここから10個出庫すると、90個
となり、これをデータベースに書き戻す。This transaction has a product name "aaa".
Is a transaction in which 10 items are stored, the record with the product name “aaa” is first read from the database 310a. At that time, the stock of product name "aaa" is 1
Since it is 00 pieces, if 10 pieces are put out from here, it becomes 90 pieces, and this is written back to the database.
【0052】この時点で、データベース310aの品名
「aaa」の在庫は90個となっている。At this point, the inventory of the product name "aaa" in the database 310a is 90 pieces.
【0053】さらに、端末C1からホストコンピュータ
3Aに、品名「aaa」が30個出庫されるシングルホ
ストトランザクションが入力されると同時に端末C2か
らホストコンピュータ3Bに、品名「aaa」が10個
入庫されるシングルホストトランザクションが入力され
る場合を考える。Further, from the terminal C1 to the host computer 3A, a single host transaction for storing 30 product names "aaa" is input, and at the same time, from the terminal C2 to the host computer 3B, 10 product names "aaa" are stored. Consider the case where a single host transaction is entered.
【0054】ホストコンピュータ3Aでは、入力された
トランザクションは、トランザクション識別処理手段3
3Aでトランザクションが実行可能か否かをチェックす
る。実行可能ならば、シングルホストトランザクション
か否かのチェックが行われ、シングルホストトランザク
ションであるため、実行権チェック手段34Aが起動さ
れる。In the host computer 3A, the input transaction is transaction identification processing means 3
At 3A, it is checked whether the transaction can be executed. If it is executable, it is checked whether or not it is a single host transaction. Since it is a single host transaction, the execution right checking means 34A is activated.
【0055】実行権チェック手段34Aは、実行権記憶
手段31Aを参照し、どのホストコンピュータが実行権
を持っているかチェックする。このとき、実行権はホス
トコンピュータ3Aが保有しているので、トランザクシ
ョン実行手段35Aによりトランザクションを実行す
る。The execution right checking means 34A refers to the execution right storing means 31A to check which host computer has the execution right. At this time, since the execution right is held by the host computer 3A, the transaction execution means 35A executes the transaction.
【0056】このトランザクションは、品名「aaa」
が30個出庫されるようなトランザクションであるの
で、まずデータベース310aから品名「aaa」のレ
コードを読み出す。その際、品名「aaa」の在庫は9
0個であるので、ここから30個出庫すると、60個と
なり、これをデータベースに書き戻す。This transaction has a product name "aaa".
Since the transaction is such that 30 items are delivered, first, the record of the product name “aaa” is read from the database 310a. At that time, the stock of product name “aaa” is 9
Since there are 0 pieces, if 30 pieces are delivered from here, it will become 60 pieces, which will be written back to the database.
【0057】この時点で、データベース310aの品名
aaaの在庫は60個となっている。At this point, the inventory of the product name aaa in the database 310a is 60 pieces.
【0058】一方、ホストコンピュータ3Bでは、入力
されたトランザクションは、トランザクション識別処理
手段33Bでトランザクションが実行可能か否かをチェ
ックする。実行可能ならば、シングルホストトランザク
ションか否かのチェックが行われ、シングルホストトラ
ンザクションであるため、実行権チェック手段34Bが
起動される。On the other hand, in the host computer 3B, the input transaction is checked by the transaction identification processing means 33B whether or not the transaction can be executed. If it is executable, it is checked whether or not it is a single host transaction. Since it is a single host transaction, the execution right checking means 34B is activated.
【0059】実行権チェック手段34Bは、実行権記憶
手段31Bを参照し、どのホストコンピュータが実行権
を持っているかチェックする。このとき、実行権はホス
トコンピュータ3Aが保有しているので、トランザクシ
ョン実行に必要な情報を、トランザクション情報格納フ
ァイル310bに格納し、ホスト間通信手段39Bを介
して、他のホストコンピュータ(ホストコンピュータ3
Bからみて3A)に対し、トランザクション情報をトラ
ンザクション情報格納ファイル310bに格納したこと
を通知する。The execution right checking means 34B refers to the execution right storing means 31B to check which host computer has the execution right. At this time, since the execution right is held by the host computer 3A, the information necessary for executing the transaction is stored in the transaction information storage file 310b, and the other host computer (host computer 3
It notifies 3A) from the viewpoint of B that the transaction information is stored in the transaction information storage file 310b.
【0060】ホストコンピュータ3Aでは、ホスト間通
信手段39Aにより他ホストコンピュータ3Bがトラン
ザクション情報をトランザクション情報格納ファイル3
10bに格納したことを受け取り、トランザクション実
行手段35Aにより、トランザクション情報格納ファイ
ル310bに格納されたトランザクション情報を読みだ
し、実行する。In the host computer 3A, the other host computer 3B transfers the transaction information to the transaction information storage file 3 by the inter-host communication means 39A.
Upon receiving the information stored in 10b, the transaction execution means 35A reads out and executes the transaction information stored in the transaction information storage file 310b.
【0061】このトランザクションは、品名「aaa
が」10個入庫されるようなトランザクションであるの
で、まずデータベース310aから品名「aaa」のレ
コードを読み出す。品名「aaa」の在庫は60個であ
るので、ここから10個入庫すると、70個となり、こ
れをデータベースに書き戻す。This transaction is executed under the product name "aaa".
Is a transaction in which 10 items are stored, first, the record of the product name “aaa” is read from the database 310a. Since the stock of the product name “aaa” is 60 pieces, if 10 pieces are stored from here, it becomes 70 pieces, which is written back to the database.
【0062】この時点で、データベース310aの品名
「aaa」の在庫は70個となっている。At this point, the inventory of the product name "aaa" in the database 310a is 70 pieces.
【0063】ここで、データベースの排他処理を利用者
プログラムで行っていなかった場合、上記の2つのトラ
ンザクションが同時に実行された場合を考える。Now, let us consider a case where the user program does not perform the exclusive processing of the database and the above-mentioned two transactions are executed at the same time.
【0064】まず、ホストコンピュータ3Aでは、品名
「aaa」が30個出庫されるトランザクションが入力
されたので、データベース310aから品名「aaa」
のレコードを読み出す。このときの在庫は90個であ
る。First, in the host computer 3A, since a transaction for shipping 30 product names "aaa" has been input, the product name "aaa" is input from the database 310a.
Read the record. The inventory at this time is 90 pieces.
【0065】一方、ホストコンピュータ3Bには、品名
「aaa」が10個入庫されるトランザクションが入力
されたことにより、データベース310aから品名「a
aa」のレコードを読み出す。このときの在庫はやはり
90個である。On the other hand, since a transaction for storing 10 product names "aaa" is input to the host computer 3B, the product name "a" is stored in the database 310a.
The record of “aa” is read. The inventory at this time is still 90 pieces.
【0066】ホストコンピュータ3Aでは、品名「aa
a」の在庫は90個であるので、ここから30個出庫す
ると、60個となり、これをデータベースに書き戻す。
同時に、ホストコンピュータ3Bでは、品名「aaa」
の在庫は90個であるので、ここから10個入庫する
と、100個となり、これをデータベースに書きもど
す。In the host computer 3A, the product name "aa
The inventory of "a" is 90, so if 30 are shipped from here, it will be 60, and this will be written back to the database.
At the same time, in the host computer 3B, the product name "aaa"
The stock of 90 is 90, so if 10 is stored from here, it will be 100, and this will be written back to the database.
【0067】この結果、データベース上の正しい値は7
0個であるはずなのに、実際の値は100個となり、デ
ータベースの排他処理を行わないと正しい結果が得られ
ないのは、明らかである。As a result, the correct value on the database is 7
Although it should be 0, the actual value is 100, and it is clear that the correct result cannot be obtained without the database exclusive processing.
【0068】さらに、他ホスト監視手段38Aおよび3
8Bは、定期的に自ホストコンピュータが動作している
旨の情報を。ホスト間通信手段39Aおよび39Bによ
り交換しており、一定時間この情報が通知されないこと
により、他ホストコンピュータのダウンを検出すること
ができる。Further, the other host monitoring means 38A and 3
8B periodically provides information indicating that the host computer is operating. By exchanging by the inter-host communication means 39A and 39B, and this information is not notified for a certain period of time, it is possible to detect the down of another host computer.
【0069】すなわち、実行権を持つホストコンピュー
タ3Aからの一定時間通知がこないことにより、ホスト
コンピュータ3Bはホストコンピュータ3Aのダウンを
検出し、実行権を獲得し、トランザクション処理を代替
することができる。That is, the host computer 3B can detect the down of the host computer 3A, acquire the execution right, and substitute the transaction processing by not receiving the notification from the host computer 3A having the execution right for a certain period of time.
【0070】[0070]
【発明の効果】以上説明したように、本発明によるクラ
スタシステムにおけるトランザクション排他方式は、実
行権をもつホストコンピュータのみで、トランザクショ
ンを実行することが可能なため、利用者プログラムに排
他制御の機構を組み込む必要がないという利点を有す
る。As described above, in the transaction exclusion method in the cluster system according to the present invention, since the transaction can be executed only by the host computer having the execution right, the user program is provided with an exclusive control mechanism. It has the advantage that it does not need to be incorporated.
【0071】さらに、本発明によれば、他のホストコン
ピュータの状態を監視して、実行権を持つホストコンピ
ュータのダウンを検出して他のホストコンピュータに実
行権を変更することにより、クラスタシステムの特性で
ある運用性/信頼性の向上が期待できる。Further, according to the present invention, by monitoring the status of another host computer, detecting the down of the host computer having the execution right and changing the execution right to the other host computer, the cluster system It can be expected to improve operability / reliability, which is a characteristic.
【図1】本発明の実施の形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.
【図2】本発明の実施の形態の動作を示すフローチャー
トである。FIG. 2 is a flowchart showing the operation of the embodiment of the present invention.
【図3】本発明の実施例を示すブロック図である。FIG. 3 is a block diagram showing an embodiment of the present invention.
【図4】本発明の実施例を説明するための図であり、デ
ータベースの一例を示す図である。FIG. 4 is a diagram for explaining the embodiment of the present invention and is a diagram showing an example of a database.
【図5】本発明の実施例を説明するための図であり、ト
ランザクション情報格納ファイルの一例を示す図であ
る。FIG. 5 is a diagram for explaining the embodiment of the present invention and is a diagram showing an example of a transaction information storage file.
1 実行権記憶手段 2 実行権変更手段 3 トランザクション識別処理手段 4 実行権チェック手段 5 トランザクション実行手段 6 実行権獲得手段 7 実行権解放手段 8 他ホスト監視手段 9 ホスト間通信手段 10 共有記憶手段 A ホストコンピュータ B ホストコンピュータ C トランザクション入力手段 1 Execution Right Storage Means 2 Execution Right Changing Means 3 Transaction Identification Processing Means 4 Execution Right Checking Means 5 Transaction Execution Means 6 Execution Right Acquiring Means 7 Execution Right Releasing Means 8 Other Host Monitoring Means 9 Inter-Host Communication Means 10 Shared Storage Means A Host Computer B Host computer C Transaction input means
Claims (3)
該複数のホストコンピュータがデータベースを共有し、
オンライントランザクション処理を行うクラスタシステ
ムにおいて、 いずれのホストコンピュータが実行権を持っているかを
記憶する実行権記憶手段と、 前記実行権記憶手段に記憶される実行権を保有するホス
トコンピュータの情報を変更する実行権変更手段と、 トランザクション入力手段から入力されたトランザクシ
ョンを識別する、トランザクション識別処理手段と、 前記トランザクション識別処理手段で単一のホストコン
ピュータで処理するトランザクションであると識別され
たトランザクションについて、該当するホストコンピュ
ータに実行権があるか否かを前記実行権記憶手段を参照
してチェックする実行権チェック手段と、 前記実行権チェック手段で該ホストコンピュータするに
実行権がある場合にトランザクションを実行するトラン
ザクション実行手段と、 前記実行権チェック手段のチェック時に、実行権を獲得
しているホストコンピュータがない場合には、実行権を
獲得する実行権獲得手段と、 前記トランザクション識別処理手段で実行不可能なトラ
ンザクションと判断された場合に実行権を解放する実行
権解放手段と、 他のホストコンピュータが動作中か否かを監視する他ホ
ストの監視手段と、 ホストコンピュータ間のデータ転送を行うホスト間通信
手段と、 トランザクション情報等を記憶する共有記憶手段と、 を含むトランザクション排他制御方式。1. A system comprising a plurality of host computers,
The plurality of host computers share a database,
In a cluster system that performs online transaction processing, changes information about an execution right storage unit that stores which host computer has the execution right and information about the host computer that holds the execution right stored in the execution right storage unit Applicable to the execution right changing unit, the transaction identification processing unit for identifying the transaction input from the transaction input unit, and the transaction identified by the transaction identification processing unit to be processed by a single host computer. Execution right checking means for checking whether or not the host computer has the execution right by referring to the execution right storing means, and executing the transaction when the host computer has the execution right by the execution right checking means When there is no host computer that has acquired the execution right at the time of checking the execution right check means, the execution right acquisition means that acquires the execution right and the transaction identification processing means cannot execute the execution. Execution right release means for releasing the execution right when it is judged as a valid transaction, another host monitoring means for monitoring whether or not another host computer is operating, and inter-host communication for data transfer between host computers A transaction exclusive control method including a means and a shared storage means for storing transaction information and the like.
該複数のホストコンピュータがデータベースを共有し、
オンライントランザクション処理を行うクラスタシステ
ムにおいて、 入力されたトランザクションに対して前記複数のコンピ
ュータの中から実行権を有するホストコンピュータを一
台決定し、 前記決定された一台のホストコンピュータにおいてのみ
シングルタスクトランザクションが起動されて前記デー
タベースのアクセスが行われ、且つ前記シングルタスク
トランザクションが前記データベースアクセス中に前記
クラスタ内の他のホストコンピュータでシングルタスク
トランザクションが同時に実行されることがないように
制御する、 ことを特徴とするトランザクション排他制御方式。2. A host computer comprising a plurality of host computers,
The plurality of host computers share a database,
In a cluster system that performs online transaction processing, one host computer that has the execution right for the input transaction is determined, and a single-task transaction is performed only in the determined one host computer. Controlling that the single task transaction is started up and the database is accessed, and the single task transaction is not simultaneously executed by another host computer in the cluster during the database access. Exclusive transaction control method.
の他のホストコンピュータが動作中か否かを監視する他
ホストの監視手段と、ホストコンピュータ間のデータ転
送を行うホスト間通信手段と、を含むことを特徴とする
請求項2記載のトランザクション排他制御方式。3. Each of the host computers includes a monitoring means of another host for monitoring whether or not another host computer in the cluster is operating, and an inter-host communication means for transferring data between the host computers. The transaction exclusive control method according to claim 2, wherein
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8130966A JPH09292999A (en) | 1996-04-26 | 1996-04-26 | Transaction exclusive system in cluster system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8130966A JPH09292999A (en) | 1996-04-26 | 1996-04-26 | Transaction exclusive system in cluster system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH09292999A true JPH09292999A (en) | 1997-11-11 |
Family
ID=15046792
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8130966A Pending JPH09292999A (en) | 1996-04-26 | 1996-04-26 | Transaction exclusive system in cluster system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09292999A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0894705A2 (en) | 1997-08-01 | 1999-02-03 | Ishikawajima-Harima Heavy Industries Co., Ltd. | Generation of bubbles for friction-reducing ship and method for reducing skin-friction |
| EP0962383A2 (en) | 1998-06-03 | 1999-12-08 | Ishikawajima-Harima Heavy Industries Co., Ltd. | Method for analyzing friction reduction effects of bubbles in a ship |
| JP2001175522A (en) * | 1999-12-15 | 2001-06-29 | Hitachi Software Eng Co Ltd | Method and system for exclusive control |
-
1996
- 1996-04-26 JP JP8130966A patent/JPH09292999A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0894705A2 (en) | 1997-08-01 | 1999-02-03 | Ishikawajima-Harima Heavy Industries Co., Ltd. | Generation of bubbles for friction-reducing ship and method for reducing skin-friction |
| EP0962383A2 (en) | 1998-06-03 | 1999-12-08 | Ishikawajima-Harima Heavy Industries Co., Ltd. | Method for analyzing friction reduction effects of bubbles in a ship |
| JP2001175522A (en) * | 1999-12-15 | 2001-06-29 | Hitachi Software Eng Co Ltd | Method and system for exclusive control |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7770064B2 (en) | Recovery of application faults in a mirrored application environment | |
| US5649184A (en) | Symmetric/asymmetric shared processing operation in a tightly coupled multiprocessor | |
| US4435755A (en) | Balanced channel finding method | |
| US5161227A (en) | Multilevel locking system and method | |
| JP4117202B2 (en) | Thread dispatch mechanism and method for multiprocessor computer systems | |
| US5140685A (en) | Record lock processing for multiprocessing data system with majority voting | |
| US6996821B1 (en) | Data processing systems and method for batching tasks of the same type in an instruction cache | |
| JP2706602B2 (en) | Interrupt retry reduction device | |
| US20070067775A1 (en) | System and method for transferring data between virtual machines or other computer entities | |
| JPH03147047A (en) | Balancing of load on input/output channel path | |
| EP0818736A2 (en) | System for assigning boot strap processor in symmetric multiprocessor computer with watchdog reset | |
| US20030041173A1 (en) | Synchronization objects for multi-computer systems | |
| EP0747832A2 (en) | Customer information control system and method in a loosely coupled parallel processing environment | |
| US5682507A (en) | Plurality of servers having identical customer information control procedure functions using temporary storage file of a predetermined server for centrally storing temporary data records | |
| CA1304513C (en) | Multiple i/o bus virtual broadcast of programmed i/o instructions | |
| US6681241B1 (en) | Resource contention monitoring employing time-ordered entries in a blocking queue and waiting queue | |
| TWI394074B (en) | Methods, apparatus and computer programs for managing access to storage | |
| US20060059489A1 (en) | Parallel processing system, interconnection network, node and network control method, and program therefor | |
| US5613133A (en) | Microcode loading with continued program execution | |
| JPH0895614A (en) | Control device | |
| CA1302580C (en) | Apparatus and method for using lockout for synchronization of access to main memory signal groups in a multiprocessor data processing system | |
| US6029255A (en) | Input/output control device and method applied to fault-resilient computer system | |
| US5446892A (en) | Method of and apparatus for re-allocating programs in a distributed programming system | |
| O'Neil et al. | Towards predictable transaction executions in real-time database systems | |
| EP4095688B1 (en) | Method and apparatus for processing transaction |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 19981104 |