JP2850863B2 - Exclusive control unit - Google Patents

Exclusive control unit

Info

Publication number
JP2850863B2
JP2850863B2 JP8188575A JP18857596A JP2850863B2 JP 2850863 B2 JP2850863 B2 JP 2850863B2 JP 8188575 A JP8188575 A JP 8188575A JP 18857596 A JP18857596 A JP 18857596A JP 2850863 B2 JP2850863 B2 JP 2850863B2
Authority
JP
Japan
Prior art keywords
lock
processing unit
deadlock
timer
lock request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP8188575A
Other languages
Japanese (ja)
Other versions
JPH1021098A (en
Inventor
茂雄 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP8188575A priority Critical patent/JP2850863B2/en
Publication of JPH1021098A publication Critical patent/JPH1021098A/en
Application granted granted Critical
Publication of JP2850863B2 publication Critical patent/JP2850863B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)
  • Memory System (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータシス
テムの排他制御装置に関し、特に、デッドロックチェッ
ク処理をホストコンピュータからのロック要求コマンド
と非同期に行う排他制御装置に関する。
The present invention relates to an exclusive control device for a computer system, and more particularly to an exclusive control device for performing a deadlock check process asynchronously with a lock request command from a host computer.

【0002】[0002]

【従来の技術】ホストコンピュータから独立して設けら
れた従来の排他制御装置に於いては、或るホストコンピ
ュータからロック要求があった場合、先ず、ロック可能
か否かを判定する。そして、ロック可能な場合はロック
を許可し、ロック不可能である場合は、そのロック要求
がロック待ちになることによってデッドロックが発生す
るか否かをチェックし、デッドロックが発生する場合
は、そのロック要求を待ち登録することを拒否し、デッ
ドロックが発生しない場合には、そのロック要求を待ち
登録する。待ち登録したロック要求に対しては、それを
待たせる原因が消滅したとき(例えば、先に資源をロッ
クしていたホストコンピュータがその資源のロックを解
放したとき)、待ち登録されているロック要求にロック
を許可し、そのことをアテンションによって要求元のホ
ストコンピュータに通知する。以上のように、従来の排
他制御装置は、或るホストコンピュータからのロック要
求が待ち登録されることによってデッドロックが発生す
るか否かを、当該ロック要求を排他制御装置が受け付け
たときに即座にチェックするようにしていた。
2. Description of the Related Art In a conventional exclusive control device provided independently of a host computer, when a lock request is issued from a certain host computer, it is first determined whether or not lock is possible. Then, if the lock is possible, the lock is permitted. If the lock is not possible, it is checked whether or not a deadlock occurs due to the lock request waiting for the lock. Waiting registration of the lock request is refused, and if no deadlock occurs, the lock request is waited and registered. When the cause of the waiting lock request has disappeared (for example, when the host computer which previously locked the resource releases the lock on the resource), the lock request registered in the waiting state is issued. , And notify the requesting host computer by attention. As described above, the conventional exclusive control device immediately determines whether a deadlock occurs due to waiting and registering a lock request from a certain host computer when the exclusive control device receives the lock request. I was trying to check.

【0003】ここで、ロック要求とは、複数のホストコ
ンピュータがディスク装置やメモリ装置等の資源を共有
使用する状況に於いて、或るホストコンピュータが或る
資源(例えば、ディスク装置内の特定のファイル)を排
他使用する必要があるときに、その排他使用権を要求す
ることをいい、或る条件のもとで排他使用が許可された
状態を資源のロックという。
[0003] Here, a lock request means that in a situation where a plurality of host computers share resources such as a disk device and a memory device, a certain host computer has a certain resource (for example, a specific resource in the disk device). Requesting exclusive use right when it is necessary to exclusively use the file), and a state in which exclusive use is permitted under certain conditions is called resource locking.

【0004】また、デッドロックとは、次のような状態
を言う。例えば、ホストコンピュータAが資源αをロッ
クし、同時に資源βに対してロック待ちになっている状
態で、資源βをロックしているホストコンピュータBが
資源αに対してロック要求してロック待ちになると、ホ
ストコンピュータA,Bの何れもロック要求している資
源のロックに成功するまで、既にロックしている資源を
解放できないため(必要な資源が全てロックできるま
で、ロック要求している資源に関する処理が終了しない
ため)、ホストコンピュータA,Bの何れもそれ以上処
理を継続できない状態になる。この状態をデッドロック
と言い、従来の排他制御装置では、上述したように、ロ
ック要求を待ち登録する前に、デッドロックチェックを
行い、デッドロックが発生しないことを確認した上で待
ち登録していた。
[0004] Deadlock refers to the following state. For example, in a state where the host computer A locks the resource α and is waiting for the lock on the resource β at the same time, the host computer B locking the resource β requests the lock on the resource α and waits for the lock. Then, since neither of the host computers A and B can successfully release the locked resource until the lock requesting resource is successfully locked (until all necessary resources can be locked, Since the processing is not completed), neither of the host computers A and B can continue the processing. This state is called deadlock, and in the conventional exclusive control device, as described above, before waiting and registering a lock request, a deadlock check is performed, and after confirming that no deadlock occurs, waiting registration is performed. Was.

【0005】尚、以上の説明では簡単のために、ロック
要求の要求元をホストコンピュータとしたが、一般的な
コンピュータシステムに於いて、通常、プロセスやタス
クと呼ばれるソフトウェアの処理単位が行う。上述のデ
ッドロックは、同じホストコンピュータ内の複数のプロ
セス等から出力されるロック要求の競合によっても発生
し、また、複数のホストコンピュータの複数のプロセス
等が関連し、数十以上のプロセス等が順に待ち,待たせ
る関係となることも稀ではない。
In the above description, the request source of the lock request is a host computer for the sake of simplicity. However, in a general computer system, a processing unit of software called a process or a task is usually performed. The deadlock described above also occurs due to contention of lock requests output from a plurality of processes and the like in the same host computer. It is not unusual for the relationship to wait and wait in order.

【0006】デッドロックを調べるためのデッドロック
チェックは、或るロック要求が待ちとなった場合に、そ
のロック要求が要求している資源のロック元が他の資源
に対してロック待ちになっていないかを順に調べてい
き、最終的にデッドロックチェックの契機となったロッ
ク要求の要求元によるロックが待たせる原因となるとい
う閉ループを検出したとき、これをデッドロックとす
る。ここで、先に、ロック要求が待ちになる原因とし
て、先に要求資源をロックしているホストコンピュータ
がある場合等と述べたが、資源のロック方法として、他
に全くロックを許可しない完全排他ロックや、例えばフ
ァイル資源のロックに於いて、読み出しアクセスのみを
行う複数のプロセスに対して同時にロックを許可する共
有ロック等、幾つかのロックのレベルがある場合が一般
的である。従って、上述のデッドロックチェックは、単
一の1本のループを検索するだけでなく、検索が進むに
つれて次々に分岐していき、その全てについてチェック
することが必要になる。
A deadlock check for checking a deadlock is such that when a certain lock request is waiting, the lock source of the resource requested by the lock request is waiting for a lock on another resource. In order to determine whether or not there is a closed loop that causes the lock by the request source of the lock request that eventually triggered the deadlock check, the closed loop is regarded as deadlock. Here, the cause of the lock request waiting has been described above as being the case where there is a host computer that has previously locked the requested resource. In general, there are several lock levels, such as a lock and a shared lock that permits a plurality of processes performing only read access at the same time to lock a file resource. Therefore, the above-described deadlock check requires not only searching a single loop but also branching one after another as the search progresses, and checking all of them.

