JPH09265406A - Exclusive control method - Google Patents
Exclusive control methodInfo
- Publication number
- JPH09265406A JPH09265406A JP8073513A JP7351396A JPH09265406A JP H09265406 A JPH09265406 A JP H09265406A JP 8073513 A JP8073513 A JP 8073513A JP 7351396 A JP7351396 A JP 7351396A JP H09265406 A JPH09265406 A JP H09265406A
- Authority
- JP
- Japan
- Prior art keywords
- exclusion
- acquisition
- exclusive
- execution
- execution body
- 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.)
- Withdrawn
Links
Landscapes
- Hardware Redundancy (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、資源の排他制御を
実行する排他制御方式に関し、特に、信頼性の高い排他
制御を実行する排他制御方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an exclusive control method for executing exclusive control of resources, and more particularly to an exclusive control method for executing highly reliable exclusive control.
【0002】複数の実行体が並列走行する計算機システ
ムでは、実行体が資源を排他獲得しつつデータ処理を実
行することになる。計算機システムの信頼性を高めるた
めにも、高い信頼性を持つ資源の排他制御技術を構築し
ていく必要がある。In a computer system in which a plurality of execution bodies run in parallel, the execution bodies execute data processing while exclusively acquiring resources. In order to improve the reliability of computer systems, it is necessary to build exclusive control technology for highly reliable resources.
【0003】[0003]
【従来の技術】従来の計算機システムでは、排他獲得を
制御する排他機構を1つ用意して、それを使って実行体
の発行する資源の排他獲得要求を制御することで、並列
走行する実行体に対して資源の使用を許可していくとい
う構成を採っていた。2. Description of the Related Art In a conventional computer system, an exclusive mechanism for controlling exclusive acquisition is prepared, and an exclusive acquisition request for a resource issued by an executable is used to control an exclusive execution request to execute parallel executions. It was adopted to permit the use of resources to.
【0004】具体的に説明するならば、実行体が、単一
のメモリ域に対して、コンペアスワップ命令等の排他命
令を使って、そのメモリ域に他の実行体の識別データが
書き込まれていないことを条件にして、自分の識別デー
タを書き込んでいって、その書き込みが成功したのか否
かをチェックすることで排他獲得を制御するという構成
を採っていたのである。More specifically, an execution unit writes an identification data of another execution unit in a single memory area by using an exclusive instruction such as a compare swap instruction. On the condition that it does not exist, the identification data is written, and the exclusive acquisition is controlled by checking whether or not the writing is successful.
【0005】[0005]
【発明が解決しようとする課題】しかしながら、このよ
うな従来技術に従っていると、排他機構に障害が発生す
ると、排他獲得の制御が不可能になって、システム全体
を停止させなければならないという問題点があった。However, according to such a conventional technique, when a failure occurs in the exclusion mechanism, control of exclusion acquisition becomes impossible and the entire system must be stopped. was there.
【0006】すなわち、排他機構が1つであることか
ら、その排他機構に障害が発生すると、排他獲得の制御
が不可能になって、システム全体を停止させなければな
らないという問題点があったのである。That is, since there is only one exclusion mechanism, there is a problem that if a failure occurs in that exclusion mechanism, control of exclusion acquisition becomes impossible and the entire system must be stopped. is there.
【0007】計算機システムは、信頼性を上げるために
二重化構成を採ることがあり、この場合、排他命令の書
込先のメモリ域が2つとなる。しかしながら、この場合
でも、発行する排他命令は1つであり、その排他命令で
もって同時に2つのメモリ域に識別データを書き込んで
いくことになることから、排他機構としては実質的に1
つしか用意されていないことになる。これから、その排
他機構に障害が発生すると、排他獲得の制御が不可能に
なるという問題点は解決されずに残ることになる。A computer system may have a dual structure in order to improve reliability. In this case, there are two memory areas to which exclusive instructions are written. However, even in this case, the number of exclusive instructions to be issued is one, and since the identification data is written to two memory areas at the same time by the exclusive instruction, the exclusion mechanism is substantially 1
Only one is prepared. From now on, if a failure occurs in the exclusion mechanism, the problem that the acquisition of exclusion cannot be controlled will remain unsolved.
【0008】本発明はかかる事情に鑑みてなされたもの
であって、信頼性の高い排他制御を実行する新たな排他
制御方式の提供を目的とする。The present invention has been made in view of the above circumstances, and an object thereof is to provide a new exclusive control system for executing highly reliable exclusive control.
【0009】[0009]
【課題を解決するための手段】図1に本発明の原理構成
を図示する。図中、1は本発明を具備する計算機システ
ムであって、並列実行する複数の実行体2が排他機構3
を使って資源を排他獲得しつつデータ処理を実行するも
のである。FIG. 1 shows the principle configuration of the present invention. In the figure, reference numeral 1 is a computer system equipped with the present invention, in which a plurality of execution bodies 2 executing in parallel is an exclusion mechanism 3.
Is used to exclusively acquire resources and execute data processing.
【0010】本発明の計算機システム1は、排他機構3
を複数備えることで多重化するとともに、それらの排他
機構3を制御する排他制御機構4を備える。この排他制
御機構4は、順番管理手段10と、獲得実行手段11
と、通知手段12と、解放実行手段13と、特定手段1
4と、割付手段15とを備える。The computer system 1 of the present invention comprises an exclusive mechanism 3.
A plurality of (1) to (3) are provided for multiplexing, and an exclusive control mechanism (4) for controlling the exclusive mechanism (3) is provided. The exclusive control mechanism 4 includes an order management means 10 and an acquisition execution means 11
, Notifying means 12, release executing means 13, and specifying means 1
4 and allocation means 15.
【0011】この順番管理手段10は、排他機構3に割
り付けられる順番を管理する。獲得実行手段11は、実
行体2が排他獲得要求を発行するときに、排他機構3に
対してその実行体2に与える排他獲得を実行する。通知
手段12は、排他獲得要求発行元の実行体に対して排他
獲得を通知する。The order management means 10 manages the order assigned to the exclusion mechanism 3. The acquisition execution means 11 executes the exclusion acquisition given to the execution body 2 for the exclusion mechanism 3, when the execution body 2 issues the exclusion acquisition request. The notifying means 12 notifies the execution body of the exclusion acquisition request issuing source of the exclusion acquisition.
【0012】解放実行手段13は、実行体2が排他獲得
の解放要求を発行するときに、排他機構3に対してその
実行体2に与えている排他獲得の解放を実行する。特定
手段14は、実行体2が排他獲得者の特定要求を発行す
るときに、排他獲得を取得している実行体2を特定し
て、それを特定要求発行元の実行体2に通知する。割付
手段15は、排他機構3が追加されるときに、その排他
機構3に対して規定の順番を割り付ける。The release executing means 13 executes release of the exclusive acquisition given to the executing body 2 to the exclusion mechanism 3 when the executing body 2 issues the exclusive acquisition releasing request. When the executor 2 issues a request to specify an exclusive acquirer, the identifying unit 14 identifies the executor 2 that has acquired the exclusive acquisition and notifies the executor 2 of the specific request issuing source. The allocating means 15 allocates a prescribed order to the exclusion mechanism 3 when the exclusion mechanism 3 is added.
【0013】獲得実行手段11は、排他機構3が排他獲
得要求発行元の実行体2とは別の実行体2に排他獲得を
与えているときに、どの実行体2にも排他獲得を与えて
いない排他機構3がある場合には、その排他機構3に対
してその別の実行体2に与える排他獲得を実行すること
がある。The acquisition executing means 11 gives the exclusion acquisition to any one of the execution bodies 2 when the exclusion mechanism 3 gives the execution body 2 other than the execution body 2 which issued the exclusion acquisition request. When there is no exclusive mechanism 3, the exclusive acquisition given to the other executing body 2 may be executed for the exclusive mechanism 3.
【0014】このように構成される本発明の計算機シス
テム1では、実行体2が排他獲得要求を発行すると、獲
得実行手段11は、順番管理手段10の管理する順番に
従いつつ、排他機構3に対してその実行体2に与える排
他獲得を実行し、この処理を受けて、通知手段12は、
獲得実行手段11が動作可能である全ての排他機構3に
対して排他獲得に成功するときに、排他獲得要求発行元
の実行体2に対して排他獲得を通知する。In the computer system 1 of the present invention configured as above, when the execution body 2 issues an exclusive acquisition request, the acquisition execution means 11 follows the order managed by the order management means 10 and instructs the exclusion mechanism 3 to do so. Then, the exclusive acquisition given to the executing body 2 is executed, and in response to this processing, the notification means 12
When the acquisition executing means 11 succeeds in acquiring the exclusion for all the exclusivity mechanisms 3 which are operable, the acquisition execution means 11 notifies the execution body 2 of the exclusion acquisition request issuing source of the exclusion acquisition.
【0015】一方、実行体2が排他獲得の解放要求を発
行すると、解放実行手段13は、順番管理手段10の管
理する順番に従いつつ、排他機構3に対してその実行体
2に与えている排他獲得の解放を実行する。また、実行
体2が排他獲得者の特定要求を発行すると、特定手段1
4は、順番管理手段10の管理する順番とは逆の順番に
従って排他機構3を参照していくことで、最初に排他獲
得が与えられている実行体2を特定して、それを特定要
求発行元の実行体2に通知する。On the other hand, when the execution body 2 issues a release request for acquisition of exclusion, the release execution means 13 gives the exclusion mechanism 3 the exclusion body 3 to the execution body 2 in accordance with the order managed by the order management means 10. Perform release of acquisition. When the execution body 2 issues a request to specify the exclusive acquisition person, the specifying unit 1
4 refers to the exclusion mechanism 3 in the order opposite to the order managed by the order management means 10 to specify the execution body 2 to which the exclusion acquisition is given first, and issue the specification request. Notify the original executing body 2.
【0016】このようにして、本発明の計算機システム
1では、図2に示すように、例えば,',''という
3つの排他機構3を用意することで排他機構3を多重す
る構成を採って、実行体2は、排他制御機構4を起動す
ることで、図3に示すように、例えば、「→' →
''」という順番に従って排他機構3を排他獲得してい
って、全ての排他機構3を排他獲得できたときに排他を
獲得する構成を採る。このとき、排他制御機構4は、排
他機構3が実装されていない場合や、排他機構3に障害
が発生することで動作不可能である場合には、その排他
機構3の排他獲得をスキップしていくことになる。In this way, the computer system 1 of the present invention has a configuration in which, as shown in FIG. 2, the exclusion mechanisms 3 are multiplexed by preparing three exclusion mechanisms 3 such as ','. The executor 2 activates the exclusive control mechanism 4 so that, for example, as shown in FIG.
The exclusive mechanism 3 is exclusively acquired in the order of "", and the exclusive structure is acquired when all the exclusive mechanisms 3 can be exclusively acquired. At this time, the exclusion control mechanism 4 skips the acquisition of the exclusion mechanism 3 when the exclusion mechanism 3 is not implemented or when the exclusion mechanism 3 cannot operate due to a failure. I will go.
【0017】そして、実行体2は、排他制御機構4を起
動することで、図4(a)に示すように、「→' →
''」という順番に従って排他機構3の排他獲得を解放
していって、全ての排他機構3の排他獲得を解放できた
ときに排他を解放する構成を採る。Then, the executor 2 activates the exclusive control mechanism 4 so that "→ '→" as shown in FIG.
The configuration is such that the exclusion acquisition of the exclusion mechanism 3 is released according to the order of ″ ″, and the exclusion is released when the exclusion acquisition of all the exclusion mechanisms 3 can be released.
【0018】そして、図4(b)に示すように、「''
→' →」という順番に従って排他機構3を排他獲得
している実行体2を検出していって、最初に検出した実
行体2を排他獲得を持っている実行体2であると特定す
る構成を採るのである。Then, as shown in FIG. 4B, ""
The configuration is such that the execution body 2 that has acquired the exclusion mechanism 3 in an exclusive manner is detected in the order of → '→', and the execution body 2 that is detected first is identified as the execution body 2 that has the exclusion acquisition. Collect it.
【0019】この構成を採るときにあって、排他機構3
が追加されると、割付手段15は、その排他機構3に対
して例えば最後尾の順番を割り付けて順番管理手段10
に登録する。この追加時に、既にいずれかの実行体2が
排他獲得を持っていることが起こる。このことを考慮し
て、獲得実行手段11は、排他機構3が排他獲得要求発
行元の実行体2とは別の実行体2に排他獲得を与えてい
て、しかも、そのとき、どの実行体2にも排他獲得を与
えていない排他機構3がある場合には、その排他機構3
が追加されたものと判断して、その排他機構3に対して
その別の実行体2に与える排他獲得を実行する。When this configuration is adopted, the exclusion mechanism 3
Is added, the allocating means 15 allocates, for example, the last order to the exclusion mechanism 3, and the order managing means 10
Register with. At the time of this addition, it happens that any of the executing bodies 2 already has exclusive acquisition. In consideration of this, the acquisition execution means 11 determines that which execution body 2 the exclusion mechanism 3 gives the exclusion acquisition to the execution body 2 different from the execution body 2 that issued the exclusion acquisition request. Also, if there is an exclusion mechanism 3 that has not given exclusion acquisition, that exclusion mechanism 3
Is determined to have been added, the exclusive acquisition given to the other executing body 2 is executed for the exclusive mechanism 3.
【0020】このようにして、本発明では、排他機構3
の一部に障害が発生しても、排他獲得の制御論理を障害
の発生していないときと同じまま続行できるようになる
ので、信頼性の高い排他制御を実現できるようになる。
そして、排他機構3が追加されるときにも、排他獲得の
制御論理を追加前と同じまま続行できるようになるの
で、信頼性の高い排他制御を実現できるようになる。Thus, according to the present invention, the exclusion mechanism 3
Even if a failure occurs in a part of the above, it becomes possible to continue the control logic of the exclusion acquisition as it is when no failure occurs, so that highly reliable exclusive control can be realized.
Even when the exclusion mechanism 3 is added, the control logic for acquisition of exclusion can be continued as it was before the addition, so that highly reliable exclusion control can be realized.
【0021】[0021]
【発明の実施の形態】以下、実施の形態に従って本発明
を詳細に説明する。以下に説明する実施例では、図5に
示すように、A実行体2a、B実行体2b、C実行体2
cという3つの実行体2が存在するとともに、で示す
排他機構3-1と、' で示す排他機構3-2という2つの
排他機構3を用意することを想定している。ここで、排
他機構3-1,2はモジュールで実装され、これにより、例
えば、当初は排他機構3-1だけで運用し、その後、排他
機構3-2を追加していくことが起こる。BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail according to embodiments. In the embodiment described below, as shown in FIG. 5, A execution body 2a, B execution body 2b, C execution body 2
It is assumed that there are three execution bodies 2 called c and that two exclusion mechanisms 3 shown by and an exclusion mechanism 3-2 are prepared. Here, the exclusion mechanisms 3-1 and 2 are implemented by modules, so that, for example, initially, only the exclusion mechanism 3-1 operates, and then the exclusion mechanism 3-2 is added.
【0022】これらの排他機構3-1,2は、具体的には初
期値“0”の設定される制御レジスタで構成されてお
り、A実行体2a、B実行体2b、C実行体2cの全て
からアクセス可能であって、それらにより書き込まれる
最初の実行体IDを保証する。そして、実行体IDが書
き込まれている場合に、その実行体IDと同じ値が書き
込まれるときには、初期化処理を行う別の制御レジスタ
を用意する。These exclusion mechanisms 3-1, 2 are specifically composed of control registers in which an initial value "0" is set, and the A execution unit 2a, the B execution unit 2b, and the C execution unit 2c. Ensures the first executor ID that is accessible to and written by them. Then, if the same value as the execution body ID is written when the execution body ID is written, another control register that performs initialization processing is prepared.
【0023】この図5では省略してあるが、図1で示し
たように、排他制御機構4が用意されており、この排他
制御機構4が実行体2a,b,cから起動されると排他制御
処理を実行する。Although not shown in FIG. 5, an exclusive control mechanism 4 is prepared as shown in FIG. 1, and when the exclusive control mechanism 4 is activated from the execution bodies 2a, b, c, exclusion is performed. Perform control processing.
【0024】図6ないし図8に、この排他制御機構4の
実行する処理フローの一実施例を図示する。次に、これ
らの処理フローに従って本発明について詳細に説明す
る。排他制御機構4は、実行体2a,b,cから排他獲得要
求が発行されると、図6の処理フローに示すように、先
ず最初に、ステップ1で、で示す排他機構3-1に対し
て、排他獲得要求元の実行体2a,b,c(以下、自実行体
と称することがある)の実行体IDの書き込みを実行
し、続くステップ2で、このアクセスが成功したのか否
かを判断する。6 to 8 show an embodiment of a processing flow executed by the exclusive control mechanism 4. Next, the present invention will be described in detail according to these processing flows. When the exclusive body acquisition request is issued from the execution bodies 2a, b, c, the exclusive control mechanism 4 first, as shown in the processing flow of FIG. Then, the execution unit IDs of the execution units 2a, b, and c (hereinafter, sometimes referred to as self-execution units) of the exclusion acquisition request source are written, and in the subsequent step 2, whether or not this access is successful is determined. to decide.
【0025】このステップ2で、で示す排他機構3-1
に対してのアクセスが成功しないことを判断するとき、
すなわち、で示す排他機構3-1に障害が発生している
か、その排他機構3-1が実装されていないことを判断す
るときには、ステップ3に進んで、“X実行体”に自実
行体を設定する。In this step 2, the exclusion mechanism 3-1 indicated by
When determining that access to is not successful,
That is, when it is determined that the exclusion mechanism 3-1 indicated by has a failure or the exclusion mechanism 3-1 is not installed, the process proceeds to step 3 and the own execution body is set to the "X execution body". Set.
【0026】一方、ステップ2で、で示す排他機構3
-1に対してのアクセスが成功したことを判断するときに
は、ステップ4に進んで、で示す排他機構3-1を排他
獲得できたのかを判断(後述するように、排他獲得済み
ということもある)して、排他獲得できたか排他獲得済
みであることを判断するときには、ステップ5に進ん
で、“X実行体”に自実行体を設定する。すなわち、
で示す排他機構3-1に対して自実行体の実行体IDを書
き込めたときと、既にその実行体IDを書き込んでいた
ときには、“X実行体”に自実行体を設定するのであ
る。On the other hand, in step 2, the exclusion mechanism 3 indicated by
When it is determined that the access to -1 has succeeded, the process proceeds to step 4, and it is determined whether the exclusion mechanism 3-1 indicated by can be acquired exclusively (may be already acquired as described later). ), If it is determined that the exclusive acquisition has been completed or the exclusive acquisition has already been completed, the process proceeds to step 5 and the self-execution body is set in the "X execution body". That is,
When the execution body ID of the self-execution body has been written to the exclusion mechanism 3-1 and the execution body ID has already been written, the self-execution body is set to the “X execution body”.
【0027】一方、ステップ4で、で示す排他機構3
-1を排他獲得できず、また排他獲得済みでもないことを
判断するとき、すなわち、自実行体とは別の実行体2
a,b,cがその排他機構3-1を排他獲得していることを判
断するときには、ステップ6に進んで、“X実行体”に
その排他機構3-1を排他獲得している実行体2a,b,cを
設定する。On the other hand, in step 4, the exclusion mechanism 3 indicated by
When it is determined that -1 cannot be acquired exclusively and has not been acquired, that is, an execution body 2 other than the self-execution body
When it is determined that a, b, and c have exclusively acquired the exclusion mechanism 3-1, the process proceeds to step 6, and the execution body that has exclusively acquired the exclusion mechanism 3-1 in the "X execution body". Set 2a, b, c.
【0028】ステップ3/ステップ5/ステップ6で
“X実行体”を設定すると、続いて、ステップ7で、
' で示す排他機構3-2に対して、“X実行体”の実行
体IDの書き込みを実行し、続くステップ8で、このア
クセスが成功したのか否かを判断する。When "X execution body" is set in step 3 / step 5 / step 6, then in step 7,
The execution unit ID of the "X execution unit" is written to the exclusion mechanism 3-2 indicated by ', and it is determined in subsequent Step 8 whether or not this access has succeeded.
【0029】このステップ8で、' で示す排他機構3
-2に対してのアクセスが成功したことを判断するときに
は、ステップ9に進んで、' で示す排他機構3-2に対
して排他獲得できたのか、排他獲得済みであるかを判断
して、排他獲得できたか排他獲得済みであることを判断
するときには、ステップ10に進んで、“X実行体”が
排他獲得権を持つものとする。In this step 8, the exclusion mechanism 3 indicated by '
When it is determined that the access to -2 is successful, the process proceeds to step 9, and it is determined whether the exclusion mechanism 3-2 indicated by'has been exclusively acquired or has already been acquired. When it is determined that the exclusive acquisition has been completed or the exclusive acquisition has been completed, the process proceeds to step 10 and the "X executive" has the exclusive acquisition right.
【0030】一方、ステップ9で、' で示す排他機構
3-2を排他獲得できず、また排他獲得済みでもないこと
を判断するとき、すなわち、“X実行体”とは別の実行
体2a,b,cがその排他機構3-2を排他獲得していること
を判断するときには、その排他獲得している実行体2
a,b,cが排他獲得権を持つものとする。On the other hand, in step 9, when it is judged that the exclusion mechanism 3-2 indicated by 'cannot be exclusively acquired, and is not already acquired, that is, the execution body 2a different from the "X execution body", When it is determined that b and c have exclusively acquired the exclusion mechanism 3-2, the execution body 2 that has acquired the exclusion
It is assumed that a, b, and c have exclusive acquisition rights.
【0031】一方、ステップ8で、' で示す排他機構
3-2に対してのアクセスが成功しないことを判断すると
き、すなわち、' で示す排他機構3-2に障害が発生し
ているか、その排他機構3-2が実装されていないことを
判断するときには、ステップ11に進んで、2つの排他
機構3-1,2に対してアクセスに失敗したのか否かを判断
して、両方に失敗したことを判断するときには、排他獲
得処理が不可能であると判断し、そうでないことを判断
するときには、ステップ10に進んで、“X実行体”が
排他獲得権を持つものとする。On the other hand, when it is judged in step 8 that the access to the exclusion mechanism 3-2 indicated by "" is not successful, that is, whether the exclusion mechanism 3-2 indicated by "" has a failure, When it is determined that the exclusion mechanism 3-2 is not implemented, the process proceeds to step 11, and it is determined whether or not the access to the two exclusion mechanisms 3-1, 2 has failed, and both have failed. If it is determined that the exclusive acquisition processing is impossible, if it is determined that the exclusive acquisition processing is not possible, the process proceeds to step 10 and the "X executive" has the exclusive acquisition right.
【0032】このようにして、排他制御機構4は、実行
体2a,b,cから排他獲得要求が発行されると、図6の処
理フローに従って、「→' 」という順番に従って排
他機構3-1,2を排他獲得していって、2つの排他機構3
-1,2の排他獲得に成功するか、いずれか一方が動作不可
能であるときにあって、動作可能であるもう一方の排他
機構3-1,2の排他獲得に成功するときに、排他獲得要求
発行元の実行体2a,b,cに対して排他獲得を通知してい
くのである。In this way, when the exclusive body acquisition request is issued from the executing bodies 2a, b, c, the exclusive control mechanism 4 follows the processing flow of FIG. 6 and follows the order of "→ '" in the exclusive mechanism 3-1. , 2 are exclusively acquired, and two exclusion mechanisms 3
-1,2 is successfully acquired, or when one of them is inoperable and the other exclusion mechanism 3-1,2 that is operational is successfully acquired Exclusive execution is notified to the execution bodies 2a, 2b, and 2c that are acquisition request issuing sources.
【0033】すなわち、この排他制御機構4の処理に従
って、例えば、A実行体2aが排他獲得要求を発行する
ときに、A実行体2aが、で示す排他機構3-1と'
で示す排他機構3-2との両方に実行体IDを書き込めた
ときには、A実行体2aが排他獲得権を持つことにな
る。That is, according to the processing of the exclusion control mechanism 4, for example, when the A execution body 2a issues an exclusion acquisition request, the A execution body 2a and the exclusion mechanism 3-1 shown by
When the execution body ID can be written into both of the exclusion mechanism 3-2 shown in (1), the A execution body 2a has the exclusive acquisition right.
【0034】また、A実行体2aが排他獲得要求を発行
するときに、A実行体2aが、で示す排他機構3-1に
実行体IDを書き込めたものの、' で示す排他機構3
-2には書き込めなかったときには、' で示す排他機構
3-2に実行体IDを書き込んでいる例えばB実行体2b
が排他獲得権を持つことになる。When the A-executable body 2a issues the exclusion acquisition request, the A-executable body 2a writes the execution body ID into the exclusion mechanism 3-1 indicated by, but the exclusion mechanism 3 indicated by '.
-2 cannot be written, the execution unit ID is written in the exclusion mechanism 3-2 indicated by ', for example, B execution unit 2b.
Will have the exclusive acquisition right.
【0035】これは、B実行体2bが排他獲得権を解放
中に、A実行体2aが排他獲得要求を発行する場合や、
で示す排他機構3-1が、B実行体2bの排他獲得権の
取得後に追加された場合に起こる。This is because the A execution body 2a issues an exclusion acquisition request while the B execution body 2b is releasing the exclusion acquisition right,
This occurs when the exclusion mechanism 3-1 shown by is added after the acquisition of the exclusive acquisition right of the B execution body 2b.
【0036】また、A実行体2aが排他獲得要求を発行
するときに、例えばB実行体2bがで示す排他機構3
-1に実行体IDを書き込んでいるときには、' で示す
排他機構3-2にはB実行体2bの実行体IDが書き込ま
れている筈なので、A実行体2aは、その排他機構3-2
にB実行体2bの実行体IDを代行して書き込む。When the A-executable body 2a issues an exclusion acquisition request, for example, the exclusion mechanism 3 indicated by the B-executable body 2b.
When the execution body ID is written in -1, the execution body ID of the B execution body 2b is written in the exclusion mechanism 3-2 indicated by ', so that the A execution body 2a determines the exclusion mechanism 3-2.
The execution body ID of the B execution body 2b is written on behalf of.
【0037】この代行処理は、' で示す排他機構3-2
がB実行体2bの排他獲得権の取得後に追加された場合
に起こる。この代行処理に従って、上述したような排他
獲得済みということが起こる。なお、このときには、B
実行体2bが排他獲得権を持つことになる。This substitute process is executed by the exclusion mechanism 3-2 indicated by "."
Occurs when the B execution unit 2b is added after the acquisition of the exclusive acquisition right. According to this proxy processing, the above-mentioned exclusion acquisition has occurred. At this time, B
The executing body 2b has the exclusive acquisition right.
【0038】また、A実行体2aが排他獲得要求を発行
するときに、で示す排他機構3-1に障害が発生してい
たり、その排他機構3-1が実装されていないときには、
A実行体2aが、' で示す排他機構3-2に実行体ID
を書き込んで、書き込めたときにはA実行体2aが排他
獲得権を持つことになる。書き込めないときには、'
で示す排他機構3-2に実行体IDを書き込んでいる例え
ばB実行体2bが排他獲得権を持つことになる。このと
き、' に示す排他機構3-2に障害が発生していたり、
その排他機構3-2が実装されていないときには、排他獲
得はできないことになる。Further, when the A execution body 2a issues the exclusion acquisition request, if the exclusion mechanism 3-1 indicated by is in failure or the exclusion mechanism 3-1 is not installed,
The A execution body 2a sends an execution body ID to the exclusion mechanism 3-2 indicated by '.
Is written and the A execution body 2a has the exclusive acquisition right. If you can't write, '
For example, the B execution body 2b that has written the execution body ID in the exclusion mechanism 3-2 has the exclusive acquisition right. At this time, there is a failure in the exclusion mechanism 3-2 shown in ',
If the exclusion mechanism 3-2 is not implemented, exclusion cannot be acquired.
【0039】一方、排他制御機構4は、実行体2a,b,c
から排他獲得の解放要求が発行されると、図7の処理フ
ローに示すように、先ず最初に、ステップ1で、で示
す排他機構3-1に対して、初期値であるゼロ値の書き込
みを実行し、続くステップ2で、' で示す排他機構3
-2に対して、初期値であるゼロ値が設定されるように初
期化処理を実行する。On the other hand, the exclusive control mechanism 4 includes the execution bodies 2a, 2b, 2c.
When an exclusive acquisition release request is issued from, as shown in the processing flow of FIG. 7, first, in step 1, a zero value, which is an initial value, is written to the exclusion mechanism 3-1 indicated by. Execute, and in the following step 2, exclusion mechanism 3 indicated by '
For -2, perform initialization so that the initial value, zero value, is set.
【0040】続いて、ステップ3で、' で示す排他機
構3-2に対してのアクセスが成功したのか否かを判断し
て、成功したことを判断するときには、ステップ4に進
んで、排他獲得の解放要求元の実行体2a,b,c(自実行
体)が排他獲得を解放したものとする。Then, in step 3, it is judged whether or not the access to the exclusion mechanism 3-2 indicated by 'has succeeded, and when it is judged that the access has succeeded, the process proceeds to step 4 to acquire the exclusion. It is assumed that the execution requesting execution bodies 2a, 2b, and 2c (self-execution bodies) have released the exclusive acquisition.
【0041】一方、ステップ3で、' で示す排他機構
3-2に対してのアクセスが成功しないことを判断すると
き、すなわち、' で示す排他機構3-2に障害が発生し
ているか、その排他機構3-2が実装されていないことを
判断するときには、ステップ5に進んで、2つの排他機
構3-1,2に対してアクセスに失敗したのか否かを判断し
て、両方に失敗したことを判断するときには、排他獲得
の解放処理が不可能であると判断する。On the other hand, when it is judged in step 3 that the access to the exclusion mechanism 3-2 indicated by 'is unsuccessful, that is, whether the exclusion mechanism 3-2 indicated by' has a failure or not, When it is determined that the exclusion mechanism 3-2 is not implemented, the process proceeds to step 5, and it is determined whether or not the access to the two exclusion mechanisms 3-1, 2 has failed, and both have failed. When determining that, it is determined that the exclusive acquisition release processing is impossible.
【0042】このようにして、排他制御機構4は、実行
体2a,b,cから排他獲得の解放要求が発行されると、図
7の処理フローに従って、「→' 」という順番に従
って排他機構3-1,2の排他獲得を解放していって、その
排他獲得の解放に成功するときに、排他獲得の解放要求
発行元の実行体2a,b,cに対して排他獲得の解放を通知
していくのである。In this manner, when the execution bodies 2a, b, and c issue the exclusion acquisition release request, the exclusion control mechanism 4 follows the processing flow of FIG. When releasing the exclusive acquisition of -1,2 and succeeding in releasing the exclusive acquisition, the exclusive body is notified to the execution bodies 2a, b, and c of the issuer of the request to release the exclusive acquisition. It goes.
【0043】一方、排他制御機構4は、実行体2a,b,c
から排他獲得者の特定要求が発行されると、図8の処理
フローに示すように、先ず最初に、ステップ1で、'
で示す排他機構3-2に書き込まれている実行体IDを参
照し、続くステップ2で、このアクセスが成功したのか
否かを判断する。On the other hand, the exclusive control mechanism 4 includes the execution bodies 2a, b, c.
When a request for specifying an exclusive acquirer is issued by the user, as shown in the processing flow of FIG.
The execution unit ID written in the exclusion mechanism 3-2 is referred to, and in the subsequent step 2, it is determined whether or not this access is successful.
【0044】このステップ2で、' で示す排他機構3
-2に対してのアクセスが成功しないことを判断すると
き、すなわち、' で示す排他機構3-2に障害が発生し
ているか、その排他機構3-2が実装されていないことを
判断するときには、ステップ3に進んで、で示す排他
機構3-1に書き込まれている実行体IDを参照し、続く
ステップ2で、このアクセスが成功したのか否かを判断
して、成功しないことを判断するとき、すなわち、で
示す排他機構3-1に障害が発生しているか、その排他機
構3-1が実装されていないことを判断するときには、排
他獲得者の特定が不可能であると判断する。In this step 2, the exclusion mechanism 3 indicated by '
-When deciding that the access to -2 is not successful, that is, when deciding that the exclusion mechanism 3-2 indicated by 'has a failure or that exclusion mechanism 3-2 is not implemented , Go to step 3, refer to the execution unit ID written in the exclusion mechanism 3-1 indicated by, and in the following step 2, determine whether or not this access was successful, and determine that it is not successful. At this time, that is, when it is determined that the exclusion mechanism 3-1 has a failure or the exclusion mechanism 3-1 is not implemented, it is determined that the exclusion acquirer cannot be specified.
【0045】一方、ステップ2で、' で示す排他機構
3-2に対してのアクセスが成功したことを判断するとき
と、ステップ4で、で示す排他機構3-1に対してのア
クセスが成功したことを判断するときには、ステップ5
に進んで、アクセスの成功した排他機構3-1,2に実行体
IDが書き込まれているのか否かを判断して、書き込ま
れていないことを判断するときには、ステップ6に進ん
で、排他獲得者がいないことを判断して排他獲得者の特
定処理を終了してから、続くステップ7で、排他獲得者
の特定要求を発行してきた実行体2a,b,cからの排他獲
得要求を受け取り、上述した図6の処理フローに従って
排他獲得処理を行う。On the other hand, when it is judged in step 2 that the access to the exclusion mechanism 3-2 indicated by 'is successful, and in step 4, the access to the exclusion mechanism 3-1 indicated by is successful. Step 5
If it is determined that the execution unit ID has not been written in the exclusion mechanism 3-1, 2 that has been successfully accessed, and if it has not been written, the process proceeds to Step 6 to obtain the exclusion. After determining that there is no person who has acquired the exclusion request and ending the process of specifying the exclusion acquirer, in step 7, the exclusive acquisition request is received from the execution units 2a, b, c that have issued the exclusion request specifying request. Exclusive acquisition processing is performed according to the processing flow of FIG. 6 described above.
【0046】一方、ステップ5で、アクセスの成功した
排他機構3-1,2に実行体IDが書き込まれていることを
判断するとき、すなわち、排他獲得権を持つ実行体2
a,b,cがいることを判断するときには、ステップ8に進
んで、図示しない監視機構を呼び出して排他獲得権を持
つ実行体2a,b,cの監視処理に入り、続くステップ9
で、監視機構の監視処理によりその排他獲得権を持つ実
行体2a,b,cが動作中であるのか否かを判断して、動作
中であることを判断するときには、ステップ10に進ん
で、排他獲得者の特定処理を終了してから、定期的にス
テップ1に戻っていくことで排他獲得者の特定処理を続
行していく。On the other hand, in step 5, when it is judged that the execution unit ID is written in the exclusion mechanism 3-1, 2 that has been successfully accessed, that is, the execution unit 2 having the exclusive acquisition right.
When it is determined that a, b, and c are present, the process proceeds to step 8, and the monitoring mechanism (not shown) is called to enter the monitoring process of the execution bodies 2a, b, and c having the exclusive acquisition right, and the following step 9 is performed.
Then, by the monitoring process of the monitoring mechanism, it is determined whether or not the executing bodies 2a, 2b, 2c having the exclusive acquisition right are operating, and when it is determined that they are operating, the process proceeds to step 10. After the exclusion acquirer identification process is completed, the process periodically returns to step 1 to continue the exclusion acquisition person identification process.
【0047】一方、ステップ9で、排他獲得権を持つ実
行体2a,b,cが動作中でないことを判断するときには、
ステップ11に進んで、上述した図7の処理フローに従
って排他獲得の解放処理を行ってから、続くステップ1
2で、排他獲得者の特定要求を発行してきた実行体2
a,b,cからの排他獲得要求を受け取り、上述した図6の
処理フローに従って排他獲得処理を行う。On the other hand, when it is judged in step 9 that the executing bodies 2a, 2b, 2c having the exclusive acquisition right are not operating,
Proceeding to step 11, the exclusive acquisition release processing is performed according to the processing flow of FIG. 7 described above, and then step 1
Execution unit 2 that has issued the specific request for the exclusive acquirer
The exclusive acquisition requests from a, b, and c are received, and the exclusive acquisition processing is performed according to the processing flow of FIG. 6 described above.
【0048】このようにして、排他制御機構4は、実行
体2a,b,cから排他獲得者の特定要求が発行されると、
図8の処理フローに従って、「' →」という順番に
従って排他機構3-1,2を排他獲得している実行体2a,
b,cを検出していって、最初に検出した実行体2a,b,c
を排他獲得権を持っているものとして特定して、特定要
求発行元の実行体2a,b,cに対して、その特定した実行
体2a,b,cの排他獲得権が解放されるのを待ち合わせる
のである。In this way, the exclusive control mechanism 4 issues a request for specifying the exclusive acquirer from the execution units 2a, 2b, 2c,
According to the process flow of FIG. 8, the execution body 2a which has exclusively acquired the exclusion mechanisms 3-1, 2 in the order of "'→"
Detecting b, c, the first detected execution body 2a, b, c
Is specified as having the exclusive acquisition right, and the exclusive acquisition right of the specified execution body 2a, b, c is released to the execution body 2a, b, c of the specific request issuer. Meet up.
【0049】このように、本発明の計算機システム1で
は、実行体2は、例えば、「→' →''」という順
番に従って排他機構3を排他獲得していって、全ての排
他機構3を排他獲得できたときに排他を獲得する構成を
採る。そして、「→' →''」という順番に従って
排他機構3の排他獲得を解放していって、全ての排他機
構3の排他獲得を解放できたときに排他を解放する構成
を採る。そして、「''→' →」という順番に従っ
て排他機構3を排他獲得している実行体2を検出してい
って、最初に検出した実行体2を排他獲得を持っている
実行体2であると特定する構成を採る。As described above, in the computer system 1 of the present invention, the executing body 2 acquires the exclusion mechanism 3 in an exclusive manner, for example, in the order of "→ '→""and excludes all exclusion mechanisms 3. When it can be acquired, it takes a structure to acquire exclusive. The exclusive acquisition of the exclusion mechanism 3 is released in the order of "→ '→''", and the exclusive release is released when the exclusion acquisition of all the exclusion mechanisms 3 can be released. Then, the execution body 2 which has exclusively acquired the exclusion mechanism 3 is detected according to the order of “″ → ′ →”, and the execution body 2 which is detected first is the execution body 2 which has the exclusive acquisition. The configuration that specifies
【0050】この構成に従い、排他機構3が追加される
場合に、その追加の排他機構3に対して規定の順番を割
り付けるようにすれば、何ら支障は起こらない。図9に
示すように、実行体2が排他獲得を実行中に、先頭や最
後尾に排他機構3が追加されるようなことがあっても、
何ら支障は起こらない。According to this configuration, when the exclusive mechanism 3 is added, if the prescribed order is assigned to the additional exclusive mechanism 3, no trouble occurs. As shown in FIG. 9, while the execution body 2 is executing the exclusion acquisition, even if the exclusion mechanism 3 is added to the beginning or the end,
No trouble will occur.
【0051】また、図10に示すように、ある実行体2
が排他獲得権を持った後に、排他機構3が例えば最後尾
に追加されることが起きても、図6の処理フローで説明
したように、別の実行体2が代行して、その追加の排他
機構3に対して排他獲得権を持った実行体2を登録する
ので、何ら支障は起こらない。Further, as shown in FIG.
Even if the exclusion mechanism 3 is added at the end, for example, after the owner has the exclusive acquisition right, as described in the processing flow of FIG. Since the execution body 2 having the exclusive acquisition right is registered in the exclusion mechanism 3, no trouble occurs.
【0052】[0052]
【発明の効果】以上説明したように、本発明では、排他
機構を多重化する構成を採るので、排他機構の一部に障
害が発生しても、排他獲得の制御論理を障害の発生して
いないときと同じまま続行できるようになるので、信頼
性の高い排他制御を実現できるようになる。そして、排
他機構が追加されるときにも、排他獲得の制御論理を追
加前と同じまま続行できるようになるので、信頼性の高
い排他制御を実現できるようになる。As described above, in the present invention, since the exclusive mechanism is multiplexed, even if a part of the exclusive mechanism fails, the exclusive control logic does not fail. Since it becomes possible to continue the same as when there is no time, highly reliable exclusive control can be realized. Then, even when the exclusion mechanism is added, the control logic for acquisition of exclusion can be continued as it was before the addition, so that highly reliable exclusion control can be realized.
【図1】本発明の原理構成図である。FIG. 1 is a principle configuration diagram of the present invention.
【図2】排他機構の構成例である。FIG. 2 is a configuration example of an exclusive mechanism.
【図3】本発明の処理説明図である。FIG. 3 is an explanatory diagram of processing of the present invention.
【図4】本発明の処理説明図である。FIG. 4 is an explanatory diagram of a process according to the present invention.
【図5】実施例で想定する排他機構の構成図である。FIG. 5 is a configuration diagram of an exclusion mechanism assumed in the embodiment.
【図6】排他制御機構の実行する処理フローの一実施例
である。FIG. 6 is an example of a processing flow executed by an exclusive control mechanism.
【図7】排他制御機構の実行する処理フローの一実施例
である。FIG. 7 is an example of a processing flow executed by an exclusive control mechanism.
【図8】排他制御機構の実行する処理フローの一実施例
である。FIG. 8 is an example of a processing flow executed by an exclusive control mechanism.
【図9】本発明の処理説明図である。FIG. 9 is an explanatory diagram of a process according to the present invention.
【図10】本発明の処理説明図である。FIG. 10 is an explanatory diagram of a process according to the present invention.
1 計算機システム 2 実行体 3 排他機構 4 排他制御機構 10 順番管理手段 11 獲得実行手段 12 通知手段 13 解放実行手段 14 特定手段 15 割付手段 1 Computer System 2 Executor 3 Exclusive Mechanism 4 Exclusive Control Mechanism 10 Order Management Means 11 Acquisition Execution Means 12 Notification Means 13 Release Execution Means 14 Identification Means 15 Allocation Means
Claims (5)
使って資源を排他獲得しつつデータ処理を実行する計算
機システムにおいて、 排他機構を多重化するとともに、それらの排他機構に予
め規定の順番を割り付ける構成を採り、 かつ、実行体が排他獲得要求を発行するときに、上記順
番に従いつつ、排他機構に対して該実行体に与える排他
獲得を実行する獲得実行手段と、 上記獲得実行手段が動作可能である全ての排他機構に対
して排他獲得に成功するときに、排他獲得要求発行元の
実行体に対して排他獲得を通知する通知手段とを備える
ことを、 特徴とする排他制御方式。1. In a computer system in which a plurality of execution bodies executing in parallel execute data processing while exclusively acquiring resources by using an exclusion mechanism, the exclusion mechanisms are multiplexed and the exclusion mechanisms have a predetermined order in advance. When the execution body issues an exclusion acquisition request, the acquisition execution means for executing the exclusion acquisition given to the execution body for the exclusion mechanism according to the above order and the acquisition execution means are adopted. An exclusion control method characterized by comprising notifying means for notifying the execution body of the exclusion acquisition request issuing source of the exclusion acquisition when the exclusion acquisition is successful for all operable exclusion mechanisms.
行手段と同一の順番に従いつつ、排他機構に対して該実
行体に与えている排他獲得の解放を実行する解放実行手
段を備えることを、 特徴とする排他制御方式。2. The exclusive control method according to claim 1, wherein when the execution unit issues a release request for exclusive acquisition, the execution unit is given to the execution unit in the same order as the acquisition execution unit. An exclusive control method characterized by comprising release execution means for executing release of exclusive lock acquisition.
いて、 実行体が排他獲得者の特定要求を発行するときに、獲得
実行手段とは逆の順番に従って排他機構を参照していく
ことで、最初に排他獲得が与えられている実行体を特定
して、それを特定要求発行元の実行体に通知する特定手
段を備えることを、 特徴とする排他制御方式。3. The exclusive control system according to claim 1 or 2, wherein when the execution body issues a specific request of the exclusion acquirer, the exclusion mechanism is referred to in the reverse order of the acquisition execution means. The exclusive control method is characterized by including a specifying unit that first specifies an execution unit to which exclusive acquisition is given and notifies the execution unit of the specific request issuer of it.
において、 排他機構が追加されるときに、該排他機構に対して規定
の順番を割り付ける割付手段を備えることを、 特徴とする排他制御方式。4. The exclusion control method according to claim 1, 2 or 3, further comprising: allocation means for allocating a prescribed order to the exclusion mechanism when the exclusion mechanism is added. control method.
体とは別の実行体に排他獲得を与えているときに、どの
実行体にも排他獲得を与えていない排他機構がある場合
には、その排他機構に対してその別の実行体に与える排
他獲得を実行することを、 特徴とする排他制御方式。5. The exclusive control system according to claim 4, wherein the acquisition execution means is configured to determine which execution body when the exclusion mechanism gives an exclusive acquisition to an execution body other than the execution body that issued the exclusion acquisition request. If there is also an exclusion mechanism that does not give an exclusion acquisition, an exclusion control method characterized by executing the exclusion acquisition given to the other executing body for the exclusion mechanism.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8073513A JPH09265406A (en) | 1996-03-28 | 1996-03-28 | Exclusive control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8073513A JPH09265406A (en) | 1996-03-28 | 1996-03-28 | Exclusive control method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH09265406A true JPH09265406A (en) | 1997-10-07 |
Family
ID=13520413
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8073513A Withdrawn JPH09265406A (en) | 1996-03-28 | 1996-03-28 | Exclusive control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH09265406A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
USRE46060E1 (en) | 1997-02-10 | 2016-07-05 | Genesys Telecommunications Laboratories, Inc. | In-band signaling for routing |
-
1996
- 1996-03-28 JP JP8073513A patent/JPH09265406A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
USRE46060E1 (en) | 1997-02-10 | 2016-07-05 | Genesys Telecommunications Laboratories, Inc. | In-band signaling for routing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106790694B (en) | Distributed system and scheduling method of target object in distributed system | |
CA2086692C (en) | Integrity of data objects used to maintain state information for shared data at a local complex | |
US6463532B1 (en) | System and method for effectuating distributed consensus among members of a processor set in a multiprocessor computing system through the use of shared storage resources | |
US5388266A (en) | Management of data objects used intain state information for shared data at a local complex | |
US5394542A (en) | Clearing data objects used to maintain state information for shared data at a local complex when at least one message path to the local complex cannot be recovered | |
US7904906B2 (en) | Tracking modified pages on a computer system | |
US5712971A (en) | Methods and systems for reconstructing the state of a computation | |
US7516361B2 (en) | Method for automatic checkpoint of system and application software | |
US5796937A (en) | Method of and apparatus for dealing with processor abnormality in multiprocessor system | |
US20030105796A1 (en) | Method and apparatus for controlling access to shared resources in an environment with multiple logical processors | |
US20050132249A1 (en) | Apparatus method and system for fault tolerant virtual memory management | |
US20080215909A1 (en) | Apparatus, system, and method for transactional peer recovery in a data sharing clustering computer system | |
JPH06119232A (en) | Shared-data-memory control system, setting method for master processing device and data-copy method | |
US5450590A (en) | Authorization method for conditional command execution | |
JPH05181823A (en) | Method and apparatus for controlling block in block partitioning type process environment | |
JPS62105247A (en) | Management of data base system | |
CN112395050B (en) | Virtual machine backup method and device, electronic equipment and readable storage medium | |
US20100262720A1 (en) | Techniques for write-after-write ordering in a coherency managed processor system that employs a command pipeline | |
US6092084A (en) | One system of a multisystem environment taking over log entries owned by another system | |
JP2001022599A (en) | Fault tolerant system, fault tolerant processing method, and fault tolerant control program recording medium | |
US7346747B1 (en) | Exclusive lease instruction support for transient blocking synchronization | |
CN115552377A (en) | Hybrid leases for master selection | |
US6076095A (en) | Method of one system of a multisystem environment taking over log entries owned by another system | |
US7281153B2 (en) | Apparatus, system, and method for transactional peer recovery in a data sharing clustering computer system | |
JPH09265406A (en) | Exclusive control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20030603 |