JP2001067238A - Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded - Google Patents

Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded

Info

Publication number
JP2001067238A
JP2001067238A JP24112199A JP24112199A JP2001067238A JP 2001067238 A JP2001067238 A JP 2001067238A JP 24112199 A JP24112199 A JP 24112199A JP 24112199 A JP24112199 A JP 24112199A JP 2001067238 A JP2001067238 A JP 2001067238A
Authority
JP
Japan
Prior art keywords
exclusive
request message
lock
lock request
shared
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
JP24112199A
Other languages
Japanese (ja)
Inventor
Keiichi Koyama
恵一 小山
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP24112199A priority Critical patent/JP2001067238A/en
Publication of JP2001067238A publication Critical patent/JP2001067238A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the processing efficiency of a computer system consisting of plural computers having a shared resource. SOLUTION: A computer 1-1 requesting exclusive or shared lock for exclusive units transmits an exclusive or shared lock request to all computers. A computer which receives the exclusive lock request transmits lock permission to the computer 1-1 under a condition that any unsolved exclusive lock request or shared lock request is not transmitted prior to the transmission of the received exclusive lock request, and a computer which receives the shared lock request transmits lock permission to the computer 1-1 under a condition that any unsolved exclusive lock request is not transmitted prior to the transmission of the received shared lock. The computer 1-1 receives the lock permission from all the normally operating computers, and obtains the exclusive or shared lock.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、複数のコンピュー
タが記憶装置,ファイル,プログラム等の共有資源を共
有するコンピュータシステムに関し、特に、共有資源の
排他共有制御を行う技術に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a computer system in which a plurality of computers share a shared resource such as a storage device, a file, and a program, and more particularly to a technique for performing exclusive sharing control of a shared resource.

【0002】[0002]

【従来の技術】複数のコンピュータが共有資源を共有す
るコンピュータシステムに於いては、従来から次のよう
な排他制御が行われている。
2. Description of the Related Art In a computer system in which a plurality of computers share a shared resource, the following exclusive control has been conventionally performed.

【0003】或るコンピュータが共有資源の排他単位を
使用する場合、全てのコンピュータに対して上記排他単
位のロックを要求するロック要求メッセージを送信す
る。このロック要求メッセージを受信したコンピュータ
は、自コンピュータが上記排他単位に対するロック要求
メッセージを発行中であるか否かを調べ、発行中でなけ
れば、ロック要求メッセージの送信元のコンピュータに
対してロック許可メッセージを送信する。ロック要求メ
ッセージの送信元のコンピュータは、全てのコンピュー
タの内の、正常に動作している全てのコンピュータから
ロック許可メッセージを受信することにより、上記排他
単位に対するロックを獲得する。このような技術は、例
えば、「分散オペレーティングシステム」,1996年
8月5日,株式会社プレンティスホール出版,p125
〜p127に記載されている。
When a certain computer uses an exclusive unit of a shared resource, a lock request message requesting a lock of the exclusive unit is transmitted to all computers. The computer that has received the lock request message checks whether the own computer is issuing a lock request message for the exclusive unit, and if not, grants the lock request message to the computer that transmitted the lock request message. Send a message. The computer that has transmitted the lock request message acquires the lock for the exclusive unit by receiving the lock permission message from all the computers that are operating normally among all the computers. Such a technique is described in, for example, "Distributed Operating System", August 5, 1996, Prentice Hall Publishing Co., p125.
To p127.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の技術
は、或るコンピュータが或る排他単位を使用しようとし
てロックを獲得した場合、他のコンピュータが上記排他
単位を全く使用できなくなってしまうため、コンピュー
タシステムの処理効率が低下してしまうという問題があ
る。例えば、排他単位がファイルの場合、参照であれ
ば、複数のコンピュータが上記ファイルを同時に参照す
ることが可能であるが、上述した従来の技術では、複数
のコンピュータが上記ファイルを参照したい場合であっ
ても、上記ファイルに対するロックを最初に獲得した1
台のコンピュータしか上記ファイルを参照することがで
きないため、コンピュータシステムの処理効率が低下し
てしまう。また、排他単位がプログラムをいくつかの部
分に分割した際の各部分である場合、複数台のコンピュ
ータが同時に実行しても良いプログラム部分であって
も、上述した従来の技術では、或るコンピュータがロッ
クを獲得してしまうと他のコンピュータが上記プログラ
ム部分を実行することができなくなり、コンピュータシ
ステムの処理効率が低下してしまう。
According to the above-mentioned prior art, when a certain computer acquires a lock by using a certain exclusive unit, another computer cannot use the exclusive unit at all. There is a problem that the processing efficiency of the computer system is reduced. For example, when the exclusion unit is a file, if it is a reference, a plurality of computers can refer to the file at the same time. However, in the above-described conventional technology, a case where a plurality of computers want to refer to the file is required. Even if the lock on the above file was first acquired
Since only one computer can refer to the file, the processing efficiency of the computer system decreases. Further, when the exclusive unit is each part when the program is divided into several parts, even if it is a program part that may be executed by a plurality of computers at the same time, in the above-described conventional technology, a certain computer If the computer acquires the lock, the other computer cannot execute the program part, and the processing efficiency of the computer system decreases.

【0005】そこで、本発明の目的は、共有資源を有す
る複数台のコンピュータからなるコンピュータシステム
の処理効率を向上させることにある。
Accordingly, an object of the present invention is to improve the processing efficiency of a computer system including a plurality of computers having shared resources.

【0006】[0006]

【課題を解決するための手段】本発明の分散排他共有制
御方法は、上記目的を達成するため、複数のコンピュー
タが共有資源を共有するコンピュータシステムに於い
て、前記共有資源の排他単位に対する排他ロック,共有
ロックを要求するコンピュータは、前記全てのコンピュ
ータに対して排他ロック要求メッセージ,共有ロック要
求メッセージを送信し、排他ロック要求メッセージを受
信したコンピュータは、該受信した排他ロック要求メッ
セージの送信時よりも前に、該受信した排他ロック要求
メッセージよってロック要求されている排他単位と同一
の排他単位に対する未解決の排他ロック要求メッセー
ジ,共有ロック要求メッセージを送信していないことを
条件にして前記排他ロック要求メッセージの送信元のコ
ンピュータに対してロック許可メッセージを送信し、共
有ロック要求メッセージを受信したコンピュータは、該
受信した共有ロック要求メッセージの送信時よりも前
に、該受信した共有ロック要求メッセージによってロッ
ク要求されている排他単位と同一の排他単位に対する未
解決の排他ロック要求メッセージを送信していないこと
を条件にして前記共有ロック要求メッセージの送信元の
コンピュータに対してロック許可メッセージを送信し、
排他ロック要求メッセージの送信元のコンピュータは、
前記全てのコンピュータの内の、正常に動作している全
てのコンピュータからロック許可メッセージを受信した
場合、ロック要求した排他単位に対する排他ロックを獲
得し、共有ロック要求メッセージの送信元のコンピュー
タは、前記全てのコンピュータの内の、正常に動作して
いる全てのコンピュータからロック許可メッセージを受
信した場合、ロック要求した排他単位に対する共有ロッ
クを獲得する。
In order to achieve the above object, a distributed exclusion sharing control method according to the present invention provides an exclusive lock for an exclusion unit of a shared resource in a computer system in which a plurality of computers share a shared resource. , The computer requesting the shared lock transmits an exclusive lock request message and a shared lock request message to all the computers, and the computer receiving the exclusive lock request message transmits the exclusive lock request message from the time when the received exclusive lock request message is transmitted. The exclusive lock on the condition that no outstanding exclusive lock request message or shared lock request message for the same exclusive unit as the exclusive unit whose lock is requested by the received exclusive lock request message has not been transmitted. Log in to the computer that sent the request message. Computer that has transmitted the lock permission message and received the shared lock request message, before the transmission of the received shared lock request message, Transmitting a lock permission message to the transmission source computer of the shared lock request message on condition that the unresolved exclusive lock request message for the exclusive unit is not transmitted;
The computer that sent the exclusive lock request message
If a lock permission message is received from all the computers that are operating normally among all the computers, an exclusive lock is acquired for the exclusive unit that issued the lock request, and the transmission source computer of the shared lock request message receives the lock request message. When a lock permission message is received from all the normally operating computers among all the computers, a shared lock is acquired for the exclusive unit for which the lock was requested.

