JPH05204667A - Task execution control device in computer system - Google Patents

Task execution control device in computer system

Info

Publication number
JPH05204667A
JPH05204667A JP1206992A JP1206992A JPH05204667A JP H05204667 A JPH05204667 A JP H05204667A JP 1206992 A JP1206992 A JP 1206992A JP 1206992 A JP1206992 A JP 1206992A JP H05204667 A JPH05204667 A JP H05204667A
Authority
JP
Japan
Prior art keywords
task
cpu
load
execution
load factor
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
JP1206992A
Other languages
Japanese (ja)
Inventor
Hideaki Matsumoto
英明 松本
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1206992A priority Critical patent/JPH05204667A/en
Publication of JPH05204667A publication Critical patent/JPH05204667A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the production cost of the whole computer system by starting a task at the time of a load rate drop for a CPU when task execution requests are concentrated. CONSTITUTION:This task execution control device is provided with a load status monitoring means 4 for monitoring the current task execution status of the CPU, a load rate calculating means 2 for calculating a load rate indicated by the task execution status time rate of the CPU within a past fixed period counted from the present, a start enable load rate memory 6 for storing a start enable load rate indicating the start allowing drop rate of the load rate in each task, a start queuing task memory 7 for temporarily storing a generated task execution request, and a task judging means 3 for starting a task concerned when the start enable load rates of respective tasks stored in the memory 7 are higher than the load rate during the period of no execution of a task in the CPU. When an execution request for one task is generated, the task is executed only when the current load rate of the CPU is lower than the start enable load rate of the task concerned.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、複数のタスクを備え、
ランダムに発生するタスク実行要求に応じて、指定され
たタスクをCPU(中央処理装置)でもって実行する計
算機システムに係わり、特に複数のタスク実行要求が短
期間に集中した場合における各タスクの起動タイミング
を制御する計算機システムのタスク実行制御装置に関す
る。
BACKGROUND OF THE INVENTION The present invention comprises a plurality of tasks,
Involved in a computer system that executes a specified task by a CPU (central processing unit) according to a task execution request generated at random, and especially when each task execution request is concentrated in a short period of time The present invention relates to a task execution control device of a computer system that controls a computer.

【0002】[0002]

【従来の技術】各種製造設備の制御や各種プラントの監
視設備等に用いられる計算機システムにおいては、プラ
ント等の制御対象からの入力に対して、一定時間内に応
答を返す必要がある。
2. Description of the Related Art In a computer system used for controlling various manufacturing facilities and monitoring facilities for various plants, it is necessary to return a response to an input from a controlled object such as a plant within a fixed time.

【0003】しかし、ある事象の発生した時点のみに多
数のタスク実行要求が発生することがある。このよう
に、短期間のうちに多数のタスク実行要求が発生した場
合に備えて、各タスクには予め優先度が割当てられてい
る。そして、優先度が高いタスクに優先的にCPUを割
当てるようにスケジューリングを行っている。
However, a large number of task execution requests may occur only when an event occurs. In this way, priorities are assigned to the respective tasks in advance, in case a large number of task execution requests are generated within a short period of time. Then, the scheduling is performed so that the CPU having a high priority is preferentially assigned to the CPU.

【0004】しかし、負荷が高いという状況をよくよく
内情を見てみると、計算機システムにおけるCPUに対
して実行要求される多数のタスクのうちには、実行要求
発生と同時に実行する必要のあるタスクと、実行要求の
発生時点から、多少遅れて実行されても業務には支障が
ないタスクもある。
However, looking carefully inside the situation where the load is high, among the many tasks requested to be executed by the CPU in the computer system, the tasks that need to be executed at the same time as the execution request is issued. Then, there is a task that does not hinder the work even if it is executed with a slight delay from the time when the execution request is generated.

【0005】したがって、短期間のうちに多数のタスク
の実行要求が発生すると、原則とし、入力した各タスク
の実効要求を一旦起動待行列に登録して、先頭のタスク
から順番に実行していくのであるが、優先順位の高いタ
スクに対する実行要求が発生すると、この実行要求を前
記起動待行列の最終の位置ではなく、先頭近傍位置に割
込ませるようにしている。したがって、直ちに実行する
必要のあるタスクは、たとえタスク実行要求がすでに多
数発生していたとしても、比較的短時間で起動される。
Therefore, when a large number of task execution requests are generated within a short period of time, as a general rule, the input execution request of each task is once registered in the activation queue and the tasks are sequentially executed from the first task. However, when an execution request for a task with a high priority occurs, this execution request is interrupted not at the final position of the activation queue but at a position near the head. Therefore, a task that needs to be executed immediately is activated in a relatively short time even if a large number of task execution requests have already occurred.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、優先順
位の高いタスクの実行要求が発生すると、このタスクに
優先的にCPUを割当てるタスク実行制御装置において
もまだ改良すべき次のような課題があった。
However, when an execution request for a task with a high priority occurs, the task execution control device that preferentially allocates a CPU to this task has the following problems to be improved. ..