【0007】また、デッドロックチェックの実行中、こ
のデッドロックチェックのためにテーブルの状態が他の
プロセスからのロックやアンロックによって変化する
と、正しいデッドロックのチェックが行えないのは自明
であり、従来の排他制御装置では、或るロック要求に対
するデッドロックチェックの処理中、他の全てのロック
要求やアンロック要求は、ホストコンピュータからコマ
ンド受け付け処理の時点で待たせるようにしていた。
Also, during execution of the deadlock check, if the state of the table changes due to a lock or unlock from another process due to the deadlock check, it is obvious that correct deadlock check cannot be performed. In the conventional exclusive control device, during the deadlock check processing for a certain lock request, all other lock requests and unlock requests are made to wait at the time of command reception processing from the host computer.

【0008】[0008]

【発明が解決しようとする課題】上述した従来の技術
は、或るホストコンピュータからのロック要求がロック
待ちとなることによってデッドロックが発生するか否か
を、そのロック要求を排他制御装置が受け付けたとき
に、即時にチェックするようにしているため、デッドロ
ックチェック処理がボトルネックとなってシステム全体
の性能が低下するという問題があった。つまり、或るホ
ストコンピュータからのロック要求がロック待ちにな
り、その要求に関するデッドロックチェックの処理が行
われると、その間、他のロック要求を処理できないから
である。
In the above-mentioned prior art, the exclusive control device receives a lock request from a host computer as to whether or not deadlock occurs due to waiting for a lock from the lock request. In such a case, the check is performed immediately, and therefore, there is a problem that the deadlock check processing becomes a bottleneck and the performance of the entire system is reduced. In other words, a lock request from a certain host computer waits for a lock, and if deadlock check processing is performed on the request, other lock requests cannot be processed during that time.

【0009】そこで、本発明の目的は、デッドロックチ
ェック処理がボトルネックとならないようにすることに
より、システム全体の性能を向上させることができる排
他制御装置を提供することにある。
It is an object of the present invention to provide an exclusive control device capable of improving the performance of the entire system by preventing deadlock check processing from becoming a bottleneck.

【0010】尚、特開平1−223558号公報には、
複数のホストコンピュータから構成されるシステムに於
いて、排他制御によるトランザクションの最初の待ち状
態発生から一定時間経過するまでの待ち状態発生までの
排他制御の待ち情報を、一括して1つのホストコンピュ
ータに集めてデッドロックの検出処理を行う技術が開示
されているが、この技術では、ホストコンピュータの負
荷が大きくなってしまうという問題がある。
Japanese Patent Application Laid-Open No. 1-223558 discloses that
In a system composed of a plurality of host computers, waiting information for exclusive control from the first wait state of a transaction by exclusive control to the occurrence of a wait state until a predetermined time elapses is collectively transferred to one host computer. Although a technique for collecting deadlocks is disclosed, this technique has a problem that a load on a host computer increases.

【0011】[0011]

【課題を解決するための手段】本発明は上記目的を達成
すると共に、ロック要求コマンド毎に、デッドロックチ
ェックを所定時間経過後に行うのか、直ちに行うのかを
制御できるようにするため、要求元からのロック要求コ
マンドを受け付け、該ロック要求コマンドによるロック
要求に対して資源のロックが可能か否かを判定し、ロッ
ク不可能と判定した場合は、更に、前記ロック要求コマ
ンドにそれと同期してデッドロックチェックを行うこと
の指示が含まれているか否かを判定し、前記指示が含ま
れていないと判定した場合は、ロック不可能と判定した
ロック要求を出力し、前記指示が含まれていると判定し
た場合は、前記ロック要求をロック待ちにするとデッド
ロックが発生するか否かのチェックを行うことの指示を
出力し、そのチェック結果がデッドロックが発生するこ
とを示している場合は、前記要求元に対してデッドロッ
ク発生を通知し、デッドロックが発生しないことを示し
ている場合は、タイマ処理が不要であることの指示を出
力すると共に前記ロック要求を出力するロック要求コマ
ンド処理部と、該ロック要求コマンド処理部から出力さ
れたロック要求をロック待ちにすると共に、前記ロック
要求コマンド処理部からタイマ処理が不要であることが
指示されていない場合は、そのロック待ちの事象に対す
るタイマ処理の開始を指示し、前記ロック要求コマンド
処理部からタイマ処理が不要であることが指示されてい
る場合は、そのロック待ちの事象に対するタイマ処理の
開始を指示しないロック待ちキュー処理部と、該ロック
待ちキュー処理部によってタイマ処理の開始が指示され
た事象についてタイマ処理を開始し、タイマ処理を開始
した事象の内の、タイマ処理を開始してから予め定めら
れた一定時間が経過した事象をタイムアウトとするタイ
マ処理部と、該タイマ処理部でタイムアウトとされた事
象についてデッドロックが発生しているか否かをチェッ
クすると共に、前記ロック要求コマンド処理部からの指
示に従ったデッドロックチェックを行うデッドロックチ
ェック処理部と、該デッドロックチェック処理部がデッ
ドロックを検出したとき、前記要求元にデッドロック発
生を通知するアテンション処理手段とを備えている。
SUMMARY OF THE INVENTION The present invention achieves the above objects and provides a deadlock check for each lock request command.
Check after a lapse of the specified time or immediately
In order to enable control, a lock request command from the request source is accepted, it is determined whether or not the resource can be locked in response to the lock request by the lock request command . The lock request frame
Perform a deadlock check synchronously with the command
It is determined whether or not the instruction is included, and the instruction is included.
If it is determined that it is not locked, it is determined that lock is not possible
Outputs a lock request and determines that the instruction is included.
If the lock request waits for a lock,
An instruction to check whether a lock occurs
Output and the check result indicates that deadlock may occur.
Indicates a deadlock to the requestor.
Notification that a deadlock does not occur.
The timer processing is unnecessary.
A lock request command processing unit which outputs the lock request as well as the force, as well as the lock wait a lock request that is outputted from the lock request command processing section, the locking
Timer processing may not be required from the request command processing unit
If not instructed, start of timer processing for the event waiting for the lock is instructed, and the lock request command is issued.
The processing unit indicates that timer processing is unnecessary.
If the timer processing is
A lock wait queue processing unit that does not instruct start, a timer process is started for an event for which the start of timer processing is instructed by the lock wait queue processing unit, and a timer process of the events that started the timer process is started. A timer processing unit that times out an event after a predetermined period of time has elapsed, and checks whether a deadlock has occurred for the event that has been timed out by the timer processing unit, and executes the lock request command processing. Finger from department
And a attention processing means for notifying the request source of the occurrence of deadlock when the deadlock check processing unit detects a deadlock.

【0012】この構成に於いては、ロック要求コマンド
処理部が、ロック要求コマンドによるロック要求に対し
て資源のロックが可能か否かを判定し、ロック不可能と
判定した場合は、更に、ロック要求コマンドにそれと同
期してデッドロックチェックを行うことの指示が含まれ
ているか否かを判定する。そして、指示が含まれていな
いと判定した場合は、ロック不可能と判定したロック要
求を出力する。これにより、ロック待ちキュー処理部
が、ロック不可能と判定されたロック要求をロック待ち
にすると共に、タイマ処理部に対してそのロック待ちの
事象に対するタイマ処理の開始を指示する。この指示を
受けると、タイマ処理部がタイマ処理を開始し、予め定
められた所定時間が経過した事象をタイムアウトとす
る。デッドロックチェック処理部は、タイムアウトした
事象についてデッドロックが発生しているか否かをチェ
ックする。
In this configuration, the lock request command processing section determines whether or not the resource can be locked in response to the lock request by the lock request command, and determines that the lock is not possible.
If a judgment is made, the lock request command is added to the request.
Instructions to perform a deadlock check in anticipation
Is determined. And the instructions are not included
If it is determined that the lock is not possible,
Output the request. As a result, the lock waiting queue processing unit sets the lock request determined to be impossible to lock to the lock waiting state, and instructs the timer processing unit to start timer processing for the lock waiting event. Upon receiving this instruction, the timer processing unit starts timer processing, and sets an event in which a predetermined time has elapsed as a timeout. The deadlock check processing unit checks whether a deadlock has occurred for an event that has timed out.

