JPH0421893B2 - - Google Patents
Info
- Publication number
- JPH0421893B2 JPH0421893B2 JP59145236A JP14523684A JPH0421893B2 JP H0421893 B2 JPH0421893 B2 JP H0421893B2 JP 59145236 A JP59145236 A JP 59145236A JP 14523684 A JP14523684 A JP 14523684A JP H0421893 B2 JPH0421893 B2 JP H0421893B2
- Authority
- JP
- Japan
- Prior art keywords
- processing request
- priority
- processing
- resource
- request
- 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
Links
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本考案はメモリ上に置かれた複数の優先度つき
処理要求を単一処理装置が順次処理してゆくシス
テムにおいて、共通資源(その具体的内容は問わ
ない)への複数の処理要求からのアクセスをシリ
アライズする方式に関するものである。Detailed Description of the Invention [Field of Industrial Application] The present invention provides a system in which a single processing device sequentially processes multiple priority processing requests placed in memory. This relates to a method for serializing accesses from multiple processing requests to (regardless of the content).
第3図のごときシステムにおいて、メモリ1の
中に処理要求2a,2b,2cがあり、、これら
の処理要求は何れも優先度を有しており共通資源
3を使用して、処理装置4が外部装置からの割込
みにより順次処理されるものとする。この場合処
理装置4が実行可の処理要求の中で優先度の最も
高いものをその処理手順に従つて処理する。これ
らの処理はすべてプログラム制御によつてなさ
れ、すべての処理要求は実行可状態あるいは事象
待ち状態にある。そして事象待ち状態から実行可
状態への遷移は外部装置からの信号あるいは他の
処理要求の指示によつて行なわれる。とくに外部
装置からの信号により実行可となる処理要求(割
込要求)はその処理手順をすべて終了するまで事
象待ちとなれない。 In the system shown in FIG. 3, there are processing requests 2a, 2b, and 2c in the memory 1, and each of these processing requests has a priority, and the processing device 4 uses the common resource 3. It is assumed that processing is performed sequentially by interrupts from external devices. In this case, the processing device 4 processes the one with the highest priority among the executable processing requests according to its processing procedure. All of these processes are performed under program control, and all processing requests are in an executable state or in an event waiting state. The transition from the event waiting state to the executable state is performed in response to a signal from an external device or an instruction from another processing request. In particular, a processing request (interrupt request) that can be executed by a signal from an external device cannot wait for an event until all its processing procedures are completed.
このように優先度を有する処理要求が共通資源
にアクセスしようとするとき、他の処理要求がア
クセス中でなければアクセス中を表示してからア
クセスする。すでに他の処理要求がアクセス中で
あるならば、アクセス要求ありを表示して現処理
要求を事象待ちとする。アクセス終了時、アクセ
ス要求があれば、待つている処理要求を実行可と
する。かかる従来の方式を第4図により詳細に説
明する。
When a processing request with such a priority attempts to access a common resource, if no other processing request is currently accessing, it displays "Accessing" and then accesses. If another processing request is already accessing, an access request is displayed and the current processing request is placed in the event waiting state. When the access ends, if there is an access request, the waiting processing request can be executed. This conventional method will be explained in detail with reference to FIG.
第4図Aにおいては処理要求A(優先度3)が
資源を使用中であり、処理要求B(優先度4)は
事象待ち状態にある。第4図AにおいてECB
(Event Control Bloek)は資源を管理するため
の制御情報を示す。第4図Bにおいては処理要求
Bの方がAよりも優先度が高いので実行可となり
先に処理されるべきである。しかし第4図Cに示
すように処理要求Aが資源を使用中であるので処
理要求Bが資源を使用しようとしても使用中のた
め事象待ちとなり処理要求Aが処理され、処理要
求Aの使用が終了した後処理要求Bが実行可能と
なり先に処理される。この状態を第4図Dに示
す。 In FIG. 4A, processing request A (priority level 3) is using resources, and processing request B (priority level 4) is waiting for an event. In Figure 4 A, ECB
(Event Control Bloek) indicates control information for managing resources. In FIG. 4B, processing request B has a higher priority than A, so it can be executed and should be processed first. However, as shown in Figure 4C, processing request A is currently using the resource, so even if processing request B tries to use the resource, it will wait for an event because it is currently using the resource, and processing request A will be processed. The completed post-processing request B becomes executable and is processed first. This state is shown in FIG. 4D.
実行単位(タスク)間での資源の排他制御/遂
次使用を目的としてENQ/DEQマクロといつた
スーパパイザ機能がある。これは資源使用中の実
行単位があるとき、後から要求してきた実行単位
を資源が返却されるまで待ち状態とするものであ
るが次のような問題点がある。
There are supervisor functions such as ENQ/DEQ macros for the purpose of exclusive control/sequential use of resources between execution units (tasks). In this method, when there is an execution unit that is using resources, the execution unit that requests it later is placed in a waiting state until the resources are returned, but it has the following problems.
(イ) 待ち状態となれない実行単位(割込み処理
等)との排他制御には使用できない。そのため
割込みをマスクして動く必要があり応答性が悪
くなる。すなわち、外部装置からの割込みに対
する処理要求との排他制御には使用できないか
ら、従来はハード的に割込みをマスクすること
により排他制御を実現している。複数の割込み
要因がある場合、それぞれ個別にマスクできれ
ば問題ないが、一括してマスクできないと、
(このようなハードウエアの方が一般的である)
排他に関係しない割込みに対する応答性が悪く
なる。(b) It cannot be used for exclusive control with execution units that cannot enter the wait state (such as interrupt processing). Therefore, it is necessary to operate with interrupts masked, resulting in poor responsiveness. That is, since it cannot be used for exclusive control with processing requests for interrupts from external devices, conventionally exclusive control has been achieved by masking interrupts using hardware. If there are multiple interrupt sources, there is no problem if they can be masked individually, but if they cannot be masked all at once,
(This kind of hardware is more common)
Responsiveness to interrupts not related to exclusion deteriorates.
(ロ) 処理要求A,B,Cがあり、それぞれの優先
度をPA,PB,PCとしPA>PB>PCとする。今C
が資源使用中にAが実行状態となり、同じ資源
を要求するとAは待ち状態に入る。ここでBが
実行状態になると、Cよりも優先度が高いため
制御を得、その結果より優先度の高いAに待ち
解除をCが動かさないことにより遅らせてしま
う。この状態を第5図に示す。第5図Aにおい
て、処理要求C(優先度2)が実行状態にあり、
処理要求A(優先度4)、および処理要求B(優
先度3)は事象待ち状態にある。処理要求Aは
優先度4であつて処理要求Cよりも優先度が高
いから実行可となつて先に処理される。しかし
処理要求Aが資源にアクセスしたこところ処理
要求Cが使用中であるため第5図Cのごとく事
象待ちに戻される。この状態において、優先度
3の処理要求Bが実行可となると、これは処理
要求Cよりも優先度が高いため先に処理され、
AはBよりも優先度が高いにもかかわらずCが
処理されないため処理できない。(b) There are processing requests A, B, and C, and their priorities are P A , P B , and P C , with P A > P B > P C. Now C
A enters the running state while A is using resources, and when it requests the same resource, A enters the waiting state. Here, when B enters the execution state, it gains control because it has a higher priority than C, and as a result, the waiting release is delayed to A, which has a higher priority, because C does not move. This state is shown in FIG. In FIG. 5A, processing request C (priority 2) is in the execution state,
Processing request A (priority level 4) and processing request B (priority level 3) are in an event waiting state. Since processing request A has a priority of 4 and has a higher priority than processing request C, it is allowed to be executed and is processed first. However, when processing request A accesses the resource, processing request C is in use, so it is returned to the event waiting state as shown in FIG. 5C. In this state, when processing request B with priority 3 becomes executable, it is processed first because it has a higher priority than processing request C.
Even though A has a higher priority than B, it cannot be processed because C is not processed.
本発明は上記問題を解消した応答性のよい排他
制御方式を提供するもので、その手段はメモリ上
におかれた複数の優先度つき処理要求を共通の資
源へのアクセスをシリアライズして単一の処理装
置が順次処理してゆくシステムにおいて、前記処
理要求が前記資源にアクセス時、前記資源がその
優先度がそのアクセスされた前記処理要求よりも
低い処理要求により使用中であるとき、該使用中
の処理要求の優先度をあとからアクセスした前記
処理要求と同レベルまで上げて先に処理し該使用
中の処理要求の処理が終るとその処理要求の優先
度をもとの優先度に戻しつぎに前記資源にあとか
らアクセスした処理要求を処理することを特徴と
する排他制御方式によつてなされる。
The present invention provides an exclusive control method with good responsiveness that solves the above-mentioned problems, and the means for doing so is to serialize access to a common resource by serializing multiple priority processing requests stored in memory. In a system in which processing devices sequentially perform processing, when the processing request accesses the resource, when the resource is being used by a processing request whose priority is lower than that of the accessed processing request, the usage The priority of the processing request in use is raised to the same level as the processing request accessed later and processed first, and when the processing request in use is finished, the priority of the processing request is returned to the original priority. Next, a processing request that accesses the resource later is processed using an exclusive control method.
上記排他制御方式は待ち状態となれない処理要
求からも使用でき、割込み応答性を悪くせず、自
分よりも低優先度の処理要求のために資源確保が
必要以上に遅れることがない。
The above exclusive control method can be used even by processing requests that cannot be placed in a waiting state, does not impair interrupt responsiveness, and does not cause an undue delay in securing resources for processing requests with lower priority than itself.
以下図面を参照して本発明の実施例を詳細に説
明する。
Embodiments of the present invention will be described in detail below with reference to the drawings.
第1図に本発明の1実施例を示す。第1図にお
いて、Aは処理要求C(優先度2)が実行可状態
にあり、処理要求A(優先度4)および処理要求
B(優先度3)は事象待ち状態にある。第1図A
において処理要求Aは優先度4であつて処理要求
Cよりも優先度が高いから実行可となつて先に処
理される。これを第1図Bに示す。しかし処理要
求Aが資源にアクセスしたところ処理要求Cが使
用中であるため、処理要求Cの優先度を処理要求
Aと同じ4まで上げて先に処理させる。この状態
を第1図Cに示す。第1図Dは優先度3の処理要
求Bが実行可となつたが、優先度4の処理要求C
の方が先に処理される状態を示す。処理要求Cの
資源使用が終ると優先度を元の2に戻しつぎに優
先度4の処理要求Aが処理される。これを第1図
Eに示す。 FIG. 1 shows one embodiment of the present invention. In FIG. 1, at A, processing request C (priority level 2) is in an executable state, and processing requests A (priority level 4) and processing requests B (priority level 3) are in an event waiting state. Figure 1A
Since processing request A has a priority of 4 and has a higher priority than processing request C, it is allowed to be executed and is processed first. This is shown in FIG. 1B. However, when processing request A accesses the resource, processing request C is in use, so the priority of processing request C is increased to 4, which is the same as processing request A, and processing request C is processed first. This state is shown in FIG. 1C. In Figure 1D, processing request B with priority 3 has become executable, but processing request C with priority 4 has become executable.
Indicates a state in which the item is processed first. When the resource usage of processing request C is completed, the priority is returned to the original 2, and processing request A with priority 4 is processed next. This is shown in Figure 1E.
つぎに本発明の実施例を第2図A,Bのフロー
チヤートを参照しつつ説明する。 Next, an embodiment of the present invention will be described with reference to the flowcharts of FIGS. 2A and 2B.
資源要求があると(ブロツク21)その現優先
度がメモリされる(ブロツク22)。そして使用
中の処理要求があるかどうかをチエツクされる
(ブロツク23)。使用中の処理要求がない場合に
はそれを使用中処理要求として(ブロツク24)
とリターンする(ブロツク25)。もしブロツク
23において使用中の処理要求がある場合はそれ
を自分と同レベルの優先度として(ブロツク2
6)デイスパツチヤ(ブロツク27)により先に
処理する。 When a resource request is made (block 21), its current priority is memorized (block 22). A check is then made to see if there is a processing request in use (block 23). If there is no processing request in use, mark it as a processing request in use (block 24).
and returns (block 25). If there is a processing request in use in block 23, set it to the same priority level as yourself (block 23).
6) First processed by dispatcher (block 27).
資源返却の場合(ブロツク31)は使用中の処
理要求をクリアする(ブロツク32)。そして現
優先度とメモしておいたものを比較し(ブロツク
33)、同じ場合はリターンする(ブロツク3
4)。また異なる場合は自分をメモしておいた優
先度にもどし(ブロツク35)デイスパツチヤに
より(ブロツク36)リターンする。 In the case of resource return (block 31), processing requests in use are cleared (block 32). Then, compare the current priority with the memo (block 33), and if the priority is the same, return (block 3).
4). If it is different, the priority is returned to the memo (block 35) and the dispatcher returns (block 36).
以上詳細に説明したように、本発明においては
資源にアクセスしたとき、その資源を使用中のそ
の優先度がそれにより低い処理要求があると、そ
の優先度を自分と同レベルまで上げ、デイスパツ
チキユーでの自分の前に入れて先に処理するもの
である。このとき自分は実行状態のままであり、
前述の問題点イの問題はなくなり応答性が悪くな
るという問題は解決される。また使用中処理要求
の優先度を同じレベルまで上るため、自分より低
優先度の処理要求により資源確保が遅れるという
前述の問題点ロも解決される。
As explained in detail above, in the present invention, when a resource is accessed, if there is a processing request that is currently using that resource and has a lower priority, its priority is raised to the same level as itself, and the dispatch request is You put it in front of you and process it first. At this time, I remain in the running state,
Problem A mentioned above is eliminated, and the problem of poor responsiveness is solved. Furthermore, since the priority of the processing request in use is raised to the same level, the aforementioned problem (2), in which resource reservation is delayed due to a processing request with a lower priority than the processing request, is also solved.
第1図は本発明にかかる排他処理制御方式の手
順を示す図、第2図は本発明にかかる方式を説明
するためのフローチヤート、第3図は本発明の適
用分野を説明するブロツクダイアグラム、第4図
および第5図は従来の方式の手順を示す図であ
る。
図面において26は使用中の処理要求の優先度
を後にアクセスされた処理要求のそれと同レベル
まで上げるブロツク、35は優先度を上げられた
処理要求をもとの優先度に戻すブロツクをそれぞ
れ示す。
FIG. 1 is a diagram showing the procedure of the exclusive processing control method according to the present invention, FIG. 2 is a flowchart for explaining the method according to the present invention, and FIG. 3 is a block diagram for explaining the field of application of the present invention. FIG. 4 and FIG. 5 are diagrams showing the procedure of the conventional method. In the drawing, 26 indicates a block that raises the priority of a processing request in use to the same level as that of a processing request accessed later, and 35 indicates a block that returns a processing request whose priority has been raised to its original priority.
Claims (1)
求を共通の資源へのアクセスをシリアライズして
単一の処理装置が順次処理してゆくシステムにお
いて、前記処理要求が前記資源にアクセス時、前
記資源がその優先度がそのアクセスされた前記処
理要求よりも低い処理要求により使用中であると
き、該使用中の処理要求の優先度をあとからアク
セスした前記処理要求と同レベルまで上げて先に
処理し該使用中の処理要求の処理が終るとその処
理要求の優先度をもとの優先度に戻しつぎに前記
資源にあとからアクセスした処理要求を処理する
ことを特徴とする排他制御方式。1. In a system in which a single processing device sequentially processes multiple priority processing requests placed on memory by serializing access to a common resource, when the processing request accesses the resource, the When a resource is being used by a processing request whose priority is lower than that of the processing request that was accessed, the priority of the processing request that is in use is raised to the same level as the processing request that was accessed later. An exclusive control method characterized in that when processing of the processing request in use is completed, the priority of the processing request is returned to the original priority, and then a processing request that accesses the resource later is processed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14523684A JPS6125249A (en) | 1984-07-14 | 1984-07-14 | Exclusive control system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14523684A JPS6125249A (en) | 1984-07-14 | 1984-07-14 | Exclusive control system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6125249A JPS6125249A (en) | 1986-02-04 |
| JPH0421893B2 true JPH0421893B2 (en) | 1992-04-14 |
Family
ID=15380479
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP14523684A Granted JPS6125249A (en) | 1984-07-14 | 1984-07-14 | Exclusive control system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6125249A (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04195432A (en) * | 1990-11-28 | 1992-07-15 | Nec Corp | Task management device |
| JPH05120042A (en) * | 1991-10-25 | 1993-05-18 | Nec Corp | Computer system |
| JPH06187175A (en) * | 1992-12-18 | 1994-07-08 | Erugu Kk | Exclusion control method for multi-task computing system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58107961A (en) * | 1981-12-21 | 1983-06-27 | Nippon Telegr & Teleph Corp <Ntt> | Controlling method for information processor |
-
1984
- 1984-07-14 JP JP14523684A patent/JPS6125249A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6125249A (en) | 1986-02-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4553202A (en) | User controlled dialog resource switching in a multi-tasking word processor | |
| JPS5812611B2 (en) | Data Tensou Seigiyohoushiki | |
| JP2000284978A (en) | Interface system for asynchronously updating common resource and method for the same | |
| EP0913770A2 (en) | Method and apparatus for sharing a time quantum | |
| JPH0421893B2 (en) | ||
| JPH0877025A (en) | Task priority control method and task priority control device | |
| KR100651722B1 (en) | Linux kernel configuration and real-time performance test method for real-time performance support | |
| JPH07141208A (en) | Multitasking processor | |
| JP3422504B2 (en) | Exclusive control method between tasks | |
| JPH03116261A (en) | Multiprocessor control system | |
| JP2010026575A (en) | Scheduling method, scheduling device, and multiprocessor system | |
| JPS63265336A (en) | Control system for preference allocation of shared resources | |
| JP2511012B2 (en) | Task termination method | |
| JPS63124138A (en) | Shared resource occupancy conflict management method | |
| JPH09330241A (en) | Deadlock prevention exclusive control method | |
| JPH02244371A (en) | Exclusive control method for multiprocessor system | |
| CN117762576A (en) | In-vehicle task scheduling method, device, electronic equipment, storage medium and vehicle | |
| JPH04223533A (en) | Common resource exclusive control system | |
| JPH02304667A (en) | Information transfer controlling system | |
| JPH04133155A (en) | Digital computer | |
| JPS59111563A (en) | Controlling system of multi-processor | |
| JPS60215249A (en) | Computer peripheral unit incorporating multi-task control element | |
| JPS63104146A (en) | Controlling system for resource | |
| JPS6027950A (en) | Preferential dispatch control system | |
| JPH04209031A (en) | Resources control method for computer system |