【0007】すなわち、優先度が低いタスクの実行要求
が発生したときに、たまたま、優先度が高いタスクの実
行要求が発生していなければ、優先度の低いタスクは即
座に実行される。そして、一旦実行が開始されると、最
低限のCPU単位時間は、そのタスクに与えられてしま
うようなタスクスケジューリングの計算機システムが多
い。また、優先度の低いタスクでも、共有メモリやファ
イル使用の為に排他的な実行を開始すると、優先度の高
いタスクが動けずに待ち状態になってしまう。
That is, when an execution request for a task with a low priority occurs by chance, if a request for execution with a task with a high priority does not occur, the task with a low priority is executed immediately. In many computer systems for task scheduling, the minimum CPU unit time is given to the task once the execution is started. In addition, even if a task with low priority starts exclusive execution due to use of shared memory or a file, the task with high priority does not move and enters a waiting state.

【0008】具体例を上げると、ソースプログラムのコ
ンパイル等の開発作業等においては、CPUの負荷が高
い期間は、処理を控えるように設定しておきたい。ま
た、1日に1回帳票を出力するような機能があって、そ
れが、たまたまピーク負荷の時期にタスクの実行を必要
とした場合には、CPUの負荷がある程度低下した後
に、この帳票を出力するタスクを実行するのが望まし
い。
As a specific example, in development work such as compiling a source program, it is desirable to set the processing so that it is refrained from processing while the CPU load is high. Also, if there is a function that outputs a form once a day and it happens that it is necessary to execute a task during the peak load period, this form will be output after the CPU load has decreased to some extent. It is desirable to perform the output task.

【0009】なお、高速でタスクを実行できる大容量の
CPUを採用すれば、上述したように高負荷期間におい
て優先順位の低いタスクの実行中に優先順位の高いタス
クの実行要求が待たされる確率は小さくなる。しかし、
CPUの高負荷状態と低負荷状態との差が大きくなるの
で、CPUの機能が有効に使用されないことになり、非
常に不経済である。
If a large-capacity CPU that can execute tasks at high speed is adopted, the probability of waiting for the execution request of the task with the high priority during the execution of the task with the low priority during the high load period is as described above. Get smaller. But,
Since the difference between the high load state and the low load state of the CPU becomes large, the functions of the CPU are not effectively used, which is very uneconomical.

【0010】本発明はこのような事情に鑑みてなされた
ものであり、現在から過去一定期間内におけるCPUの
タスク実行時間割合を示す負荷率でもってタスクの実行
タイミングを判断することによって、タスク実行要求が
集中した場合には、優先順位の低いタスクは、たとえ現
在時点でCPUが空き状態であったとしても暫くしてか
ら起動され、CPUに対す負荷を平準化できると共に、
優先順位の高いタスクの実行要求が保留されることが極
力防止できる計算機システムのタスク実行制御装置を提
供することを目的とする。
The present invention has been made in view of the above circumstances, and the task execution is determined by determining the execution timing of the task with the load rate indicating the task execution time ratio of the CPU within the past certain period. When requests are concentrated, a task with a low priority is activated after a while even if the CPU is currently idle, and the load on the CPU can be leveled.
It is an object of the present invention to provide a task execution control device for a computer system that can prevent pending execution of a task with a high priority as much as possible.

【0011】[0011]

【課題を解決するための手段】上記課題を解消するため
に本発明は、複数のタスクを備え、ランダムに発生する
タスク実行要求に応じて、実行が要求されたタスクをC
PUにて実行するとともに、複数のタスク実行要求が重
なった場合、これらのタスクの実行順をスケジューリン
グする計算機システムのタスク実行制御装置において、
In order to solve the above-mentioned problems, the present invention comprises a plurality of tasks, and executes a task requested to be executed in response to a task execution request randomly generated.
When a plurality of task execution requests overlap with each other in the PU, the task execution control device of the computer system that schedules the execution order of these tasks,