【0013】これに対して、ロック要求コマンドと同期
してデッドロックチェックを行うことの指示が含まれて
いると判定した場合は、ロック要求コマンド処理部は、
直ちに、デッドロックチェック処理部に対してそのロッ
ク要求をロック待ちにするとデッドロックが発生するか
否かのチェックを行うことを指示する。これに応答して
デッドロックチェック処理部がデッドロックチェックを
行う。デッドロックチェック処理部でデッドロックが発
生しないと判定された場合、ロック要求コマンド処理部
は、ロック待ちキュー処理部に対して上記ロック要求を
通知すると共にタイマ処理が不要であることを指示す
る。
On the other hand, synchronization with the lock request command
Includes instructions to perform a deadlock check
If the lock request command processing unit determines that the
Immediately, the deadlock check
Deadlock occurs when waiting for a lock request
Indicates that a check should be made. In response to this
Deadlock check processing block performs deadlock check
Do. Deadlock occurred in deadlock check processing section
If it is determined not to be generated, the lock request command processing unit
Sends the lock request to the lock wait queue processing unit.
Notify and indicate that timer processing is not required
You.

【0014】上記した第2の構成に於いては、ロック要
求コマンドに対して資源のロックが不可能で且つロック
要求コマンドに時間の指定が含まれている場合、タイマ
初期値設定処理部がその時間をタイマ処理部に通知し、
タイマ処理部は、タイマ初期値設定処理部から時間が通
知された事象については、その通知された時間が経過し
たときにタイムアウトとする。
In the above-mentioned second configuration, if the resource cannot be locked for the lock request command and the lock request command includes designation of time, the timer initial value setting processing unit performs Notify the timer processing unit of the time,
The timer processing unit sets a time-out for an event for which time has been notified from the timer initial value setting processing unit when the notified time has elapsed.

【0015】また、本発明は、ロック要求コマンド毎
に、デッドロックチェックを所定時間経過後に行うの
か、直ちに行うのかを制御できるようにするため、上記
した第1の構成に於けるロック要求コマンド処理部は、
前記要求元からのロック要求コマンドによるロック要求
に対して資源のロックが不可能であり、且つ前記ロック
要求コマンドにそれと同期してデッドロックチェックを
行うことの指示が含まれている場合は、前記デッドロッ
クチェック処理部に対して前記ロック要求をロック待ち
にするとデッドロックが発生するか否かのチェックを行
うことを指示し、そのチェック結果がデッドロックが発
生することを示している場合は、前記要求元に対してデ
ッドロック発生を通知し、デッドロックが発生しないこ
とを示している場合は、前記ロック待ちキュー処理部に
対してタイマ処理が不要であることを指示すると共に前
記ロック要求を出力するタイマ作動制御処理部を有し、
前記デッドロックチェック処理部は、前記ロック要求コ
マンド処理部からの指示に従ったデッドロックチェック
を行う構成を有し、前記ロック待ちキュー処理部は、前
記タイマ作動制御処理部からタイマ処理が不要であるこ
とが指示された事象については、タイマ処理の開始を指
示しない構成を備えている。
Further, according to the present invention, in order to control whether a deadlock check is performed after a lapse of a predetermined time or immediately after each lock request command, the lock request command processing in the first configuration described above is performed. The department is
If the resource cannot be locked in response to a lock request by a lock request command from the request source, and the lock request command includes an instruction to perform a deadlock check in synchronization therewith, If the deadlock check processing unit instructs the lock request to wait for a lock to check whether a deadlock occurs, and if the check result indicates that a deadlock occurs, When the deadlock occurrence is notified to the request source and the deadlock does not occur, the lock wait queue processing unit is instructed that timer processing is unnecessary, and the lock request is issued. It has a timer operation control processing unit that outputs,
The deadlock check processing unit has a configuration for performing a deadlock check in accordance with an instruction from the lock request command processing unit, and the lock waiting queue processing unit does not need timer processing from the timer operation control processing unit. A configuration is provided in which the start of timer processing is not instructed for an event for which there is an instruction.

【0016】上記した第3の構成に於いては、ロック要
求コマンドに、ロック要求コマンドと同期してデッドロ
ックチェックを行うことの指示が含まれ、且つそのロッ
ク要求について資源のロックが不可能な場合、タイマ作
動制御処理部は、直ちに、デッドロックチェック処理部
に対してそのロック要求を待ちにするとデッドロックが
発生するか否かのチェックを行うことを指示する。これ
に応答してデッドロックチェック処理部がデッドロック
チェックを行う。デッドロックチェック処理部でデッド
ロックが発生しないと判定された場合、タイマ作動制御
処理部は、ロック待ちキュー処理部に対して上記ロック
要求を通知すると共にタイマ処理が不要であることを指
示する。
In the third configuration described above, the lock request command includes an instruction to perform a deadlock check in synchronization with the lock request command, and the lock request cannot lock resources. In this case, the timer operation control processing unit immediately instructs the deadlock check processing unit to check whether a deadlock occurs when waiting for the lock request. In response, the deadlock check processing unit performs a deadlock check. If the deadlock check processing unit determines that no deadlock occurs, the timer operation control processing unit notifies the lock waiting queue processing unit of the lock request and indicates that timer processing is not required.

【0017】[0017]

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

【0018】図12は、本発明の排他制御装置を含むコ
ンピュータの典型的な一例を示すブロック図である。ホ
ストコンピュータA,Bが1台のディスク装置12を共
有しており、このディスク装置12の排他使用のための
ロック制御を、排他制御装置11がホストコンピュータ
A,Bからのコマンドに従って行う。
FIG. 12 is a block diagram showing a typical example of a computer including the exclusive control device of the present invention. The host computers A and B share one disk device 12, and the exclusive control device 11 performs lock control for exclusive use of the disk device 12 in accordance with commands from the host computers A and B.

【0019】以下、本発明の排他制御装置の詳細につい
ては、図12に示した例をもとに説明するが、本発明の
排他制御装置が、ホストコンピュータが1台の場合も含
め、ホストコンピュータの台数によらないこと、また、
排他制御の対象となる資源がディスク装置に限らず複数
のホストコンピュータ或いはホストコンピュータ内の複
数のプロセス等のソフトウェア処理単位によって共有使
用される全ての資源を対象とすることはいうまでもな
い。
Hereinafter, the exclusive control device of the present invention will be described in detail with reference to the example shown in FIG. 12. However, the exclusive control device of the present invention includes a host computer including a single host computer. Not depend on the number of
It goes without saying that the resources to be subjected to the exclusive control are not limited to the disk devices but to all resources shared and used by a plurality of host computers or software processing units such as a plurality of processes in the host computers.

【0020】図1は本発明の前提となる技術を説明する
ためのブロック図であり、ホストインタフェース処理部
1と、ロック要求コマンド処理部2と、アテンション処
理部3と、ロック管理テーブル4と、ロック待ちキュー
処理部5と、タイマ処理部6と、デッドロックチェック
処理部7とを備えている。
FIG. 1 illustrates a technique on which the present invention is based .
A host interface processing unit 1, a lock request command processing unit 2, an attention processing unit 3, a lock management table 4, a lock waiting queue processing unit 5, a timer processing unit 6, a deadlock And a check processing unit 7.

