JPH0365732A - Resource management method - Google Patents
Resource management methodInfo
- Publication number
- JPH0365732A JPH0365732A JP1201591A JP20159189A JPH0365732A JP H0365732 A JPH0365732 A JP H0365732A JP 1201591 A JP1201591 A JP 1201591A JP 20159189 A JP20159189 A JP 20159189A JP H0365732 A JPH0365732 A JP H0365732A
- Authority
- JP
- Japan
- Prior art keywords
- resources
- task
- acquired
- priority
- queue
- 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
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、情報処理システムに用いられる資源管理方法
に関するものである。DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a resource management method used in an information processing system.
従来の技術
従来より、資源の管理方法にはセマフォが用いられてお
り、資源の獲得要求がだされた場合、要求する個数とセ
マフォの値を比較し、セマフォの値から要求する個数を
減じた値が負にならない範囲の個数のみ資源が獲得でき
るとしていた。Conventional technology Traditionally, semaphores have been used to manage resources, and when a request to acquire a resource is made, the requested number is compared with the semaphore value, and the requested number is subtracted from the semaphore value. It was stated that resources could be acquired only within the range in which the value did not become negative.
発明が解決しようとする課題
しかし、従来の資源管理方法では、新たに獲得可能な資
源の個数はセマフォに記録されている個数であり、先に
資源の獲得要求をした優先度の低いタスクに獲得されて
しまっている資源については獲得できず、優先度の高い
タスクが優先度の低いタスクに待たされるという課題が
あった。本発明はこのような従来の課題を解決するもの
であり、資源を有効に活用できる優れた資源管理方法を
提供することを目的とするものである。Problems to be Solved by the Invention However, in conventional resource management methods, the number of newly obtainable resources is the number recorded in the semaphore, and the resource is acquired by a low-priority task that requested the resource first. There was a problem in that resources that had already been used could not be acquired, and high-priority tasks were forced to wait for lower-priority tasks. The present invention is intended to solve such conventional problems, and aims to provide an excellent resource management method that can effectively utilize resources.
課題を解決するための手段
本発明は上記目的を達成するために、どのタスクにも獲
得されていない資源の個数を記憶する部分と、各タスク
が既に獲得している資源の個数(以下、獲得資源数とい
う)と、まだ獲得できていない資源の個数(以下、未獲
得資源数という)を記憶する部分を有し、その記憶部分
を各タスクの優先度の低い順から並ぶようなキー−に接
続して資源の管理を行なうようにしたものである。Means for Solving the Problems In order to achieve the above object, the present invention has a part that stores the number of resources that have not been acquired by any task, and a part that stores the number of resources that each task has already acquired (hereinafter referred to as acquired). It has a part that stores the number of resources (referred to as the number of resources) and the number of resources that have not yet been acquired (hereinafter referred to as the number of unacquired resources), and the storage part is organized into keys arranged in descending order of priority for each task. It is designed to connect and manage resources.
作用
本発明は上記構成により、あるタスク(以下、自タスク
という)から資源の獲得要求がだされた際に、必ず先頭
に接続される未使用の資源の個数より順にキューを調べ
ていき、自タスクが必要とする資源を既に獲得している
タスクがあった場合には、自タスクの必要資源数を最大
値として獲得できるだけの資源の個数を、そのタスク(
以下、被獲得タスクという)の獲得資源数と自タスクの
未獲得資源数より減算し、被獲得タスクの未獲得資源数
と自タスクの獲得資源数に加算する。これを、キュー上
のタスクの優先度が自タスクの優先度と同じになるまで
繰り返しおこない、自タスクの獲得資源数と未獲得資源
数の記録部分をキューのその場所に接続することにより
、常に優先度の高いタスクはど優先的に資源を獲得する
ことができる。Effect of the present invention With the above configuration, when a task (hereinafter referred to as the self-task) issues a resource acquisition request, the queue is always checked in order of the number of unused resources connected to the beginning, and the self-task is If there is a task that has already acquired the resources it needs, the task (
The result is subtracted from the number of acquired resources of the acquired task (hereinafter referred to as the acquired task) and the number of unacquired resources of the own task, and added to the number of unacquired resources of the acquired task and the number of acquired resources of the own task. This is repeated until the priority of the task on the queue becomes the same as the priority of the self-task, and by connecting the recording part of the number of acquired resources and the number of unacquired resources of the self-task to that location in the queue, it is possible to always Tasks with high priority can acquire resources preferentially.
実施例
以下、第1図、及び第2図を参照しながら本発明の一実
施例について説明する。EXAMPLE Hereinafter, an example of the present invention will be described with reference to FIGS. 1 and 2.
第1図は、本発明のキューの構成を示した構成図で、第
2図は、資源の獲得を行なう際の処理手順を示した手順
図である。第1図において、11は獲得資源数と未獲得
資源数を記憶する部分の構成であり、12はキューの接
続を示す。以上のような第1図の構成、並びに第2図の
処理手順において以下その動作につき説明する。まず、
キネ−の先頭の未獲得資源の部分13より検索をはじめ
る。キー−上のタスクの優先度と自タスクの優先度とを
比較し、キュー上のタスクの優先度が自タスクと同じか
、またはそれ以上だった場合には、自タスクをそのタス
クの前に接続して、資源の獲得を終了する。自タスクの
優先度の方が高かった場合にキュー上のタスクが自タス
クの獲得したい資源をもっていた場合は、キー−上のタ
スクより資源を獲得する。そこで、自タスクの獲得した
い資源がすべて獲得できた場合には、資源の獲得を終了
する。そして、まだ未獲得の資源が在った場合にはキー
−の1つ先のタスクを検索するということを繰り返す。FIG. 1 is a block diagram showing the structure of a queue according to the present invention, and FIG. 2 is a flowchart showing a processing procedure when acquiring resources. In FIG. 1, reference numeral 11 indicates the configuration of a portion that stores the number of acquired resources and the number of unacquired resources, and 12 indicates the connection of queues. The operation of the configuration shown in FIG. 1 and the processing procedure shown in FIG. 2 as described above will be explained below. first,
The search starts from the unobtained resource portion 13 at the beginning of the kine. Key - Compares the priority of the task on the queue with the priority of the own task, and if the priority of the task on the queue is the same as or higher than the own task, the own task is moved before that task. Connect and finish acquiring resources. If the priority of the self-task is higher and the task on the queue has the resource that the self-task wants to acquire, the resource is acquired from the task on the key. Therefore, when all the resources that the own task wants to acquire have been acquired, the resource acquisition ends. Then, if there are resources that have not yet been acquired, the process of searching for the task one step ahead of the key is repeated.
また、キューの最後まで検索を行なっても未獲得の資源
が在った場合には、自タスクの記憶部分をキューの最後
につなぐことにより資源の管理を行なうものである。Furthermore, if there are resources that have not been acquired even after searching to the end of the queue, the resources are managed by connecting the memory portion of the own task to the end of the queue.
発明の効果
以上のように、本発明の効果としては、記憶部分を各タ
スクの優先度の低い順から並ぶようなキューに接続して
資源の管理を行なうことにより、常に優先度の高いタス
クはど優先的に資源の獲得ができる。Effects of the Invention As described above, the effect of the present invention is that by managing resources by connecting the storage part to a queue in which each task is arranged in order of priority, tasks with high priority are always You can acquire resources with priority.
第1図は、本発明の一実施例におけるキューの構成を示
した構成図、第2図は、本発明の方法を用いて資源の獲
得を行なう際の処理手順を示した手順図である。
11・・・獲得資源数、12・・・キー−の接続、13
・・・未獲得数。FIG. 1 is a block diagram showing the configuration of a queue in an embodiment of the present invention, and FIG. 2 is a flowchart showing a processing procedure when acquiring resources using the method of the present invention. 11... Number of acquired resources, 12... Key connection, 13
...Number of unobtained items.
Claims (1)
数個同時に使用し、各タスクが既に獲得している資源と
獲得できていない資源の個数を記憶する部分を有し、そ
の記憶部分を各タスクの優先度順に並ぶようなキューに
接続して資源を管理することを特徴とする資源管理方法
。A task that has multiple resources and uses multiple types of resources at the same time, and each task has a part that stores the number of resources that it has already acquired and the number of resources that it has not acquired. A resource management method characterized by managing resources by connecting them to a queue in which each task is arranged in order of priority.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1201591A JPH0365732A (en) | 1989-08-03 | 1989-08-03 | Resource management method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1201591A JPH0365732A (en) | 1989-08-03 | 1989-08-03 | Resource management method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0365732A true JPH0365732A (en) | 1991-03-20 |
Family
ID=16443598
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1201591A Pending JPH0365732A (en) | 1989-08-03 | 1989-08-03 | Resource management method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0365732A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05120042A (en) * | 1991-10-25 | 1993-05-18 | Nec Corp | Computer system |
| JPH05204675A (en) * | 1992-01-30 | 1993-08-13 | Toshiba Corp | Scheduling method |
| WO2011148553A1 (en) * | 2010-05-24 | 2011-12-01 | 株式会社ソニー・コンピュータエンタテインメント | Information processing device and information processing method |
| JP2011248468A (en) * | 2010-05-24 | 2011-12-08 | Sony Computer Entertainment Inc | Information processor and information processing method |
-
1989
- 1989-08-03 JP JP1201591A patent/JPH0365732A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05120042A (en) * | 1991-10-25 | 1993-05-18 | Nec Corp | Computer system |
| JPH05204675A (en) * | 1992-01-30 | 1993-08-13 | Toshiba Corp | Scheduling method |
| WO2011148553A1 (en) * | 2010-05-24 | 2011-12-01 | 株式会社ソニー・コンピュータエンタテインメント | Information processing device and information processing method |
| JP2011248468A (en) * | 2010-05-24 | 2011-12-08 | Sony Computer Entertainment Inc | Information processor and information processing method |
| US9658905B2 (en) | 2010-05-24 | 2017-05-23 | Sony Corporation | Information processing apparatus and method for carrying out multi-thread processing |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5761659A (en) | Method, product, and structure for flexible range locking of read and write requests using shared and exclusive locks, flags, sub-locks, and counters | |
| US5734909A (en) | Method for controlling the locking and unlocking of system resources in a shared resource distributed computing environment | |
| US5956712A (en) | Byte range locking in a distributed environment | |
| US5454108A (en) | Distributed lock manager using a passive, state-full control-server | |
| US8190857B2 (en) | Deleting a shared resource node after reserving its identifier in delete pending queue until deletion condition is met to allow continued access for currently accessing processor | |
| US7100161B2 (en) | Method and apparatus for resource access synchronization | |
| JPH04308961A (en) | Means and apparatus for notifying state of synchronous locking of occupied process | |
| US6185650B1 (en) | High performance locking facility | |
| JPH0365732A (en) | Resource management method | |
| JPH0877025A (en) | Task priority control method and task priority control device | |
| JPH04314147A (en) | Memory managing system | |
| JPH0478932A (en) | Shared resource exclusion control system | |
| JPH04101233A (en) | Task management method using two-layer queue structure | |
| CN111405015A (en) | Data processing method, device, equipment and storage medium | |
| JPH06282448A (en) | Shared resource exclusive control system | |
| JPH0383142A (en) | Shared resource exclusive control system | |
| JPH0115899B2 (en) | ||
| JPH02112030A (en) | System for exclusive control | |
| JPH03257568A (en) | Exclusive control system for shared resources | |
| JPH09305455A (en) | Group integration method for distributed database | |
| JPH04262425A (en) | Exclusive control system for commonly shared resource | |
| JPH02194442A (en) | Shared resource controller | |
| JPH04116731A (en) | Exclusive control for shared resources | |
| JPS60209858A (en) | File processing system | |
| JP2000003287A (en) | Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program |