JPS59180747A - System for automatically detecting dead lock - Google Patents

System for automatically detecting dead lock

Info

Publication number
JPS59180747A
JPS59180747A JP58055504A JP5550483A JPS59180747A JP S59180747 A JPS59180747 A JP S59180747A JP 58055504 A JP58055504 A JP 58055504A JP 5550483 A JP5550483 A JP 5550483A JP S59180747 A JPS59180747 A JP S59180747A
Authority
JP
Japan
Prior art keywords
task
resource
qel
dead lock
deadlock
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
JP58055504A
Other languages
Japanese (ja)
Inventor
Hideki Tanabe
英樹 田辺
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP58055504A priority Critical patent/JPS59180747A/en
Publication of JPS59180747A publication Critical patent/JPS59180747A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To quickly send a warning, by performing processing for detecting a dead lock with a processing routine which performs exclusive control and, processing for outputting a message indicating the occurrence of the dead lock when the dead lock is detected. CONSTITUTION:When an ENQ macro instruction is executed, an ENQ processing routine checks whether or not the resource designated by the instruction exists in the row of cue control blocks (QCB). When the resource does not exist, the routine adds a new QCB to the row and connects a cue element (QEL), and then, writes the address space identifier ASID and the address of a task control block DCB of the originating task in the QEL. When the resource exists, the routine connects a new QEL to the end of the QEL row and writes the ASID and TCB in the new QEL, and then, makes waiting display. Thereafter, the routine detects a dead lock and outputs a message indicating the incidence of the dead lock to a console picture.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、逐次使用可能ガ資源を排他的に使用するだめ
のマクロ命令を処理する処理ルーチンに、デッドロック
を検出する機能と、デッドロックが発生した場合にコン
ソール画面上にデッドロックの発生を示すメツセージを
出力する機能を付加したデッドロックの自動検出方式に
関するものである0 〔従来技術と問題点〕 りになる可能性がおる。しかしながら、従来技術におい
ては、デッドロックになってもオペレータへの通知が行
われていないため、発見が遅れ、また、異常に気がつい
た後の原因調査に時間がか−るという問題があった。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention provides a deadlock detection function and a deadlock detection function in a processing routine that processes macro instructions that are intended to exclusively use sequentially available resources. The present invention relates to an automatic deadlock detection method that has a function to output a message indicating the occurrence of a deadlock on the console screen when a deadlock occurs. However, in the conventional technology, even if a deadlock occurs, the operator is not notified, which causes a delay in discovery, and it takes time to investigate the cause after an abnormality is noticed.

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

本発明は、上記の考察に基づくものであって、デッドロ
ックの検出を進運に検出できると共にデッドロックの発
生をオペレータに通知できるようにしたデッドロックの
自動検出方式を提供することを目的としている。
The present invention is based on the above consideration, and an object of the present invention is to provide an automatic deadlock detection method that can detect deadlock in a timely manner and can notify an operator of the occurrence of deadlock. There is.

〔発明の構成〕[Structure of the invention]

そしてそのため、本発明のデッドロックの自動検出方式
は、タスクが排他制御を要求する命令を発生したときに
動作し、当該命令によって指定された資源が他のタスク
によって使用されているか否かを調べ、当該資源が他の
タスクによって既に使用されている場合には要求元のタ
スクを待ち状態とする処理ルーチンを具備する計算機に
おいて、上記処理ルーチンに、デッドロック検出処理を
行わせると共に1デッドロック検出時にデッドロック発
生を示すメツセージをコンソール画面上に出力させるた
めの処理を行わせることを特徴とするものである。
Therefore, the automatic deadlock detection method of the present invention operates when a task issues an instruction requesting exclusive control, and checks whether the resource specified by the instruction is being used by another task. , in a computer equipped with a processing routine that puts the requesting task in a waiting state if the resource is already being used by another task, causes the processing routine to perform deadlock detection processing and detects one deadlock. This feature is characterized in that a message indicating the occurrence of a deadlock is sometimes output on the console screen.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。第1図はデ
ッドロックを説明するだめの図、第2図はENQマクロ
命令による資源の排他制御を説明するための図である。
Hereinafter, the present invention will be explained with reference to the drawings. FIG. 1 is a diagram for explaining deadlock, and FIG. 2 is a diagram for explaining exclusive control of resources by the ENQ macro instruction.

