JPH05143370A - Multi-task computer - Google Patents

Multi-task computer

Info

Publication number
JPH05143370A
JPH05143370A JP30203691A JP30203691A JPH05143370A JP H05143370 A JPH05143370 A JP H05143370A JP 30203691 A JP30203691 A JP 30203691A JP 30203691 A JP30203691 A JP 30203691A JP H05143370 A JPH05143370 A JP H05143370A
Authority
JP
Japan
Prior art keywords
task
priority
computer resource
context
processing
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
Application number
JP30203691A
Other languages
Japanese (ja)
Inventor
Kazumi Harada
一己 原田
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP30203691A priority Critical patent/JPH05143370A/en
Publication of JPH05143370A publication Critical patent/JPH05143370A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the execution delay of a task with high priority order to a minimum by saving the context of a using task and starting exceptional processing when the exceptional processing routine of the using task is defined, and when not defined, setting up a task to be executed to a computer queuing state without processing it. CONSTITUTION:When a computer resource is being used, the priority of a task A is compared with that of a task C. When the priority of the task C is equal or lower to/than that of the task A, the task C is set up to a computer queuing state and the processing is ended. When the priority of the task C is higher, the priority of the task A is saved and raised up to the priority of the task C. Then whether the exceptional processing routine of the task A has been defined or not is judged, and when the routine has been defined, the context of the task A is saved and the exceptional processing routine of the task A is started. When the routine has not been defined yet, the task C is set up to the computer queuing state without executing the processing of the task A to end the current processing.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、オペレーティングシス
テムにおける優先度の処理に利用する。本発明は、計算
機資源を競合する複数のタスクの優先度処理において優
先度の高いタスクの実行の遅延を最小限に抑えることが
できるマルチタスク計算装置に関する。
BACKGROUND OF THE INVENTION The present invention is used for priority processing in an operating system. The present invention relates to a multi-task computer capable of minimizing a delay in execution of a task having a high priority in priority processing of a plurality of tasks competing for computer resources.

【0002】[0002]

【従来の技術】始めに例を挙げて、計算機資源を競合す
る複数のタスクにおける優先度に関する問題点について
説明する。次いで、この問題を解決するための従来の方
式について説明する。図7は従来例におけるタスク制御
ブロックの構成を示す図、図8は従来例における資源獲
得処理の流れを示す流れ図である。
2. Description of the Related Art First, problems with regard to priorities in a plurality of tasks competing for computer resources will be described with an example. Next, a conventional method for solving this problem will be described. FIG. 7 is a diagram showing a configuration of a task control block in the conventional example, and FIG. 8 is a flow chart showing a flow of resource acquisition processing in the conventional example.

【0003】ここでは三つのタスクA、B、Cを実行す
るシステムを対象とし、これらのタスクは、それぞれに
実行の優先度を持ち、A<B<Cの順で優先度が高いも
のとする。また、タスクAとCとは、計算機資源Xを使
用し、この計算機資源Xは、複数のタスクが同時に使用
することができない(排他的に使用することができる)
ものとする。
Here, a system that executes three tasks A, B, and C is targeted, and these tasks have respective execution priorities, and the priority is higher in the order of A <B <C. .. Further, the tasks A and C use the computer resource X, and this computer resource X cannot be used by a plurality of tasks at the same time (can be used exclusively).
I shall.

【0004】いま、タスクBとCは何らかの待ち状態に
あり、タスクAが実行されて計算機資源Xを獲得したと
する。次いで、タスクBの待ちが解除され、(タスクB
はタスクAより優先度が高いので)タスクAの実行が中
断され、タスクBが実行状態となったとする。さらに、
タスクCの待ちが解除され、タスクBの実行が中断さ
れ、タスクCが実行状態になったとする。タスクCは、
その実行中に計算機資源Xを獲得しようと試みるが、計
算機資源XはタスクAが使用中であるため、計算機資源
X待ちとなり、タスクBの実行が再開される。図9は、
この状態を図示したものである。
Now, it is assumed that tasks B and C are in some waiting state and task A is executed to acquire the computer resource X. Then, the wait for task B is released, and (task B
Is higher in priority than task A), execution of task A is interrupted, and task B is in the execution state. further,
It is assumed that the waiting of the task C is released, the execution of the task B is interrupted, and the task C is in the execution state. Task C is
An attempt is made to acquire the computer resource X during the execution, but since the computer resource X is being used by the task A, the computer resource X waits and the execution of the task B is restarted. Figure 9
This state is illustrated.