【0021】ホストインタフェース処理部1は、ホスト
コンピュータAとホストコンピュータBとの物理的,論
理的インタフェースを司る。ロック要求コマンド処理部
2は、ホストインタフェース処理部1を介してホストコ
ンピュータA,Bから受け付けたロック要求コマンドに
よってロック管理テーブル4の更新処理を行い、即座に
ロックできない場合は、ロック待ちキュー処理部5にそ
の処理を依頼する。タイマ処理部6は、ロック待ちキュ
ー処理部5から通知された各事象それぞれについてタイ
マ処理を行い、予め定められた所定時間が経過したとき
(タイムアウトしたとき)に、タイムアウトした事象を
デッドロックチェック処理部7に通知する。デッドロッ
クチェック処理部7は、通知された事象についてデッド
ロックが発生しているか否かをチェックし、デッドロッ
クが発生している場合は、アテンション処理部3を介し
て要求元にデッドロック発生を通知する。
The host interface processing unit 1 manages a physical and logical interface between the host computer A and the host computer B. The lock request command processing unit 2 updates the lock management table 4 according to the lock request commands received from the host computers A and B via the host interface processing unit 1. If the lock cannot be locked immediately, the lock waiting queue processing unit 5 is requested to perform the processing. The timer processing unit 6 performs timer processing for each event notified from the lock waiting queue processing unit 5, and when a predetermined time has elapsed (when a timeout occurs), a deadlock check process is performed on the event that has timed out. Notify the unit 7. The deadlock check processing unit 7 checks whether a deadlock has occurred for the notified event, and if a deadlock has occurred, notifies the request source via the attention processing unit 3 of the occurrence of the deadlock. Notice.

【0022】図2はロック要求コマンド処理部2の処理
例を示す流れ図、図3はロック待ちキュー処理部5の処
理例を示す流れ図、図4,図5はタイマ処理部6の処理
例を示す流れ図、図6はデッドロックチェック処理部7
の処理例を示す流れ図、図7はロック管理テーブル4の
内容が変化する様子を示した図である。以下、各図を参
照して、本実施例の動作を説明する。尚、本実施例に於
いては、各処理部はソフトウェアによって構成される
が、同様の機能の一部または全てをハードウェアによっ
て実現することもできる。
FIG. 2 is a flowchart showing a processing example of the lock request command processing unit 2, FIG. 3 is a flowchart showing a processing example of the lock waiting queue processing unit 5, and FIGS. FIG. 6 is a flowchart showing the deadlock check processing unit 7.
FIG. 7 is a diagram showing how the contents of the lock management table 4 change. Hereinafter, the operation of this embodiment will be described with reference to the drawings. In this embodiment, each processing unit is configured by software, but a part or all of the same functions can be realized by hardware.

【0023】今、ホストコンピュータAのプロセスaか
ら資源αのロックを要求するロック要求コマンドが排他
制御装置11に対して出力されたとする。尚、このと
き、資源αは、ロックされていないとする。
Now, it is assumed that a lock request command requesting the lock of the resource α is output from the process a of the host computer A to the exclusive control device 11. At this time, it is assumed that the resource α is not locked.

【0024】このロック要求コマンドは、ホストインタ
フェース処理部1を介してロック要求コマンド処理部2
へ通知される。
This lock request command is sent to the lock request command processing unit 2 via the host interface processing unit 1.
To be notified.

【0025】これにより、ロック要求コマンド処理部2
は、図2の流れ図に示す処理を開始し、先ず、ロック管
理テーブル4を参照して資源αが既にロックされている
か否かを調べる(S1,S2)。この例では、資源αは
ロックされていないので(S2がNO)、ホストインタ
フェース処理部1は、ロック管理テーブル4に、図7
(A)に示すように、資源αがホストコンピュータAの
プロセスaによってロックされたことを示す情報41を
登録し、その後、ホストインタフェース処理部1を介し
て要求元のプロセスaにロック許可を通知する(S3,
S4)。尚、本実施例は、唯一のプロセスに対してのみ
ロックを許可する完全排他ロックであるものとする。
Thus, the lock request command processing unit 2
Starts the process shown in the flowchart of FIG. 2, and first checks with reference to the lock management table 4 whether or not the resource α is already locked (S1, S2). In this example, since the resource α is not locked (NO in S2), the host interface processing unit 1 stores the resource α in the lock management table 4 as shown in FIG.
As shown in (A), information 41 indicating that the resource α has been locked by the process a of the host computer A is registered, and then the lock request is notified to the requesting process a via the host interface processing unit 1. (S3
S4). In this embodiment, it is assumed that the lock is a completely exclusive lock that permits a lock only for a single process.

【0026】その後、ホストコンピュータBのプロセス
bから資源βのロックを要求するロック要求コマンドが
排他制御装置11に対して出力されたとする。尚、この
とき、資源βはロックされていないとする。
Thereafter, it is assumed that a lock request command for requesting the lock of the resource β is output from the process b of the host computer B to the exclusive control device 11. At this time, it is assumed that the resource β is not locked.

【0027】このロック要求コマンドは、ホストインタ
フェース処理部1を介してロック要求コマンド処理部2
に通知される。
This lock request command is sent to the lock request command processing unit 2 via the host interface processing unit 1.
Will be notified.

【0028】これにより、ロック要求コマンド処理部2
は、前述したと同様の処理を行い、ロック管理テーブル
4に、図7(B)に示すように、資源βがホストコンピ
ュータBのプロセスbによってロックされたことを示す
情報42を登録し、その後、ホストインタフェース処理
部1を介して要求元のプロセスbにロック許可を通知す
る(S1〜S4)。
As a result, the lock request command processing unit 2
Performs the same processing as described above, and registers information 42 indicating that the resource β has been locked by the process b of the host computer B in the lock management table 4 as shown in FIG. Then, the lock permission is notified to the requesting process b via the host interface processing unit 1 (S1 to S4).

【0029】その後、ホストコンピュータAのプロセス
aから出力された、資源βのロックを要求するコマンド
が、ホストインタフェース処理部1を介してロック要求
コマンド処理部2に通知されたとする。
Thereafter, it is assumed that the command requesting the lock of the resource β output from the process a of the host computer A is notified to the lock request command processing unit 2 via the host interface processing unit 1.

【0030】この場合、ロック管理テーブル4を参照す
ることにより、資源βが既にホストコンピュータBのプ
ロセスbによってロックされていることが分かるので
(S1,S2)、ロック要求コマンド処理部2は、上記
ロック要求コマンドによるロック要求は許可せずに、ロ
ック待ちキュー処理部5に対して上記ロック要求を通知
すると共に、ホストインタフェース処理部1を介して要
求元のプロセスaへロック要求がロック待ちになったこ
とを通知する(S5,6)。
In this case, by referring to the lock management table 4, it is known that the resource β has already been locked by the process b of the host computer B (S1, S2), so that the lock request command processing unit 2 The lock request by the lock request command is not permitted, the lock request is notified to the lock waiting queue processing unit 5, and the lock request is put into the lock waiting state to the requesting process a via the host interface processing unit 1. Is notified (S5, 6).