第1図に示すように、タスクT1が資源Aを指定してE
NQマクロ命令を発行したとすると、ENQルーチンが
実行される。ENQルーチンは資源Aを使用している他
のタスクが存在しない場合には資源AをタスクT1に使
用させる。タスクT、は、資源Aを確保すると、それ以
後の処理を実行する。
As shown in FIG. 1, task T1 specifies resource A and
If the NQ macro instruction is issued, the ENQ routine is executed. The ENQ routine causes task T1 to use resource A if no other task is using resource A. When task T secures resource A, it executes subsequent processing.

タスクT2が資源Bを指定しENQマクロ命令を発行す
ると、同様にENQルーチンが実行される。
When task T2 specifies resource B and issues an ENQ macro instruction, the ENQ routine is similarly executed.

資源Bを使用している他のタスクが存在しない場合には
、タスクT、は資源Bを使用することが出来る。その後
において、タスクT、が資源Bを指定してENQマクロ
命令を発行すると、資源Bは既にタスクT、によって使
用されているので、タスクT。
If no other task is using resource B, task T can use resource B. After that, when task T issues an ENQ macro instruction specifying resource B, task T issues resource B because it is already being used by task T.

は待ち状態となる。また、タスクTtが資源Aを指定し
てENQマクロ命令を発行すると、資源Aは既にタスク
T1によって使用されているのでタスクT、も待ち状態
と々る。タスクT1とT2が共に待ち状態となると、デ
ッドロックが発生する。
is in a waiting state. Furthermore, when task Tt issues an ENQ macro instruction specifying resource A, task T also goes into a waiting state because resource A is already being used by task T1. If tasks T1 and T2 are both in a waiting state, a deadlock occurs.

第2図はENQマクロ命令による排他制御を説明するも
のである。第2図において、CVTはコントロール・ベ
クトル・テーブル、QCIftキュー・コント四−ル・
ブロック、QELはキュー・ニレメン)、ASIDはア
ドレス空間識別子、TCBはタスク・コン)o−ル・ブ
ロックをそれぞれ示している。なお、第を番目の主QC
Bと第1番目の副QCBは実質的に同じであると考えて
良い。
FIG. 2 explains exclusive control using the ENQ macro instruction. In Figure 2, CVT is a control vector table, QCIft queue control table,
QEL is a queue block, ASID is an address space identifier, and TCB is a task control block. In addition, the main QC
It may be considered that B and the first secondary QCB are substantially the same.

QCBは資源単位の管理表であり、また、QELのキュ
ー・ターミナルとなるものである。QELは、資源要求
者単位の管理表であり、キュー・ターミナルのQCBで
指定される資源を使用しているのは何の空間の何のタス
クであるか、或は資源の使用を待っているのは何の空間
の何のタスクであるか等を記録している。QCBにQE
Lアドレスが設定されている場合、その資源は使用中で
あり、先頭のQELに記録されているタスクがその資源
を使用していることを示している。
QCB is a resource unit management table and also serves as a queue terminal for QEL. QEL is a management table for each resource requester, and it shows what task in what space is using the resource specified by the QCB of the queue terminal, or what task is waiting for the resource to be used. It records what space, what task, etc. QE to QCB
If the L address is set, the resource is in use, indicating that the task recorded in the first QEL is using the resource.

デッドロック検出は以下の手順で行われる。Deadlock detection is performed in the following steps.

(イ) ENQマクロ命令の処理で要求元タスクを待ち
とする(他のタスクが要求資源を確保筒)場合、要求元
タスクに関して、以下の(ロ)ないしくニ)までのチェ
ックを行う。
(b) When the requesting task is placed in a wait state in the processing of the ENQ macro instruction (another task has secured the requested resource), the following (b) through (d) are checked regarding the requesting task.