【0005】このような状況下では、最も優先度の高い
タスクCが実行されるのは、タスクBが待ちに入るなど
の理由で中央処理装置(CPU)を放棄し、タスクAの
実行が再開され、タスクAが計算機資源Xを返却した時
点まで遅延されることになる。
In such a situation, the task C with the highest priority is executed because the central processing unit (CPU) is abandoned because the task B waits and the execution of the task A is resumed. Then, the task A is delayed until it returns the computer resource X.

【0006】このように、本来、優先度の高いタスクの
実行が、計算機資源の獲得待ちなどによって、優先度の
低いタスクによって中断され、優先度の低いタスクが実
行される状況を、優先度の逆転(priority i
n version)と呼ぶ。このような状況は、排他
的に実行されなければならない(同時に複数のプログラ
ムが実行できない)プログラム部分(クリティカル・リ
ージョン)の実行についても発生する。優先度の逆転
は、本来、優先して処理されるべきタスクの実行が遅延
されるためにシステムの処理能力(タスクAが行うべき
処理に関する単位時間当たりの処理能力)を大幅に低下
させる場合がある。
In this way, originally, the execution of a task with a high priority is interrupted by a task with a low priority due to waiting for acquisition of computer resources, etc. Inversion (priority i
n version). Such a situation also occurs for execution of a program portion (critical region) that must be executed exclusively (a plurality of programs cannot be executed at the same time). The inversion of the priority may delay the execution of the task that should be preferentially processed, which may significantly reduce the processing capacity of the system (processing capacity per unit time regarding the processing that the task A should perform). is there.

【0007】上述した優先度の逆転の問題に対して、提
案された解決策の一つが優先度の継承(priorit
y inheritance)である。上述の例では、
タスクCが実行状態になり、計算機資源Xを獲得しよう
と試みた時点で、タスクCが計算機資源待ち状態となる
点は同じであるが、オペレーティング・システムがタス
クAの優先度を一時的にタスクCの優先度に上げ、タス
クAを優先して実行することでタスクBの実行によるタ
スクCの実行の遅延を防ぐことができる。タスクAが計
算機資源を返却した時点で、オペレーティング・システ
ムはタスクAの優先度を元に戻し、タスクCの実行を再
開する。図10は、この状態を図示したものである。図
9と比較して、タスクBによるタスクCの実行の遅延時
間が短縮されている。
One of the proposed solutions to the above-mentioned problem of priority inversion is priority inheritance (priorit).
y inheritance). In the example above,
It is the same that task C enters the waiting state for computer resources when task C enters the execution state and attempts to acquire computer resources X, but the operating system temporarily assigns the priority of task A to the tasks. It is possible to prevent the delay of the execution of task C due to the execution of task B by increasing the priority of C and executing task A with priority. When the task A returns the computer resource, the operating system restores the priority of the task A and resumes the execution of the task C. FIG. 10 illustrates this state. As compared with FIG. 9, the delay time of execution of task C by task B is shortened.

【0008】[0008]

【発明が解決しようとする課題】上述した従来の優先度
処理方式では、タスクAは、オペレーティング・システ
ムにより自動的に優先度を上げることができるために、
上述した優先度の逆転問題について意識してプログラミ
ングする必要がない。しかし、その反面、結果として、
本来、優先度が低いタスクが優先されて実行されること
になるため、システム全体としてみれば好ましいことで
はなく、特に、タスクAが優先されて実行される時間が
長いと、タスクBのようにタスクAより優先度の高いタ
スクが実行されにくくなる問題がある。この問題を回避
しようとして、タスクAの計算機資源の返却処理を細か
く行うようにすると、計算機資源の獲得/返却処理によ
るオーバヘッドが増加する。
In the conventional priority processing method described above, task A can automatically raise the priority by the operating system.
It is not necessary to program while paying attention to the above-mentioned priority inversion problem. However, on the other hand, as a result,
Originally, a task with a low priority is prioritized and executed, which is not preferable from the viewpoint of the entire system. Especially, when task A is prioritized and executed for a long time, like task B, There is a problem that it becomes difficult to execute a task having a higher priority than the task A. In order to avoid this problem, if the computer resource return processing of task A is performed in detail, the overhead due to the computer resource acquisition / return processing increases.