【0007】上記した方法を実施するのに好適な装置と
して、本発明の分散排他共有制御装置は、複数のコンピ
ュータが共有資源を共有するコンピュータシステムに於
ける前記各コンピュータがそれぞれ備える分散排他共有
制御装置であって、前記共有資源の排他単位に対する排
他ロックの獲得要求時、前記全てのコンピュータに対し
て排他ロック要求メッセージを送信し、前記全てのコン
ピュータの内の、正常に動作している全てのコンピュー
タからロック許可メッセージを受信することにより、前
記排他単位に対する排他ロックを獲得する排他ロック獲
得手段と、前記共有資源の排他単位に対する共有ロック
の獲得要求時、前記全てのコンピュータに対して共有ロ
ック要求メッセージを送信し、前記全てのコンピュータ
の内の、正常に動作している全てのコンピュータからロ
ック許可メッセージを受信することにより、前記排他単
位に対する共有ロックを獲得する共有ロック獲得手段
と、他のコンピュータから送られてくる排他ロック要求
メッセージの受信時、該受信した排他ロック要求メッセ
ージの送信時よりも前に、自コンピュータが、前記受信
した排他ロック要求メッセージによってロック要求され
ている排他単位と同一の排他単位に対する未解決の排他
ロック要求メッセージ,共有ロック要求メッセージを送
信していないことを条件にして前記受信した排他ロック
要求メッセージの送信元のコンピュータに対してロック
許可メッセージを送信し、他のコンピュータから送られ
てくる共有ロック要求メッセージの受信時、該受信した
共有ロック要求メッセージの送信時よりも前に、自コン
ピュータが、前記受信した共有ロック要求メッセージに
よってロック要求されている排他単位と同一の排他単位
に対する未解決の排他ロック要求メッセージを送信して
いないことを条件にして前記受信した共有ロック要求メ
ッセージの送信元のコンピュータに対してロック許可メ
ッセージを送信するロック要求応答手段とを備えてい
る。
As a device suitable for carrying out the above method, a distributed exclusion sharing control device of the present invention is a distributed exclusion sharing control device provided in each computer in a computer system in which a plurality of computers share a shared resource. The device, when requesting to acquire an exclusive lock for the exclusive unit of the shared resource, transmits an exclusive lock request message to all of the computers, and among all of the computers, all of the normally operating computers Exclusive lock acquiring means for acquiring an exclusive lock for the exclusive unit by receiving a lock permission message from a computer; and a shared lock request for all the computers when a request for acquiring a shared lock for the exclusive unit of the shared resource is made. Send a message and make sure that all of the computers Receiving a lock permission message from all of the computers performing the lock process, and a shared lock acquisition unit that acquires a shared lock for the exclusive unit, and when receiving an exclusive lock request message sent from another computer, Before transmitting the exclusive lock request message, the own computer transmits an unresolved exclusive lock request message and a shared lock request message for the same exclusive unit as the exclusive unit whose lock is requested by the received exclusive lock request message. A lock permission message is transmitted to the transmission source computer of the received exclusive lock request message on condition that it is not transmitted, and when the shared lock request message transmitted from another computer is received, the received lock request message is received. When sending a shared lock request message Before receiving the shared key on the condition that the own computer has not transmitted an unresolved exclusive lock request message for the same exclusive unit as the exclusive unit whose lock is requested by the received shared lock request message. Lock request response means for transmitting a lock permission message to the computer that transmitted the lock request message.

【0008】この構成に於いては、共有資源の排他単位
に対する排他ロックを獲得する場合、排他ロック獲得手
段が、全てのコンピュータに対して排他ロック要求メッ
セージを送信する。この排他ロック要求メッセージを受
信した全てのコンピュータ内のロック要求応答手段は、
受信した排他ロック要求メッセージの送信時よりも前
に、自コンピュータが、上記受信した排他ロック要求メ
ッセージによってロック要求されている排他単位と同一
の排他単位に対する未解決の排他ロック要求メッセー
ジ,共有ロック要求メッセージを送信していないことを
条件にして上記受信した排他ロック要求メッセージの送
信元のコンピュータに対してロック許可メッセージを送
信する。排他ロック要求メッセージの送信元の排他ロッ
ク獲得手段は、正常に動作している全てのコンピュータ
からロック許可メッセージを受信することにより、排他
単位に対する排他ロックを獲得する。
In this configuration, when acquiring an exclusive lock for the exclusive unit of the shared resource, the exclusive lock acquiring means transmits an exclusive lock request message to all the computers. The lock request response means in all the computers that have received this exclusive lock request message,
Before the transmission of the received exclusive lock request message, the own computer causes the unresolved exclusive lock request message and the shared lock request for the same exclusive unit as the exclusive unit whose lock is requested by the received exclusive lock request message. A lock permission message is transmitted to the computer that has transmitted the received exclusive lock request message on condition that the message has not been transmitted. The exclusive lock acquiring means of the transmission source of the exclusive lock request message acquires the exclusive lock for the exclusive unit by receiving the lock permission message from all the normally operating computers.

【0009】また、共有資源の排他単位に対する共有ロ
ックを獲得する場合、共有ロック獲得手段が、全てのコ
ンピュータに対して共有ロック要求メッセージを送信す
る。この共有ロック要求メッセージを受信した全てのコ
ンピュータ内のロック要求応答手段は、受信した共有ロ
ック要求メッセージの送信時よりも前に、自コンピュー
タが、上記受信した共有ロック要求メッセージによって
ロック要求されている排他単位と同一の排他単位に対す
る未解決の排他ロック要求メッセージを送信していない
ことを条件にして上記受信した共有ロック要求メッセー
ジの送信元の共有ロック獲得手段に対してロック許可メ
ッセージを送信する。共有ロック要求メッセージの送信
元の共有ロック獲得手段は、正常に動作している全ての
コンピュータからロック許可メッセージを受信すること
により、排他単位に対する共有ロックを獲得する。
When acquiring a shared lock for an exclusive unit of a shared resource, the shared lock acquiring means transmits a shared lock request message to all computers. The lock request responding means in all the computers that have received the shared lock request message request that their own computer be locked by the received shared lock request message before the transmission of the received shared lock request message. The lock permission message is transmitted to the shared lock acquisition unit of the transmission source of the received shared lock request message on the condition that the unresolved exclusive lock request message for the same exclusive unit as the exclusive unit is not transmitted. The shared lock acquisition unit of the transmission source of the shared lock request message acquires the shared lock for the exclusive unit by receiving the lock permission message from all the normally operating computers.

【0010】[0010]

【発明の実施の形態】次に本発明の実施の形態について
図面を参照して詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0011】図1は本発明の実施例のブロック図であ
り、複数台のコンピュータ1−1〜1−4と、各コンピ
ュータ1−1〜1−4によって共有される記憶装置6
と、各コンピュータ1−1〜1−4を接続するネットワ
ーク7とを備えている。尚、本実施例では、共有資源で
ある記憶装置6に格納されている複数のファイル(図示
せず)が排他単位であるとする。また、本実施例では、
各コンピュータ1−1〜1−4には、それぞれ識別子
「1」〜「4」が付与されているとする。
FIG. 1 is a block diagram of an embodiment of the present invention, in which a plurality of computers 1-1 to 1-4 and a storage device 6 shared by the computers 1-1 to 1-4 are provided.
And a network 7 for connecting the computers 1-1 to 1-4. In the present embodiment, it is assumed that a plurality of files (not shown) stored in the storage device 6 that is a shared resource is an exclusive unit. In this embodiment,
It is assumed that identifiers “1” to “4” are assigned to the computers 1-1 to 1-4, respectively.

【0012】各コンピュータ1−1〜1−4は、それぞ
れ分散排他共有制御手段2−1〜2−4,論理時計制御
手段3−1〜3−4,通信制御手段4−1〜4−4から
なる分散排他共有制御装置を備えている。
Each of the computers 1-1 to 1-4 comprises a distributed exclusive sharing control means 2-1 to 2-4, a logical clock control means 3-1 to 3-4, and a communication control means 4-1 to 4-4, respectively. Is provided.

【0013】通信制御手段4−1〜4−4は、それぞれ
ネットワーク7を介して他のコンピュータとメッセージ
をやり取りする機能や、他のコンピュータが正常に動作
しているか否かを常に監視する機能を有する。
Each of the communication control means 4-1 to 4-4 has a function of exchanging messages with another computer via the network 7 and a function of constantly monitoring whether or not the other computer is operating normally. Have.

【0014】論理時計制御手段3−1〜3−4は、それ
ぞれ通信制御手段4−1〜4−4を利用して他のコンピ
ュータ上の論理時計制御手段と協調し、全コンピュータ
1−1〜1−4で一意に事象の前後関係が決定できる論
理時刻を分散排他共有制御手段2−1〜2−4に提供す
る機能を有する。
The logic clock control means 3-1 to 3-4 cooperate with the logic clock control means on another computer by using the communication control means 4-1 to 4-4, respectively, and It has a function of providing a logical time at which the context of an event can be uniquely determined in 1-4 to the distributed exclusive sharing control means 2-1 to 2-4.

【0015】具体的には、論理時計制御手段3−i(1
≦i≦4)は、内部に時計(図示せず)を有しており、
その時計が示す時刻に、コンピュータ1−iに付与され
ている識別子を小数点で区切って付加したものを論理時
刻として分散排他共有制御手段2−iに提供する。例え
ば、コンピュータ1−2内の論理時計制御手段3−2
は、その内部に設けられている時計が時刻「1010」
を示している場合は、それにコンピュータ1−2の識別
子「2」を小数点で区切って付加したもの「1010.
2」を論理時刻として分散排他共有制御手段2−2に提
供する。
Specifically, the logical clock control means 3-i (1
≦ i ≦ 4) has a clock (not shown) inside,
At the time indicated by the clock, the identifier added to the computer 1-i separated by a decimal point is added to the distributed exclusive control means 2-i as a logical time. For example, the logical clock control means 3-2 in the computer 1-2
Means that the clock provided inside is "1010"
Is displayed, the identifier “2” of the computer 1-2 is added thereto separated by a decimal point “1010.
"2" as the logical time to the shared exclusive control means 2-2.