(ロ)対象タスクが確保している資源があるかチェック
し、(各資源に対応する各QCBの先頭のQELを調べ
、ASID、TCBアドレスが一致するかチェックする
。)あれば、対象タスクが確保している全資源に関し、
以下の(ハ)ないしくニ)のチェックを行う。対象タス
クが確保している資源がない場合は、対象タスクに関す
るチェックは終了する。
(b) Check whether there are resources secured by the target task (check the QEL at the beginning of each QCB corresponding to each resource, and check whether the ASID and TCB address match). Regarding all the resources we have secured,
Check (c) or d) below. If there are no resources secured by the target task, the check regarding the target task ends.

(ハ)対象資源は、現要求資源と同一であるかチェック
し、同一であればデッドロック発生として全チェックを
終了する。同一でない場合はさらにに)のチェックを行
う。
(c) Check whether the target resource is the same as the currently requested resource, and if they are the same, it is assumed that a deadlock has occurred and all checks are terminated. If they are not the same, check further).

に)対象資源を待っているタスクがあるか(2番目以降
のQELが存在するか)チェックし、もしあれば、その
全タスクに関して、(ロ)ないしくニ)のチェックを行
う。ない場合は、対象資源に関する処理を終了する。
b) Check whether there is a task waiting for the target resource (if there is a second or subsequent QEL), and if there is, check (b) or d) for all the tasks. If there is no such resource, the processing related to the target resource ends.

ENQマクロ命令が実行されると、ENQ処理ルーチン
は、そのENQマクロ命令で指定された資源がQCBの
列の中に存在するか否かを調べ、存在しない場合にはそ
のENQマクロ命令で指定された資源を管理するだめの
新たなQCBを008列につなぎ、この新たなQCBに
QELをつなぎ、このQELの中に発行元タスクのアド
レス空間識別子ASIDおよびTCBアドレスを書込む
When an ENQ macro instruction is executed, the ENQ processing routine checks whether the resource specified by the ENQ macro instruction exists in the column of the QCB and, if not, returns the resource specified by the ENQ macro instruction. A new QCB for managing the acquired resources is connected to column 008, a QEL is connected to this new QCB, and the address space identifier ASID and TCB address of the issuing task are written in this QEL.

存在する場合には、ENQ処理ルーチンは、そのQCB
をキー−・ターミナルとするQEL列の最後に新たにQ
ELをつなぎ、この新たなQELO中に要求元タスクの
アドレス空間識別子ASIDおよびTCBアドレスを書
込み、対応するTCBに待ちの表示をし、しかる後にデ
ッドロック検出を行う。デッドロックが検出されると、
ENQ処理ルーチンは、デッドロックが発生したことを
示すメツセージをコンソール画面上に出力するだめの処
理を行う。
If so, the ENQ processing routine
Add a new Q at the end of the QEL sequence with
EL is connected, the address space identifier ASID and TCB address of the requesting task are written in this new QELO, a waiting indication is given to the corresponding TCB, and deadlock detection is then performed. When a deadlock is detected,
The ENQ processing routine performs processing to output a message on the console screen indicating that a deadlock has occurred.

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

以上の説明から明らかなように、本発明によれば、排他
制御を行う処理ルーチンに、デッドロックを検出する処
理を行わせると共に1デツドロツクが検出されたときデ
ッドロックの発生を示すメソセージを出力するだめの処
理を行わせるようにしたので、デッドロック発生を速や
かに知ることが出来る。
As is clear from the above description, according to the present invention, a processing routine that performs exclusive control is caused to perform processing for detecting deadlock, and when one deadlock is detected, a message indicating the occurrence of deadlock is output. Since deadlock processing is performed, the occurrence of deadlock can be quickly detected.

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