【0012】CPUにおける現在のタスク実行状況を監
視する負荷状況監視手段と、現在から過去一定期間内に
おけるCPUのタスク実行状態の時間割合で示す負荷率
を算出する負荷率算出手段と、各タスク毎に負荷率が幾
らに低下したら起動許可するかを示す起動許容負荷率を
記憶する起動許容負荷率メモリと、発生するタスク実行
要求を一旦記憶する起動待タスクメモリと、CPUがタ
スクを実行していない期間において、起動待タスクメモ
リの各タスクの起動許容負荷率が負荷率より高い場合に
該当タスクを起動させるタスク起動判断手段とを備えた
ものである。
Load status monitoring means for monitoring the current task execution status in the CPU, load ratio calculation means for calculating the load ratio indicated by the time ratio of the task execution status of the CPU within a certain past period from the present, and each task The allowable start load rate memory that stores the allowable start load rate that indicates how much the start rate is permitted when the load rate decreases, the start waiting task memory that temporarily stores the generated task execution request, and the CPU that executes the task. The task activation determining unit is configured to activate the corresponding task when the permissible activation rate of each task in the activation waiting task memory is higher than the load rate during a non-active period.

【0013】[0013]

【作用】このように構成された計算機システムのタスク
実行制御装置においては、現在から過去一定期間内にお
けるCPUのタスク実行状態の時間割合を示す負荷率が
常時計算されている。すなわち、CPUが連続して各タ
スクを実行している期間は負荷率が100%であり、各
タスクが一定の時間間隔を明けて実行されている場合、
負荷率は100%より低い値となる。すなわち、タスク
処理が終了すると時間経過とともに負荷率が低下する。
In the task execution control device of the computer system configured as described above, the load factor indicating the time ratio of the task execution state of the CPU within the past certain period from the present is constantly calculated. That is, when the CPU is continuously executing each task, the load factor is 100%, and when each task is executed at regular time intervals,
The load factor is lower than 100%. That is, when the task processing ends, the load factor decreases with the passage of time.

【0014】また、この計算機システムで実行される各
タスクはその優先順位に従って、負荷率が幾らに低下し
たら起動許可するかを示す起動許可負荷率が起動許可負
荷率メモリに予め設定されている。そして、一つのタス
クに対する実行要求が発生すると、現時点でのCPUの
負荷率が該当タスクの起動許可負荷率よりも低い場合に
のみ、該当タスクが実行される。
In addition, each task executed in this computer system has a start permission load factor which is set in advance in the start permission load factor memory, which indicates how much the start factor is permitted when the load factor decreases according to its priority. Then, when an execution request for one task occurs, the corresponding task is executed only when the current CPU load rate is lower than the activation permission load rate of the corresponding task.

【0015】よって、負荷率が高い期間において優先順
位の低いタスクの実行要求が入力されると、たとえ現在
時点でCPUが空き状態であったとしても、負荷率が低
下するまで、該当タスクは起動されない。すなわち、C
PUの負荷が分散される。また、この期間に優先順位の
高いタスクの実行要求が発生すると、そのタスクは優先
順位の低いタスクより先に実行される。
Therefore, when an execution request for a task with a low priority is input during a period when the load factor is high, the task is activated until the load factor decreases, even if the CPU is currently idle. Not done. That is, C
The load on the PU is distributed. When an execution request for a task with a high priority occurs during this period, the task is executed before the task with a low priority.

【0016】[0016]

【実施例】以下本発明の一実施例を図面を用いて説明す
る。図1は実施例の計算機システムのタスク実行制御装
置の概略構成を示すブロック図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a task execution control device of a computer system according to an embodiment.

【0017】タイマ1は第1の周期ΔT1 経過する毎に
負荷率算出手段2に対して時間割込信号aを送出すると
共に、第2の周期ΔT2 経過する毎にタスク起動判断手
段3に対して時間割込信号bを送出する。
The timer 1 sends a time interrupt signal a to the load factor calculating means 2 each time the first period ΔT 1 has elapsed, and to the task activation determining means 3 each time the second period ΔT 2 has elapsed. And outputs the time interrupt signal b.

【0018】また、負荷率算出手段2には負荷状況監視
手段4および負荷率メモリ5が接続されている。さら
に、タスク起動判断手段3には起動許容負荷率メモリ
6,起動待タスクメモリ7およびタスクメモリ8が接続
されている。なお、上述した負荷率算出手段2,タスク
起動判断手段3,負荷状況監視手段4はそれぞれ制御プ
ログラムによるソフト的手法で構成されている。
The load factor calculation means 2 is connected to a load condition monitoring means 4 and a load factor memory 5. Further, the task activation determination means 3 is connected to the activation allowable load factor memory 6, the activation waiting task memory 7, and the task memory 8. The load factor calculating means 2, the task activation determining means 3, and the load status monitoring means 4 described above are each configured by a software method using a control program.