【0016】また、論理時計制御手段3−iは、他のコ
ンピュータから送られてきたメッセージを受信した時、
そのメッセージの受信時刻(論理時計制御手段3−i内
の時計が示す時刻)と、メッセージに含まれている論理
時刻中の時刻部分(メッセージの送信時の送信元のコン
ピュータ内の時計が示す時刻)とを比較し、メッセージ
に含まれている論理時刻中の時刻部分の方が進んでいる
場合は、自論理時計制御手段3−i内の時計が示す時刻
を、メッセージに含まれている論理時刻中の時刻部分が
示す時刻よりも単位時間だけ進んだ時刻に変更する。例
えば、メッセージの受信時刻が「1234」で、メッセ
ージに含まれている論理時刻が「1245.3」であれ
ば、論理時計制御手段3−iは、その内部の時計を時刻
「1246」を示すものに変更する。
When the logical clock control means 3-i receives a message sent from another computer,
The reception time of the message (the time indicated by the clock in the logical clock control means 3-i) and the time portion in the logical time included in the message (the time indicated by the clock in the transmission source computer when the message is transmitted) ), And when the time portion of the logical time included in the message is advanced, the time indicated by the clock in the own logical clock control means 3-i is changed to the logical time included in the message. The time is changed to a time advanced by a unit time from the time indicated by the time portion in the time. For example, if the reception time of the message is "1234" and the logical time included in the message is "1245.3", the logical clock control unit 3-i indicates the internal clock to the time "1246". Change to something.

【0017】各分散排他共有制御手段2−1〜2−4
は、他のコンピュータ上の分散排他共有制御手段と協調
して、排他ロックの獲得,排他ロックの開放,共有ロッ
クの獲得,共有ロックの開放を制御する機能を有する。
Each of the distributed exclusive sharing control means 2-1 to 2-4
Has a function of controlling acquisition of an exclusive lock, release of an exclusive lock, acquisition of a shared lock, and release of a shared lock in cooperation with distributed exclusive sharing control means on another computer.

【0018】図2は分散排他共有制御手段2−iの構成
例を示すブロック図であり、排他ロック獲得手段21−
iと、共有ロック獲得手段22−iと、ロック開放手段
23−iと、ロック要求応答手段24−iと、待ち行列
25−iと、テーブル26−iとを備えている。
FIG. 2 is a block diagram showing an example of the configuration of the distributed exclusive sharing control means 2-i.
i, a shared lock acquisition unit 22-i, a lock release unit 23-i, a lock request response unit 24-i, a queue 25-i, and a table 26-i.

【0019】排他ロック獲得手段21−iは、プロセス
等の排他ロックの要求元から排他ロックするファイルの
ファイル名が指定されたとき、全てのコンピュータ1−
1〜1−4に対して、排他ロックするファイルのファイ
ル名および論理時計制御手段3−iから取得した論理時
刻を含む排他ロック要求メッセージを送信する機能や、
送信した排他ロック要求メッセージと要求元の識別子と
を対にしてテーブル26−iに登録する機能や、送信し
た排他ロック要求メッセージに対するロック許可メッセ
ージを、正常に動作している全てのコンピュータから受
信したとき、要求元にロック獲得を通知する機能を有す
る。
When the file name of the file to be exclusively locked is specified by the exclusive lock requesting source such as a process, the exclusive lock acquisition means 21-i sends all the computers 1-i.
A function of transmitting an exclusive lock request message including the file name of the file to be exclusively locked and the logical time obtained from the logical clock control unit 3-i to
A function of registering the transmitted exclusive lock request message and the identifier of the request source in the table 26-i, and a lock permission message for the transmitted exclusive lock request message are received from all the normally operating computers. Sometimes, it has a function of notifying a request source of lock acquisition.

【0020】共有ロック獲得手段22−iは、プロセス
等の共有ロックの要求元から共有ロックするファイルの
ファイル名が指示されたとき、全てのコンピュータ1−
1〜1−4に対して、共有ロックするファイルのファイ
ル名および論理時計制御手段3−iから取得した論理時
刻を含む共有ロック要求メッセージを送信する機能や、
送信した共有ロック要求メッセージと要求元の識別子と
を対にしてテーブル26−iに登録する機能や、送信し
た共有ロック要求メッセージに対するロック許可メッセ
ージを、正常に動作している全てのコンピュータから受
信したとき、要求元にロック獲得を通知する機能を有す
る。
When a file name of a file to be shared locked is designated by a shared lock requesting source such as a process, the shared lock acquisition means 22-i sends all the computers 1--1.
A function of transmitting a shared lock request message including a file name of a file to be shared locked and a logical time acquired from the logical clock control unit 3-i to
The function of registering the transmitted shared lock request message and the identifier of the request source in the table 26-i in pairs and the lock permission message for the transmitted shared lock request message are received from all the normally operating computers. Sometimes, it has a function of notifying a request source of lock acquisition.

【0021】ロック要求応答手段24−iは、排他ロッ
ク要求メッセージを受信したとき、この排他ロック要求
メッセージに含まれている論理時刻よりも前の論理時刻
に於いて、自コンピュータ1−iが送信した上記排他ロ
ック要求メッセージと同一の排他単位に対する未解決の
排他ロック要求メッセージ或いは共有ロック要求メッセ
ージが存在するか否かをテーブル26−iの内容に基づ
いて判断し、存在する場合は、受信した排他ロック要求
メッセージを待ち行列25−iに登録して保留状態に
し、存在しない場合は、受信した排他ロック要求メッセ
ージの送信元のコンピュータに対してロック許可メッセ
ージを送信する機能を有する。ここで、未解決の排他,
共有ロック要求メッセージとは、送信はされたがロック
許可メッセージが返されていない排他,共有ロック要求
メッセージ及びロック許可メッセージは返されたがその
排他,共有ロック要求メッセージによってロックした排
他単位が開放されていない排他,共有ロック要求メッセ
ージをいう。
When receiving the exclusive lock request message, the lock request responding means 24-i transmits the exclusive lock request message to the own computer 1-i at a logical time earlier than the logical time included in the exclusive lock request message. It is determined based on the contents of the table 26-i whether or not there is an unresolved exclusive lock request message or a shared lock request message for the same exclusive unit as the exclusive lock request message described above. The exclusive lock request message is registered in the queue 25-i and is put on hold. If the exclusive lock request message does not exist, a lock permission message is transmitted to the computer that has transmitted the received exclusive lock request message. Where unresolved exclusions,
The shared lock request message is an exclusion that has been transmitted but has not returned a lock permission message, a shared lock request message and a lock permission message have been returned, but the exclusion unit locked by the shared lock request message is released. This is an exclusive / shared lock request message that has not been sent.

【0022】更に、ロック要求応答手段24−iは、共
有ロック要求メッセージを受信したとき、受信した共有
ロック要求メッセージに含まれている論理時刻よりも前
の論理時刻に於いて自コンピュータ1−iが送信した、
上記共有ロック要求メッセージと同一の排他単位に対す
る未解決の排他ロック要求メッセージが存在するか否か
をテーブル26−iの内容に基づいて判断し、存在して
いる場合は、受信した共有ロック要求メッセージを待ち
行列25−iに登録して保留状態にし、存在しない場合
は、受信した共有ロック要求メッセージの送信元のコン
ピュータに対してロック許可メッセージを送信する機能
を有する。
Further, when receiving the shared lock request message, the lock request responding means 24-i sets its own computer 1-i at a logical time earlier than the logical time contained in the received shared lock request message. Sent by
It is determined based on the contents of the table 26-i whether or not there is an unresolved exclusive lock request message for the same exclusive unit as the above-mentioned shared lock request message. Is registered in the queue 25-i and put on hold. If the shared lock request message does not exist, a lock permission message is transmitted to the computer that has transmitted the received shared lock request message.

【0023】ロック開放手段23−iは、プロセス等の
要求元から排他単位のロック開放が指示されたとき、テ
ーブル26−iに登録されている排他,共有ロック要求
メッセージと要求元の識別子との対の内、開放する排他
単位と関係する対を削除する機能や、待ち行列25−i
に登録されている排他ロック要求メッセージ或いは共有
ロック要求メッセージを先頭から1つずつ取り出す機能
を有する。
The lock release means 23-i, when instructed by a request source such as a process or the like to release the lock of an exclusive unit, transmits the exclusive / shared lock request message registered in the table 26-i and the identifier of the request source. Among the pairs, a function for deleting a pair related to an exclusive unit to be released or a queue 25-i
Has a function of extracting exclusive lock request messages or shared lock request messages registered in the.