【0031】ロック要求コマンド処理部2からロック要
求が通知されると、ロック待ちキュー処理部5は、図7
(C)に示すように、ホストコンピュータAのプロセス
aが資源βの解放を待っているということを示す情報4
3をロック管理テーブル4に登録し、更に、タイマ処理
部6にホストコンピュータAのプロセスaが資源βの解
放を待っているという事象を通知する(図3,S11,
S12)。
When a lock request is notified from the lock request command processing unit 2, the lock waiting queue processing unit 5
As shown in (C), information 4 indicating that the process a of the host computer A is waiting for the release of the resource β.
3 is registered in the lock management table 4, and the timer processing unit 6 is notified of an event that the process a of the host computer A is waiting for the release of the resource β (FIG. 3, S11,
S12).

【0032】タイマ処理部6は、上記した事象β,wa
it=A(a)が通知されると、その内部に設けられて
いるタイマ管理テーブル61に、図8に示すように、そ
の事象と、予め定められている一定時間Tiとを対応付
けて登録する(図4,S21)。尚、タイマ処理部6
は、一定時間ΔT(ΔT≪Ti)が経過する毎に、図5
に示すように、各事象の残り時間からΔTを減算し、残
り時間が0以下の事象があれば、即ち、タイムアウトし
た事象があれば、その事象をデッドロックチェック処理
部7に対して出力する処理も行っている(図5,S3
1,S32)。尚、残り時間が0以下になった事象につ
いての情報は、タイマ管理テーブル61から削除され
る。
The timer processing unit 6 determines whether the event β, wa
When it is notified that it = A (a), the event is registered in the timer management table 61 provided therein in association with the predetermined time Ti, as shown in FIG. (S21 in FIG. 4). The timer processing unit 6
FIG. 5 shows that every time a fixed time ΔT (ΔT≪Ti) elapses.
As shown in (3), ΔT is subtracted from the remaining time of each event, and if there is an event whose remaining time is 0 or less, that is, if there is an event that has timed out, the event is output to the deadlock check processing unit 7. Processing is also performed (FIG. 5, S3
1, S32). It should be noted that information on the event that the remaining time has become 0 or less is deleted from the timer management table 61.

【0033】その後、上記した事象β,wait=A
(a)がタイムアウトする前に、ホストコンピュータB
のプロセスbから資源αのロックを要求するロック要求
コマンドが出力されたとすると、資源αは既にホストコ
ンピュータAのプロセスaでロックされているので、ロ
ック要求コマンド処理部2は、要求元のプロセスbに対
してロック要求がロック待ちになったことを通知し(図
2,S6)、ロック待ちキュー処理部5は、図7(D)
に示すように、ホストコンピュータBのプロセスbが資
源αの解放を待っているということを示す情報44をロ
ック管理テーブル4に登録し、更に、タイマ処理部6に
ホストコンピュータBのプロセスbが資源αの解放を待
っているという事象α,wait=B(b)を通知する
(図3,S11,S12)。
Thereafter, the above-mentioned event β, wait = A
Before (a) times out, the host computer B
If the lock request command for requesting the lock of the resource α is output from the process b of the host computer A, since the resource α has already been locked by the process a of the host computer A, the lock request command processing unit 2 The lock wait queue processing unit 5 notifies that the lock request has become a lock wait (S6 in FIG. 2).
As shown in (4), information 44 indicating that the process b of the host computer B is waiting for the release of the resource α is registered in the lock management table 4, and the process b of the host computer B An event α, wait = B (b) indicating that α is waiting to be released is notified (FIG. 3, S11, S12).

【0034】その後、所定時間Tiが経過し、事象β,
wait=A(a)がタイムアウトとなると、タイマ処
理部6は、上記事象をデッドロックチェック処理部7に
対して出力する(図5,S31,S32)。
Thereafter, a predetermined time Ti elapses, and the events β,
When wait = A (a) times out, the timer processing unit 6 outputs the above event to the deadlock check processing unit 7 (FIG. 5, S31, S32).

【0035】デッドロックチェック処理部7は、出力さ
れた事象β,wait=A(a)についてデッドロック
が発生しているか否かをロック管理テーブル4を参照し
てチェックする(図6,S41,S42)。この例で
は、ホストコンピュータAのプロセスaが解放を待って
いる資源βは、ホストコンピュータBのプロセスbがロ
ックしている資源であり、また、ホストコンピュータB
のプロセスbは、ホストコンピュータAのプロセスaが
ロックしている資源αの解放を待っているので、デッド
ロックチェック処理部7は、ホストコンピュータAのプ
ロセスaとホストコンピュータBのプロセスbとにデッ
ドロックが発生していると判断し(S42がYES)、
アテンション処理部3にそのことを通知する(S4
3)。
The deadlock check processing unit 7 checks whether or not a deadlock has occurred for the output event β, wait = A (a) by referring to the lock management table 4 (FIG. 6, S41, S41). S42). In this example, the resource β waiting for the process a of the host computer A to be released is the resource locked by the process b of the host computer B.
Process b of the host computer A is waiting for the release of the resource α locked by the process a of the host computer A. Therefore, the deadlock check processing unit 7 determines that the process a of the host computer A and the process b of the host computer B are dead. It is determined that the lock has occurred (YES at S42),
This is notified to the attention processing unit 3 (S4
3).

【0036】この通知を受けると、アテンション処理部
3は、ホストインタフェース処理部1を介してホストコ
ンピュータAのプロセスaへデッドロック発生を通知す
る。一般的なコンピュータシステムでは、デッドロック
発生を通知されたプロセスは、実行を中止し、ロックし
ている資源を全て解放する。本実施例では、デッドロッ
ク発生を通知されたホストコンピュータAのプロセスa
は、資源αのロックを解放する。これにより、ロック待
ちキュー処理部5は、ホストコンピュータBのプロセス
bに対して資源αのロックを許可すると共に、タイマ処
理部6に対し、ホストコンピュータBのプロセスbの資
源α待ちの事象に対するタイマ処理の停止を指示する。
この指示を受けると、タイマ処理部6は、タイマ管理テ
ーブル61から上記事象に関する情報を削除する。
Upon receiving this notification, the attention processing unit 3 notifies the process a of the host computer A of the occurrence of the deadlock via the host interface processing unit 1. In a general computer system, a process notified of occurrence of a deadlock stops execution and releases all locked resources. In this embodiment, the process a of the host computer A notified of the occurrence of the deadlock
Releases the lock on the resource α. As a result, the lock waiting queue processing unit 5 permits the process b of the host computer B to lock the resource α, and notifies the timer processing unit 6 of the timer for the event waiting for the resource α of the process b of the host computer B. Instructs to stop processing.
Upon receiving this instruction, the timer processing unit 6 deletes information on the above event from the timer management table 61.

【0037】尚、以上の説明では、デッドロック発生
時、ホストコンピュータAのプロセスaに対してのみ、
デッドロック発生を通知し、ロックしている資源の解放
を要求するようにしたが、逆に、ホストコンピュータB
のプロセスbに対して、或いはデッドロックとなった全
てのプロセスに対してデッドロック発生を通知しても良
い。
In the above description, when a deadlock occurs, only the process a of the host computer A is executed.
Notifying that a deadlock has occurred, and requesting release of the locked resource,
The deadlock occurrence may be notified to the process b or to all the processes that have become deadlock.

【0038】[0038]

【0039】[0039]

【0040】[0040]

【0041】[0041]

【0042】[0042]

【0043】[0043]

【0044】[0044]

【0045】[0045]

【0046】[0046]