【0009】また、タスクCが計算機資源を獲得しよう
とした時点で、実際にはタスクAは、計算機資源を返却
可能であり、タスクCの実行を速やかに行うことができ
ることも考えられる。このような場合には、単にその時
点で、タスクAが獲得した資源を使用していない場合だ
けでなく、例えば、タスクAが、現在の処理を放棄して
計算機資源を返却し、(タスクCの実行が完了してか
ら)あらかじめ定めた場所から処理を再実行し、改めて
返却した計算機資源を獲得するような場合も含まれる。
上述の従来の優先度処理方式では、このような場合には
対応できない欠点がある。
It is also conceivable that when the task C tries to acquire the computer resource, the task A can actually return the computer resource and the task C can be executed promptly. In such a case, not only when the resource acquired by the task A is not being used at that time, but for example, the task A abandons the current process and returns the computer resource (task C It also includes the case where the processing is re-executed from a predetermined location after the execution of (1) is completed and the computer resources returned again are acquired.
The conventional priority processing method described above has a drawback that it cannot cope with such a case.

【0010】本発明はこのような問題を解決するもの
で、あるタスクAが獲得した計算機資源を他のタスクB
が獲得しようと試みた場合に、タスクBの優先度がタス
クAの優先度より高ければ、タスクAが定義したソフト
ウェア例外処理ルーチンを起動し、優先度の高いタスク
の実行の遅延を最小限に抑えることができる装置を提供
することを目的とする。
The present invention solves such a problem, and a computer resource acquired by one task A is transferred to another task B.
If the priority of task B is higher than the priority of task A, the software exception handling routine defined by task A is activated to minimize the delay in the execution of the high priority task. An object is to provide a device that can be suppressed.

【0011】[0011]

【課題を解決するための手段】本発明は、中央処理装置
に入出力装置、記憶装置、および計算機資源が接続さ
れ、前記中央処理装置に、タスクの優先度を取得する優
先度取得手段と、この優先度取得手段が取得したタスク
の優先度を比較する優先度比較手段と、タスクを実行す
るときに前記計算機資源を獲得する計算機資源獲得手段
と、タスク実行後に前記計算機資源を返却する計算機資
源返却手段と、前記計算機資源を獲得したタスクを識別
するタスク識別手段とを備えたマルチタスク計算装置に
おいて、前記中央処理装置に、タスクのソフトウェア例
外処理ルーチンを定義する例外処理ルーチン定義手段
と、定義された例外処理ルーチンを起動する例外処理ル
ーチン起動手段とを備え、前記記憶装置に、タスク制御
を行うための制御情報を格納するタスク制御ブロック
と、コンテキストを退避するコンテキスト退避領域と、
例外用コンテキストを退避する例外用コンテキスト退避
領域とを含むことを特徴とする。
According to the present invention, an input / output device, a storage device, and a computer resource are connected to a central processing unit, and the central processing unit has priority acquisition means for acquiring the priority of a task. Priority comparison means for comparing the priorities of the tasks acquired by the priority acquisition means, computer resource acquisition means for acquiring the computer resources when executing the tasks, and computer resources for returning the computer resources after executing the tasks In a multi-task computer having a return means and a task identification means for identifying the task that has acquired the computer resource, an exception handling routine defining means for defining a software exception handling routine of the task in the central processing unit, and a definition Control means for executing task control in the storage device, which comprises: A task control block for storing a context save area for saving the context,
An exception context save area for saving the exception context is included.

【0012】[0012]

【作用】あるタスクがある計算機資源を獲得しようとす
るときに、その計算機資源が使用中であるか否かを判断
し、使用中でなければそのタスクを割当てて処理を行
う。他のタスクにより使用されている場合には、その両
者の優先度を比較し、使用しようとするタスクの優先度
が使用中のタスクの優先度と同じか、低い場合には使用
しようとするタスクを待ち状態にする。使用しようとす
るタスクの優先度が高い場合には使用中のタスクの優先
度を退避し、使用中のタスクの優先度を使用しようとす
るタスクの優先度に上げる。
When a task tries to acquire a certain computer resource, it is determined whether the computer resource is in use, and if not, the task is assigned and processed. When used by other tasks, the priorities of the two are compared, and if the priority of the task to be used is the same as or lower than the priority of the task being used, the task to be used To wait. When the priority of the task to be used is high, the priority of the task in use is saved, and the priority of the task in use is increased to the priority of the task to be used.

【0013】次いで、使用中のタスクの例外処理ルーチ
ンがあらかじめ定義されているか否かを判断し、定義さ
れていれば、使用中のタスクのコンテキストを退避し、
その例外処理ルーチンを起動する。定義されていなけれ
ば処理を行わずに、使用しようとするタスクを計算機待
ち状態にする。
Next, it is judged whether or not the exception handling routine of the task in use is defined in advance. If it is defined, the context of the task in use is saved,
Start the exception handling routine. If it is not defined, the task to be used is placed in the computer wait state without performing any processing.

【0014】これにより、優先度の高いタスクの実行の
遅延を最小限に抑えることができる。
As a result, it is possible to minimize the delay in the execution of the high priority task.

【0015】[0015]

【実施例】次に、本発明実施例を図面に基づいて説明す
る。図1は本発明実施例の構成を示すブロック図であ
る。
Embodiments of the present invention will now be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the embodiment of the present invention.

【0016】本発明実施例は、中央処理装置1に入出力
装置2、記憶装置3、および計算機資源4が接続され、
中央処理装置1に、タスクの優先度を取得する優先度取
得手段11と、この優先度取得手段が取得したタスクの
優先度を比較する優先度比較手段12と、タスクを実行
するときに計算機資源4を獲得する計算機資源獲得手段
13と、タスク実行後に計算機資源4を返却する計算機
資源返却手段14と、計算機資源4を獲得したタスクを
識別するタスク識別手段15とを備え、更に、本発明の
特徴として、中央処理装置1に、タスクのソフトウェア
例外処理ルーチンを定義する例外処理ルーチン定義手段
16と、定義された例外処理ルーチンを起動する例外処
理ルーチン起動手段17とを備え、記憶装置3に、タス
ク制御を行うための制御情報を格納するタスク制御ブロ
ック201と、コンテキストを退避するコンテキスト退
避領域208と、例外用コンテキストを退避する例外用
コンテキスト退避領域210とを含む。
In the embodiment of the present invention, an input / output device 2, a storage device 3 and a computer resource 4 are connected to a central processing unit 1,
In the central processing unit 1, a priority acquisition unit 11 that acquires the priority of a task, a priority comparison unit 12 that compares the priority of the task acquired by this priority acquisition unit, and a computer resource when executing the task. 4, a computer resource acquisition unit 13 that acquires the computer resource 4, a computer resource return unit 14 that returns the computer resource 4 after executing the task, and a task identification unit 15 that identifies the task that has acquired the computer resource 4. Characteristically, the central processing unit 1 is provided with an exception handling routine defining means 16 for defining a software exception handling routine of a task, and an exception handling routine starting means 17 for launching the defined exception handling routine, and the storage device 3 A task control block 201 that stores control information for performing task control, a context save area 208 that saves a context, And a exception for context save area 210 for saving the external context.

【0017】図2は本発明実施例におけるタスク制御ブ
ロックの構成を示すブロック図である。
FIG. 2 is a block diagram showing the configuration of the task control block in the embodiment of the present invention.

【0018】タスク制御ブロック201は、タスクの優
先度を示す優先度202、タスクの優先度を一時的に退
避するための優先度退避領域203、コンテキスト退避
領域208のアドレスを保持するコンテキスト退避領域
アドレス204、定義された例外処理ルーチンを保持す
る例外処理ルーチンのアドレス205、例外用コンテキ
スト退避領域210のアドレスを保持する例外用コンテ
キスト退避領域アドレス206、およびその他のタスク
制御に必要な情報、例えば、タスクの状態などの制御情
報207を保持する。
The task control block 201 includes a priority 202 indicating the priority of a task, a priority save area 203 for temporarily saving the task priority, and a context save area address for holding the addresses of the context save area 208. 204, an exception handling routine address 205 that holds the defined exception handling routine, an exception context saving area address 206 that holds the address of the exception context saving area 210, and other information necessary for task control, such as a task It holds control information 207 such as the state of.

【0019】コンテキスト退避領域208は、例外処理
ルーチン起動時、元のコンテキストを退避するためのデ
ータ構造であり、退避領域209は実際のコンテキスト
を保持する領域である。例外用コンテキスト退避領域2
10は、例外処理ルーチン実行時のコンテキストを退避
するためのデータ構造であり、例外用退避領域211は
実際の例外処理ルーチンのコンテキストを保持する領域
である。
The context save area 208 is a data structure for saving the original context when the exception handling routine is activated, and the save area 209 is an area for holding the actual context. Exception save area 2
Reference numeral 10 is a data structure for saving the context when the exception handling routine is executed, and the exception save area 211 is an area for holding the context of the actual exception handling routine.

【0020】次に、このように構成された本発明実施例
の動作について説明する。図3は本発明実施例における
資源獲得処理の流れを示す流れ図、図4は本発明実施例
および従来例における資源返却処理の流れを示す流れ
図、図5は本発明実施例および従来例における例外処理
ルーチンの終了処理の流れを示す流れ図である。
Next, the operation of the embodiment of the present invention thus constructed will be described. 3 is a flowchart showing the flow of resource acquisition processing in the embodiment of the present invention, FIG. 4 is a flowchart showing the flow of resource return processing in the embodiment of the present invention and the conventional example, and FIG. 5 is exception processing in the embodiment of the present invention and the conventional example. It is a flowchart which shows the flow of the termination process of a routine.

【0021】まず、図3を参照して資源獲得処理につい
て説明する。図8に示す従来のオペレーティング・シス
テムでの処理に対して、例外処理ルーチンが定義されて
いる場合の処理が追加される。例えば、タスクCが計算
機資源Xの獲得を試みると、計算機資源が使用中でなけ
れば、タスクCに計算機資源を割当てて処理を終える。
First, the resource acquisition process will be described with reference to FIG. Processing in the case where an exception handling routine is defined is added to the processing in the conventional operating system shown in FIG. For example, when the task C tries to acquire the computer resource X, if the computer resource is not in use, the task C is allocated with the computer resource and the processing ends.

【0022】計算機資源が(タスクAにより)使用中の
場合、タスクCとタスクAの優先度を比較する。タスク
Cの優先度がタスクAの優先度と同等か低い場合には、
タスクCを計算機資源待ち状態にして終了する。タスク
Cの優先度が高ければ、タスクAの優先度を退避し、タ
スクAの優先度をタスクCの優先度に上げる。
When the computer resource is in use (by task A), the priorities of task C and task A are compared. If the priority of task C is equal to or lower than the priority of task A,
The task C is placed in a computer resource waiting state and the processing is terminated. If the priority of task C is high, the priority of task A is saved and the priority of task A is increased to the priority of task C.

【0023】次いで、タスクAの例外処理ルーチンが定
義されているか否かを判断し、定義されている場合に
は、タスクAのコンテキストを退避し、タスクAの例外
処理ルーチンを起動する。定義されていない場合には、
処理を行わずにタスクCを計算機資源待ち状態にして終
了する。
Then, it is judged whether or not the exception handling routine of task A is defined. If it is defined, the context of task A is saved and the exception handling routine of task A is started. If not defined,
The task C is put in the computer resource waiting state without any processing, and the processing is terminated.

【0024】この資源獲得処理で上げられたタスクAの
優先度は、従来のオペレーティング・システムと同様、
計算機資源の返却処理により復帰される。すなわち、図
4に示すように、タスクAの計算機資源の返却処理を行
い、計算機資源待ちタスクがあるか否かを判断し、ない
場合には終了する。ある場合にはタスクCの待ちを解除
し、退避された優先度があるか否かを判断する。優先度
がない場合は処理を終了し、優先度がある場合にはタス
クAの優先度を復帰させる。
The priority of the task A raised by this resource acquisition processing is the same as in the conventional operating system.
It is restored by the process of returning computer resources. That is, as shown in FIG. 4, the process of returning the computer resource of the task A is performed, it is determined whether there is a computer resource waiting task, and if there is no task, the process ends. If there is, the wait for task C is released, and it is determined whether or not there is a priority saved. If there is no priority, the process is terminated, and if there is a priority, the priority of task A is restored.

【0025】例外処理ルーチン中では、タスクAが計算
機資源を返却し、図5に示すように退避したコンテキス
トを復帰してタスクCの実行を速やかに行えるようにす
る処理を行う。言うまでもなく、例外処理ルーチンが定
義されない場合は、従来と全く同様に動作する。
In the exception handling routine, task A returns computer resources and restores the saved context as shown in FIG. 5 so that task C can be executed quickly. Needless to say, when the exception handling routine is not defined, the operation is exactly the same as the conventional one.

【0026】図6は本発明実施例における優先度の逆転
の改善例を示す図である。
FIG. 6 is a diagram showing an example of improvement of priority inversion in the embodiment of the present invention.

【0027】[0027]

【発明の効果】以上説明したように本発明によれば、あ
るタスクAが獲得した計算機資源を他のタスクBが獲得
しようと試みた場合に、タスクBの優先度がタスクAの
優先度より高ければ、タスクAが定義したソフトウェア
例外処理ルーチンを起動し、オペレーティング・システ
ムが優先度の継承に従い優先度が低いタスクを優先して
実行することを制御することにより、優先度の高いタス
クの実行の遅延を最小限に抑えることができる効果があ
る。
As described above, according to the present invention, when another task B attempts to acquire a computer resource acquired by a task A, the priority of the task B is higher than the priority of the task A. If the value is higher, the software exception handling routine defined by task A is started, and the operating system controls the priority task to execute the lower priority task according to the priority inheritance, thereby executing the higher priority task. This has the effect of minimizing the delay.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明実施例の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】本発明実施例におけるタスク制御ブロックの構
成を示すブロック図。
FIG. 2 is a block diagram showing the configuration of a task control block according to the embodiment of the present invention.

【図3】本発明実施例における資源獲得処理の流れを示
す流れ図。
FIG. 3 is a flowchart showing a flow of resource acquisition processing in the embodiment of the present invention.

【図4】本発明実施例および従来例における資源返却処
理の流れを示す流れ図。
FIG. 4 is a flowchart showing the flow of resource return processing in the embodiment of the present invention and the conventional example.

【図5】本発明実施例および従来例における例外処理ル
ーチンの終了処理の流れを示す流れ図。
FIG. 5 is a flowchart showing a flow of termination processing of an exception processing routine in the embodiment of the present invention and the conventional example.

【図6】本発明実施例における優先度の逆転の改善例を
示す図。
FIG. 6 is a diagram showing an example of improvement of priority inversion according to the embodiment of the present invention.

【図7】従来例におけるタスク制御ブロックの構成を示
す図。
FIG. 7 is a diagram showing a configuration of a task control block in a conventional example.

【図8】従来例における資源獲得処理の流れを示す流れ
図。
FIG. 8 is a flowchart showing a flow of resource acquisition processing in a conventional example.

【図9】従来例における優先度の逆転の例を示す図。FIG. 9 is a diagram showing an example of priority inversion in a conventional example.

【図10】従来例における優先度の継承による優先度の
逆転の改善例を示す図。
FIG. 10 is a diagram showing an example of improvement of priority inversion due to priority inheritance in the conventional example.

【符号の説明】[Explanation of symbols]

1 中央処理装置 2 入出力装置 3 記憶装置 4 計算機資源 11 優先度取得手段 12 優先度比較手段 13 計算機資源獲得手段 14 計算機資源返却手段 15 タスク識別手段 16 例外処理ルーチン定義手段 17 例外処理ルーチン起動手段 201、701 タスク制御ブロック 202、702 優先度 203、703 優先度退避領域 204、704 コンテキスト退避領域アドレス 205 例外処理ルーチンのアドレス 206 例外用コンテキスト退避領域アドレス 207、707 その他のタスク制御情報 208、708 コンテキスト退避領域 209、709 退避領域 210 例外用コンテキスト退避領域 211 例外用退避領域 DESCRIPTION OF SYMBOLS 1 central processing unit 2 input / output device 3 storage device 4 computer resource 11 priority acquisition means 12 priority comparison means 13 computer resource acquisition means 14 computer resource return means 15 task identification means 16 exception processing routine definition means 17 exception processing routine activation means 201, 701 Task control block 202, 702 Priority 203, 703 Priority save area 204, 704 Context save area address 205 Exception handling routine address 206 Exception context save area address 207, 707 Other task control information 208, 708 Context Save area 209, 709 Save area 210 Exception context save area 211 Exception save area

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置に入出力装置、記憶装置、
および計算機資源が接続され、 前記中央処理装置に、 タスクの優先度を取得する優先度取得手段と、 この優先度取得手段が取得したタスクの優先度を比較す
る優先度比較手段と、 タスクを実行するときに前記計算機資源を獲得する計算
機資源獲得手段と、 タスク実行後に前記計算機資源を返却する計算機資源返
却手段と、 前記計算機資源を獲得したタスクを識別するタスク識別
手段とを備えたマルチタスク計算装置において、 前記中央処理装置に、 タスクのソフトウェア例外処理ルーチンを定義する例外
処理ルーチン定義手段と、 定義された例外処理ルーチンを起動する例外処理ルーチ
ン起動手段とを備え、 前記記憶装置に、 タスク制御を行うための制御情報を格納するタスク制御
ブロックと、 コンテキストを退避するコンテキスト退避領域と、 例外用コンテキストを退避する例外用コンテキスト退避
領域とを含むことを特徴とするマルチタスク計算装置。
1. A central processing unit, an input / output device, a storage device,
And a computer resource are connected to the central processing unit, and a priority acquisition unit that acquires the priority of the task, a priority comparison unit that compares the priorities of the tasks acquired by the priority acquisition unit, and execute the task Multitask calculation including computer resource acquisition means for acquiring the computer resource when executing, computer resource return means for returning the computer resource after task execution, and task identification means for identifying the task that acquired the computer resource In the device, the central processing unit is provided with an exception handling routine defining unit that defines a software exception handling routine of a task, and an exception handling routine starting unit that launches the defined exception handling routine, and the storage unit includes a task control unit. Control block that stores the control information for performing the task and the context that saves the context And 避領 zone, multitasking computing device which comprises a exceptions for context save area for saving the exception for context.
JP30203691A 1991-11-18 1991-11-18 Multi-task computer Pending JPH05143370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30203691A JPH05143370A (en) 1991-11-18 1991-11-18 Multi-task computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30203691A JPH05143370A (en) 1991-11-18 1991-11-18 Multi-task computer

Publications (1)

Publication Number Publication Date
JPH05143370A true JPH05143370A (en) 1993-06-11

Family

ID=17904135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30203691A Pending JPH05143370A (en) 1991-11-18 1991-11-18 Multi-task computer

Country Status (1)

Country Link
JP (1) JPH05143370A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000019803A (en) * 1998-09-15 2000-04-15 윤종용 Apparatus and method for processing exception in multi tasking operation system environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000019803A (en) * 1998-09-15 2000-04-15 윤종용 Apparatus and method for processing exception in multi tasking operation system environment

Similar Documents

Publication Publication Date Title
US6006247A (en) Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system
US5390329A (en) Responding to service requests using minimal system-side context in a multiprocessor environment
US7448036B2 (en) System and method for thread scheduling with weak preemption policy
US8145820B2 (en) Multiprocessor system and computer program product
US5274823A (en) Interrupt handling serialization for process level programming
JPH08171494A (en) Multi-thread processor
CN113010275A (en) Interrupt processing method and device
JP2009163658A (en) Input/output controller and its firmware update method
US20030018682A1 (en) Computer system and computer-readable record medium
JP3644042B2 (en) Multitask processing device
JPH05143370A (en) Multi-task computer
US20050060706A1 (en) Method and apparatus for performing real-time commands in a non real-time operating system environment
JPH09160790A (en) Device and method for task schedule
JPH0414376B2 (en)
JP2597283B2 (en) Scheduling method for interrupt
JPH11184828A (en) Test system for multiprocessor system
JPH11203149A (en) Device and method for scheduling task
US20210141661A1 (en) Lightweight Context For CPU Idling Using A Real Time Kernel
JP2553526B2 (en) Multitasking processor
JPH05165652A (en) Task switching control method
CN114443257A (en) Task scheduling method, device and system based on thread pool
WO1992003783A1 (en) Method of implementing kernel functions
JPS63128442A (en) Control device for cyclic start task
JPH03116335A (en) System for transferring from non-privileged cpu to privileged cpu
JPH03245257A (en) Acquisition method for ownership of multiprocessor system resources