【0024】更に、ロック開放手段23−iは、待ち行
列25−iから排他ロック要求メッセージを取り出した
ときは、それに含まれている論理時刻よりも前の論理時
刻に於いて自コンピュータ1−iが送信した、上記排他
ロック要求メッセージと同一の排他単位に対する未解決
の排他ロック要求メッセージ或いは共有ロック要求メッ
セージが存在するか否かをテーブル26−iの内容に基
づいて判断し、存在する場合は、取り出した排他ロック
要求メッセージを再度待ち行列25−iに登録し、存在
しない場合は、取り出した排他ロック要求メッセージの
発行元のコンピュータに対してロック許可メッセージを
送信する機能を有する。また、ロック開放手段23−i
は、待ち行列25−iから共有ロック要求メッセージを
取り出したときは、それに含まれている論理時刻よりも
前の論理時刻の於いて自コンピュータ1−iが送出し
た、上記共有ロック要求メッセージと同一の排他単位に
対する未解決の排他ロック要求メッセージが存在するか
否かをテーブル26−iの内容に基づいて判断し、存在
する場合は、取り出した共有ロック要求メッセージを再
び待ち行列25−iに登録し、存在しない場合は、取り
出した共有ロック要求メッセージの発行元のコンピュー
タに対してロック許可メッセージを送信する機能を有す
る。
Further, when the exclusive release request message is taken out from the queue 25-i, the lock releasing means 23-i sets its own computer 1-i at a logical time earlier than the logical time contained in the exclusive lock request message. Determines whether there is an unresolved exclusive lock request message or shared lock request message for the same exclusive unit as the exclusive lock request message transmitted based on the contents of the table 26-i. Then, the extracted exclusive lock request message is registered in the queue 25-i again, and if it does not exist, a lock permission message is transmitted to the computer that issued the extracted exclusive lock request message. Also, the lock releasing means 23-i
When the shared lock request message is extracted from the queue 25-i, the same as the shared lock request message transmitted by the own computer 1-i at a logical time earlier than the logical time included in the shared lock request message. Is determined based on the contents of the table 26-i, and if there is an unresolved exclusive lock request message for the exclusive unit, the shared lock request message taken out is registered again in the queue 25-i. If it does not exist, it has a function of transmitting a lock permission message to the computer that issued the extracted shared lock request message.

【0025】各コンピュータ1−1〜1−4に接続され
ている記録媒体5−1〜5−4は、ディスク,半導体メ
モリ,その他の記録媒体であり、コンピュータ1−1〜
1−4を分散排他共有制御装置として機能させるための
プログラムが記録されている。この記録媒体5−1〜5
−4に記録されているプログラムは、それぞれコンピュ
ータ1−1〜1−4によって読み取られ、コンピュータ
1−1〜1−4の動作を制御することで、コンピュータ
1−1〜1−4上に分散排他共有制御手段2−1〜2−
4,論理時計制御手段3−1〜3−4,通信制御手段4
−1〜4−4を実現する。
The recording media 5-1 to 5-4 connected to each of the computers 1-1 to 1-4 are disks, semiconductor memories, and other recording media.
A program for causing 1-4 to function as a distributed exclusion shared control device is recorded. This recording medium 5-1 to 5
-4 are read by the computers 1-1 to 1-4, respectively, and distributed to the computers 1-1 to 1-4 by controlling the operations of the computers 1-1 to 1-4. Exclusive sharing control means 2-1 to 2-
4, logical clock control means 3-1 to 3-4, communication control means 4
-1 to 4-4 are realized.

【0026】図3は排他ロック獲得手段21−iの処理
例を示す流れ図、図4は共有ロック獲得手段22−iの
処理例を示す流れ図、図5はロック要求応答手段24−
iの処理例を示す流れ図、図6はロック開放手段23−
iの処理例を示す流れ図であり、以下各図を参照して本
実施例の動作について説明する。
FIG. 3 is a flowchart showing a processing example of the exclusive lock acquiring means 21-i, FIG. 4 is a flowchart showing a processing example of the shared lock acquiring means 22-i, and FIG. 5 is a lock request responding means 24-i.
FIG. 6 is a flowchart showing a processing example of i, and FIG.
6 is a flowchart illustrating an example of processing i, and the operation of the present exemplary embodiment will be described below with reference to the drawings.

【0027】先ず、排他ロック獲得時の動作について説
明する。
First, the operation at the time of acquiring an exclusive lock will be described.

【0028】今、例えば、コンピュータ1−1内の分散
排他共有制御手段2−1に対して、プロセス等の要求元
PAからファイルFAを排他ロックすることが要求され
たとすると、分散排他共有制御手段2−1は、その内部
に設けられている排他ロック獲得手段21−1に図3の
流れ図に示す処理を行わせる。
Now, for example, if it is requested that the distributed exclusive sharing control means 2-1 in the computer 1-1 be exclusively locked by the request source PA such as a process, the distributed exclusive sharing controlling means 2-1. 2-1 causes the exclusive lock acquisition means 21-1 provided therein to perform the processing shown in the flowchart of FIG.

【0029】排他ロック獲得手段21−1は、先ず、自
コンピュータ1−1内のロック要求応答手段24−1に
対して排他ロック要求メッセージを送信すると共に、通
信制御手段4−1,ネットワーク7を介して他の全ての
コンピュータ1−2〜1−4に対して排他ロック要求メ
ッセージを送信する(図3,ステップA1)。尚、排他
ロック要求メッセージには、排他ロックするファイルF
Aの識別子と、論理時計制御手段3−1から提供される
現時点の論理時刻とが含まれる。その後、排他ロック獲
得手段21−1は、送信した排他ロック要求メッセージ
と要求元PAの識別子とを対にしてテーブル26−1に
登録する(ステップA2)。
The exclusive lock acquisition unit 21-1 first transmits an exclusive lock request message to the lock request response unit 24-1 in the own computer 1-1, and transmits the exclusive communication request message to the communication control unit 4-1 and the network 7. An exclusive lock request message is transmitted to all the other computers 1-2 through 1-4 via the computer (FIG. 3, step A1). The exclusive lock request message includes the file F to be exclusively locked.
A includes the identifier of A and the current logical time provided by the logical clock control means 3-1. Thereafter, the exclusive lock acquisition unit 21-1 registers the transmitted exclusive lock request message and the identifier of the request source PA in the table 26-1 as a pair (step A2).

【0030】一方、コンピュータ1−1からの排他ロッ
ク要求メッセージを受信した他のコンピュータ1−2〜
1−4内の通信制御手段4−2〜4−4は、それぞれ受
信した排他ロック要求メッセージを分散排他共有制御手
段2−2〜2−4内のロック要求応答手段24−2〜2
4−4に送信する。
On the other hand, the other computers 1-2 which have received the exclusive lock request message from the computer 1-1
The communication control means 4-2 to 4-4 in the 1-4 respectively transmit the received exclusive lock request message to the lock request response means 24-2-2 in the distributed exclusive sharing control means 2-2 to 2-4.
Send to 4-4.

【0031】各コンピュータ1−1〜1−4内のロック
要求応答手段24−1〜24−4は、それぞれ排他ロッ
ク獲得手段21−1からの排他ロック要求メッセージを
受信すると(図5,ステップC1がイエス)、それに含
まれている論理時刻よりも前の論理時刻に於いて自コン
ピュータ1−1〜1−4が送信した、ファイルFAに対
する未解決の排他ロック要求メッセージ,共有ロック要
求メッセージが存在するか否かを、自コンピュータ内の
テーブル26−1〜26−4の内容に基づいて判断する
(ステップC2)。つまり、各ロック要求応答手段24
−1〜24−4は、受信した排他ロック要求メッセージ
に含まれている論理時刻よりも前の論理時刻を含む、フ
ァイルFAに対する排他ロック要求メッセージ,共有ロ
ック要求メッセージが自コンピュータ1−1〜1−4内
のテーブル26−1〜26−4に登録されているか否か
を判断する。
The lock request responding units 24-1 to 24-4 in each of the computers 1-1 to 1-4 receive the exclusive lock request message from the exclusive lock acquiring unit 21-1 (FIG. 5, step C1). Yes), there are unresolved exclusive lock request messages and shared lock request messages for the file FA transmitted by the own computers 1-1 to 1-4 at the logical time before the logical time included therein. It is determined whether or not to do so based on the contents of the tables 26-1 to 26-4 in the own computer (step C2). That is, each lock request response unit 24
-1 to 24-4 are the exclusive lock request message and the shared lock request message for the file FA that include the logical time before the logical time included in the received exclusive lock request message. -4 are registered in the tables 26-1 to 26-4.

【0032】そして、各ロック要求応答手段24−1〜
24−4は、先行する未解決の排他ロック要求メッセー
ジ,共有ロック要求メッセージが存在しないと判断した
場合(ステップC2がノー)は、排他ロック要求メッセ
ージの送信元の排他ロック獲得手段21−1に対してロ
ック許可メッセージを送信する(ステップC3)。尚、
送信元は、排他ロック要求メッセージに含まれている論
理時刻中の識別子に基づいて知ることができる。これに
対して、先行する未解決の排他ロック要求メッセージ,
共有ロック要求メッセージが存在すると判断した場合
(ステップC2がイエス)は、排他ロック獲得手段21
−1から送られてきた排他ロック要求メッセージを自コ
ンピュータ1−1〜1−4内の待ち行列25−1〜25
−4に登録して保留状態にする(ステップC5)。
The lock request responding means 24-1
If it is determined that there is no preceding unresolved exclusive lock request message and shared lock request message (No in step C2), the exclusive lock acquisition unit 21-1 of the transmission source of the exclusive lock request message sends the exclusive lock request message to the exclusive lock acquisition unit 21-1. Then, a lock permission message is transmitted (step C3). still,
The transmission source can be known based on the identifier in the logical time included in the exclusive lock request message. On the other hand, the preceding unresolved exclusive lock request message,
When it is determined that the shared lock request message exists (Yes in step C2), the exclusive lock acquisition unit 21
-1 to the queues 25-1 to 25 in the own computer 1-1 to 1-4.
-4 to be put on hold (step C5).

