JPH03260734A - Resources control system for computer system - Google Patents
Resources control system for computer systemInfo
- Publication number
- JPH03260734A JPH03260734A JP5973490A JP5973490A JPH03260734A JP H03260734 A JPH03260734 A JP H03260734A JP 5973490 A JP5973490 A JP 5973490A JP 5973490 A JP5973490 A JP 5973490A JP H03260734 A JPH03260734 A JP H03260734A
- Authority
- JP
- Japan
- Prior art keywords
- resources
- resource
- program
- time
- timer
- 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
Links
Abstract
Description
【発明の詳細な説明】
A、産業上の利用分野
本発明は、コンピュータシステムの資源管理方式に係り
、特にデッドロ゛ツク回避方式に関する。DETAILED DESCRIPTION OF THE INVENTION A. Field of Industrial Application The present invention relates to a resource management method for a computer system, and more particularly to a deadlock avoidance method.
B1発明の概要
本発明は、アプリケーションプログラムからの資源確保
要求に対して資源管理プログラムがシステムの各資源を
割り当てる資源管理方式において、資源待ちが発生した
ときにプログラム優先順位等で定める時間後に資源確保
完了処理を強制的に行うことにより、
誤った資源確保要求によるシステム運用への影響を少な
くしたものである。B1 Summary of the Invention The present invention provides a resource management method in which a resource management program allocates each resource of a system in response to a resource reservation request from an application program, in which resources are secured after a time determined by program priority when a resource wait occurs. By forcibly performing completion processing, the impact on system operation due to erroneous resource reservation requests is reduced.
C1従来の技術 コンピュータシステムの資源になる周辺装置。C1 Conventional technology A peripheral device that becomes a resource for a computer system.
ファイル、メモリ等の管理には、多くのアプリケーショ
ンプログラムの実行に必要な資源の確保要求を受は付け
、また実行終了時に資源の解放を行う資源管理プログラ
ムが用意される。To manage files, memory, etc., a resource management program is prepared that accepts requests to secure resources necessary for executing many application programs and releases the resources when the execution ends.
従来の管理方式は、アプリケーションプログラムからの
資源確保要求を資源要求待ち行列に順次登録又は各プロ
グラムが持つ優先度の高い順に登録し、FIFO(Fi
rst In FirstOut)に従って資源
を割り当て、当該プログラムの資源解放要求に従って当
該資源の解放を行う。The conventional management method is to register resource reservation requests from application programs in a resource request queue sequentially or in the order of the priority of each program.
rst In FirstOut), and releases the resources in accordance with the resource release request of the program.
このような資源管理プログラムにおいて、システムのデ
ッドロックの問題がある。このデッドロックは、複数の
プログラムが資源の確保要求順位を誤って行った場合に
生じる。例えば、第2図に示すようにプログラムAが資
源Xを確保し、プログラムBが資源Yを確保している状
態で、次の処理でプログラムAが資源Yを確保要求した
ときにプログラムBが資源Xを確保要求すると、プログ
ラムA、B共に相手が確保する資源を解除するまで半永
久的な待ち状態(すくみ状態)となる。In such resource management programs, there is a problem of system deadlock. This deadlock occurs when multiple programs make a mistake in the order in which they request to secure resources. For example, as shown in Figure 2, in a state where program A has secured resource X and program B has secured resource Y, when program A requests to secure resource Y in the next process, program B When a request is made to secure X, both programs A and B enter a semi-permanent waiting state (frozen state) until the other party releases the secured resources.
上述のデッドロックの発生は、システム設計段階で回避
しようとするが、システムの大規模化によってバグとし
て残ってしまう可能性があり、システムの運用中にバグ
が発生した場合に単独で異常ならば影響は少ないが、ね
ずみ算式にすくみ状態が発生拡大するとシステム全体と
しての機能不能(システムダウン)になる恐れがある。Although attempts are made to avoid the occurrence of the deadlock described above at the system design stage, there is a possibility that it will remain as a bug as the system becomes larger. Although the impact is small, if a paralyzing situation develops and spreads, there is a risk that the entire system will be unable to function (system down).
従来にデッドロック回避方式としては、必要な資源をす
べて確保できない限り何も資源を確保しないようにする
もの(オール・オア・ナッシング)がある。例えば、第
2図において、プログラムAが資源Yを確保要求したと
きにプログラムBが資源Yを既に確保しているとき、プ
ログラムAは資源Yを確保できないため資源Xも解放し
、これによりプログラムBが資源YとXの両方を確保し
てその処理の実行を可能とし、プログラムAはプログラ
ムBの処理終了後に両前源X、Yの確保ができる。Conventional deadlock avoidance methods include all-or-nothing methods in which no resources are secured unless all necessary resources are secured. For example, in FIG. 2, when program A requests to secure resource Y, if program B has already secured resource Y, program A cannot secure resource Y, so it also releases resource X, and as a result, program B program A can secure both resources Y and X to execute its processing, and program A can secure both resources X and Y after program B completes its processing.
D1発明が解決しようとする課題
従来のデッドロック回避方式は、資源を確保できなかっ
たプログラムがすべての資源を解放するため、当該プロ
グラムは使用する資源のすさでか解放されるまで待ち状
態となる。このため、オンラインシステムに適用した場
合に運用不能等の弊害を生じる課題があった。D1 Problem to be solved by the invention In the conventional deadlock avoidance method, a program that cannot secure resources releases all resources, so the program is placed in a waiting state until the resources it uses are exhausted or are released. . Therefore, when applied to an online system, there is a problem that it causes problems such as inoperability.
例えば、電力系統の監視制御システムに従来にプツトロ
ック回避方式を適用すると、CRTの機器監視のための
システム系統図表示を行うプログラムが資源CRTの確
保ができないですべての資源を解放した待ち状態に入る
と電力系統の監視不能となり、その間の機器状態変化等
を知ることができなくなる。For example, when a conventional put-lock avoidance method is applied to a power system monitoring and control system, a program that displays a system diagram for monitoring CRT equipment cannot secure the resource CRT and enters a waiting state with all resources released. It becomes impossible to monitor the power system, and it becomes impossible to know changes in equipment status during that time.
また、従来の資源管理方式には資源の重複確保要求に対
する対応処理かなされていな・い。この重複確保要求は
、同一プログラムがバグ等によって誤って同一資源に対
して2度の資源確保要求をするもので、資源管理プログ
ラムは2度目の資源の要求に資源割り当て不能処理を行
い、資源要求したプログラムは半永久的に資源待ち状態
になってしまう。Furthermore, conventional resource management methods do not handle requests for duplicative resource allocation. This duplicate reservation request occurs when the same program mistakenly requests the same resource twice due to a bug, etc., and the resource management program handles the second resource request as unable to allocate the resource. The program will be in a state of waiting for resources semi-permanently.
本発明の目的は、誤った資源確保要求によるシステム運
用への影響を少なくした資源管理方式を提供することに
ある。An object of the present invention is to provide a resource management method that reduces the influence of erroneous resource reservation requests on system operation.
E1課題を解決するための手段と作用
本発明は、前記目的を達成するため、複数のアプリケー
ションプログラムからの資源確保要求に応じて資源管理
プログラムが各資源の割り当てと該資源の解放を行う資
源管理方式において、前記資源管理プログラムは、前記
資源確保要求に対して資源待ちの発生から計時するタイ
マーと、前記資源確保要求に対して当該プログラムの優
先順位と資源占有率と資源重要度と資源確保順位等をパ
ラメータとして資源待ち時間を決定する判別部とを備え
、前記判別部で決定した時間に前記タイマーの計時が一
致したときに資源確保完了処理を強制的に行うようにし
、デッドロックによる資源待ち発生時に判別部で判別す
る時間後に強制的に資源確保完了として各プログラムの
処理を実行させ、資源の半永久的な待ち状態を解除し、
一部のプログラムが資源欠きを起こした場合もシステム
の運用を確保する。Means and Effects for Solving Problem E1 In order to achieve the above object, the present invention provides resource management in which a resource management program allocates and releases each resource in response to resource reservation requests from a plurality of application programs. In the method, the resource management program includes a timer that measures time from the occurrence of resource waiting in response to the resource reservation request, and a priority, resource occupancy, resource importance, and resource reservation order of the program in response to the resource reservation request. and a determination unit that determines the resource waiting time using parameters such as the above, and when the time determined by the determination unit matches the time measured by the timer, the resource reservation completion process is forcibly performed, and the resource waiting time due to deadlock is prevented. After the time determined by the determination unit at the time of occurrence, the resource reservation is forcibly completed and the processing of each program is executed, and the semi-permanent waiting state of the resource is released.
To ensure system operation even when some programs run out of resources.
F、実施例
第1図は本発明の一実施例を示す資源管理プログラムの
機能構成図である。イベントバッファlはアプリケーシ
ョンプログラムの各機能A−X別のプログラム2A〜2
Xからの資源確保要求に対する資源管理を行う。この資
源管理は従来と同様のFIFOに従って行われる。F. Embodiment FIG. 1 is a functional configuration diagram of a resource management program showing an embodiment of the present invention. The event buffer l is a program 2A to 2 for each function A to X of the application program.
Performs resource management in response to requests from X to secure resources. This resource management is performed according to FIFO as in the past.
上述の資源管理に加えて、イベントバッファlはプログ
ラム2A〜2xからの資源確保要求が逆順要求になって
デッドロックが発生した場合のデッドロック回避機能及
び同じプログラムからの資源重複要求に対する資源待ち
解除機能を備える。In addition to the above-mentioned resource management, the event buffer l has a deadlock avoidance function when a deadlock occurs due to a resource reservation request from programs 2A to 2x becoming a reverse order request, and a resource waiting release function for resource duplicate requests from the same program. Equipped with functions.
イベントバッファ1による待ち解除機能は、資源重複要
求に対してFIFOに従った管理を無視して資源確保完
了を当該プログラムに応答する。The wait release function by the event buffer 1 ignores FIFO-based management for resource duplication requests and responds to the program with the completion of resource reservation.
この処理によって、当該プログラムは資源待ちから解除
されて処理を続行する。Through this processing, the program is released from waiting for resources and continues processing.
次に、イベントバッファlによるデッドロック回避機能
はタイマー3による時間管理と資源配分判別I’L4.
〜43等による整合性管理とによって資源割り当てを決
定し、この決定に従って資源確保完了処理5を行うこと
でデッドロック回避を実現する。Next, the deadlock avoidance function using the event buffer l, time management using the timer 3, and resource allocation determination I'L4.
- 43 etc., resource allocation is determined by consistency management, and deadlock avoidance is realized by performing resource reservation completion processing 5 according to this determination.
タイマー3による時間管理は、任意プログラムからの資
源確保要求に対して計時を開始し、この計時を判別部4
I〜48等による判別で決定した時間との比較に使用す
る。判別部4.〜43は判別結果として資源待ち時間を
求め、その判別パラメータとしてプログラム優先順位判
別部4.では資源確保要求を行ったプログラムの優先順
位から求め、資源占有率判別部4.では当該プログラム
が1回の処理に使用する資源の占有率から求め、資源重
要度判別部43では当該資源の重要度(他のプログラム
への影響を)を求める。なお、図示しないが他のパラメ
ータとして資源確保順位との関係等から求められ、これ
ら判別パラメータはアプリケーションプログラムの内容
から適宜決定して夫々の判別部が設けられる。Time management by the timer 3 starts counting time in response to a resource reservation request from an arbitrary program, and the timer 3
This is used for comparison with the time determined by discrimination based on I-48, etc. Discrimination unit 4. 43 obtains the resource waiting time as the determination result, and uses the program priority determination unit 4.4 as the determination parameter. Then, it is determined from the priority order of the program that made the resource reservation request, and the resource occupancy rate determination unit 4. Then, the occupancy rate of the resource used by the program in one process is determined, and the resource importance determination unit 43 determines the importance of the resource (influence on other programs). Note that other parameters (not shown) are determined based on the relationship with the resource reservation order, etc., and these discrimination parameters are appropriately determined from the contents of the application program, and respective discrimination units are provided.
上述の判別部4.〜43により決定する各待ち時間に対
して、タイマー3の計時が最初に一致したときに資源確
保完了処理部5を起動させる。この処理5は通常の応答
処理とするか又は異常時の応答処理とするかは判別部に
おける判別と同様にバラ−メタ別にすることでも良い。The above-mentioned discrimination unit 4. -43, the resource reservation completion processing unit 5 is activated when the time measured by the timer 3 first matches. Whether this process 5 is a normal response process or an abnormal response process may be determined based on parameters, as in the case of the discrimination section.
従って、本実施例における資源管理は、通常の資源管理
で資源待ちが発生したときに、当該プログラムの優先順
位等から決定する時間経過後に強制的に資源確保完了と
させるため、デッドロックは判別パラメータから決定す
る適当な時間待ち後に解消される。このとき、一部のプ
ログラムは一部の資源を欠いた処理になるが、デッドロ
ックひいてはシステムダウンは確実に回避される。また
、重複要求の場合は正常な資源割り当てになり、通常の
処理に戻すことができる。Therefore, in the resource management in this embodiment, when a resource wait occurs in normal resource management, the resource reservation is forcibly completed after a period of time determined from the priority of the program concerned, etc. It will be resolved after waiting an appropriate amount of time determined by . At this time, some programs will be processed without some resources, but deadlocks and system downs will be reliably avoided. In addition, in the case of duplicate requests, resource allocation becomes normal and normal processing can be resumed.
G9発明の効果
以上のとおり、本発明によれば、資源待ちが発生したと
きにプログラム優先順位等で定める時間管理で資源確保
完了を強制的に行うため、プツトロック発生にもプログ
ラムの半永久的な待ちが無くなってシステムの運用を継
続できる効果がある。Effects of the G9 Invention As described above, according to the present invention, when a resource wait occurs, resource reservation is forcibly completed by time management determined by program priority, etc., so even when a put lock occurs, the program does not have to wait semi-permanently. This has the effect of eliminating the problem and allowing the system to continue operating.
特に、オンラインシステムへ適用して資源待ちによるシ
ステムダウンを確実に防止し、システムの信頼性を向上
させるのに効果がある。In particular, it is effective when applied to online systems to reliably prevent system failures due to resource waiting and improve system reliability.
第1図は本発明の一実施例を示す機能構成図、第2図は
デッドロックの説明図である。
■・・・イベントバッファ、2A、2X・・・プログラ
ム、3・・・タイマー、4゜
4、.43・・・判別部、5・・資
源確保完了処理部。
プツトロックの説明図
外2名FIG. 1 is a functional configuration diagram showing an embodiment of the present invention, and FIG. 2 is an explanatory diagram of deadlock. ■...Event buffer, 2A, 2X...Program, 3...Timer, 4°4, . 43...Discrimination unit, 5...Resource reservation completion processing unit. 2 people not included in the explanation diagram for Puttlock
Claims (1)
保要求に応じて資源管理プログラムが各資源の割り当て
と該資源の解放を行う資源管理方式において、前記資源
管理プログラムは、前記資源確保要求に対して資源待ち
の発生から計時するタイマーと、前記資源確保要求に対
して当該プログラムの優先順位と資源占有率と資源重要
度と資源確保順位等をパラメータとして資源待ち時間を
決定する判別部とを備え、前記判別部で決定した時間に
前記タイマーの計時が一致したときに資源確保完了処理
を強制的に行うことを特徴とするコンピュータシステム
の資源管理方式。(1) In a resource management method in which a resource management program allocates and releases each resource in response to resource reservation requests from multiple application programs, the resource management program waits for resources in response to the resource reservation request. a timer that measures time from the occurrence of the resource reservation request, and a determination unit that determines the resource waiting time using parameters such as the priority of the program, the resource occupancy rate, the resource importance, the resource reservation order, etc. for the resource reservation request, and the determination unit A resource management method for a computer system, characterized in that a resource reservation completion process is forcibly performed when the time measured by the timer matches a time determined by the department.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5973490A JPH03260734A (en) | 1990-03-09 | 1990-03-09 | Resources control system for computer system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5973490A JPH03260734A (en) | 1990-03-09 | 1990-03-09 | Resources control system for computer system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03260734A true JPH03260734A (en) | 1991-11-20 |
Family
ID=13121737
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5973490A Pending JPH03260734A (en) | 1990-03-09 | 1990-03-09 | Resources control system for computer system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03260734A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09106357A (en) * | 1995-10-11 | 1997-04-22 | Nec Corp | Exclusive controller and method therefor |
| JP2010524054A (en) * | 2007-03-30 | 2010-07-15 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Method, system, and computer program therefor for managing memory access in an emulated processing environment |
-
1990
- 1990-03-09 JP JP5973490A patent/JPH03260734A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09106357A (en) * | 1995-10-11 | 1997-04-22 | Nec Corp | Exclusive controller and method therefor |
| JP2010524054A (en) * | 2007-03-30 | 2010-07-15 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Method, system, and computer program therefor for managing memory access in an emulated processing environment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5623670A (en) | Method and apparatus for crash safe enforcement of mutually exclusive access to shared resources in a multitasking computer system | |
| TWI267782B (en) | Deallocation of computer data in a multithreaded computer | |
| US5748959A (en) | Method of conducting asynchronous distributed collective operations | |
| US20020184295A1 (en) | Method for mutual computer process monitoring and restart | |
| CN108595282A (en) | A kind of implementation method of high concurrent message queue | |
| US9411661B2 (en) | Deadlock avoidance | |
| US6295602B1 (en) | Event-driven serialization of access to shared resources | |
| JPH03260734A (en) | Resources control system for computer system | |
| CN118113485B (en) | Task execution method and device, storage medium and electronic device | |
| CN119668854A (en) | Chip resource management method, electronic device and medium | |
| CN101739341B (en) | System having processor and i/o controller | |
| JPH0764852A (en) | Assurance system for dynamically reserved area | |
| US7788529B2 (en) | Method for safely interrupting blocked work in a server | |
| JPH0334037A (en) | Processing system for detection of system abnormality | |
| JP2972792B2 (en) | Computer system with multiple functions | |
| JPS63146153A (en) | System for processing interprocessor exclusive control | |
| JP2001256065A (en) | Exclusive control method and computer system | |
| JPH01133144A (en) | Common resource control system | |
| CN119226301A (en) | Event execution method, system, device and medium for high-concurrency business scenarios | |
| JPS6125249A (en) | Exclusive control system | |
| JPH09282185A (en) | Real-time system and resource managing method for the same | |
| CN106293884A (en) | The detection method of invalid time exceeded message in a kind of message-driven system | |
| CN119690618A (en) | IPMI command processing method and device | |
| JPS62202249A (en) | Shared resource access guard system among plural host computers | |
| JPS62113260A (en) | Timer monitor control system for multi-cpu system |