【0019】タスクメモリ8は例えば磁気ディスク記憶
装置等で構成されており、このタスクメモリ8内にはこ
の計算機システムが実際に各種業務を実行するためのア
プリケーションプログラムからなる複数のタスク8aが
記憶されている。
The task memory 8 is composed of, for example, a magnetic disk storage device, and the task memory 8 stores a plurality of tasks 8a consisting of application programs for the computer system to actually execute various tasks. ing.

【0020】負荷状況監視手段4は、計算機システムの
図示しないCPUが現在タスクを実行期間中であるか否
かを監視する。また、負荷率算出手段2内には、図2に
示すように、1番からM番まで領域番号Aが付された負
荷状態メモリ2aが形成されている。各領域には、前記
各ΔT1 時間経過する毎に負荷状況監視手段4から読出
されたCPUの負荷状態がビットデータRで記憶され
る。CPUがタスクを実行中の場合は[1]に設定さ
れ、CPUがタスクを実行中でない場合、すなわち空き
状態の場合は[0]に設定される。そして、負荷率算出
手段2はタイマ1からΔT1 毎に時間割込信号aが入力
すると、図3に示す流れ図に従って現在のCPUの負荷
率LR を算出する。
The load status monitoring means 4 monitors whether or not a CPU (not shown) of the computer system is currently executing a task. Further, in the load factor calculation means 2, as shown in FIG. 2, a load state memory 2a having area numbers A from 1 to M is formed. In each area, the load status of the CPU read from the load status monitoring means 4 is stored as bit data R every time each ΔT 1 time elapses. It is set to [1] when the CPU is executing the task, and is set to [0] when the CPU is not executing the task, that is, when the CPU is empty. When the timer 1 inputs the time interrupt signal a for each ΔT 1 , the load factor calculation means 2 calculates the current load factor L R of the CPU according to the flowchart shown in FIG.

【0021】図3において、割込処理が開始されると、
負荷状態メモリ2aの領域番号Aを1だけ増加する(A
=A+1)。増加後の領域番号Aが最大領域数Mを越え
た場合、先頭の領域番号1に戻す(A=1)。次に、負
荷状況監視手段4にて検出されているCPUの負荷状況
を調べる。タスク実行中の場合、領域番号Aの指定する
領域のビットデータRA を[1]に設定する。また、C
PUが空き状態の場合、該当領域のビッドデータRA
[0]に設定する。
In FIG. 3, when the interrupt processing is started,
The area number A of the load state memory 2a is incremented by 1 (A
= A + 1). When the increased area number A exceeds the maximum number M of areas, the area number 1 at the beginning is returned (A = 1). Next, the load status of the CPU detected by the load status monitoring means 4 is checked. When the task is being executed, the bit data R A of the area designated by the area number A is set to [1]. Also, C
When the PU is empty, the bid data R A of the corresponding area is set to [0].

【0022】以上の負荷状態メモリ2aに対するビッド
データRA の更新処理が終了すると、負荷状態メモリ2
aのM個のビットデータR1 〜RM のうち[1]に設定
されたビット数S(領域数)を算出する。そして、ビッ
ト数Sを領域数Mで除算して負荷率LR を算出する。 LR =(S/M)×100 (%)
When the above-mentioned update processing of the bid data R A for the load state memory 2a is completed, the load state memory 2
calculating a of the M-bit data R 1 to R number of bits set to [1] of M S (number of areas). Then, the load factor L R is calculated by dividing the bit number S by the region number M. L R = (S / M) × 100 (%)

【0023】よって、この算出された負荷率LR は(Δ
1 ×M)時間前から現在時刻までの一定期間(ΔT1
×M)におけるCPPのタスク実行状態の時間割合
(%)を示す。そして、算出した負荷率LR を負荷率メ
モリ5に書込んで、今回の時間割込処理を終了する。し
たがって、負荷率メモリ5内の負荷率LR はΔT1 毎に
最新の負荷率LR に更新される。
Therefore, the calculated load factor L R is (Δ
T 1 × M) time ago to the current time (ΔT 1
XM) shows the time ratio (%) of the task execution state of the CPP. Then, the calculated load factor L R is written in the load factor memory 5, and the current time interrupt process is terminated. Therefore, the load factor L R in the load factor memory 5 is updated to the latest load factor L R for each ΔT 1 .

