Priority changing system for resources acquisition waiting processing
Abstract
(57) The delay in processing by resource 獲得待 of a task with the high summary purpose processing priority is canceled. Composition The comparison circuit 3 makes the task level signal 2 an active state, only when the value of the resource 獲得待 task level register 5 becomes high from the value of the resource possession task level register 4. The central processing unit 1 processes the task level change interrupt signal 2 as interruption. Effect When a resource acquisition task is higher than the level of the task which is using the present resources, it becomes possible to raise the level of the task which is using the present resources by interruption processing, and is effective in the ability not to be concerned with the acquisition situation of resources but process high processing of a priority.
Term
No projected expiry on record.
- Priority and filed
- Published
- Today
1 claim: 1 independent, 0 dependent
- 1[Claims] [1] In a resource management process of an operating system in which there are a plurality of tasks that use the same resource and operate at a plurality of levels, a current resource holding task level register that stores the task level using the resource and the current resource holding task level register. , The resource acquisition waiting task level register that stores the level of the task with the highest level among the tasks waiting for the resource and the task currently holding the resource, the comparison circuit of the register, and the comparison circuit thereof. A method for changing the priority of resource acquisition wait processing, which is characterized by being equipped with a central processing unit that can process the result of. 【特許請求の範囲】 【請求項1】 同一の資源を使用し複数レベルで動作する複数タスクが存在するオペレーティングシステムの資源管理処理において、該資源を使用しているタスクレベルを記憶している現資源保有タスクレベルレジスタと、該資源待をしているタスクおよび現在資源を保有しているタスクのうち最も高いレベルのタスクのレベルを記憶している資源獲得待タスクレベルレジスタと、該レジスタの比較回路と、その比較回路の結果を割込みとして処理することができる中央処理装置を備えて成ることを特徴とする資源獲得待処理の優先順位変更方式。
54 paragraphs, as filed
Description: TECHNICAL FIELD [Detailed description of the invention]
【0001】
[Industrial application field]
The present invention relates to a method for changing the priority of the resource acquisition waiting process, and particularly to a method for changing the priority of the resource acquisition waiting task of the system resource management process in the processing of the operating system.
【0002】
[Conventional technology]
In the resource management process in the conventional operating system, even if there is a task with a higher level than the task that currently has resources among the tasks that are waiting for a certain resource, the task that currently has resources After finishing, start the resource waiting task. (For example, RX116 User's Manual NEC Corporation, etc.).
【0003】
[Problems to be Solved by the Invention]
In the conventional resource management described above, even if there is a task at a higher level than the task that currently has resources among the tasks that are waiting for a certain resource, the task that currently has resources ends. After that, start the resource waiting task. In this case, the priority of the resource waiting task with high priority is lower than the priority of the task that temporarily has resources, and the processing of the resource waiting task is prioritized at the end of the task that currently has resources. This will cause the problem that the degree depends on the degree.
【0004】
[Means for solving problems]
The priority change method of the resource acquisition process of the present invention stores the task level using the resource in the resource management process of the operating system in which there are a plurality of tasks operating at a plurality of levels using the same resource. The current resource holding task level register, the resource acquisition waiting task level register that stores the level of the highest level task among the tasks waiting for the resource and the task currently holding the resource, and the register. It is configured to include a comparison circuit of the above and a central processing unit capable of processing the result of the comparison circuit as an interrupt.
【0005】
[Example]
Next, the present invention will be described with reference to the drawings.
【0006】
FIG. 1 is a configuration diagram of the hardware of the present invention, from the central processing unit 1, the task level change interrupt signal 2, the comparison circuit 3, the resource holding task level register 4, and the resource acquisition waiting task level register 5. Become. FIG. 2 shows a processing flow of the central processing unit 1 when the resource acquisition waiting task in the present invention acquires a resource, and is a resource acquisition process (step 10) and a result determination process (step 20) of the resource acquisition process (step 10). ) And the update process (step 30) of the resource acquisition waiting task level register 5. FIG. 3 shows an interrupt processing flow in the present invention, which includes an update process (step 50) of the contents of the resource possession task level register 4 and a level change process (step 60) of the resource possession task. FIG. 4 shows a detailed flow of the resource acquisition process (step 10) of the present invention, in which determination of the presence / absence of a resource acquisition waiting task (step 100) and comparison determination processing of a resource holding task level and a resource acquisition waiting task level (step 110). ), The process of calling the OS macro for resource acquisition (step 120), and the process of holding the resource acquisition process (step 130).
【0007】
Next, a specific operation will be described.
【0008】
First, it is assumed that task A and task B exist, and both are processes that require common resources. Further, it is assumed that there is a task C that does not require the above-mentioned resources. It is assumed that A is the highest task level, C is next, and B is next.
【0009】
When the resource is free, when task B performs the resource acquisition process 10, it is determined whether or not there is a resource waiting task (step 100). Since the resource is free, the OS macro call for the resource acquisition process. Is issued (step 120), exclusive control is performed, and task B obtains the right to use the resource. As a result, the result determination process 20 of the resource acquisition process determines that the resource acquisition is successful, and the resource acquisition process ends.
【0010】
After that, when task C, which has a higher processing priority than task B, is started, task B goes into a standby state, that is, a waiting state for processing, while acquiring the right to use resources.
【0011】
It is assumed that task A, which has a higher processing priority than task C, starts processing during task C processing, and task B starts the acquisition processing of the resource for which the user currently has the right to use.
【0012】
Task A first executes a process with a resource waiting task (step 100) because task B is using resources in the resource waiting task presence / absence determination process (step 100) of the resource acquisition process 10. Next, in step 110, the resource holding task level register 4 is compared with task A, and since task A has a higher level, the resource acquisition process in step 130 is pending.
【0013】
When the process 10 ends as described above, the resource acquisition process is pending in the determination 20, so the value of the resource acquisition waiting task level register 5 is set as the level of the task A (step 30). After that, it returns to the start and executes the resource acquisition process 10.
【0014】
The comparison circuit 3 is a circuit that compares the resource holding task level register 5 with the resource holding task level register 4. When the resource holding task level register 4 is larger than the resource holding waiting task level register 5, the task level change interrupt signal 2 is Become active.
【0015】
When the value of the resource acquisition waiting task level register 5 is changed, the comparison with the resource holding task level register 4 The result of circuit 3 is that task A is larger than B, so task level change interrupt signal 2 becomes active and interrupt processing is performed. To be started.
【0016】
In the process during interrupt processing, first, the contents of the resource holding task level register 4 (containing the level of task B) are updated with the contents of the resource acquisition waiting task level register 5 (level of task A), and the resources are held. Raise the level of task level register 4 (step 50). Next, the task level change process for raising the level of task B, which currently holds resources, to the level of task A is performed (step 60).
【0017】
As a result, the processing priority of task B is raised to the level of task A, and the processing of task A is not waited for.
【0018】
[Effect of the invention]
As described above, the present invention processes the comparison result of the resource holding task level register and the resource acquisition waiting task level register as an interrupt signal to make it the task with the highest priority among the tasks for which the resource is to be acquired. By matching the level of tasks that are currently using resources, high-priority processing can be processed regardless of the resource acquisition status, and a higher-performance processing OS can be realized.
[Simple explanation of drawings]
[Figure 1]
It is a block diagram which shows the structure of the hardware of this invention.
[Figure 2]
This is the processing flow of the central processing unit 1 when the resource acquisition waiting task in the present invention acquires a resource.
[Fig. 3]
It is a flow chart which shows the interrupt processing flow in this invention.
[Fig. 4]
It is a flow chart which shows the detailed flow of the resource acquisition process of this invention.
[Explanation of symbols]
1 Central processing unit 2 Task level change interrupt signal 3 Comparison circuit 4 Resource holding task level register 5 Resource acquisition waiting task level register 10 Resource acquisition process 20 Result judgment processing 30 Update process 50 Resource holding task level register 4 content update processing 60 Resource retention task level change processing 100 Judgment of presence / absence of resource acquisition waiting task 110 Comparison and judgment processing of resource holding task and resource acquisition waiting task level 120 Resource acquisition OS call processing 130 Pending processing of resource acquisition processing
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| JPH076043A | Cited by | Japan | Search report |
| US7707576B2 | Cited by | United States of America | Applicant |
3 priority claims, no other members on record
Priority claims3
| Document | Office | Kind | Date |
|---|---|---|---|
| 17298291 | Japan | A | |
| 3172982 | – | – | – |
| JP19910172982 | – | – | – |
Numbers
- Publication
- 5-20102
- Publication, DOCDB
- H0520102
- Publication, EPODOC
- JPH0520102
- Application
- 3172982
- Application, DOCDB
- 17298291
- Application, EPODOC
- JP19910172982
Titles3
- English
- PRIORITY CHANGING SYSTEM FOR RESOURCES ACQUISITION WAITING PROCESSING
- English
- The priority change system of resource acquisition ???
- Japanese
- ???????????????????????
Classification
- CPC, 1
- H01B3/46
- IPC, 3
- G06F9 46
- G06F9 48
- H01B3 46