【0033】コンピュータ1−1内の排他ロック獲得手
段21−1は、正常に動作している全てのコンピュータ
(通信制御手段4−1によって正常動作していると確認
されているコンピュータ)からロック許可メッセージが
送られてくると(図3,ステップA3がイエス)、要求
元PAにファイルFAに対するロックを獲得したことを
通知する(ステップA4)。
The exclusive lock acquisition means 21-1 in the computer 1-1 receives the lock permission from all the normally operating computers (computers confirmed to be operating normally by the communication control means 4-1). When the message is sent (FIG. 3, step A3 is YES), the requesting PA is notified that the lock on the file FA has been acquired (step A4).

【0034】次に、共有ロック獲得時の動作について説
明する。
Next, the operation at the time of acquiring the shared lock will be described.

【0035】今、例えば、コンピュータ1−1内の分散
排他共有制御手段2−1に対して、プロセス等の要求元
PBからファイルFBを共有ロックすることが要求され
たとすると、分散排他共有制御手段2−1は、その内部
に設けられている共有ロック獲得手段22−1に図4の
流れ図に示す処理を行わせる。
For example, if it is requested that the request source PB such as a process or the like requests the shared exclusion sharing control means 2-1 in the computer 1-1 to share the file FB, the distributed exclusion sharing control means 2-1. 2-1 causes the shared lock acquisition means 22-1 provided therein to perform the processing shown in the flowchart of FIG.

【0036】共有ロック獲得手段22−1は、先ず、自
コンピュータ1−1内のロック要求応答手段24−1に
対して共有ロック要求メッセージを送信すると共に、通
信制御手段4−1,ネットワーク7を介して他の全ての
コンピュータ1−2〜1−4に対して共有ロック要求メ
ッセージを送信する(図4,ステップB1)。尚、共有
ロック要求メッセージには、共有ロックするファイルF
Bの識別子と、論理時計制御手段3−1から提供される
現時点の論理時刻とが含まれる。その後、共有ロック獲
得手段22−1は、送信した共有ロック要求メッセージ
と要求元PBの識別子とを対にしてテーブル26−1に
登録する(ステップB2)。
First, the shared lock acquisition means 22-1 transmits a shared lock request message to the lock request response means 24-1 in its own computer 1-1, and also controls the communication control means 4-1 and the network 7. The shared lock request message is transmitted to all the other computers 1-2 through 1-4 via the computer (FIG. 4, step B1). The shared lock request message includes the file F to be shared locked.
B includes the current logical time provided by the logical clock control means 3-1. Thereafter, the shared lock acquisition unit 22-1 registers the transmitted shared lock request message and the identifier of the request source PB in the table 26-1 as a pair (step B2).

【0037】一方、コンピュータ1−1からの共有ロッ
ク要求メッセージを受信した他のコンピュータ1−2〜
1−4内の通信制御手段4−2〜4−4は、それぞれ受
信した共有ロック要求メッセージを分散排他共有制御手
段2−2〜2−4内のロック要求応答手段24−2〜2
4−4に送る。
On the other hand, the other computers 1-2 that have received the shared lock request message from the computer 1-1
The communication control means 4-2 to 4-4 in the 1-4 respectively transmit the received shared lock request message to the lock request response means 24-2-2 in the distributed exclusion shared control means 2-2 to 2-4.
Send to 4-4.

【0038】各ロック要求応答手段24−1〜24−4
は、それぞれ共有ロック獲得手段22−1からの共有ロ
ック要求メッセージを受信すると(図5,ステップC1
がノー)、それに含まれている論理時刻よりも前の論理
時刻に於いて自コンピュータ1−1〜1−4が送信し
た、ファイルFBに対する未解決の排他ロック要求メッ
セージが存在するか否かを自コンピュータ内のテーブル
26−1〜26−4の内容に基づいて判断する(ステッ
プC4)。
Each lock request response means 24-1 to 24-4
Receives the shared lock request message from the shared lock acquisition unit 22-1 (FIG. 5, step C1).
No), whether or not there is an unresolved exclusive lock request message for the file FB transmitted by the own computer 1-1 to 1-4 at a logical time earlier than the logical time included therein. The determination is made based on the contents of the tables 26-1 to 26-4 in the own computer (step C4).

【0039】そして、各ロック要求応答手段24−1〜
24−4は、先行する未解決の排他ロック要求メッセー
ジが存在しないと判断した場合(ステップC4がノー)
は、共有ロック獲得手段22−1に対してロック許可メ
ッセージを送信する(ステップC3)。これに対して、
先行する未解決の排他ロック要求メッセージが存在する
と判断した場合(ステップC4がイエス)は、共有ロッ
ク獲得手段22−1から送られてきた共有ロック要求メ
ッセージを自コンピュータ内の待ち行列25−1〜25
−4に登録して保留状態にする(ステップC5)。
The lock request responding means 24-1
24-4, when it is determined that there is no preceding unresolved exclusive lock request message (No in step C4)
Sends a lock permission message to the shared lock acquisition unit 22-1 (step C3). On the contrary,
If it is determined that there is a preceding unresolved exclusive lock request message (Yes in step C4), the shared lock request message sent from the shared lock acquisition unit 22-1 is sent to the queue 25-1 in the own computer. 25
-4 to be put on hold (step C5).

【0040】共有ロック獲得手段22−1は、正常に動
作している全てのコンピュータからロック許可メッセー
ジが送られてくると(図4,ステップB3がイエス)、
要求元PBに共有ロック獲得を通知する(ステップB
4)。
When the lock permission message is sent from all the normally operating computers (FIG. 4, step B3 is YES), the shared lock acquisition unit 22-1 receives the lock permission message.
Notify the requesting PB of the acquisition of the shared lock (step B
4).

【0041】次に、ロック開放時の動作について説明す
る。
Next, the operation when the lock is released will be described.

【0042】今、例えば、コンピュータ1−1内の分散
排他共有制御手段2−1に対して、プロセス等の要求元
PCから、要求元PCがロックしていたファイルFCに
対するロック開放が指示されたとすると、分散排他共有
制御手段2−1は、その内部に設けられているロック開
放手段23−1に図6の流れ図に示す処理を行わせる。
Now, for example, if the request source PC such as a process instructs the distributed exclusive sharing control means 2-1 in the computer 1-1 to release the lock on the file FC locked by the request source PC. Then, the distributed exclusion sharing control means 2-1 causes the lock release means 23-1 provided therein to perform the processing shown in the flowchart of FIG.

【0043】ロック開放手段23−1は、先ず、テーブ
ル26−1登録されている排他,共有ロック要求メッセ
ージと要求元の識別子との対の内、ロックを開放するフ
ァイルFCと関係する対を削除する(図6,ステップD
1)。つまり、テーブル26−1に格納されている排他
ロック要求メッセージと要求元の識別子との対或いは共
有ロック要求メッセージと要求元の識別子との対の中か
ら、要求元の識別子が要求元PCの識別子と同一で、且
つ排他,共有メッセージに含まれている排他単位の識別
子がファイルFCの識別子と同一の対を探し出し、それ
を削除する。
The lock release unit 23-1 first deletes the pair related to the file FC whose lock is to be released from the pair of the exclusive / shared lock request message and the request source identifier registered in the table 26-1. (Figure 6, Step D
1). In other words, from the pair of the exclusive lock request message and the requester identifier stored in the table 26-1, or the pair of the shared lock request message and the requester identifier, the requester identifier is the identifier of the requester PC. And a pair in which the identifier of the exclusive unit included in the exclusive / shared message is the same as the identifier of the file FC, and deletes the pair.

【0044】次に、ロック開放手段23−1は、待ち行
列25−1の先頭から排他ロック要求メッセージ或いは
共有ロック要求メッセージを1つ取り出し(ステップD
2)、それが排他ロック要求メッセージであるか否かを
判断する(ステップD4)。
Next, the lock releasing means 23-1 extracts one exclusive lock request message or one shared lock request message from the head of the queue 25-1 (step D).
2) It is determined whether or not the message is an exclusive lock request message (step D4).