【0024】前記起動許容負荷率メモリ6内には、図2
に示すように、各タスク8a毎に該当タスクがCPUの
負荷率LR が幾に低下すると起動許可するかを示す起動
許可負荷率が記憶されている。すなわち、前述したよう
に、優先順位の高いタスク8aに対しては100%また
はそれに近い値が設定され、優先順位の低いタスク8a
に対しては100%より低い値が設定されている。さら
に、起動待タスクメモリ7には、外部から入力されたタ
スク実行要求が時系列的に登録される。
In the start-up allowable load factor memory 6, FIG.
As shown in FIG. 5, the activation permission load factor indicating for each task 8a, which indicates how much the activation load is permitted when the load factor L R of the CPU of the task decreases, is stored. That is, as described above, 100% or a value close to 100% is set for the high priority task 8a, and the low priority task 8a is set.
Is set to a value lower than 100%. Further, task execution requests input from the outside are registered in the activation waiting task memory 7 in time series.

【0025】そして、タスク起動判断手段3は、タイマ
1からΔT2 毎に時間割込信号bが入力すると、図4に
示す流れ図に従って起動待タスクメモリ7に登録されて
いる各タスクに対する起動または保留の判断処理を実行
する。
Then, when the task start judging means 3 receives the time interrupt signal b from the timer 1 every ΔT 2 , the task start judging means 3 starts or holds each task registered in the start waiting task memory 7 according to the flow chart shown in FIG. Perform judgment processing.

【0026】流れ図が開始されされると、負荷状況監視
手段4にて検出されているCPUの負荷状況を調べる。
タスク実行中の場合、新たなタスクを起動できないの
で、なにもせずに今回の時間割込処理を終了する。
When the flow chart is started, the load status of the CPU detected by the load status monitoring means 4 is checked.
If the task is being executed, a new task cannot be started, so the current time interrupt process is terminated without doing anything.

【0027】CPUがタスクを実行していない場合で、
かつ起動待タスクメモリ7にタスクが登録されている場
合に、負荷率メモリ5に記憶されている現在の負荷率L
R を読取る。そして、起動待タスクメモリ7に登録され
ている各タスクの各起動許容負荷率を起動許容負荷率メ
モリ6から読出す。そして、読出した各起動許容負荷率
のうちで現在のCPUの負荷率LR より高い起動許容負
荷率が存在すると、この起動許容負荷率に対応するタス
ク8aが起動可能タスクとなる。そして、この起動可能
タスクが複数存在した場合には、最も起動許容負荷率が
高いタスクを起動する。起動可能タスクが1個の場合、
そのタスクを起動する。なお、起動可能タスクがなけれ
ば、今回の時間割込処理においては、なにもせずに流れ
図を終了する。このように構成された計算機システムの
タスク実行制御装置の特徴を従来タスク実行制御装置の
動作と対比しながら説明する。
When the CPU is not executing a task,
When the task is registered in the activation waiting task memory 7, the current load factor L stored in the load factor memory 5
Read R. Then, each activation allowable load factor of each task registered in the activation waiting task memory 7 is read from the activation allowable load factor memory 6. Then, if there is a start allowable load factor higher than the current load ratio L R of the CPU among the read start allowable load factors, the task 8a corresponding to this start allowable load factor becomes a startable task. When there are a plurality of startable tasks, the task with the highest allowable start load factor is started. If there is only one startable task,
Launch that task. If there is no startable task, the flow chart ends without doing anything in this time interrupt process. The features of the task execution control device of the computer system configured as above will be described in comparison with the operation of the conventional task execution control device.

【0028】図5(a)は従来のタスク実行制御装置に
おける各タスクの起動タイミングを示すタイムチャート
であり、図5(b)は同一条件における実施例のタスク
実行制御装置における各タスクの起動タイミングを示す
タイムチャートである。
FIG. 5A is a time chart showing the activation timing of each task in the conventional task execution control device, and FIG. 5B is the activation timing of each task in the task execution control device of the embodiment under the same conditions. 2 is a time chart showing.

【0029】各タスクA,B,Xはそれぞれ高い同一優
先順位を有し、タスクCはタスクA,B,Xより低い優
先順位を有している。従って、各タスクA,B,C,X
は図2に示す100,100,70,100の起動許容
負荷率を有している。そして、各タスクA,B,C,X
がそれぞれ時刻tA ,tB ,tC ,tX に実行要求が入
力されたとする。
Each of the tasks A, B and X has the same high priority, and the task C has a lower priority than the tasks A, B and X. Therefore, each task A, B, C, X
Has a starting allowable load factor of 100, 100, 70, 100 shown in FIG. And each task A, B, C, X
It is assumed that execution requests are input at times t A , t B , t C , and t X , respectively.

