JPH0361209B2 - - Google Patents

Info

Publication number
JPH0361209B2
JPH0361209B2 JP58055514A JP5551483A JPH0361209B2 JP H0361209 B2 JPH0361209 B2 JP H0361209B2 JP 58055514 A JP58055514 A JP 58055514A JP 5551483 A JP5551483 A JP 5551483A JP H0361209 B2 JPH0361209 B2 JP H0361209B2
Authority
JP
Japan
Prior art keywords
task
deadlock
occupancy
request
cancel
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
JP58055514A
Other languages
Japanese (ja)
Other versions
JPS59180748A (en
Inventor
Hiromichi Kaneko
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 JP58055514A priority Critical patent/JPS59180748A/en
Publication of JPS59180748A publication Critical patent/JPS59180748A/en
Publication of JPH0361209B2 publication Critical patent/JPH0361209B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

〔発明の技術分野〕 本発明は、タスクからの資源占有要求が競合し
てデツドロツク状態になつたとき、デツドロツク
出口を有しているか否か、インタラクテイブ処理
を行つているか或はバツチ処理を行つているか等
を勘案してデツドロツク・キヤンセルすべきタス
クを定めるようにしたデツドロツク・キヤンセル
のスケジユーリング方式に関するものである。 〔従来技術と問題点〕 第1図はデツドロツクを説明するための図であ
り、第1図において、AないしEはタスク、DA1
ないしDA5はデータセツトをそれぞれ示してい
る。いま、タスクAがデータセツトDA1を、タス
クBがデータセツトDA2を、タスクCがデータセ
ツトDA3を、タスクDがデータセツトDA4を、タ
スクEがデータセツトDA5を占有しているものと
する。この状態の下において、タスクBがデータ
セツトDA1を指定して占有要求を発行すると、タ
スクBはタスクAがデータセツトDA1を解放する
迄で待ち状態になる。同様に、この状態の下でタ
スクCがデータセツトDA2を指定して占有要求を
発行するとタスクCは待状態になり、タスクDが
データセツトDA3を指定して占有要求を発行する
と、タスクDは待状態になり、タスクEがデータ
セツトDA4を指定して占有要求を発行するとタス
クEは待状態となる。タスクBないしEが待ち状
態となつている状態の下で、タスクAがデータセ
ツトDA5を指定して占有要求を発行すると、タス
クAないしEの全てが待ち状態になり、デツドロ
ツクが発生する。 従来技術においては、デツドロツクが発生する
と、デツドロツクのトリガを引いたタスク(上述
の例ではタスクA)に対してデツドロツク・キヤ
ンセルを行つていた。デツドロツク・キヤンセル
されたタスクがデツドロツク・キヤンセル出口を
持たないと、このタスクは異常終了してしまい、
オペレータ等によつてそのタスクを再起動するこ
とが必要となる。 〔発明の目的〕 本発明は、上記の考察に基づくものであつて、
デツドロツク・キヤンセルを行うに当つて、デツ
ドロツク出口を有するか否か、及びインタラクテ
イブ処理を行つているか否か等を考慮してデツド
ロツク・キヤンセルを行い、デツドロツクによる
システムの利用率の低下を可能な限り少なくでき
るようにしたデツドロツク・キヤンセルのスケジ
ユーリング方式を提供することを目的としてい
る。 〔発明の構成〕 そしてそのため、本発明のデツドロツク・キヤ
ンセルのスケジユーリング方式は、タスクに対し
てデツドロツク・キヤンセル・プライオリテイを
与え、デツドロツクが発生したとき、動作不能状
態にある複数のタスクのデツドロツク・キヤンセ
ル・プライオリテイに基づいて上記動作不能状態
にある複数のタスクの中から1個のデツドロツ
ク・キヤンセルすべきタスクを決定することを特
徴とするものである。 〔発明の実施例〕 以下、本発明を図面を参照しつつ説明する。 第2図は第3図で用いられているブロツクおよ
び矢印の意味を説明するための図、第3図は本発
明の1実施例のブロツク図である。 第2図に示すように、第3図の単なる空白のブ
ロツクは情報を示し、両側が2重線のブロツクは
プロセツサ(処理手段や制御手段)を示し、矢印
をもつ細い実線は参照を示し、矢印をもつ太い白
線は更新を示し、矢印をもつ斜線付きの太線は制
御を示している。 第3図において、1は資源の占有要求情報、2
は占有可否判定部、3は占有登録部、4は占有要
求結果通知部、5は占有要求結果情報、6はデツ
ドロツク検出&キヤンセル・タスク決定部、7は
占有待制御部、8はデツドロツク・キヤンセル制
御部、9は占有状況情報記憶部、10は占有待情
報記憶部、11はタスク属性情報記憶部をそれぞ
れ示している。 占有可否判定部2は、資源の占有要求情報1が
送られて来ると、占有状況情報記憶部9の内容を
参照し、占有可であるか、占有不可であるかを判
定する。占有可である場合には、占有登録部3
は、占有要求を発したタスクの名前と占有要求の
対象となつた資源の名前とを関連づけて占有状況
情報記憶部9に書込む、この占有登録がなされた
後、占有結果通知部4によつて占有可の占有要求
結果状報が所定の管理部に送られる。占有可否判
定部2が占有不可と判定した場合には、次にデツ
ドロツク検出&キヤンセル・タスク決定部6が動
作する。デツドロツク検出&キヤンセル・タスク
決定部6は、占有要求を発したタスクの名前、占
有要求の対象である資源の名前、占有要求の対象
である資源を占有しているタスクの名前、占有待
情報記憶部10の内容およびタスク属性情報記憶
部11の内容を参照し、デツドロツクが発生して
いないと判定した場合には占有要求発行元のタス
クを占有待ちとすべきものとし、デツドロツクが
発生していると判定した場合にはデツドロツク・
キヤンセルすべきタスクを決定する。占有要求を
発行したタスクを占有待ちにすべきものであると
決定された場合には、占有制御部7によつて占有
待情報記憶部10の内容が更新され、次いで占有
結果通知部4によつて占有要求を発行したタスク
を占有待ちすべきことを指示する占有要求結果情
報が所定の管理部に送られる。デツドロツクが発
生しデツドロツク・キヤンセルすべきタスクが決
定された場合には、デツドロツク・キヤンセル制
御部8によつて占有状況情報記憶部9および占有
待情報記憶部11が更新され、次いで占有結果通
知部4によつて占有要求を発行したタスクをデツ
ドロツク・キヤンセルすべきことを指示する占有
要求結果情報が所定の管理部に通知する。 占有待情報記憶部10には、占有要求を発行し
たタスクの名前、当該占有要求の対象となつた資
源の名前および当該資源を現に占有しているタス
クの名前より成る占有待情報が記憶されている。
また、タスク属性情報記憶部11には、タスクの
名前と当該タスクのデツドロツク・キヤンセル・
プライオリテイより成るタスク属性情報が格納さ
れている。デツドロツク・キヤンセル・プライオ
リテイは、例えば、デツドロツク出口をもつイン
タラクテイブ処理を行うものについては“1”、
デツドロツク出口をもつバツチ処理を行うものに
ついては“2”、デツドロツク出口をもたないイ
ンタラクテイブ処理を行うものについては“3”、
デツドロツク出口を持たないバツチ処理を行うも
のについては“4”とされる。なお、数値が大き
い程、プライオリテイが高いものとする。 次に、デツドロツク検出論理について説明す
る。占有待ちは2つのタスクの関係であり、一方
のタスクが他方のタスクの占有している資源の解
放を待つている場合、「一方のタスクが他方のタ
スクに対して占有待ちしている。」と表現する。
第3図のデツドロツク検出&キヤンセル・タスク
決定部6は、占有要求された資源を占有している
タスクの名前が占有待情報記憶部10の中に存在
するか否かを調べ、存在する場合にはそのタスク
を先頭として占有待関係にあるタスクの名前とそ
のデツドロツク・キヤンセル・プライオリテイを
次々にレジスタに格納して行き、下記のようなタ
スク占有待関係表を作成する。
[Technical Field of the Invention] The present invention provides a method for determining whether a task has a deadlock exit or not, whether interactive processing is being performed, or whether batch processing is being performed when a task enters a deadlock state due to conflicting resource occupation requests. This invention relates to a deadlock/cancellation scheduling method in which tasks to be deadlocked/cancelled are determined by taking into consideration whether the current level of the deadlock/cancellation is present or not. [Prior art and problems] Figure 1 is a diagram for explaining deadlock. In Figure 1, A to E are tasks, and DA 1
to DA 5 indicate the data sets, respectively. Currently, task A occupies dataset DA 1 , task B occupies dataset DA 2 , task C occupies dataset DA 3 , task D occupies dataset DA 4 , and task E occupies dataset DA 5 . shall be taken as a thing. Under this state, when task B issues an exclusive request specifying data set DA1 , task B enters a wait state until task A releases data set DA1 . Similarly, under this state, when task C specifies dataset DA 2 and issues an exclusive request, task C enters the waiting state, and when task D specifies dataset DA 3 and issues an exclusive request, task C enters the waiting state. D enters the waiting state, and when task E issues an exclusive request specifying data set DA 4 , task E enters the waiting state. If task A issues an exclusive request specifying data set DA 5 while tasks B to E are in the waiting state, all of the tasks A to E become in the waiting state and a deadlock occurs. In the prior art, when a deadlock occurs, a deadlock is canceled for the task that pulled the deadlock trigger (task A in the above example). If a task that has been canceled due to a deadlock does not have a deadlock cancel exit, this task will terminate abnormally.
The task must be restarted by an operator or the like. [Object of the invention] The present invention is based on the above considerations, and includes:
When performing deadlock cancellation, consider whether or not there is a deadlock exit, whether or not interactive processing is being performed, etc. when performing deadlock cancellation, and reduce the system utilization rate due to deadlock as much as possible. The purpose of this invention is to provide a scheduling method for deadlock cancellation that can reduce the number of deadlock cancellations. [Structure of the Invention] Therefore, the deadlock cancellation scheduling method of the present invention gives a deadlock cancellation priority to tasks, and when a deadlock occurs, the deadlock cancellation of multiple tasks in an inoperable state is performed. - One task to be deadlocked and canceled is determined from among the plurality of tasks in the inoperable state based on the cancel priority. [Embodiments of the Invention] The present invention will be described below with reference to the drawings. FIG. 2 is a diagram for explaining the meanings of blocks and arrows used in FIG. 3, and FIG. 3 is a block diagram of one embodiment of the present invention. As shown in FIG. 2, the simply blank blocks in FIG. 3 indicate information, the blocks with double lines on both sides indicate processors (processing means or control means), and the thin solid lines with arrows indicate references. A thick white line with an arrow indicates an update, and a thick diagonal line with an arrow indicates a control. In FIG. 3, 1 is resource occupancy request information, 2
3 is an occupancy determination unit, 3 is an occupancy registration unit, 4 is an occupancy request result notification unit, 5 is an occupancy request result information, 6 is a deadlock detection & cancel task determination unit, 7 is an occupancy wait control unit, and 8 is a deadlock cancellation unit. Reference numeral 9 indicates an occupancy status information storage section, numeral 10 indicates an occupancy status information storage section, and numeral 11 indicates a task attribute information storage section. When the resource occupancy request information 1 is sent, the occupancy determination unit 2 refers to the contents of the occupancy status information storage unit 9 and determines whether occupancy is possible or not. If the possession is possible, the possession registration section 3
After this occupancy registration is performed, the occupancy result notifying unit 4 writes the name of the task that issued the occupancy request and the name of the resource that is the object of the occupancy request in association with the occupancy status information storage unit 9. Then, an occupancy request result status indicating that occupancy is possible is sent to a predetermined management section. When the occupancy determination section 2 determines that the occupancy is not possible, the deadlock detection and cancel task determination section 6 operates next. The deadlock detection & cancel task determination unit 6 stores the name of the task that issued the occupation request, the name of the resource that is the subject of the occupation request, the name of the task that occupies the resource that is the subject of the occupation request, and information on waiting for occupation. The contents of the section 10 and the task attribute information storage section 11 are referred to, and if it is determined that no deadlock has occurred, the task of the source of the occupation request is to be placed in a waiting state for occupation, and if a deadlock has occurred. If it is determined, the
Decide which tasks to cancel. If it is determined that the task that issued the occupancy request should be placed in the occupancy wait state, the occupancy control section 7 updates the contents of the occupancy wait information storage section 10, and then the occupancy result notification section 4 updates the contents of the occupancy wait information storage section 10. Occupancy request result information is sent to a predetermined management unit, instructing that the task that issued the occupation request should wait for exclusive use. When a deadlock occurs and a task to be deadlocked or canceled is determined, the deadlock/cancellation control section 8 updates the occupancy status information storage section 9 and the occupancy waiting information storage section 11, and then the occupancy result notification section 4 The predetermined management unit is notified of occupancy request result information instructing that the task that issued the occupancy request should be deadlocked and canceled. The exclusive waiting information storage unit 10 stores exclusive waiting information consisting of the name of the task that issued the exclusive request, the name of the resource that was the subject of the exclusive request, and the name of the task that is currently occupying the resource. There is.
The task attribute information storage unit 11 also contains the name of the task, deadlock/cancellation of the task, etc.
Task attribute information consisting of priorities is stored. For example, the deadlock cancel priority is "1" for interactive processing with a deadlock exit;
"2" for batch processing with a deadlock exit; "3" for interactive processing without a deadlock exit;
It is set to "4" for those that perform batch processing without a deadlock exit. Note that the larger the value, the higher the priority. Next, the deadlock detection logic will be explained. Waiting for exclusive use is a relationship between two tasks, and if one task is waiting for the release of a resource occupied by the other task, then "one task is waiting for exclusive use of the other task." Expressed as.
The deadlock detection & cancel task determination unit 6 in FIG. starts by storing the names of the tasks in the exclusive waiting relationship and their deadlock/cancel/priorities one after another in the register, creating a task exclusive waiting relationship table as shown below.

【表】【table】

Claims (1)

【特許請求の範囲】[Claims] 1 タスクに対してデツドロツク・キヤンセル・
プライオリテイを付与し、デツドロツクが発生し
たとき、動作不能状態にある複数のタスクのデツ
ドロツク・キヤンセル・プライオリテイに基づい
て上記動作不能状態にある複数のタスクの中から
1個のデツドロツク・キヤンセルすべきタスクを
決定することを特徴とするデツドロツク・キヤン
セルのスケジユーリング方式。
1 Deadlock, cancel, and
A priority is assigned, and when a deadlock occurs, one task should be canceled from among the multiple tasks in an inoperable state based on the deadlock cancel priority of the multiple tasks in an inoperable state. A deadlock/cancel scheduling method characterized by determining tasks.
JP58055514A 1983-03-31 1983-03-31 System for scheduling dead lock cancel Granted JPS59180748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58055514A JPS59180748A (en) 1983-03-31 1983-03-31 System for scheduling dead lock cancel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58055514A JPS59180748A (en) 1983-03-31 1983-03-31 System for scheduling dead lock cancel

Publications (2)

Publication Number Publication Date
JPS59180748A JPS59180748A (en) 1984-10-13
JPH0361209B2 true JPH0361209B2 (en) 1991-09-19

Family

ID=13000797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58055514A Granted JPS59180748A (en) 1983-03-31 1983-03-31 System for scheduling dead lock cancel

Country Status (1)

Country Link
JP (1) JPS59180748A (en)

Also Published As

Publication number Publication date
JPS59180748A (en) 1984-10-13

Similar Documents

Publication Publication Date Title
US5956712A (en) Byte range locking in a distributed environment
TWI239450B (en) Apparatus, computer readable recording medium, and method for yielding to a processor within a logically partitioned data processing system
EP0425320A2 (en) Multiprocessor system and process synchronisation method therefor
US20090271796A1 (en) Information processing system and task execution control method
JPH05197671A (en) Master and slave communication method
JPH0361209B2 (en)
JPH09223032A (en) Resources lock control mechanism
JPH0844662A (en) Information processor
JPS6125249A (en) Exclusive control system
JP2752894B2 (en) File transfer device
JPS63146153A (en) System for processing interprocessor exclusive control
JPH01258135A (en) Transaction execution control system
JPH01305461A (en) Right of using bus control system
JPS62182950A (en) Buffer administration system
JP2000003287A (en) Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program
JPS6265137A (en) Control system for priority of user task
JPS58165164A (en) Managing system of information source
JPH09330241A (en) Exclusive deadlock prevention control system
JPS58115569A (en) Multiprocessor system
JPH03177960A (en) Inter-processor memory exclusive control system
JPH05265969A (en) Communication method between cpu and service processor
JPH0679284B2 (en) De-dock prevention method for distributed database system
JPH02304667A (en) Information transfer controlling system
JPS62173535A (en) Access control system for shared resources
JPH01266640A (en) Equivalent property guarantee processing system for duplex volume