【0045】今、例えば、待ち行列25−1から取り出
したロック要求メッセージが、排他ロック要求メッセー
ジであったとすると(ステップD4がYES)、ロック
開放手段23−1は、上記排他ロック要求メッセージに
含まれている論理時刻よりも前の論理時刻に於いて自コ
ンピュータ1−1が送信した、排他単位が上記排他ロッ
ク要求メッセージと同じ未解決の排他ロック要求メッセ
ージ或いは共有ロック要求メッセージが存在するか否か
をテーブル26−1の内容に基づいて判断する(ステッ
プD5)。
Now, for example, if the lock request message taken out of the queue 25-1 is an exclusive lock request message (step D4: YES), the lock releasing means 23-1 includes the exclusive lock request message in the exclusive lock request message. Whether or not there is an unresolved exclusive lock request message or shared lock request message whose exclusive unit is the same as the exclusive lock request message transmitted by the own computer 1-1 at a logical time earlier than the logical time that has been set. Is determined based on the contents of the table 26-1 (step D5).

【0046】そして、先行する未解決の排他ロック要求
メッセージ,共有ロック要求メッセージが存在しない場
合(ステップD5がノー)は、待ち行列25−1から取
り出した排他ロック要求メッセージの送信元のコンピュ
ータに対してロック許可メッセージを送信する(ステッ
プD6)。これに対して、先行する未解決の排他ロック
要求メッセージ,共有ロック要求メッセージが存在する
場合(ステップD5がイエス)は、待ち行列25−1か
ら取り出した排他ロック要求メッセージを再び待ち行列
25−1の最後尾に登録する(ステップD8)。
If there is no preceding unresolved exclusive lock request message or shared lock request message (No at step D5), the exclusive lock request message taken out of the queue 25-1 is sent to the transmission source computer. To transmit a lock permission message (step D6). On the other hand, when there is a preceding unresolved exclusive lock request message and shared lock request message (Yes in step D5), the exclusive lock request message taken out of the queue 25-1 is requeued to the queue 25-1. (Step D8).

【0047】ステップD6或いはステップD8の処理が
終了すると、ロック開放手段23−1は、再び待ち行列
25−1の先頭に登録されている排他ロック要求メッセ
ージ或いは共有ロック要求メッセージを1つ取り出し、
それが排他ロック要求メッセージであるか否かを判断す
る(ステップD2,D4)。
When the processing in step D6 or step D8 is completed, the lock release means 23-1 again takes out one exclusive lock request message or shared lock request message registered at the head of the queue 25-1.
It is determined whether or not it is an exclusive lock request message (steps D2 and D4).

【0048】今、例えば、待ち行列25−1から取り出
したロック要求が共有ロック要求メッセージであったと
すると(ステップD4がノー)、ロック開放手段23−
1は、上記共有ロック要求メッセージに含まれている論
理時刻よりも前の論理時刻に於いて自コンピュータ1−
1が送信した、排他単位が上記共有ロック要求メッセー
ジと同じ未解決の排他ロック要求メッセージが存在する
か否かをテーブル26−1の内容に基づいて判断する
(ステップD7)。
Now, for example, if the lock request taken out of the queue 25-1 is a shared lock request message (step D4 is NO), the lock release means 23-
1 indicates that the local computer 1-1 has a logical time earlier than the logical time included in the shared lock request message.
Then, it is determined based on the contents of the table 26-1 whether or not there is an unresolved exclusive lock request message whose exclusive unit is the same as the above-mentioned shared lock request message transmitted by 1 (step D7).

【0049】そして、先行する未解決の排他ロック要求
メッセージが存在しない場合(ステップD7がノー)
は、ステップD6の処理を行い、先行する未解決の排他
ロック要求メッセージが存在する場合(ステップD7が
イエス)は、ステップD8の処理を行う。
When there is no preceding unresolved exclusive lock request message (No in step D7)
Performs the processing of Step D6, and if there is a preceding unresolved exclusive lock request message (Yes in Step D7), performs the processing of Step D8.

【0050】以下、ロック開放手段23−1は、待ち行
列25−1に未処理の排他ロック要求メッセージ,共有
ロック要求メッセージがなくなるまで(ステップD3が
ノーとなるまで)、前述した処理を繰り返し行う。
Thereafter, the lock release means 23-1 repeats the above-described processing until there is no unprocessed exclusive lock request message or unprocessed shared lock request message in the queue 25-1 (until step D3 becomes NO). .

【0051】尚、上述した実施例に於いては、排他単位
をファイルとしたが、ファイルのレコードや、プログラ
ムの各部を排他単位としても良い。
In the above-described embodiment, the exclusive unit is a file, but the record of the file or each part of the program may be the exclusive unit.

【0052】[0052]

【発明の効果】以上説明したように、本発明によれば、
共有資源を共有する複数台のコンピュータからなるコン
ピュータシステムの処理効率を向上させることができる
という効果がある。その理由は、排他ロックと共有ロッ
クとを使用するようにし、ファイルを参照したり、複数
のコンピュータが同時に実行しても良いプログラム部分
を実行する場合には、共有ロックを使用することによっ
て複数のコンピュータが同時に排他単位を使用できるよ
うにしたからである。
As described above, according to the present invention,
There is an effect that the processing efficiency of a computer system including a plurality of computers sharing a shared resource can be improved. The reason for this is to use exclusive locks and shared locks, and to use a shared lock when browsing files or executing program parts that can be executed simultaneously by multiple computers. This is because the computer can use the exclusive unit at the same time.

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

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】分散排他共有制御手段2−iの構成例を示すブ
ロック図である。
FIG. 2 is a block diagram illustrating a configuration example of a distributed exclusion sharing control unit 2-i.

【図3】排他ロック獲得手段21−iの処理例を示す流
れ図である。
FIG. 3 is a flowchart showing a processing example of an exclusive lock acquisition unit 21-i.

【図4】共有ロック獲得手段22−iの処理例を示す流
れ図である。
FIG. 4 is a flowchart showing a processing example of a shared lock acquisition unit 22-i.

【図5】ロック要求応答手段24−iの処理例を示す流
れ図である。
FIG. 5 is a flowchart showing a processing example of a lock request responding means 24-i.

【図6】ロック開放手段23−iの処理例を示す流れ図
である。
FIG. 6 is a flowchart showing a processing example of a lock release unit 23-i.

【符号の説明】[Explanation of symbols]