【0030】図5(a)の従来装置においては、優先順
位が高いタスクXの実行要求の入力時刻tX は優先順位
の高いタスクBの終了時刻より遅いので、優先順位の低
いタスクCの実行期間中である。したがって、タスクX
はタスクCが所定の時間を消費した後に実行される。も
し、タスクCの実行中に排他的な処理を開始すると、タ
スクXの順番がまわってきても、走行できないケースが
発生する。よって、タスクXの待時間TX はかなり長い
時間となる。
In the conventional apparatus of FIG. 5 (a), since the input time t X of the execution request of the task X having a high priority is later than the end time of the task B having a high priority, the task C having a low priority is executed. During the period. Therefore, task X
Is executed after task C consumes a predetermined time. If exclusive processing is started during the execution of task C, a case where the vehicle cannot run even if the order of task X is changed occurs. Therefore, the waiting time T X of the task X becomes a considerably long time.

【0031】一方、図5(a)の実施例装置において
は、第1の周期ΔT1 毎にCPUの負荷状況が[1]ま
たは[0]で示される。そして、説明を簡略化するため
に図2に示す負荷状態メモリ2aの領域数Mを例えば5
に設定すると(M=5)、第1の周期ΔT1 経過毎のC
PUの負荷率が算出される。
On the other hand, in the apparatus of the embodiment shown in FIG. 5A, the CPU load condition is indicated by [1] or [0] for each first cycle ΔT 1 . Then, in order to simplify the explanation, the number M of areas of the load state memory 2a shown in FIG.
When set to (M = 5), C for each elapse of the first period ΔT 1
The load factor of the PU is calculated.

【0032】したがって、優先順位の低いタスクCに対
する実行要求が入力した時刻tC におけるCPUの負荷
率は100%である。また、タスクBの終了時刻のおけ
るCPUの負荷率は100%のままである。一方、タス
クCの起動許容負荷率は70%である。よって、たと
え、タスクBが終了して、CPUが空き状態になったと
してもタスクCは起動されない。
Therefore, the load factor of the CPU is 100% at the time t C when the execution request for the task C having the lower priority is input. Further, the load factor of the CPU at the end time of the task B remains 100%. On the other hand, the activation allowable load factor of task C is 70%. Therefore, even if the task B ends and the CPU becomes empty, the task C is not activated.

【0033】そして、時刻tX にタスクXの実行要求が
入力されると、この時刻tX におけるCPUの負荷率L
R はまだ100%であり、また、タスクXの起動許容負
荷率は100%である。よって、このタスクXは待ち時
間がほとんどなく、起動される。
[0033] Then, when at time t X is task demand X is input, the load factor of the CPU at the time t X L
R is still 100%, and the activation allowable load factor of task X is 100%. Therefore, this task X is activated with almost no waiting time.

【0034】タスクXが終了して、CPUがタスクを実
行しない期間が継続して、CPUの負荷率LR が80%
から60%に変化した後の時刻tG にて初めてタスクC
が起動される。
When the task X is completed and the CPU does not execute the task, the CPU load factor L R is 80%.
Task C for the first time at time t G after the change from 60% to 60%
Is started.

【0035】このように、CPUの現在時点における負
荷率LR と実行要求のある各タスクの起動許容負荷率と
の大小関係から該当タスクを直ちに実行するか、または
暫く保留するかを判断している。したがって、多数のタ
スクの実行要求が短期間に発生した場合には、CPUの
負荷率LR が高い状態が継続する。よって、その期間に
入力された優先順位の低いタスクの実行要求はたとえ優
先順位の高いタスクの実行が終了してCPUが空き状態
になつたとしても、一定期間経過して、CPUの負荷率
R が低下しない限り実行されない。従って、CPUの
負荷が大幅に分散される。よって、CPUの処理能力を
有効に使用でき、高処理能力のCPUを用いる必要がな
いので、計算機システム全体の設備費を低減できる。
As described above, it is determined whether the task is to be executed immediately or to be suspended for a while, based on the magnitude relationship between the load factor L R of the CPU at the present time and the activation allowable load factor of each task having an execution request. There is. Therefore, when a large number of task execution requests occur in a short period of time, the CPU load factor L R remains high. Therefore, even if the execution request of the task with the high priority is finished and the CPU is in the idle state, the load request L of the CPU is input for the certain period after the execution request of the task with the low priority is input. Not executed unless R drops. Therefore, the load on the CPU is significantly distributed. Therefore, the processing capacity of the CPU can be effectively used, and it is not necessary to use the CPU having high processing capacity, so that the facility cost of the entire computer system can be reduced.