【0047】図は本発明の実施例のブロック図であ
り、図1と異なる点は、ロック要求コマンド処理部2に
代えてタイマ作動制御処理部22を有するロック要求コ
マンド処理部2bを備えた点、ロック待ちキュー処理部
5に代えてロック待ちキュー処理部5bを備えた点、
イマ処理部6に代えてタイマ処理部6aを備えた点、
びデッドロックチェック処理部7に代えてデッドロック
チェック処理部7bを備えた点である。尚、他の図
同一符号は同一部分を表している。
[0047] Figure 9 is a block diagram of a real施例of the present invention, 1 in that, a lock request command processing section 2b having a timer operation control unit 22 in place of the lock request command processing section 2 point, point with a lock queue processor 5b instead of lock queue processor 5, data
The difference is that a timer processing unit 6a is provided in place of the image processing unit 6, and a deadlock check processing unit 7b is provided in place of the deadlock check processing unit 7. Note that the same reference numerals as those in FIG. 1 indicate the same parts.

【0048】ロック要求コマンド処理部2b内のタイマ
作動制御処理部22は、ロック不可能と判定されたロッ
ク要求コマンドに時間の指定が含まれている場合、その
時間をタイマ処理部6aに通知する機能、ロック不可と
判定されたロック要求コマンドに同期指定が含まれてい
る場合は、デッドロックチェック処理部7に対して上
記ロック要求をロック待ちにするとデッドロックが発生
するか否かのチェックを行うことを指示する機能、デッ
ドロックチェック処理部7のチェック結果がデッドロ
ックが発生することを示している場合は、要求元に対し
てデッドロック発生を通知し、デッドロックが発生しな
いことを示している場合は、ロック待ちキュー処理部5
bに対してタイマ処理が不要であることを指示すると共
に上記ロック要求を出力する機能を有する。また、タイ
マ処理部6aは、タイマ作動制御処理部22から時間が
通知された事象については、予め定められている一定時
間に代えて、通知された時間が経過したときにその事象
を出力する機能を有する。
The timer operation control processing section 22 in the lock request command processing section 2b notifies the timer processing section 6a of the specified time when the lock request command determined to be unlockable includes designation of time. function, if it contains the specified synchronization in the lock request command it is determined that the lock not may check whether or not a deadlock when the lock wait the lock request occurs for deadlock check processing section 7 b instructing to perform the function, if the deadlock check processing portion 7 b of the check result indicates that a deadlock occurs, notifies the deadlock to the requesting, a deadlock does not occur Indicates that the lock waiting queue processing unit 5
b has a function of instructing that the timer processing is unnecessary and outputting the lock request. Also Thailand
The timer processing unit 6a receives the time from the timer operation control processing unit 22.
For the notified event, a predetermined time
Instead, the event occurs when the notified time elapses
Output function.

【0049】デッドロックチェック処理部7bは、タイ
マ処理部6aから事象が出力された場合、及びタイマ作
動制御処理部22からデッドロックチェックが指示され
た場合にデッドロックチェックを行う機能を有する。
The deadlock check processing unit 7b has a function of performing a deadlock check when an event is output from the timer processing unit 6a and when a deadlock check is instructed from the timer operation control processing unit 22.

【0050】ロック待ちキュー処理部5bは、タイマ作
動制御処理部22からタイマ処理が不要であることが指
示されていない場合は、ロック待ちキュー処理部5bか
ら通知されたロック要求に対して前述したロック待ちキ
ュー処理部5と同様の処理を行い、タイマ処理が不要で
あることが指示されている場合は、ロック管理テーブル
4に対する更新処理のみを行う。
When it is not instructed from the timer operation control processing section 22 that the timer processing is unnecessary, the lock waiting queue processing section 5b responds to the lock request notified from the lock waiting queue processing section 5b as described above. The same processing as that performed by the lock wait queue processing unit 5 is performed. If it is instructed that the timer processing is unnecessary, only the update processing for the lock management table 4 is performed.

【0051】図10はタイマ処理部6aの処理例を示す
流れ図、図11はタイマ作動制御処理部22の処理例を
示す流れ図であり、以下各図を参照して本実施例の動作
を説明する。
FIG . 10 shows a processing example of the timer processing section 6a.
FIG. 11 is a flowchart showing a processing example of the timer operation control processing section 22, and the operation of the present embodiment will be described below with reference to the drawings.

【0052】ロック要求コマンド処理部2bは、ホスト
インタフェース処理部1を介して通知されたロック要求
コマンドによるロック要求に対して資源をロックするこ
とが可能な場合は、前述したロック要求コマンド処理部
2と同様の処理を行う。また、ロック不可能な場合は、
タイマ作動制御処理部22に制御を渡し、図11の流れ
図に示す処理を行わせる。
When the lock request command processing unit 2b can lock the resource in response to the lock request by the lock request command notified via the host interface processing unit 1, the lock request command processing unit 2b
The same processing as in step 2 is performed. If the lock is not possible,
It passes control to the timer operation control processing unit 22 to perform the processing shown in the flowchart of FIG 11.

【0053】タイマ作動制御処理部22は、制御を渡さ
れると、上記ロック要求コマンドに時間の指定が含まれ
ているか否かを判断する(図11,S71)。時間の指
定が含まれている場合は(S71がYES)、タイマ処
理部6aに対してその時間を通知し(S72)、更に、
ロック待ちキュー処理部5bにロック要求を通知すると
共に、要求元にロック要求がロック待ちになったことを
通知する(S78,S79)。これにより、ロック待ち
キュー処理部5bは前述したロック待ちキュー処理部5
と同様の処理を行う。また、タイマ処理部6aは、図1
0の流れ図に示すように、ロック待ちキュー処理部5か
ら事象が通知されたとき、タイマ作動制御処理部22か
ら時間が通知されている場合(S61がYES)は、通
知された事象と時間とを対応付けてタイマ管理テーブル
61に登録し(S62)、時間が通知されていない場合
(S61がNO)は、通知された事象と予め定められて
いる一定時間Tiとを対応付けてタイマ管理テーブル6
1に登録する(S63)。この例の場合は、タイマ作動
制御処理部22から時間が通知されているので、タイマ
処理部6aは、通知された事象と時間とを対応付けてタ
イマ管理テーブル61に登録することになる。尚、タイ
マ処理部6aは、タイマ処理部6と同様に図5の流れ図
に示す処理も行っており、残り時間が0以下になった事
象をデッドロックチェック処理部7bに対して出力す
る。
When the control is passed, the timer operation control processing section 22 determines whether or not a time designation is included in the lock request command (FIG. 11 , S71). If the designation of the time is included (YES in S71), the time is notified to the timer processing unit 6a (S72).
The lock request is notified to the lock waiting queue processing unit 5b, and the request source is notified that the lock request is waiting for the lock (S78, S79). This ensures that the lock wait queue processing unit 5 lock wait queue processing unit 5b described above
The same processing is performed. Also, the timer processing unit 6a
0, as shown in the flowchart of FIG.
When the event is notified from the timer operation control processing unit 22
If the time has been notified (YES in S61), the
Timer management table in which the known event is associated with the time
61 is registered (S62), and the time is not notified.
(NO in S61) is determined in advance as the notified event.
Timer management table 6
1 (S63). In this case, the timer is activated
Since the time has been notified from the control processing unit 22, the timer
The processing unit 6a associates the notified event with the time, and
It will be registered in the image management table 61. In addition, Thailand
The processing section 6a is the same as the timer processing section 6 in FIG.
And the remaining time has become 0 or less.
Output the elephant to the deadlock check processing section 7b.
You.

【0054】また、上記ロック要求コマンドに、同期指
定が含まれている場合(S73がYES)は、ロック要
求コマンド処理部2は、直ちに、デッドロックチェック
処理部7bに対して、上記ロック要求をロック待ちにす
るとデッドロックが発生するか否かのチェックを行うこ
とを指示する(S74)。
If the lock request command includes a synchronization designation (YES in S73), the lock request command processing unit 2 immediately sends the lock request to the deadlock check processing unit 7b. When waiting for a lock, an instruction is issued to check whether a deadlock occurs (S74).