1−1〜1−4…コンピュータ 2−1〜2−4…分散排他共有制御手段 21−i…排他ロック獲得手段 22−i…共有ロック獲得手段 23−i…ロック開放手段 24−i…ロック要求応答手段 25−i…待ち行列 3−1〜3−4…論理時計制御手段 4−1〜4−4…通信制御手段 5−1〜5−4…記録媒体 6…記憶装置 7…ネットワーク 1-1 to 1-4 Computer 2-1 to 2-4 Distributed exclusive sharing control means 21-i Exclusive lock acquisition means 22-i Shared lock acquisition means 23-i Lock release means 24-i Lock Request response unit 25-i Queue 3-1 to 3-4 Logical clock control unit 4-1 to 4-4 Communication control unit 5-1 to 5-4 Recording medium 6 Storage device 7 Network

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 複数のコンピュータが共有資源を共有す
るコンピュータシステムに於いて、 前記共有資源の排他単位に対する排他ロック,共有ロッ
クを要求するコンピュータは、前記全てのコンピュータ
に対して排他ロック要求メッセージ,共有ロック要求メ
ッセージを送信し、 排他ロック要求メッセージを受信したコンピュータは、
該受信した排他ロック要求メッセージの送信時よりも前
に、該受信した排他ロック要求メッセージよってロック
要求されている排他単位と同一の排他単位に対する未解
決の排他ロック要求メッセージ,共有ロック要求メッセ
ージを送信していないことを条件にして前記排他ロック
要求メッセージの送信元のコンピュータに対してロック
許可メッセージを送信し、 共有ロック要求メッセージを受信したコンピュータは、
該受信した共有ロック要求メッセージの送信時よりも前
に、該受信した共有ロック要求メッセージによってロッ
ク要求されている排他単位と同一の排他単位に対する未
解決の排他ロック要求メッセージを送信していないこと
を条件にして前記共有ロック要求メッセージの送信元の
コンピュータに対してロック許可メッセージを送信し、 排他ロック要求メッセージの送信元のコンピュータは、
前記全てのコンピュータの内の、正常に動作している全
てのコンピュータからロック許可メッセージを受信した
場合、ロック要求した排他単位に対する排他ロックを獲
得し、 共有ロック要求メッセージの送信元のコンピュータは、
前記全てのコンピュータの内の、正常に動作している全
てのコンピュータからロック許可メッセージを受信した
場合、ロック要求した排他単位に対する共有ロックを獲
得することを特徴とする分散排他共有制御方法。
In a computer system in which a plurality of computers share a shared resource, an exclusive lock for an exclusive unit of the shared resource, and a computer requesting the shared lock transmits an exclusive lock request message to all the computers. The computer that sent the shared lock request message and received the exclusive lock request message
Before the transmission of the received exclusive lock request message, an unresolved exclusive lock request message and a shared lock request message for the same exclusive unit as the exclusive unit whose lock is requested by the received exclusive lock request message are transmitted. The computer that has transmitted the lock permission message to the computer that transmitted the exclusive lock request message on condition that it has not received the shared lock request message,
Prior to the transmission of the received shared lock request message, an unresolved exclusive lock request message for the same exclusive unit as the exclusive unit locked by the received shared lock request message is not transmitted. Sending a lock permission message to the computer of the source of the shared lock request message as a condition, the computer of the source of the exclusive lock request message,
If a lock permission message is received from all the computers that are operating normally among all the computers, an exclusive lock is acquired for the exclusive unit that issued the lock request, and the source computer of the shared lock request message is:
A distributed exclusion sharing control method characterized by acquiring a shared lock for an exclusion unit that has requested a lock when receiving a lock permission message from all of the normally operating computers among all of the computers.
【請求項2】 排他ロック要求メッセージを受信したコ
ンピュータは、該受信した排他ロック要求メッセージの
送信時よりも前に、該受信した排他ロック要求メッセー
ジによってロック要求されている排他単位と同一の排他
単位に対する未解決の排他ロック要求メッセージ,共有
ロック要求メッセージを送信していることを条件にして
前記受信した排他ロック要求メッセージを保留状態に
し、 共有ロック要求メッセージを受信したコンピュータは、
該受信した共有ロック要求メッセージの送信時よりも前
に、該受信した共有ロック要求メッセージによってロッ
ク要求されている排他単位と同一の排他単位に対する未
解決の排他ロック要求メッセージを送信していることを
条件にして前記受信した共有ロック要求メッセージを保
留状態にし、 獲得しているロックを開放するコンピュータは、自コン
ピュータに於いて保留状態にしている排他ロック要求メ
ッセージについては、その送信時よりも前に、前記排他
ロック要求メッセージによってロック要求されている排
他単位と同一の排他単位に対する未解決の排他ロック要
求メッセージ,共有ロック要求メッセージを送信してい
ないことを条件にして前記排他ロック要求メッセージの
送信元のコンピュータに対してロック許可メッセージを
送信し、自コンピュータに於いて保留状態にしている共
有ロック要求メッセージについては、その送信時よりも
前に、前記共有ロック要求メッセージによってロック要
求されている排他単位と同一の排他単位に対する未解決
の排他ロック要求メッセージを送信していないことを条
件にして前記共有ロック要求メッセージの送信元のコン
ピュータに対してロック許可メッセージを送信すること
を特徴とする請求項1記載の分散排他共有制御方法。
2. The computer receiving the exclusive lock request message, before sending the received exclusive lock request message, sets the same exclusive unit as the exclusive unit whose lock is requested by the received exclusive lock request message. On the condition that the unresolved exclusive lock request message and the shared lock request message are transmitted, the pending exclusive lock request message is put on hold, and the computer that has received the shared lock request message
Prior to the transmission of the received shared lock request message, an unresolved exclusive lock request message for the same exclusive unit as the exclusive unit locked by the received shared lock request message is transmitted. As a condition, the received shared lock request message is put on hold, and the computer that releases the acquired lock is required to transmit the exclusive lock request message that is put on hold in its own computer before the transmission of the exclusive lock request message. A sender of the exclusive lock request message on the condition that an unresolved exclusive lock request message and a shared lock request message for the same exclusive unit as the exclusive unit requested to be locked by the exclusive lock request message are not transmitted. A lock permission message to another computer However, before the transmission of the shared lock request message held in its own computer, the unresolved exclusion to the same exclusion unit as the exclusion unit whose lock is requested by the shared lock request message is performed. 2. The distributed exclusion sharing control method according to claim 1, wherein a lock permission message is transmitted to a transmission source computer of the shared lock request message on condition that the lock request message is not transmitted.
【請求項3】 前記各コンピュータが送信する排他ロッ
ク要求メッセージ,共有ロック要求メッセージは、その
送信時の論理時刻を含み、 前記各コンピュータは、排他ロック要求メッセージ,共
有ロック要求メッセージに含まれている論理時刻に基づ
いて、排他ロック要求メッセージ,共有ロック要求メッ
セージの送信順を判定することを特徴とする請求項2記
載の分散排他共有制御方法。
3. An exclusive lock request message and a shared lock request message transmitted by each computer include a logical time at the time of transmission, and each computer is included in the exclusive lock request message and the shared lock request message. 3. The distributed exclusive sharing control method according to claim 2, wherein the transmission order of the exclusive lock request message and the shared lock request message is determined based on the logical time.
【請求項4】 複数のコンピュータが共有資源を共有す
るコンピュータシステムに於ける前記各コンピュータが
それぞれ備える分散排他共有制御装置であって、 前記共有資源の排他単位に対する排他ロックの獲得要求
時、前記全てのコンピュータに対して排他ロック要求メ
ッセージを送信し、前記全てのコンピュータの内の、正
常に動作している全てのコンピュータからロック許可メ
ッセージを受信することにより、前記排他単位に対する
排他ロックを獲得する排他ロック獲得手段と、 前記共有資源の排他単位に対する共有ロックの獲得要求
時、前記全てのコンピュータに対して共有ロック要求メ
ッセージを送信し、前記全てのコンピュータの内の、正
常に動作している全てのコンピュータからロック許可メ
ッセージを受信することにより、前記排他単位に対する
共有ロックを獲得する共有ロック獲得手段と、 他のコンピュータから送られてくる排他ロック要求メッ
セージの受信時、該受信した排他ロック要求メッセージ
の送信時よりも前に、自コンピュータが、前記受信した
排他ロック要求メッセージによってロック要求されてい
る排他単位と同一の排他単位に対する未解決の排他ロッ
ク要求メッセージ,共有ロック要求メッセージを送信し
ていないことを条件にして前記受信した排他ロック要求
メッセージの送信元のコンピュータに対してロック許可
メッセージを送信し、他のコンピュータから送られてく
る共有ロック要求メッセージの受信時、該受信した共有
ロック要求メッセージの送信時よりも前に、自コンピュ
ータが、前記受信した共有ロック要求メッセージによっ
てロック要求されている排他単位と同一の排他単位に対
する未解決の排他ロック要求メッセージを送信していな
いことを条件にして前記受信した共有ロック要求メッセ
ージの送信元のコンピュータに対してロック許可メッセ
ージを送信するロック要求応答手段とを備えたことを特
徴とする分散排他共有制御装置。
4. A distributed exclusion shared control device provided in each of the computers in a computer system in which a plurality of computers share a shared resource, wherein, when a request to acquire an exclusive lock on an exclusive unit of the shared resource is made, The exclusive lock request message is transmitted to all the computers, and the lock permission message is received from all the normally operating computers among all the computers, thereby obtaining the exclusive lock for the exclusive unit. Lock acquisition means, when a shared lock acquisition request for the exclusive unit of the shared resource is issued, a shared lock request message is transmitted to all the computers, and all of the normally operating By receiving a lock permission message from your computer, A shared lock acquisition unit for acquiring a shared lock for the exclusive unit, and upon receiving an exclusive lock request message sent from another computer, before the transmission of the received exclusive lock request message, The received exclusive lock request message on the condition that an unresolved exclusive lock request message and a shared lock request message for the same exclusive unit as the exclusive unit requested to be locked by the received exclusive lock request message are not transmitted. Transmits a lock permission message to the transmission source computer, upon receiving a shared lock request message sent from another computer, before transmitting the received shared lock request message, the own computer, According to the received shared lock request message, A lock permission message is transmitted to the computer that transmitted the received shared lock request message on condition that an unresolved exclusive lock request message for the same exclusive unit as the lock unit requested is not transmitted. And a lock request responding means.
【請求項5】 前記ロック要求応答手段は、他のコンピ
ュータから送られてくる排他ロック要求メッセージの受
信時、該受信した排他ロック要求メッセージの送信時よ
りも前に、自コンピュータが、前記受信した排他ロック
要求メッセージによってロック要求されている排他単位
と同一の排他単位に対する未解決の排他ロック要求メッ
セージ,共有ロック要求メッセージを送信していること
を条件にして前記受信した排他ロック要求を保留状態に
し、他のコンピュータから送られてくる共有ロック要求
メッセージの受信時、該受信した共有ロック要求メッセ
ージの送信時よりも前に、自コンピュータが、前記受信
した共有ロック要求メッセージによってロック要求され
ている排他単位と同一の排他単位に対する未解決の排他
ロック要求メッセージを送信していることを条件にして
前記受信した共有ロック要求メッセージを保留状態にす
る構成を有し、且つ、 獲得しているロックの開放時、前記ロック要求応答手段
によって保留状態にされている排他ロック要求メッセー
ジについては、その送信時よりも前に、自コンピュータ
が、前記排他ロック要求メッセージによってロック要求
されている排他単位と同一の排他単位に対する未解決の
排他ロック要求メッセージ,共有ロック要求メッセージ
を送信していないことを条件にして前記排他ロック要求
メッセージの送信元のコンピュータに対してロック許可
メッセージを送信し、前記ロック要求応答手段によって
保留状態にされている共有ロック要求メッセージについ
ては、その送信時よりも前に、自コンピュータが、前記
共有ロック要求メッセージによってロック要求されてい
る排他単位と同一の排他単位に対する排他ロック要求メ
ッセージを送信していないことを条件にして前記共有ロ
ック要求メッセージの送信元のコンピュータに対してロ
ック許可メッセージを送信するロック開放手段を備えた
ことを特徴とする請求項4記載の分散排他共有制御装
置。
5. The lock request responding means, when receiving the exclusive lock request message sent from another computer, before the own computer transmits the received exclusive lock request message. The received exclusive lock request is put on hold on the condition that an unresolved exclusive lock request message and a shared lock request message for the same exclusive unit as the exclusive unit whose lock is requested by the exclusive lock request message are transmitted. Upon receiving a shared lock request message sent from another computer, prior to transmitting the received shared lock request message, the own computer may be locked by the received shared lock request message. Unresolved exclusive lock request message for the same exclusive unit as the unit On the condition that the shared lock request message is transmitted, and when the received lock is released, the shared lock request message is held by the lock request responding means when the acquired lock is released. Before sending the exclusive lock request message, the own computer transmits an unresolved exclusive lock request message and a shared lock request for the same exclusive unit as the exclusive unit whose lock is requested by the exclusive lock request message. A lock permission message is transmitted to the transmission source computer of the exclusive lock request message on condition that the message is not transmitted, and the shared lock request message held by the lock request response unit is: Before the time of the transmission, the own computer transmits the shared lock request. Lock release that transmits a lock permission message to the computer that has transmitted the shared lock request message on condition that an exclusive lock request message for the same exclusive unit as the lock unit requested to be locked by the message has not been transmitted. 5. The distributed exclusion sharing control device according to claim 4, further comprising means.
【請求項6】 前記コンピュータシステム内で発生する
事象の発生順序を一意に決定するための論理時刻を提供
する論理時計制御手段を備え、 前記排他ロック獲得手段,前記共有ロック獲得手段は、
それぞれ前記論理時計制御手段によって提供される論理
時刻を含む排他ロック要求メッセージ,共有ロック要求
メッセージを送信する構成を有し、 前記ロック要求応答手段,前記ロック開放手段は、排他
ロック要求メッセージ,共有ロック要求メッセージに含
まれる論理時刻に基づいて、排他ロック要求メッセー
ジ,共有ロック要求メッセージの送信順を判定する構成
を有することを特徴とする請求項5記載の分散排他共有
制御装置。
6. An exclusive lock acquisition unit and a shared lock acquisition unit, comprising: a logical clock control unit that provides a logical time for uniquely determining an order of occurrence of an event occurring in the computer system.
The exclusive lock request message and the shared lock request message each including a logical time provided by the logical clock control unit are transmitted, and the lock request response unit and the lock release unit respectively include an exclusive lock request message and a shared lock. 6. The distributed exclusion sharing control device according to claim 5, further comprising a configuration for determining a transmission order of the exclusive lock request message and the shared lock request message based on a logical time included in the request message.
【請求項7】 共有資源を共有するコンピュータを、 前記共有資源の排他単位に対する排他ロックの獲得要求
時、前記全てのコンピュータに対して排他ロック要求メ
ッセージを送信し、前記全てのコンピュータの内の、正
常に動作している全てのコンピュータからロック許可メ
ッセージを受信することにより、前記排他単位に対する
排他ロックを獲得する排他ロック獲得手段、 前記共有資源の排他単位に対する共有ロックの獲得要求
時、前記全てのコンピュータに対して共有ロック要求メ
ッセージを送信し、前記全てのコンピュータの内の、正
常に動作している全てのコンピュータからロック許可メ
ッセージを受信することにより、前記排他単位に対する
共有ロックを獲得する共有ロック獲得手段、 他のコンピュータから送られてくる排他ロック要求メッ
セージの受信時、該受信した排他ロック要求メッセージ
の送信時よりも前に、自コンピュータが、前記受信した
排他ロック要求メッセージによってロック要求されてい
る排他単位と同一の排他単位に対する未解決の排他ロッ
ク要求メッセージ,共有ロック要求メッセージを送信し
ていないことを条件にして前記受信した排他ロック要求
メッセージの送信元のコンピュータに対してロック許可
メッセージを送信し、他のコンピュータから送られてく
る共有ロック要求メッセージの受信時、該受信した共有
ロック要求メッセージの送信時よりも前に、自コンピュ
ータが、前記受信した共有ロック要求メッセージによっ
てロック要求されている排他単位と同一の排他単位に対
する未解決の排他ロック要求メッセージを送信していな
いことを条件にして前記受信した共有ロック要求メッセ
ージの送信元のコンピュータに対してロック許可メッセ
ージを送信するロック要求応答手段、として機能させる
ためのプログラムを記録した機械読み取り可能な記録媒
体。
7. When a request to acquire an exclusive lock for an exclusive unit of the shared resource is transmitted to a computer sharing a shared resource, an exclusive lock request message is transmitted to all of the computers, and Exclusive lock acquisition means for acquiring an exclusive lock for the exclusive unit by receiving a lock permission message from all the normally operating computers, and when acquiring a shared lock for the exclusive unit of the shared resource, A shared lock for transmitting a shared lock request message to a computer and receiving a lock permission message from all of the normally operating computers among all the computers, thereby acquiring a shared lock for the exclusive unit. Acquisition method, exclusive log sent from another computer When receiving the lock request message, before the transmission of the received exclusive lock request message, the host computer determines that the same exclusive unit as the exclusive unit whose lock is requested by the received exclusive lock request message is not resolved. A lock permission message is transmitted to the transmission source computer of the received exclusive lock request message on condition that the exclusive lock request message and the shared lock request message are not transmitted, and is transmitted from another computer. At the time of receiving the shared lock request message, before the transmission of the received shared lock request message, the host computer determines that the same exclusive unit as the exclusive unit whose lock is requested by the received shared lock request message is not resolved. That the exclusive lock request message of Machine-readable recording medium recording a program for causing the lock request response means that in the conditions to send the lock grant message to the transmission source computer shared lock request message to the received function as, a.
JP24112199A 1999-08-27 1999-08-27 Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded Pending JP2001067238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24112199A JP2001067238A (en) 1999-08-27 1999-08-27 Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24112199A JP2001067238A (en) 1999-08-27 1999-08-27 Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded

Publications (1)

Publication Number Publication Date
JP2001067238A true JP2001067238A (en) 2001-03-16

Family

ID=17069609

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24112199A Pending JP2001067238A (en) 1999-08-27 1999-08-27 Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded

Country Status (1)

Country Link
JP (1) JP2001067238A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289089B2 (en) 2001-08-03 2007-10-30 Sony Corporation Light emitting unit
JP2013513162A (en) * 2009-12-04 2013-04-18 マイクロソフト コーポレーション Resolving locks on distributed persistent instances
JP2018110031A (en) * 2018-03-07 2018-07-12 華為技術有限公司Huawei Technologies Co.,Ltd. Method of managing lock in cluster, lock server and client
US10609150B2 (en) 2015-12-14 2020-03-31 Huawei Technologies Co., Ltd. Lock management method in cluster, lock server, and client

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289089B2 (en) 2001-08-03 2007-10-30 Sony Corporation Light emitting unit
JP2013513162A (en) * 2009-12-04 2013-04-18 マイクロソフト コーポレーション Resolving locks on distributed persistent instances
US9348659B2 (en) 2009-12-04 2016-05-24 Microsoft Technology Licensing, Llc Lock resolution for distributed durable instances
US10609150B2 (en) 2015-12-14 2020-03-31 Huawei Technologies Co., Ltd. Lock management method in cluster, lock server, and client
JP2018110031A (en) * 2018-03-07 2018-07-12 華為技術有限公司Huawei Technologies Co.,Ltd. Method of managing lock in cluster, lock server and client

Similar Documents

Publication Publication Date Title
US6205466B1 (en) Infrastructure for an open digital services marketplace
KR101150146B1 (en) System and method for managing cached objects using notification bonds
US8935560B2 (en) System and method of file locking in a network file system federated namespace
US5251317A (en) Computer system with an access control unit for resource
JP2001504968A (en) Agent implementation locking mechanism
US20070136269A1 (en) Information monitoring method
US8250313B1 (en) Conflict avoidance in data store replication
JPH03206542A (en) Remote in terruption system
JP4356018B2 (en) Asynchronous messaging over storage area networks
US8141103B2 (en) Solution for modifying a queue manager to support smart aliasing which permits extensible software to execute against queued data without application modifications
JP2001067238A (en) Distributed exclusion and sharing control method and device therefor, and machine-readable recording medium where program is precorded
JPH0695859A (en) Software assets management system
JP3969308B2 (en) Parallel processing system by OS for single processor
EP0286807A2 (en) Method for regulating access by concurrent transactions to resources
US20140280347A1 (en) Managing Digital Files with Shared Locks
CN116244099B (en) Method and device for communication of processes in embedded system, electronic equipment and storage medium
JP4492569B2 (en) File operation control device, file operation control system, file operation control method, and file operation control program
Ramamritham et al. Privilege transfer and revocation in a port-based system
JPH09330240A (en) Exclusive resource control system
JP3878881B2 (en) Asynchronous agent system, resource utilization method in the system, resource utilization program, and recording medium recording the program
JP2812274B2 (en) Transaction load balancing system for loosely coupled multi-computer systems
JP3171271B2 (en) File lock management method
JPH11312113A (en) Rough connection multiprocessor system
CN117742998A (en) High-performance queuing method and system for charging acquisition data forwarding
JPH04367037A (en) Computer system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040601

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050329