【0036】また、CPUが忙しい状態においては、た
とえCPUに僅かに空き時間が存在したとしても、その
空き時間は優先順位の高いタスクの実行要求が入力する
場合に備えて待機状態となる。その結果、優先順位の高
いタスクの実行要求が優先順位の低いタスクが終了する
のまで待たされる確率が従来装置に比較して大幅に低減
できる。よって、このタスク実行制御装置が組込まれた
計算機システム全体の動作の信頼性を向上できる。
Further, when the CPU is busy, even if the CPU has a slight free time, the free time is in a standby state in preparation for the input of an execution request of a task having a high priority. As a result, it is possible to significantly reduce the probability that an execution request of a task with a high priority is kept waiting until the task with a low priority is completed, as compared with the conventional device. Therefore, the reliability of the operation of the entire computer system in which this task execution control device is incorporated can be improved.

【0037】[0037]

【発明の効果】以上説明したように本発明のタスク実行
制御装置によれば、現在から過去一定期間内におけるC
PUのタスク実行時間割合を示す負荷率でもってタスク
の実行タイミングを判断し、タスク実行要求が集中した
場合には、優先順位の低いタスクはたとえ現在時点でC
PUが空き状態であったとしても直ぐに起動せずに、C
PUの負荷率が低下した時点で起動するようにしてい
る。したがって、CPUに対す負荷を平準化でき、処理
能力の高いCPUを用いる必要がないので、計算機シス
テム全体の製造費を低減できる。さらに、優先順位の高
いタスクの実行要求が保留されることが極力生じなくで
き、システム全体の動作の信頼性を向上できる。
As described above, according to the task execution control device of the present invention, the C within the certain period in the past from the present
When the task execution timing is determined by the load factor indicating the task execution time ratio of the PU, and the task execution requests are concentrated, the task with the lower priority order is C at the present time.
Even if the PU is empty, it does not start immediately and C
The PU is activated when the load factor decreases. Therefore, the load on the CPU can be leveled and it is not necessary to use a CPU with high processing capacity, so that the manufacturing cost of the entire computer system can be reduced. Further, it is possible to prevent the execution request of the task having the high priority from being suspended as much as possible, and it is possible to improve the reliability of the operation of the entire system.

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

【図1】 本発明の一実施例に係わる計算機システムの
タスク実行制御装置の概略構成を示すブロック図、
FIG. 1 is a block diagram showing a schematic configuration of a task execution control device of a computer system according to an embodiment of the present invention,

【図2】 同実施例装置における各メモリの記憶内容を
示す図、
FIG. 2 is a diagram showing stored contents of each memory in the apparatus of the embodiment,

【図3】 同実施例装置の負荷率算出手順を示す流れ
図、
FIG. 3 is a flow chart showing a load factor calculation procedure of the apparatus of the embodiment.

【図4】 同実施例装置のタスク起動判断手順を示す流
れ図、
FIG. 4 is a flow chart showing a task activation determination procedure of the device of the embodiment.

【図5】 同実施例装置の効果を従来装置と対比して説
明するためのタイムチャート。
FIG. 5 is a time chart for explaining the effect of the apparatus of the embodiment in comparison with the conventional apparatus.

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

1…タイマ、2…負荷率算出手段、3…タスク起動判断
手段、4…負荷状況監視手段、5…負荷率メモリ、6…
起動許容負荷率メモリ、7…起動待タスクメモリ、8…
タスクメモリ。
1 ... timer, 2 ... load factor calculation means, 3 ... task activation determination means, 4 ... load status monitoring means, 5 ... load factor memory, 6 ...
Allowable activation load rate memory, 7 ... Task memory waiting for activation, 8 ...
Task memory.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数のタスクを備え、ランダムに発生す
るタスク実行要求に応じて、実行が要求されたタスクを
CPUにて実行するとともに、複数のタスク実行要求が
重なった場合、これらのタスクの実行順をスケジューリ
ングする計算機システムのタスク実行制御装置におい
て、 前記CPUにおける現在のタスク実行状況を監視する負
荷状況監視手段と、現在から過去一定期間内における前
記CPUのタスク実行状態の時間割合で示す負荷率を算
出する負荷率算出手段と、前記各タスク毎に前記負荷率
が幾らに低下したら起動許可するかを示す起動許容負荷
率を記憶する起動許容負荷率メモリと、前記発生するタ
スク実行要求を一旦記憶する起動待タスクメモリと、前
記CPUがタスクを実行していない期間において、前記
起動待タスクメモリの各タスクの起動許容負荷率が前記
負荷率より高い場合に該当タスクを起動させるタスク起
動判断手段とを備えた計算機システムのタスク実行制御
装置。
1. A plurality of tasks are provided, and a task whose execution is requested is executed by a CPU in response to a task execution request generated at random, and when a plurality of task execution requests overlap each other, these tasks are executed. In a task execution control device of a computer system for scheduling the execution order, a load status monitoring means for monitoring the current task execution status of the CPU, and a load indicated by the time ratio of the task execution status of the CPU within a certain past period from the present. A load factor calculating means for calculating a rate; a start-permissible load factor memory for storing a start-permissible load factor indicating whether to permit start-up when the load factor decreases for each task; and the generated task execution request. The activation wait task memory that is temporarily stored and the activation wait task memory during the period when the CPU is not executing the task. Li each task start allowable load factor is the task execution control unit of a computer system that includes a task activation determination means for activating the corresponding task is higher than the load rate.
JP1206992A 1992-01-27 1992-01-27 Task execution control device in computer system Pending JPH05204667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1206992A JPH05204667A (en) 1992-01-27 1992-01-27 Task execution control device in computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1206992A JPH05204667A (en) 1992-01-27 1992-01-27 Task execution control device in computer system