第1図はデッドロックを説明するための図、第2図はE
NQマクロ命令による資源の排他制御を説明するだめの
図である。 CVT・・・コントロール・ベクトル・テーブル、QC
B・・・キュー・コントロール・ブロック、QEL・・
・キュー・エレメント、ASID・・・アドレス空間識
別子、 T CB・・・タスク・コントロール曖ブロッ
ク。 特許出願人 富士通株式会社 代理人弁理士 京 谷 四 部
Figure 1 is a diagram to explain deadlock, Figure 2 is E
FIG. 3 is a diagram illustrating exclusive control of resources by NQ macro instructions. CVT...Control vector table, QC
B...Queue control block, QEL...
- Queue element, ASID...address space identifier, TCB...task control ambiguous block. Patent Applicant: Fujitsu Limited Representative Patent Attorney Yotsube Kyotani

Claims (1)

【特許請求の範囲】[Claims] タスクが排他制御を要求する命令を発生したときに動作
し、当該命令によって指定された資源が他のタスクによ
って使用されているか否かを調べ、当該資源が他のタス
クによって既に使用されている場合には要求元のタスク
を待ち状態とする処理ルーチンを具備する計算機におい
て、上記処理ルーチンに、デッドロック検出処理を行わ
せると共に、デッドロック検出時にデッドロック発生を
示すメツセージをコンソール画面上に出力させるための
処理を行わせることを特徴とするデッドロックの自動検
出方式。
Operates when a task issues an instruction that requests exclusive control, checks whether the resource specified by the instruction is being used by another task, and if the resource is already being used by another task. In a computer equipped with a processing routine that puts the requesting task in a waiting state, make the above processing routine perform deadlock detection processing and output a message indicating the occurrence of deadlock on the console screen when deadlock is detected. An automatic deadlock detection method characterized by causing processing to be performed.
JP58055504A 1983-03-31 1983-03-31 System for automatically detecting dead lock Pending JPS59180747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58055504A JPS59180747A (en) 1983-03-31 1983-03-31 System for automatically detecting dead lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58055504A JPS59180747A (en) 1983-03-31 1983-03-31 System for automatically detecting dead lock

Publications (1)

Publication Number Publication Date
JPS59180747A true JPS59180747A (en) 1984-10-13

Family

ID=13000492

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58055504A Pending JPS59180747A (en) 1983-03-31 1983-03-31 System for automatically detecting dead lock

Country Status (1)

Country Link
JP (1) JPS59180747A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS649544A (en) * 1987-07-02 1989-01-12 Fujitsu Ltd Enq resource monitoring system
JPS6470838A (en) * 1987-09-11 1989-03-16 Hitachi Ltd Exclusive control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS649544A (en) * 1987-07-02 1989-01-12 Fujitsu Ltd Enq resource monitoring system
JPS6470838A (en) * 1987-09-11 1989-03-16 Hitachi Ltd Exclusive control system

Similar Documents

Publication Publication Date Title
US6807575B1 (en) Performance monitoring method in a distributed processing system
US11593107B2 (en) Handling an input/output store instruction
CN109491928A (en) Buffer control method, device, terminal and storage medium
JP2706602B2 (en) Interrupt retry reduction device
US20090292765A1 (en) Method and apparatus for providing a synchronous interface for an asynchronous service
JPH05250337A (en) Multiprocessor system having microprogram means for dispatching processing to processor
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
JPS59180747A (en) System for automatically detecting dead lock
JPS63228335A (en) Event information and reception processing system in computer system
JP3681415B2 (en) Deadlock detection device
CN117688014A (en) Data writing method and device, electronic equipment and storage medium
JPS6125249A (en) Exclusive control system
JPS6072039A (en) Normal operation monitoring method of multi-task program
JPH05100984A (en) Machine resource management system
JPH06187312A (en) Processing method and its device in multi-cpu system
JPH0449146B2 (en)
JPH0581051A (en) Resource destruction supervisory system
JPH01140250A (en) Deadlock information collecting system
JPH096652A (en) Trace collection method and computer system
JPS638962A (en) Buffer control system
JPH03255566A (en) Inter-processor communication system
JPH06266630A (en) Input/output controller with trace function
JPH0241782B2 (en)
JPH0553889A (en) File access processing system for plural os
JPH07234850A (en) Device and method for multiprocessor system