【0055】この指示に応答して、デッドロックチェッ
ク処理部7bは、デッドロックチェックを行い、その結
果をタイマ作動制御処理部22に通知する。
In response to this instruction, the deadlock check processing section 7b performs a deadlock check and notifies the timer operation control processing section 22 of the result.

【0056】チェック結果がデッドロック発生を示して
いる場合(S75がYES)は、タイマ作動制御処理部
22は、ホストインタフェース処理部1を介して要求元
にデッドロック発生を通知し(S76)。また、デッド
ロック発生を示していない場合(S75がNO)は、ロ
ック待ちキュー処理部5bに対してタイマ処理を行わな
いことを指示した後、ロック待ちキュー処理部5bに上
記ロック要求を渡し(S77,S78)、その後、要求
元にロック待ちになったことを通知する。(S79)。
If the check result indicates that a deadlock has occurred (YES in S75), the timer operation control processing section 22 notifies the request source of the occurrence of the deadlock via the host interface processing section 1 (S76). If no deadlock is indicated (NO in S75), the lock request processing unit 5b instructs the lock wait queue processing unit 5b not to perform the timer process, and then passes the lock request to the lock wait queue processing unit 5b ( (S77, S78), and then notifies the request source that the lock has been waited. (S79).

【0057】ロック待ちキュー処理部5bは、タイマ処
理を行わないことを指示された後にロック要求が渡され
た場合は、ロック管理テーブル4の更新処理のみを行
い、タイマ処理部6aに対するタイマ処理開始指示は行
わない。
When the lock request is passed after the instruction not to perform the timer processing, the lock waiting queue processing section 5b performs only the update processing of the lock management table 4 and starts the timer processing for the timer processing section 6a. No instructions are given.

【0058】このように、本実施例は、ロック要求コマ
ンド処理部2b,タイマ処理部6bを備えているので、
ロック要求コマンドに同期したデッドロックチェックを
行うこともできるし、ロック要求コマンドとは非同期の
タイミングでデッドロックチェックを行うこともでき
る。
As described above, since the present embodiment includes the lock request command processing unit 2b and the timer processing unit 6b,
The deadlock check synchronized with the lock request command can be performed, and the deadlock check can be performed at a timing asynchronous with the lock request command.

【0059】[0059]

【発明の効果】以上説明したように、本発明は、ロック
要求コマンドによるロック要求がロック待ちになり、且
つ上記ロック要求コマンドに、それと同期してデッドロ
ックチェックを行うことの指示が含まれていない場合、
所定時間経過後にその事象についてデッドロックチェッ
クを行うようにしたので、デッドロックチェックによっ
て後続するロック要求の処理が待たされることがなくな
り、その結果、コンピュータシステムの処理性能を向上
させることができる。更に、所定時間が経過する前に、
ロック待ちとなっているロック要求がロック可能になっ
た場合、デッドロックチェックそのものを不要とするこ
とができるので、排他制御装置の負荷を軽減し、排他制
御装置のスループットを高めることができる。
As described above, according to the present invention, the lock
Ri Do the lock request is a lock wait by the request command,
One of the above lock request commands
If you do not include instructions to perform a check,
Since the deadlock check is performed for the event after the lapse of the predetermined time, the processing of the subsequent lock request is not waited for by the deadlock check, and as a result, the processing performance of the computer system can be improved. Further, before the predetermined time has elapsed,
When a lock request waiting for a lock becomes lockable, deadlock check itself can be dispensed with, so that the load on the exclusive control device can be reduced and the throughput of the exclusive control device can be increased.

【0060】[0060]

【0061】また、本発明は、ロック要求コマンドに、
ロック要求コマンドと同期してデッドロックチェックを
行うことの指示が含まれ、且つそのロック要求について
資源のロックが不可能な場合、直ちに、デッドロックチ
ェック処理部に対してそのロック要求を待ちにするとデ
ッドロックが発生するか否かのチェックを行うことを指
示するタイマ作動制御処理部を備えているので、ロック
要求コマンド毎に、デッドロックチェックを所定時間経
過後に行うのか、直ちに行うのかを制御できる。従っ
て、要求元がTSSのように高速レスポンスを必要とす
るシステムである場合は、ロック要求コマンドにそれと
同期してデッドロックチェックを行うことの指示を含ま
せる等、要求元の特性に合った柔軟なシステム運用が可
能となる。
The present invention also provides a lock request command
If the instruction to perform the deadlock check in synchronization with the lock request command is included, and the resource cannot be locked for the lock request, immediately wait for the lock request to the deadlock check processing unit. Since the timer operation control processing unit for instructing to check whether a deadlock occurs is provided, it is possible to control whether the deadlock check is performed after a predetermined time elapses or immediately for each lock request command. . Therefore, if the request source is a system that requires a high-speed response such as the TSS, the lock request command may include an instruction to perform a deadlock check in synchronization with the request, and may be flexible according to the characteristics of the request source. System operation becomes possible.

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

【図1】本発明の前提となる技術を説明するためのブロ
ック図である。
FIG. 1 is a block diagram for explaining a technique which is a premise of the present invention.

【図2】ロック要求コマンド処理部2の処理例を示す流
れ図である。
FIG. 2 is a flowchart illustrating a processing example of a lock request command processing unit 2;

【図3】ロック待ちキュー処理部5の処理例を示す流れ
図である。
FIG. 3 is a flowchart illustrating a processing example of a lock waiting queue processing unit 5;

【図4】タイマ処理部6の処理例を示す流れ図である。FIG. 4 is a flowchart illustrating a processing example of a timer processing unit 6;

【図5】タイマ処理部6の処理例を示す流れ図である。FIG. 5 is a flowchart showing a processing example of a timer processing unit 6;

【図6】デッドロックチェック処理部7の処理例を示す
流れ図である。
FIG. 6 is a flowchart illustrating a processing example of a deadlock check processing unit 7;

【図7】ロック管理テーブル4の内容が変化する様子を
示す図である。
FIG. 7 is a diagram showing how the contents of the lock management table 4 change.

【図8】タイマ管理テーブル61の内容例を示す図であ
る。
FIG. 8 is a diagram showing a content example of a timer management table 61;

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

【図10】タイマ処理部6aの処理例を示す流れ図であ
る。
FIG. 10 is a flowchart showing a processing example of a timer processing unit 6a .
You.

【図11】タイマ作動制御処理部22の処理例を示す流
れ図である。
FIG. 11 is a flowchart showing a processing example of a timer operation control processing unit 22 ;

【図12】本発明を適用するコンピュータシステムの一
例を示すブロック図である。
FIG. 12 shows a computer system to which the present invention is applied .
It is a block diagram showing an example .

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

1…ホストインタフェース処理部 2…ロック要求コマンド処理部 3…アテンション処理部 4…ロック管理テーブル 5…ロック待ちキュー処理部 6…タイマ処理部 61…タイマ管理テーブル 7…デッドロックチェック処理 a…タイマ処理部 2b…ロック要求コマンド処理部 22…タイマ作動制御処理部 5b…ロック待ちキュー処理部 7b…デッドロックチェック処理部 11…排他制御装置 12…ディスク装置 A,B…ホストコンピュータ1 ... host interface unit 2 ... lock request command processing section 3 ... Attention processor 4 ... lock management table 5 ... lock queue processor 6 ... timer processing unit 61 ... timer management table 7 ... deadlock check processing unit 6 a ... Timer processing unit 2b Lock request command processing unit 22 Timer operation control processing unit 5b Lock wait queue processing unit 7b Deadlock check processing unit 11 Exclusive control unit 12 Disk device A, B Host computer

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 9/46 G06F 11/30 G06F 12/00 G06F 15/16 G06F 3/06 G06F 13/14──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 9/46 G06F 11/30 G06F 12/00 G06F 15/16 G06F 3/06 G06F 13/14

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 要求元からのロック要求コマンドを受け
付け、該ロック要求コマンドによるロック要求に対して
資源のロックが可能か否かを判定し、ロック不可能と判
定した場合は、更に、前記ロック要求コマンドにそれと
同期してデッドロックチェックを行うことの指示が含ま
れているか否かを判定し、前記指示が含まれていないと
判定した場合は、ロック不可能と判定したロック要求を
出力し、前記指示が含まれていると判定した場合は、前
記ロック要求をロック待ちにするとデッドロックが発生
するか否かのチェックを行うことの指示を出力し、その
チェック結果がデッドロックが発生することを示してい
る場合は、前記要求元に対してデッドロック発生を通知
し、デッドロックが発生しないことを示している場合
は、タイマ処理が不要であることの指示を出力すると共
に前記ロック要求を出力するロック要求コマンド処理部
と、 該ロック要求コマンド処理部から出力されたロック要求
をロック待ちにすると共に、前記ロック要求コマンド処
理部からタイマ処理が不要であることが指示されていな
い場合は、そのロック待ちの事象に対するタイマ処理の
開始を指示し、前記ロック要求コマンド処理部からタイ
マ処理が不要であることが指示されている場合は、その
ロック待ちの事象に対するタイマ処理の開始を指示しな
ロック待ちキュー処理部と、 該ロック待ちキュー処理部によってタイマ処理の開始が
指示された事象についてタイマ処理を開始し、タイマ処
理を開始した事象の内の、タイマ処理を開始してから予
め定められた一定時間が経過した事象をタイムアウトと
するタイマ処理部と、 該タイマ処理部でタイムアウトとされた事象についてデ
ッドロックが発生しているか否かをチェックすると共
に、前記ロック要求コマンド処理部からの指示に従った
デッドロックチェックを行うデッドロックチェック処理
部と、 該デッドロックチェック処理部がデッドロックを検出し
たとき、前記要求元にデッドロック発生を通知するアテ
ンション処理手段とを備えたことを特徴とする排他制御
装置。
1. A accepts the lock request command from the request source, and determines whether it is possible to lock a resource with respect to the lock request by the lock request command, if it is determined that the lock impossible, further, the locking With it to the request command
Includes instructions for performing synchronous deadlock checks
It is determined whether or not the instruction has been included.
If determined, the lock request that is determined to be impossible to lock
Output, and if it is determined that the instruction is included,
Deadlock occurs when a lock request is made to wait for a lock
Output an instruction to check whether or not to
The check result indicates that a deadlock occurs
The deadlock has occurred to the requestor.
And that no deadlock occurs
Outputs an indication that timer processing is not required.
Wherein the lock request command processing section for outputting a lock request, as well as the lock wait a lock request that is outputted from the lock request command processing section, the lock request command processing
Has not indicated that timer processing is unnecessary.
If the lock request command processing unit issues a timer
If it is indicated that no processing is required,
Do not give an instruction to start timer processing for an event waiting for lock.
A lock wait queue processing unit, and a timer process is started for an event for which the start of timer processing is instructed by the lock wait queue processing unit. a timer unit for the event a certain time has elapsed which is a time-out, as for the event is timed out by said timer processing unit checks whether a deadlock is occurring co
In accordance with the instruction from the lock request command processing unit
Exclusive control comprising: a deadlock check processing unit for performing a deadlock check; and attention processing means for notifying the request source of the occurrence of a deadlock when the deadlock check processing unit detects a deadlock. apparatus.
JP8188575A 1996-06-29 1996-06-29 Exclusive control unit Expired - Lifetime JP2850863B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8188575A JP2850863B2 (en) 1996-06-29 1996-06-29 Exclusive control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8188575A JP2850863B2 (en) 1996-06-29 1996-06-29 Exclusive control unit

Publications (2)

Publication Number Publication Date
JPH1021098A JPH1021098A (en) 1998-01-23
JP2850863B2 true JP2850863B2 (en) 1999-01-27

Family

ID=16226089

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8188575A Expired - Lifetime JP2850863B2 (en) 1996-06-29 1996-06-29 Exclusive control unit

Country Status (1)

Country Link
JP (1) JP2850863B2 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3546694B2 (en) * 1998-03-31 2004-07-28 日本電気株式会社 Multi-thread computer system and multi-thread execution control method
US8495131B2 (en) 2002-10-08 2013-07-23 International Business Machines Corporation Method, system, and program for managing locks enabling access to a shared resource
US7289992B2 (en) 2003-05-01 2007-10-30 International Business Machines Corporation Method, system, and program for lock and transaction management
US7496574B2 (en) 2003-05-01 2009-02-24 International Business Machines Corporation Managing locks and transactions
JP5939561B2 (en) 2011-12-02 2016-06-22 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Apparatus and method for acquiring resource lock
WO2014112066A1 (en) * 2013-01-17 2014-07-24 富士通株式会社 Information processing device, memory management method, and program
JP6263940B2 (en) * 2013-10-08 2018-01-24 株式会社リコー Exclusive control program, information processing apparatus, exclusive control method
CN103761182A (en) * 2013-12-26 2014-04-30 上海华为技术有限公司 Method and device for deadlock detection
WO2016160416A1 (en) * 2015-04-01 2016-10-06 Ab Inito Technology Llc Processing database transactions in a distributed computing system
CN109445951B (en) * 2018-10-31 2020-09-25 新华三技术有限公司 Information processing method and device
CN111538599A (en) * 2020-04-23 2020-08-14 杭州涂鸦信息技术有限公司 LINUX-based multithreading deadlock problem positioning method and system

Also Published As

Publication number Publication date
JPH1021098A (en) 1998-01-23

Similar Documents

Publication Publication Date Title
EP0618532B1 (en) Deadlock detecting device
US7281050B2 (en) Distributed token manager with transactional properties
EP0972240B1 (en) An agent-implemented locking mechanism
US5095421A (en) Transaction processing facility within an operating system environment
JP3197789B2 (en) Method and system for requesting manipulation of a directory in a distributed file system
US6226717B1 (en) System and method for exclusive access to shared storage
JP2850863B2 (en) Exclusive control unit
JPH07191944A (en) System and method for prevention of deadlock in instruction to many resources by multiporcessor
US20020138483A1 (en) Selective pessimistic locking for a concurrently updateable database
JPH06301588A (en) Transaction processing synchronizing method and commit processing method for transaction
JP4620871B2 (en) Monitor conversion in multi-threaded computer systems
US5764976A (en) Method and system of deadlock detection in a data processing system having transactions with multiple processes capable of resource locking
JPH10283243A (en) Data base management system
US6807547B2 (en) Method and apparatus for implementing timers for enterprise javabean components
JPH04271453A (en) Composite electronic computer
JPH1124973A (en) Distributed transaction matching method and machine readable recording medium to store program
JPH036751A (en) File-locking method and device
JP4476011B2 (en) Database system, database inconsistency avoidance method and program
JPS6336545B2 (en)
JP2569918B2 (en) Deadlock generator
JPS6320634A (en) Exclusive control system for computer resource
JPS63265336A (en) Control system for preference allocation of shared resources
JP3527389B2 (en) Inter-process communication method and inter-process communication system
JP2000259436A (en) Exclusive control method in distributed object environment
JP2961542B2 (en) Data processing system