Publications (1)

Publication Number Publication Date
JPH05204667A true JPH05204667A (en) 1993-08-13

Family

ID=11795319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1206992A Pending JPH05204667A (en) 1992-01-27 1992-01-27 Task execution control device in computer system

Country Status (1)

Country Link
JP (1) JPH05204667A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684512A (en) * 2011-02-16 2012-09-19 美信集成产品公司 Load detection for a low power mode in an ac-dc adapter
JP2013101523A (en) * 2011-11-09 2013-05-23 Fuji Xerox Co Ltd Processing request execution management device and program
US9483320B2 (en) 2014-03-13 2016-11-01 Fujitsu Limited Computing apparatus, method of controlling computing apparatus, and computer-readable storage medium having program for controlling computing apparatus stored therein to move processes to a same processor core for execution
US11762691B2 (en) 2019-09-11 2023-09-19 Fujitsu Limited Information processing system of task scheduling, method of task scheduling, and non-transitory computer-readable storage medium for storing program of task scheduling

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684512A (en) * 2011-02-16 2012-09-19 美信集成产品公司 Load detection for a low power mode in an ac-dc adapter
JP2013101523A (en) * 2011-11-09 2013-05-23 Fuji Xerox Co Ltd Processing request execution management device and program
US9483320B2 (en) 2014-03-13 2016-11-01 Fujitsu Limited Computing apparatus, method of controlling computing apparatus, and computer-readable storage medium having program for controlling computing apparatus stored therein to move processes to a same processor core for execution
US11762691B2 (en) 2019-09-11 2023-09-19 Fujitsu Limited Information processing system of task scheduling, method of task scheduling, and non-transitory computer-readable storage medium for storing program of task scheduling

Similar Documents

Publication Publication Date Title
US6006247A (en) Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system
US7739685B2 (en) Decoupling a central processing unit from its tasks
EP0564256A2 (en) Serialisation of resource access requests for interrupts and processes
JPH07182184A (en) Method for monitoring of overrun state of execution task, method for monitoring and controlling of task-execution -cycle overrun and apparatus for detection of task-execution-cycle overrun
US7203823B2 (en) Partial and start-over threads in embedded real-time kernel
US6795873B1 (en) Method and apparatus for a scheduling driver to implement a protocol utilizing time estimates for use with a device that does not generate interrupts
JP2005276097A (en) Interruption request program and microcomputer
JPH05204667A (en) Task execution control device in computer system
GB2411023A (en) Interrupt priority control within a nested interrupt system.
JP2636722B2 (en) Multitask execution management method
US7080178B2 (en) Interrupt pre-emption and ordering within a data processing system
JPH0926888A (en) Exclusive controller
CN101751293B (en) Method for managing thread group of program
JP2016184315A (en) Electronic controller
JPS6368934A (en) Task scheduing system
WO2019044226A1 (en) Access control device
US20060112395A1 (en) Replacing idle process when doing fast messaging
JPH0836553A (en) Multiprocessor system and task scheduling method therein
JPH0855036A (en) Task scheduling method
JPH06309180A (en) Interrupt controller for computer system
Green Time sharing in a traffic control program
JPH0417034A (en) Task scheduling device
JP2591036B2 (en) I / O control method
CN113722078A (en) High-concurrency database access method, system and equipment based on thread pool
JPH0236971B2 (en)