JPH11249915A - Task management method - Google Patents

Task management method

Info

Publication number
JPH11249915A
JPH11249915A JP4940698A JP4940698A JPH11249915A JP H11249915 A JPH11249915 A JP H11249915A JP 4940698 A JP4940698 A JP 4940698A JP 4940698 A JP4940698 A JP 4940698A JP H11249915 A JPH11249915 A JP H11249915A
Authority
JP
Japan
Prior art keywords
task
cycle
processing time
tasks
group
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
JP4940698A
Other languages
Japanese (ja)
Inventor
Mutsumi Abe
睦 阿部
Junko Shimano
淳子 嶋野
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.)
Ultra High Speed Network and Computer Technology Laboratories
Original Assignee
Ultra High Speed Network and Computer Technology Laboratories
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 Ultra High Speed Network and Computer Technology Laboratories filed Critical Ultra High Speed Network and Computer Technology Laboratories
Priority to JP4940698A priority Critical patent/JPH11249915A/en
Publication of JPH11249915A publication Critical patent/JPH11249915A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To attain the proper management of service quality by registering only the tasks that are accepted after it's decided that the management of service quality can be applied to these tasks on a management table and executing each of these registered tasks based on its cycle and processing time, respectively. SOLUTION: A variety of programs including a task program, etc., are recorded in a storage 103 and then read out as necessary to memory 105. In the memory 105, a task acceptance program is stored in a task acceptance part 110 to make a CPU 101 execute the task acceptance processing. Then a task execution program is stored in a task execution part 111 to make the CPU 101 actually execute every task. The memory 105 contains a management table 112 to record the task information necessary for attaining a multi-task system. The table 112 is used for acceptance and execution of a task whose cycle and processing time are set, i.e., a task whose service quality is controlled.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マルチタスクシス
テムに関し、特にタスクの実行を制御することによりア
プリケーションのサービス品質を制御するタスク管理方
法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multitask system, and more particularly to a task management method for controlling the quality of service of an application by controlling the execution of a task.

【0002】[0002]

【従来の技術】一般に、動画や音声などのリアルタイム
情報を送受信する通信端末では、これら情報の受信、表
示、送信などのタスクをリアルタイムで実行する必要が
あり、このような通信端末では、マルチタスクシステム
を用いてこれら多数のタスクを実行することにより、各
種アプリケーションを提供するものとなっている。した
がって、このようなマルチタスクシステムでは、所定周
期ごとに所定処理時間をそれぞれ確実に各タスクに対し
て割り当てて実行することにより、アプリケーションの
サービス品質を制御する必要がある。
2. Description of the Related Art In general, a communication terminal that transmits and receives real-time information such as moving images and voices needs to perform tasks such as reception, display, and transmission of such information in real time. Various applications are provided by executing many of these tasks using the system. Therefore, in such a multitask system, it is necessary to control the service quality of the application by reliably assigning a predetermined processing time to each task at a predetermined cycle and executing the task.

【0003】従来、タスクの実行を制御することでアプ
リケーションのサービス品質を制御するタスク管理方法
として、例えば、(1)映像データや音声データなどと
いった周期的に発生するデータを処理するタスクに対し
て、周期的に実行割当を行うことで対応するという技術
(例えば、河内谷 他:「連続メディアのQoS制御の
ためのOSサポート」、情報処理学会コンピュータシス
テムシンポジウム、1994など参照)、(2)周期的
な実行および実行時からの遅延保証が必要なタスクを実
行するマルチタスクシステム(例えば、特願平8−33
3667号など参照)がある。
Conventionally, a task management method for controlling the service quality of an application by controlling the execution of a task includes, for example, (1) a task for processing periodically generated data such as video data and audio data. (2) Periodic allocation technology (for example, Kawachiya et al .: "OS support for continuous media QoS control", IPSJ Computer System Symposium, 1994, etc.), (2) Period Multi-task system that executes a task that requires a reliable execution and a delay guarantee from the time of execution (for example, Japanese Patent Application No. 8-33).
No. 3667).

【0004】[0004]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のタスク管理方法は、次のような問題点があっ
た。まず、従来技術(1)のタスク管理方法を使用して
アプリケーションのサービス品質の制御を行うには、そ
のアプリケーションからサービス品質制御を行う機能を
呼びださなくてはならず、そのため、このような機能を
有していない既存のアプリケーションのサービス品質を
制御できない。
However, such a conventional task management method has the following problems. First, in order to control the service quality of an application using the task management method of the prior art (1), a function for performing service quality control must be called from the application. Inability to control the quality of service of existing applications that do not have functionality.

【0005】また、従来技術(2)のマルチタスクシス
テムによれば、起動タスクが複数のタスクを起動する形
式のアプリケーションのタスク管理を行う場合、その起
動タスクに対してのみサービス品質を制御しても、起動
タスクから派生した別のタスクで負荷の重い処理を担当
している場合は、意図したサービス品質に制御できな
い。
Further, according to the multitask system of the prior art (2), when task management of an application in which the start task starts a plurality of tasks is performed, the service quality is controlled only for the start task. However, if another task derived from the activation task is in charge of heavy-load processing, it cannot be controlled to the intended quality of service.

【0006】本発明はこのような課題を解決するための
ものであり、マルチタスクシステムで実現される各種ア
プリケーションに対して、適切なサービス品質制御を実
現できるタスク管理方法を提供することを目的としてい
る。
The present invention has been made to solve such a problem, and an object of the present invention is to provide a task management method capable of realizing appropriate service quality control for various applications realized in a multitask system. I have.

【0007】[0007]

【課題を解決するための手段】このような目的を達成す
るために、本発明による請求項1の発明は、まず、予め
設定された周期またはユーザから指定される周期および
1周期当りにタスクに与えられる処理時間と、サービス
品質制御のためのタスク管理テーブルにすでに登録され
ているタスクとから、サービス品質制御を適用したいタ
スクに対して、サービス品質制御が適用可能かどうか判
断し、適用可と判断し受理したタスクのみを管理テーブ
ルに登録し、それぞれ周期および処理時間に基づき各タ
スクを実行するようにしたものである。
In order to achieve the above object, according to the first aspect of the present invention, first, a predetermined cycle or a cycle designated by a user and a task per one cycle are assigned. From the given processing time and tasks already registered in the task management table for service quality control, determine whether service quality control can be applied to the task to which service quality control is to be applied, and determine Only the tasks determined and accepted are registered in the management table, and each task is executed based on the cycle and the processing time.

【0008】タスク管理テーブルには、各タスクの実行
のための情報のほか、周期と処理時間が記録される。ま
た、サービス品質の制御が適用可能かどうかは、サービ
ス品質が制御されるタスクに対して、所定周期の時間内
で所定処理時間が必ず割り当てられるかどうかで判断す
る。
The task management table records information for executing each task, as well as a cycle and a processing time. Whether the control of the service quality is applicable is determined based on whether or not a predetermined processing time is always allocated within a predetermined period of time to the task for which the service quality is controlled.

【0009】この判断を実際に行う方法は、まずn個
(nは2以上の整数)のタスクを周期の短い順に並び替
え、各タスクに対して以下の式を満たす場合は割当可能
と判断する。i番目(iは1≦i<nとなる整数)のタ
スクiの周期をFi、1周期当りの処理時間をPiと
し、XをYで割った余りをmod(X/Y)と表した場
合、 mod(Fn/Fi)=0 のとき、Ri=Fn/Fi mod(Fn/Fi)≠0 のとき、Ri=Fn/Fi
+1 Fn−Pn>Σ(Ri×Pi) (但し、1≦i<n) となる。
In a method of actually making this determination, first, n (n is an integer of 2 or more) tasks are rearranged in the order of shortest cycle, and if the following formula is satisfied for each task, it is determined that the task can be allocated. . When the cycle of the i-th task i (i is an integer satisfying 1 ≦ i <n) is Fi, the processing time per cycle is Pi, and the remainder obtained by dividing X by Y is mod (X / Y). , Mod (Fn / Fi) = 0, Ri = Fn / Fi mod (Fn / Fi) ≠ 0, Ri = Fn / Fi
+1 Fn−Pn> Σ (Ri × Pi) (where 1 ≦ i <n).

【0010】これら式の意味は、最も大きい周期を有す
るタスクnの周期Fnにおいて、タスクnよりも短い周
期Fiのタスクiを実行する場合に、タスクnの周期F
n内での実行回数分(Ri)とその処理時間(Pi)の
積(Ri×Pi)の総計が、タスクnの周期Fn内での
空き時間(Fn−Pn)より短いという条件を示してい
る。この式が満たされた場合には、全てのタスクに対し
て各タスクの周期内で処理時間を割り当てることが可能
である。
The meaning of these expressions is that when the task i having the cycle Fi shorter than the task n is executed in the cycle Fn of the task n having the largest cycle, the cycle F of the task n
The condition that the total of the product (Ri × Pi) of the number of executions (Ri) in n and the processing time (Pi) is shorter than the free time (Fn-Pn) in the cycle Fn of the task n is shown. I have. If this formula is satisfied, it is possible to allocate a processing time to all tasks within the cycle of each task.

【0011】このようにして、サービス品質制御が適用
可能と判断されたタスクは、サービス品質制御のための
タスク管理テーブルに登録される。そして、タスク管理
テーブルに登録されたタスクの実行は、タスク切り換え
時に周期の短いタスクからチェックされ、周期の開始時
間となったタスクが見つかればそのタスクを処理時間が
消費されるまで実行する。
[0011] In this manner, the task for which the service quality control is determined to be applicable is registered in the task management table for the service quality control. Then, the execution of the tasks registered in the task management table is checked from tasks having a short cycle at the time of task switching, and if a task having a cycle start time is found, the task is executed until the processing time is consumed.

【0012】ここで、タスクの実行中にそのタスクより
周期の短いタスクの周期の開始時間となった場合、タス
クの実行を中断し周期の短いタスクを実行する。周期と
処理時間が設定されたすべてのタスクが処理時間を消費
してしまった場合は、次の周期の開始時間まで通常のタ
スクが実行される。このように、周期および処理時間が
設定されるタスクの実行受付、管理、および実行を行う
ことにより、タスクのサービス品質制御が正確に実行さ
れる。
If the start time of the cycle of a task having a shorter cycle than the task is reached during execution of the task, the task execution is interrupted and the task with a shorter cycle is executed. When all the tasks for which the cycle and the processing time are set have consumed the processing time, the normal task is executed until the start time of the next cycle. In this way, by performing, accepting, managing, and executing the task for which the cycle and the processing time are set, the service quality control of the task is accurately executed.

【0013】また、請求項2の発明は、タスク管理テー
ブルにタスクグループという項目を設け、すでに受理さ
れたタスクから生成されたタスクについては同一のタス
クグループに設定し、各タスクグループではそのグルー
プに属するタスクの数でタスクグループに記録されてい
る処理時間を分割し、タスクグループに属するタスクに
対して再割当てを行うようにしたものである。
Further, according to the invention of claim 2, an item called a task group is provided in the task management table, and tasks generated from tasks already received are set to the same task group, and each task group is assigned to the group. The processing time recorded in the task group is divided by the number of tasks to which the task belongs, and the tasks belonging to the task group are reassigned.

【0014】ここでは、周期および処理時間がはじめて
設定されるタスクについては、タスクグループにそのタ
スクの識別子を記録する。この際、そのタスクの情報か
らそのタスクを生成したタスクをチェックし、登録する
タスクが、すでに周期および処理時間が設定されている
タスクから生成されたものでなければ、そのタスク自身
のタスク識別子、設定される周期およびその処理時間を
新たなタスクグループに設定し登録を行う。
Here, for a task whose cycle and processing time are set for the first time, the identifier of the task is recorded in a task group. At this time, the task that generated the task is checked from the information of the task, and if the task to be registered is not generated from a task whose cycle and processing time are already set, the task identifier of the task itself, The set cycle and the processing time are set and registered in a new task group.

【0015】また、登録するタスクが、すでに周期およ
び処理時間が設定されているタスクから生成されたもの
であれば、生成したタスクのタスク識別子を登録するタ
スクのタスクグループに設定し、さらにそのタスクグル
ープのタスクに対してはそのタスクグループに属するタ
スクの数でタスクグループに記録されている処理時間を
分割し、タスクグループに属するタスクに対して再割当
てを行う。
If the task to be registered is generated from a task whose cycle and processing time have already been set, the task identifier of the generated task is set in the task group of the task to be registered. For the tasks in the group, the processing time recorded in the task group is divided by the number of tasks belonging to the task group, and the tasks belonging to the task group are reassigned.

【0016】実行に関しては、前述の同様に、タスク管
理テーブルに登録されたタスクは、タスク切り換え時に
周期の短いタスクからチェックされ、周期の開始時間と
なったタスクが見つかればそのタスクが処理時間を消費
するまで実行される。ここで、タスク実行中に、そのタ
スクより周期の短いタスクの周期の開始時間となった場
合は、そのタスクの実行が中断されて周期の短いタスク
の実行が行なわれる。
Regarding the execution, as described above, the tasks registered in the task management table are checked from tasks having a short cycle at the time of task switching, and if a task having the cycle start time is found, the task reduces the processing time. Run until consumed. Here, during the task execution, if the start time of the cycle of the task having a shorter cycle than the task is reached, the execution of the task is interrupted and the task with the shorter cycle is executed.

【0017】タスク管理テーブルに登録されている品質
サービス制御対象タスクが、処理時間を消費してしまっ
た場合は、次の周期の開始時間まで通常のタスクが実行
される。このように、周期的に処理時間が割当てられた
品質サービス制御対象タスクから派生したタスクに対し
ても、派生元タスクの処理時間を分割して割り当てるよ
うにしたので、アプリケーションの起動タスクのみに対
してサービス品質の制御が行なわれるといった問題を解
消し、複数のタスクから構成されるアプリケーションの
サービス品質の制御が可能となる。
When the quality service control target task registered in the task management table consumes processing time, a normal task is executed until the start time of the next cycle. In this way, even for tasks that are derived from the quality service control target task to which the processing time is periodically allocated, the processing time of the derived task is divided and allocated, so only the application startup task is allocated. Thus, the problem that the service quality is controlled is solved, and the service quality of an application composed of a plurality of tasks can be controlled.

【0018】また、請求項3の発明は、タスク管理テー
ブルにタスクグループという項目を設け、派生元タスク
の実行可能時間内に、その派生元タスクのタスクグルー
プに属する各タスクを、所定の切り換え時間単位で、順
次、切り換えて実行するようにしたものである。ここで
は、はじめて設定された品質サービス制御対象タスクに
ついては、タスクグループにそのタスク自身のタスク識
別子を記録する。
According to a third aspect of the present invention, an item called a task group is provided in the task management table, and each task belonging to the task group of the derivation source task is set to a predetermined switching time within the executable time of the derivation source task. The program is sequentially switched and executed in units. Here, for the quality service control target task set for the first time, the task identifier of the task itself is recorded in the task group.

【0019】そして、新たに品質サービス制御対象タス
クが登録される場合、そのタスクの情報からそのタスク
を生成したタスクをチェックする。ここで、登録するタ
スクがすでに登録済みの品質サービス制御対象タスクか
ら生成されたものでなければ、そのタスク自身のタスク
識別子と設定される周期と処理時間を新たなタスクグル
ープに設定し登録を行う。
When a new quality service control target task is registered, the task that generated the task is checked from the information on the task. Here, if the task to be registered is not generated from a registered quality service control target task, the task identifier of the task itself, the set cycle and processing time are set in a new task group, and registration is performed. .

【0020】登録するタスクが、すでに登録されている
品質サービス制御対象タスクから生成したものであれ
ば、派生元タスクのタスク識別子を、新たに登録するタ
スクのタスクグループに設定する。実行に関しては、タ
スク管理テーブルに登録されたタスクは、タスク切り換
え時に周期の短いタスクからチェックされ、周期の開始
時間となったタスクグループが見つかればそのタスクグ
ループに属するタスクが、そのマルチタスクシステムの
所定タスク切り換え単位時間ごとに順番、処理時間を消
費するまで実行される。
If the task to be registered is generated from a registered task for quality service control, the task identifier of the derivation source task is set to the task group of the task to be newly registered. Regarding execution, the tasks registered in the task management table are checked from tasks with a short cycle at the time of task switching, and if a task group with the cycle start time is found, the tasks belonging to that task group are assigned to the task of the multitask system. It is executed in order for each predetermined task switching unit time until the processing time is consumed.

【0021】ここで、タスクの実行中に、そのタスクよ
り周期の短いタスクタスクグループの周期の開始時間と
なった場合は、そのタスクの実行は中断され周期の短い
タスクグループのタスクの実行が行なわれる。すべての
品質サービス制御対象タスクが処理時間を消費してしま
った場合は、次の周期の開始時間まで通常のタスクが実
行される。
If the start time of the cycle of the task task group having a shorter cycle than the task is reached during the execution of the task, the execution of the task is suspended and the task of the task group with the shorter cycle is executed. It is. If all the quality service controlled tasks have consumed the processing time, the normal tasks are executed until the start time of the next cycle.

【0022】このように、品質サービス制御対象タスク
から派生したタスクに対しても、派生元タスクの実行可
能時間内に、その派生元タスクのタスクグループに属す
る各タスクを、所定の切り換え時間単位で、順次、切り
換えて実行するようにしたので、アプリケーションの起
動タスクのみに対してサービス品質の制御が行なわれる
といった問題を解消し、複数のタスクから構成されるア
プリケーションのサービス品質の制御が可能となる。
As described above, even for a task derived from the quality service control target task, within the executable time of the derived task, each task belonging to the task group of the derived task is divided by a predetermined switching time unit. Since the switching is executed sequentially, the problem that the service quality is controlled only for the task for starting the application can be solved, and the service quality of the application composed of a plurality of tasks can be controlled. .

【0023】[0023]

【発明の実施の形態】次に、本発明について図面を参照
して説明する。図1は本発明の第1の実施の形態となる
タスク管理方法に用いるマルチタスクシステムのブロッ
ク図である。マルチタスクシステム100は、CPU1
01、タイマ102、例えばハードディスク装置などの
記憶装置103、メモリ105を備えており、これらC
PU101、タイマ102、記憶装置103、メモリ1
05は、バス104を介して接続されている。
Next, the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a multitask system used in the task management method according to the first embodiment of the present invention. The multitasking system 100 includes a CPU 1
01, a timer 102, a storage device 103 such as a hard disk device, and a memory 105.
PU 101, timer 102, storage device 103, memory 1
05 is connected via a bus 104.

【0024】タイマ102は、設定時間ごとにCPU1
01に割り込みをかける機能を有しており、この割り込
みによって設定時間の経過がCPU101に通知され
る。記憶装置103には、タスクプログラムなどの各種
プログラムが記録されており、必要に応じてメモリ10
5に読み出される。
The timer 102 is used by the CPU 1 every set time.
The CPU 101 has a function of interrupting the CPU 101, and the CPU 101 is notified of the elapse of the set time by this interrupt. Various programs such as a task program are recorded in the storage device 103.
5 is read.

【0025】メモリ105上には、後述するタスク受付
処理をCPU101に実行させるためのタスク受付プロ
グラムが格納されるタスク受付部110と、実際に各タ
スクの実行処理をCPU101に実行させるためのタス
ク実行プログラムが格納されるタスク実行部111が設
けられている。
The memory 105 stores a task receiving program for causing the CPU 101 to execute a task receiving process described later, and a task execution unit for actually causing the CPU 101 to execute each task execution process. A task execution unit 111 in which a program is stored is provided.

【0026】また、メモリ105上にはマルチタスクシ
ステムを実現するのに必要なタスクの情報を記録するた
めのタスク管理テーブル112が設けられている。この
タスク管理テーブル112は、周期と処理時間が設定さ
れるタスク、すなわちサービス品質制御対象タスクの受
付および実行に使用される。
The memory 105 is provided with a task management table 112 for recording information on tasks necessary to realize a multitask system. The task management table 112 is used for accepting and executing a task for which a cycle and a processing time are set, that is, a service quality control target task.

【0027】図2はタスク管理テーブルの構成例を示す
図である。タスク管理テーブル112は、管理可能なタ
スク数分のタスク識別子201、タスク情報202、周
期203、周期カウンタ204、処理時間205、処理
時間カウンタ206の各記憶領域から構成されている。
FIG. 2 is a diagram showing a configuration example of the task management table. The task management table 112 includes storage areas for a task identifier 201, task information 202, cycle 203, cycle counter 204, processing time 205, and processing time counter 206 for the number of manageable tasks.

【0028】タスク識別子201は、各タスクを区別す
るために用いられ、タスク情報202は、通常のマルチ
タスクシステムでタスク管理に必要な情報を格納するた
めに用いられる。これらタスク識別子201とタスク情
報202は、通常のマルチタスクシステムでもよく使用
されるものである。
The task identifier 201 is used to distinguish each task, and the task information 202 is used to store information necessary for task management in a normal multitask system. The task identifier 201 and the task information 202 are often used in a normal multitask system.

【0029】周期203、周期カウンタ204、処理時
間205、および処理時間カウンタ206は、本発明で
新たに設けられるものである。周期203は、タスクに
周期が設定されたときの設定値を記録しておくためのも
の、また周期カウンタ204は、周期と処理時間が設定
されたタスクを実行する際に、周期の経過時間を記録す
るためのものである。
The cycle 203, cycle counter 204, processing time 205, and processing time counter 206 are newly provided in the present invention. The cycle 203 is for recording a set value when the cycle is set to the task, and the cycle counter 204 is used to record the elapsed time of the cycle when executing the task for which the cycle and the processing time are set. It is for recording.

【0030】なお、周期203には、予め設定された周
期またはユーザから指定される周期が記録設定される。
処理時間205は、タスクに処理時間が設定されたとき
の設定値を記録しておくためのもの、処理時間カウンタ
206は、タスクが実行された分の時間を記録するため
のものである。
In the cycle 203, a preset cycle or a cycle designated by the user is recorded and set.
The processing time 205 is for recording a set value when the processing time is set for the task, and the processing time counter 206 is for recording the time for executing the task.

【0031】図3は本発明を用いた場合のタスク動作例
を示す図である。図3(a)、(b)は、周期と処理時
間が設定されるタスクa、タスクbを示しており、この
場合、タスクaは周期Fa、処理時間Paであり、タス
クbは周期Fb、処理時間Pbである。また、図3
(c)、(d)はタスクaとタスクbが実行されるとき
のタスク切り換え状況を示している。
FIG. 3 is a diagram showing an example of a task operation when the present invention is used. 3A and 3B show a task a and a task b in which a cycle and a processing time are set. In this case, the task a has a cycle Fa and a processing time Pa, and the task b has a cycle Fb. Processing time Pb. FIG.
(C) and (d) show task switching situations when task a and task b are executed.

【0032】まず、t1の時点でタスクaとタスクbの
周期の開始が一致しているが、タスクaの方が周期が短
いために優先的にタスクが実行される。t1からタスク
aの処理時間Paが経過したt2の時点でタスクが切り
換えられ、タスクbの実行が開始される。t2からt3
までタスクbが実行された時点で、タスクaの次の周期
となったため、タスクが切り換えられてタスクbの実行
が開始される。
First, at the time point t1, the start of the cycle of the task a and the start of the task b match, but the task a is executed preferentially because the cycle of the task a is shorter. The task is switched at the time t2 when the processing time Pa of the task a has elapsed from the time t1, and the execution of the task b is started. From t2 to t3
When the task b is executed up to this point, the next cycle of the task a is reached, so that the task is switched and the execution of the task b is started.

【0033】そして、タスクaの処理時間Paが経過し
たt4の時点で、タスクが切り換えられ、タスクbが開
始される。続くt5でタスクbの1回分の周期が終了す
るが、その時点でタスクbが実行された時間は、次のよ
うに表される。 Pb1+Pb2=(t3−t2)+(t5−t4) =Pb
Then, at time t4 when the processing time Pa of the task a has elapsed, the task is switched, and the task b is started. At time t5, one cycle of the task b is completed. At that time, the time at which the task b is executed is expressed as follows. Pb1 + Pb2 = (t3-t2) + (t5-t4) = Pb

【0034】このことから、タスクbに設定された処理
時間もタスクbの1周期の中で確かに割当てられている
ことがわかる。このように、タスクの切り換え動作を行
うことで、各タスクに設定された周期内に、設定された
処理時間のタスクの実行が可能となる。
From this, it can be seen that the processing time set for task b is certainly allocated in one cycle of task b. By performing the task switching operation as described above, the task can be executed for the set processing time within the cycle set for each task.

【0035】以下、図4を参照して、本発明の第1の実
施の形態によるタスク受付処理について説明する。図4
は本発明の第1の実施の形態によるタスク受付処理例を
示すフローチャートである。
Hereinafter, a task receiving process according to the first embodiment of the present invention will be described with reference to FIG. FIG.
5 is a flowchart illustrating an example of a task receiving process according to the first embodiment of the present invention.

【0036】任意のタスクを品質サービス制御対象タス
クとして受け付けるタスク受付処理は、タスク受付部1
10で行なわれる。このタスク受付処理は、任意のタス
クに対して予め設定された周期あるいはユーザから指定
された周期と、処理時間との設定要求の発生に応じて開
始される(ステップ301)。
The task accepting process for accepting an arbitrary task as a quality service control target task is performed by the task accepting unit 1
Performed at 10. This task accepting process is started in response to a request for setting a processing time and a cycle preset for an arbitrary task or a cycle designated by a user (step 301).

【0037】まず、周期と処理時間をタスクに設定し
て、図3で示したように、各タスクが設定された周期に
処理時間を割当てられるかどうかを判断し、設定要求が
受付けられるがどうか判断する(ステップ302)。判
断方法は、前述したように、すでに周期と処理時間が設
定されたタスクと、新たに設定が要求されたタスクに対
して、以下の条件を満たせば各タスクが周期ごとに処理
時間の割当が可能と判断し、要求を受付ける。
First, a cycle and a processing time are set for a task, and as shown in FIG. 3, it is determined whether or not a processing time can be assigned to the set cycle for each task. A decision is made (step 302). As described above, as described above, for tasks for which the cycle and processing time have already been set, and for tasks for which a new setting has been requested, the processing time for each task can be allocated for each cycle if the following conditions are satisfied. Judge that it is possible and accept the request.

【0038】n個(nは2以上の整数)のタスクを周期
の短い順に並び替え、i番目(iは1≦i<nとなる整
数)のタスクiの周期をFi、1周期当りの処理時間を
Piとし、XをYで割った余りをmod(X/Y)と表
した場合に、 mod(Fn/Fi)=0 のとき、Ri=Fn/Fi mod(Fn/Fi)≠0 のとき、Ri=Fn/Fi
+1 Fn−Pn>Σ(Ri×Pi) (但し、1≦i<n) となる。
The n (n is an integer of 2 or more) tasks are rearranged in the order of the shortest cycle, and the cycle of the i-th (i is an integer satisfying 1 ≦ i <n) task Fi is processed per cycle. When the time is Pi and the remainder of X divided by Y is expressed as mod (X / Y), when mod (Fn / Fi) = 0, Ri = Fn / Fi mod (Fn / Fi) / 0. When Ri = Fn / Fi
+1 Fn−Pn> Σ (Ri × Pi) (where 1 ≦ i <n).

【0039】ここで、設定要求が受付けられた場合は
(ステップ302:YES)、タスク管理テーブル11
2の周期203に設定される周期を記録し、処理時間2
05に設定される処理時間を記録する。そして、周期カ
ウンタ204と処理時間カウンタ206を初期値にリセ
ットする(ステップ304)。
If the setting request is accepted (step 302: YES), the task management table 11
The cycle set in the cycle 203 of the second time is recorded, and the processing time 2
The processing time set to 05 is recorded. Then, the cycle counter 204 and the processing time counter 206 are reset to initial values (step 304).

【0040】最後に、受付成功として値を返し(ステッ
プ305)、一連のタスク受付処理を終了する(ステッ
プ306)。一方、ステップ302において、要求が受
付けられなかった場合は(ステップ302:NO)、受
付失敗として値を返し(ステップ303)、終了する
(ステップ306)。
Finally, a value is returned as success of reception (step 305), and a series of task reception processing ends (step 306). On the other hand, if the request is not accepted in step 302 (step 302: NO), a value is returned as acceptance failure (step 303), and the process ends (step 306).

【0041】したがって、タスク登録の際には、各タス
クについて周期と処理時間の設定が可能かどうか判断さ
れ、設定可能と判断されたタスクについてのみ、品質サ
ービス制御対象タスクとして、タスク管理テーブル11
2(図1参照)に登録される。このようにして登録され
た各タスクは、その周期と処理時間に基づいてタスク実
行部111で、順次、実行される。以下、図5を参照し
て、本発明の第1の実施の形態によるタスク切り換え処
理について説明する。
Therefore, at the time of task registration, it is determined whether the setting of the cycle and the processing time is possible for each task, and only the task determined to be settable is set as a quality service control target task as the task management table 11.
2 (see FIG. 1). The tasks registered in this manner are sequentially executed by the task execution unit 111 based on the cycle and the processing time. Hereinafter, a task switching process according to the first embodiment of the present invention will be described with reference to FIG.

【0042】図5は本発明の第1の実施の形態によるタ
スク切り換え処理例を示すフローチャートである。タス
クの切り換えは、そのマルチタスクシステムのタスク切
り換え単位時間ごとやタスクの終了などによって発生
し、その発生に応じてタスク切り換え処理が実行される
(ステップ401)。
FIG. 5 is a flowchart showing an example of task switching processing according to the first embodiment of the present invention. The task switching occurs at every task switching unit time of the multitask system or at the end of the task, and the task switching process is executed according to the occurrence (step 401).

【0043】まず、前回の実行から経過した時間に基づ
いて、すべての品質サービス制御対象タスクの周期カウ
ンタ204を更新する。ここで、直前まで実行していた
タスクが、品質サービス制御対象タスクであれば、その
タスクの処理時間カウンタを更新する。また、周期カウ
ンタ204が周期203に到達した品質サービス制御対
象タスクがあれば、そのタスクの周期カウンタ204と
処理時間カウンタ206をリセットする(ステップ40
2)。
First, the cycle counters 204 of all the quality service controlled tasks are updated based on the time elapsed from the previous execution. Here, if the task executed immediately before is a quality service control target task, the processing time counter of the task is updated. If there is a quality service control target task whose cycle counter 204 has reached the cycle 203, the cycle counter 204 and the processing time counter 206 of the task are reset (step 40).
2).

【0044】次に、動作可能な品質サービス制御対象タ
スクが存在するか否かを検出する(ステップ403)。
ここでは、周期の短いタスクから調べていき、処理時間
カウンタ206が処理時間205より小さいタスクが見
つかった場合、そのタスクを次に動作するタスクとす
る。
Next, it is detected whether there is any operable quality service control target task (step 403).
Here, the tasks starting from the task with the shortest cycle are examined, and if a task whose processing time counter 206 is smaller than the processing time 205 is found, that task is set as the task that operates next.

【0045】また、処理時間カウンタ206が処理時間
205より小さいタスクが見つからなかった場合は、周
期と処理時間が設定されたタスクで次に動作するタスク
は無いものとする。ここで、次に動作するタスクがあっ
た場合は(ステップ403:YES)、そのタスクへの
タスクの切り換えを行い(ステップ404)、一連のタ
スク切り換え処理を終了する(ステップ406)。
When the processing time counter 206 finds no task smaller than the processing time 205, it is assumed that there is no task that has the cycle and the processing time set and that operates next. If there is a task to be operated next (step 403: YES), the task is switched to that task (step 404), and a series of task switching processing ends (step 406).

【0046】一方、次に動作するタスクがない場合は
(ステップ403:NO)、品質サービス制御対象タス
ク以外のタスクを実行するために、従来と同様の既存の
タスク切り換え処理を行い(ステップ405)、一連の
タスク切り換え処理を終了する(ステップ406)。以
上により、マルチタスクシステムにおいて、品質サービ
ス制御対象タスクに対し、1周期内に確実に処理時間の
割当が可能となり、正確なサービス品質制御が可能とな
る。
On the other hand, if there is no task to be operated next (step 403: NO), an existing task switching process similar to the conventional one is performed to execute a task other than the quality service control target task (step 405). Then, a series of task switching processing ends (step 406). As described above, in the multitask system, the processing time can be reliably assigned to the quality service control target task within one cycle, and accurate service quality control can be performed.

【0047】次に、図6を参照して、本発明の第2の実
施の形態について説明する。本実施の形態では、タスク
をタスクグループで管理し、すでに受理されたタスクか
ら生成されたタスクについては同一のタスクグループに
設定し、各タスクグループではそのグループに属するタ
スクの数でタスクグループに記録されている処理時間を
分割し、タスクグループに属するタスクに対して再割当
てを行うようにしたものである。
Next, a second embodiment of the present invention will be described with reference to FIG. In this embodiment, tasks are managed in task groups, tasks generated from tasks that have already been received are set in the same task group, and each task group is recorded in the task group with the number of tasks belonging to that group. The processing time is divided and the tasks belonging to the task group are reassigned.

【0048】図6は本発明の第2の実施の形態によるタ
スク管理テーブルの構成例を示す図である。図6のタス
ク管理テーブル112は、図2で示したタスク管理テー
ブル112に、タスクグループ207とグループ処理時
間208とを追加した形で構成されている。
FIG. 6 is a diagram showing a configuration example of the task management table according to the second embodiment of the present invention. The task management table 112 in FIG. 6 is configured by adding a task group 207 and a group processing time 208 to the task management table 112 illustrated in FIG.

【0049】タスクグループ207は、品質サービス制
御対象タスクから派生するタスクを管理するために用い
られ、そのタスクの派生元タスクのタスク識別子が記録
される。グループ処理時間208は、派生元タスクに設
定された処理時間を記録しておくために使用される。
The task group 207 is used to manage tasks derived from the quality service control target task, and records the task identifier of the task from which the task is derived. The group processing time 208 is used to record the processing time set for the derivation source task.

【0050】したがって、図4のステップ304を処理
する際に、派生元タスクのタスク識別子201を、派生
したタスクのタスクグループ207に記録するようにし
てもよい。また、派生元タスクの処理時間205を、派
生タスクのグループ処理時間208に記録するようにし
てもよい。
Therefore, when processing step 304 in FIG. 4, the task identifier 201 of the derived task may be recorded in the task group 207 of the derived task. Further, the processing time 205 of the derived task may be recorded in the group processing time 208 of the derived task.

【0051】図7は本発明の第2の実施の形態による新
規タスク管理処理例を示すフローチャートである。新し
くタスクが生成された時点で、この新規タスク管理処理
が開始される(ステップ501)。
FIG. 7 is a flowchart showing an example of a new task management process according to the second embodiment of the present invention. When a new task is created, the new task management process is started (step 501).

【0052】まず、新規タスクが、品質サービス制御対
象タスクから派生したタスクかどうかを判定するため、
新しく生成されたタスクのタスク情報202から、この
タスクを生成した派生元タスクのタスク識別子201を
取得する。そして、例えば、品質サービス制御対象タス
クのタスク識別子201とグループタスク識別子207
との比較により、派生元タスクが品質サービス制御対象
タスクかチェックする(ステップ502)。
First, to determine whether the new task is a task derived from the quality service control target task,
From the task information 202 of the newly generated task, the task identifier 201 of the derivation source task that generated this task is acquired. Then, for example, the task identifier 201 and the group task identifier 207 of the quality service control target task
Then, it is checked whether the derived task is a quality service control target task (step 502).

【0053】ここで、生成されたタスクが品質サービス
制御対象タスクから派生したタスクであれば(ステップ
502:YES)、派生元タスクのタスクグループ20
7の値とグループ処理時間208とを、生成されたタス
クのタスクグループ207とグループ処理時間208へ
記録する(ステップ503)。
Here, if the generated task is a task derived from the quality service control target task (step 502: YES), the task group 20 of the derived source task is set.
The value of 7 and the group processing time 208 are recorded in the task group 207 and the group processing time 208 of the generated task (step 503).

【0054】そして、同じタスクグループのタスクの数
を計算し、グループ処理時間を同じタスクグループのタ
スクの数で割った値を、同じタスクグループに属する各
タスクの処理時間205に書き込み(ステップ50
3)、一連の新規タスク管理処理を終了する(ステップ
504)。一方、新規タスクが、周期と処理時間の設定
されたタスクから派生したタスクでなければ(ステップ
502:NO)、そのまま新規タスク管理処理を終了す
る(ステップ504)。
Then, the number of tasks in the same task group is calculated, and a value obtained by dividing the group processing time by the number of tasks in the same task group is written in the processing time 205 of each task belonging to the same task group (step 50).
3), a series of new task management processing ends (step 504). On the other hand, if the new task is not a task derived from the task for which the cycle and the processing time are set (step 502: NO), the new task management processing is terminated as it is (step 504).

【0055】以上のように、新たなタスク生成時に品質
サービス制御対象タスクからタスクの派生したタスクに
対して、派生元タスクの周期とそのタスクグループに属
する派生タスクの数で分割した処理時間を割当てるよう
にしたので、新規に派生するタスクに対しても派生元タ
スクに割り当てられたサービス品質に基づく制御が可能
となり、任意タスクとそこから派生するタスクで構成さ
れるアプリケーションに対しても、正確なサービス品質
制御が可能となる。
As described above, when a new task is generated, a processing time divided by the cycle of the derivation source task and the number of derivation tasks belonging to the task group is allocated to the task derived from the quality service control target task. As a result, it is possible to control the newly derived task based on the quality of service assigned to the deriving task, and to achieve accurate control for the application consisting of arbitrary tasks and tasks derived from it. Service quality control becomes possible.

【0056】次に、図8を参照して、本発明の第3の実
施の形態について説明する。第2の実施の形態では、派
生タスクに対して、派生元タスクの周期とそのタスクグ
ループに属するタスクの数で分割した処理時間を割当て
るようにしたが、本実施の形態では、派生元タスクの実
行可能時間内に、その派生元タスクのタスクグループに
属する各タスクを、所定の切り換え時間単位で、順次、
切り換えて実行するようにしたものである。
Next, a third embodiment of the present invention will be described with reference to FIG. In the second embodiment, the processing time divided by the cycle of the derivation source task and the number of tasks belonging to the task group is allocated to the derivation task. Within the executable time, each task belonging to the task group of the derivation source task is successively switched in a predetermined switching time unit.
It is designed to be switched and executed.

【0057】図8は本発明の第3の実施の形態によるタ
スク管理テーブルの構成例を示す図である。図8のタス
ク管理テーブル112は、図2で示したタスク管理テー
ブルに、タスクグループ207とタスクポインタ209
を追加した形で構成される。タスクグループ207は、
品質サービス制御対象タスクから派生するタスクを管理
するために用いられ、派生元タスクのタスク識別子20
1が記録される。
FIG. 8 is a diagram showing a configuration example of a task management table according to the third embodiment of the present invention. The task management table 112 shown in FIG. 8 includes the task group 207 and the task pointer 209 in the task management table shown in FIG.
Is added. Task group 207 is
The task identifier 20 is used to manage a task derived from the quality service control target task, and is a task identifier of the derivation source task.
1 is recorded.

【0058】派生元タスクのタスクポインタ209に
は、そのタスクグループに属するタスクのうち、実行が
終了したタスクのタスク識別子が記録される。したがっ
て、図4のステップ304を処理する際に、派生元タス
クのタスク識別子201を、派生したタスクのタスクグ
ループ207に記録するようにしてもよい。
The task pointer 209 of the derivation source task records the task identifier of the task whose execution has been completed among the tasks belonging to the task group. Therefore, when processing step 304 in FIG. 4, the task identifier 201 of the derivation source task may be recorded in the task group 207 of the derived task.

【0059】図9は本発明の第3の実施の形態によるタ
スク動作例を示す図である。図9(a)、(b)は、品
質サービス制御対象タスクa、bを示しており、この場
合、タスクaは周期Fa、処理時間Paであり、タスク
bは周期Fb、処理時間Pbである。
FIG. 9 is a diagram showing an example of a task operation according to the third embodiment of the present invention. 9A and 9B show quality service control target tasks a and b. In this case, task a has a cycle Fa and a processing time Pa, and task b has a cycle Fb and a processing time Pb. .

【0060】また、図9(c)〜(g)は、タスクaと
タスクbが動作するときのタスクの切り換え状況を示し
ている。特に、タスクa1〜a3は、タスクaから派生
したタスクであり、タスクa、a1〜a3は、同じタス
クグループに属する。
FIGS. 9 (c) to 9 (g) show a task switching situation when the tasks a and b operate. In particular, tasks a1 to a3 are tasks derived from task a, and tasks a and a1 to a3 belong to the same task group.

【0061】t1からt2、t3と続く時間間隔は、こ
のマルチタスクシステムのタスク切り換え単位時間であ
り、このタスク切り換え単位時間が経過するごとに、タ
スク切り換え処理が実行される。図9の動作例では、t
1の時点でタスクaとタスクbの周期の開始が一致して
いるが、タスクaの方が周期が短いために優先的にタス
クが実行される。
The time interval from t1 to t2 and t3 is a unit time for task switching of the multitask system, and the task switching process is executed every time the unit time for task switching elapses. In the operation example of FIG.
At the point of time 1, the start of the cycle of the task a and the start of the task b coincide, but the task is executed with priority because the cycle of the task a is shorter.

【0062】タスクa実行中に、t2でタスクの切り換
え時間となるが、ここでは、タスクaから、同じタスク
グループのタスクa1に切り換える。同様に、タスクa
の処理時間Pa分の時間内でタスクが切り換わる場合
は、同じタスクグループのタスクで順番に切り換えら
れ、タスクaの処理時間Pa分経過後のt4で、タスク
bに切り換えられる。
During the execution of the task a, the task switching time is reached at t2. Here, the task a is switched to the task a1 of the same task group. Similarly, task a
When the tasks are switched within the processing time Pa, the tasks are switched in order by the tasks in the same task group, and switched to the task b at t4 after the processing time Pa of the task a has elapsed.

【0063】そして、タスク切り換え単位時間経過後の
t5において、次のタスクaの周期となり、まだ実行さ
れていなかったタスクa3から行なわれるように、タス
クaのタスクグループのタスクは平等に実行される。こ
のような動作を繰り返し、タスクの実行が行なわれる。
この場合でも、各タスクは周期と処理時間とを確実に割
当てられ実行されている。
Then, at t5 after the elapse of the task switching unit time, the cycle of the next task a becomes, and the tasks of the task group of the task a are executed equally, so that the task a3 which has not been executed is executed. . Such an operation is repeated to execute the task.
Even in this case, each task is executed with a cycle and a processing time reliably assigned.

【0064】図10は本発明の第3の実施の形態におけ
るタスク切り換え処理動作例を示すフローチャートであ
る。タスクの切り換えは、そのマルチタスクシステムの
タスク切り換え単位時間ごとに発生し、そのときに実行
される(ステップ601)。まず、前回実行から経過し
た時間に基づいて、品質サービス制御対象タスクグルー
プの派生元タスクの周期カウンタ204を更新する。
FIG. 10 is a flowchart showing an example of a task switching processing operation according to the third embodiment of the present invention. Task switching occurs every task switching unit time of the multitask system, and is executed at that time (step 601). First, the cycle counter 204 of the task from which the quality service control target task group is derived is updated based on the time elapsed from the previous execution.

【0065】そして、直前まで実行していたタスクが、
品質サービス制御対象タスクであれば、そのタスクが属
するタスクグループの派生元タスクの処理時間カウンタ
206を更新し、派生元タスクのタスクポインタ209
に、直前まで実行していたタスクのタスク識別子201
を記録する。派生元タスクのうち、周期カウンタ204
が、周期203に到達したタスクがあれば、そのタスク
グループの派生元タスクの周期カウンタ204と処理時
間カウンタ206とをリセットする(ステップ60
2)。
Then, the task executed until immediately before is
If the task is a quality service control target task, the processing time counter 206 of the derivation source task of the task group to which the task belongs is updated, and the task pointer 209 of the derivation source task is updated.
, The task identifier 201 of the task that has been executed immediately before
Record Among the derived tasks, the period counter 204
However, if there is a task that has reached the cycle 203, the cycle counter 204 and the processing time counter 206 of the task from which the task group is derived are reset (step 60).
2).

【0066】次に、動作可能な品質サービス制御対象タ
スクグループが存在するか否かを検出する(ステップ6
03)。ここでは、周期の短いタスクグループから調べ
ていき、処理時間カウンタ206が処理時間205より
小さいタスクグループが見つかった場合には、そのタス
クグループの派生元タスクのタスクポインタ209に記
録されているタスク識別子を用いて、次に動作するタス
クを見つけ、そのタスクを次に動作するタスクとする。
Next, it is detected whether or not an operable quality service control target task group exists (step 6).
03). Here, the task group is searched from the task group with a short cycle, and if a task group whose processing time counter 206 is smaller than the processing time 205 is found, the task identifier recorded in the task pointer 209 of the task from which the task group is derived. Is used to find a task that operates next, and sets that task as the task that operates next.

【0067】なお、タスクポインタ209から同じタス
クグループに属する次に動作するタスクを見つけるに
は、タスクポインタ209に記録されているタスク識別
子から先(すなわち処理時間205の長い方向)に、各
タスクのタスクグループ207を検索し、派生元タスク
と同一のタスク識別子が記録されているタスクを、次に
動作するタスクとする。また、タスク管理テーブルの最
後まで見つからなかった場合は、派生元タスクを次に動
作するタスクとする。
In order to find the next operating task belonging to the same task group from the task pointer 209, the task identifiers recorded in the task pointer 209 are searched for first (ie, in the direction of the longer processing time 205). The task group 207 is searched, and a task in which the same task identifier as the derivation source task is recorded is set as a task that operates next. If the task is not found up to the end of the task management table, the derivation source task is set as the task that operates next.

【0068】処理時間カウンタ206が処理時間205
より小さいタスクグループが見つからなかった場合は、
品質サービス制御対象タスクのうち、次に動作するタス
クは無いものとする。したがって、次に動作するタスク
があった場合は(ステップ603:YES)、そのタス
クへのタスクの切り換えを行い(ステップ605)、一
連のタスク切り換え処理を終了する(ステップ60
6)。
The processing time counter 206 determines the processing time 205
If no smaller task group is found,
It is assumed that there is no task that operates next among the quality service control target tasks. Therefore, if there is a task to be operated next (step 603: YES), the task is switched to that task (step 605), and a series of task switching processing ends (step 60).
6).

【0069】一方、次に動作するタスクがない場合は
(ステップ603:NO)、品質サービス制御対象タス
ク以外のタスクを実行するために、従来と同様の既存の
タスク切り換え処理を行い(ステップ604)、一連の
タスク切り換え処理を終了する(ステップ606)。
On the other hand, if there is no task to be operated next (step 603: NO), an existing task switching process similar to the conventional one is performed to execute a task other than the quality service control target task (step 604). Then, a series of task switching processing ends (step 606).

【0070】以上のように、派生元タスクの実行可能時
間内に、その派生元タスクのタスクグループに属する各
タスクを、所定の切り換え時間単位で、順次、切り換え
て実行するようにしたので、新規に派生するタスクに対
しても派生元タスクに割り当てられたサービス品質に基
づく制御が可能となり、任意タスクとそこから派生する
タスクで構成されるアプリケーションに対しても、正確
なサービス品質制御が可能となる。
As described above, within the executable time of the derivation source task, each task belonging to the task group of the derivation source task is sequentially switched and executed in a predetermined switching time unit. Dependent tasks can be controlled based on the service quality assigned to the deriving task, and accurate service quality control can be performed for any task and the application derived from it. Become.

【0071】[0071]

【発明の効果】以上説明したように、本発明は、請求項
1に記載のように、任意の周期および処理時間を有する
新規タスクの登録が要求された場合は、その新規タスク
の周期および処理時間と、すでに管理テーブルに登録さ
れているタスクの周期および処理時間とから、新規タス
クの実行制御が可能か否か判断し、実行制御可能であれ
ば、タスク管理テーブルに所定周期ごとに所定処理時間
の割当が行なわれる品質サービス制御対象タスクとして
登録するようにしたものである。したがって、従来のよ
うに、アプリケーションからサービス品質制御を行う機
能を呼びだす必要がなくなり、このような機能を有して
いない既存のアプリケーションに対しても、適切なサー
ビス品質制御を実現できる。
As described above, according to the present invention, when registration of a new task having an arbitrary cycle and processing time is requested, the cycle and processing of the new task are requested. From the time, the cycle and the processing time of the task already registered in the management table, it is determined whether or not the execution control of the new task is possible. If the execution control is possible, the predetermined processing is performed in the task management table at predetermined cycles. It is registered as a quality service control target task to which time is allocated. Therefore, unlike the related art, there is no need to call a function for performing service quality control from an application, and appropriate service quality control can be realized even for an existing application that does not have such a function.

【0072】また、請求項2記載のように、タスク管理
テーブルに登録された各タスクを、それぞれの周期が短
い順に並び替え、最も大きい周期を有するタスクnの周
期Fnにおいて、タスクnよりも短い周期Fiのタスク
iを実行する場合に、タスクnの周期Fn内での実行回
数分(Ri)とその処理時間(Pi)の積(Ri×P
i)の総計が、タスクnの周期Fn内での空き時間(F
n−Pn)より短いという条件が成立した場合に、新規
タスクの実行制御が可能と判断するようにしたので、所
望の周期と処理時間を有する新規タスクに対して、実行
制御可能か否かを正確に判断できる。
As described in claim 2, the tasks registered in the task management table are rearranged in the order of the shortest cycle, and the cycle Fn of the task n having the largest cycle is shorter than the task n. When executing the task i of the cycle Fi, the product (Ri × P) of the number of executions (Ri) of the task n within the cycle Fn and the processing time (Pi)
i) is the total free time (F) within the cycle Fn of task n.
(n-Pn), it is determined that the execution control of the new task can be performed when the condition that the length is shorter than n-Pn) is satisfied. Can be determined accurately.

【0073】また、請求項3記載のように、すでにタス
ク管理テーブルに登録されている品質サービス制御対象
タスクから派生されたタスクについては、派生元タスク
と同一のタスクグループとして管理し、任意のタスクグ
ループに複数のタスクが属する場合は、派生元タスクに
割り当てられた処理時間をそのタスクグループに属する
タスクの数で分割して新たな処理時間を算出し、この新
たな処理時間を、そのタスクグループに属する各タスク
に対して再割り当てするようにしたものである。
As described in claim 3, a task derived from a quality service control target task already registered in the task management table is managed as the same task group as the derivation source task, and any task If multiple tasks belong to a group, the processing time assigned to the derivation source task is divided by the number of tasks belonging to the task group to calculate a new processing time, and this new processing time is assigned to the task group. Are reassigned to each task belonging to.

【0074】さらに、請求項4記載のように、すでにタ
スク管理テーブルに登録されている品質サービス制御対
象タスクから派生されたタスクについては、派生元タス
クと同一のタスクグループとして管理し、任意のタスク
グループに複数のタスクが属する場合は、派生元タスク
の実行可能時に、所定の切り換え時間単位でこれらタス
クを順番に切り換えて実行するようにしたものである。
したがって、タスクグループごとに、当初割り当てられ
た周期および処理時間で、派生元タスクおよび派生タス
クが実行制御され、派生タスクで負荷の重い処理を担当
している場合でも、意図したサービス品質制御を実現で
きる。
Further, as described in claim 4, a task derived from the quality service control target task already registered in the task management table is managed as the same task group as the derivation source task, and any task When a plurality of tasks belong to a group, these tasks are sequentially switched and executed in a predetermined switching time unit when the derived task is executable.
Therefore, the original task and the derived task are executed and controlled at the cycle and processing time initially assigned to each task group, and the intended service quality control is achieved even when the derived task is in charge of heavy processing. it can.

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

【図1】 本発明におけるマルチタスクシステムのブロ
ック図である。
FIG. 1 is a block diagram of a multitask system according to the present invention.

【図2】 本発明の第1の実施の形態によるタスク管理
テーブルの構成例を示す説明図である。
FIG. 2 is an explanatory diagram showing a configuration example of a task management table according to the first embodiment of the present invention.

【図3】 本発明の第1の実施の形態によるタスク動作
例を示す説明図である。
FIG. 3 is an explanatory diagram showing an example of a task operation according to the first embodiment of the present invention.

【図4】 周期と処理時間の設定の受付動作例を示すフ
ローチャートである。
FIG. 4 is a flowchart illustrating an example of a receiving operation of setting a cycle and a processing time.

【図5】 タスク切り換え時の処理動作例を示すフロー
チャートである。
FIG. 5 is a flowchart illustrating an example of a processing operation at the time of task switching.

【図6】 本発明の第2の実施の形態によるタスク管理
テーブルの構成例を示す説明図である。
FIG. 6 is an explanatory diagram showing a configuration example of a task management table according to the second embodiment of the present invention.

【図7】 本発明の第2の実施の形態による新規タスク
管理処理例を示すフローチャートである。
FIG. 7 is a flowchart illustrating an example of a new task management process according to the second embodiment of the present invention.

【図8】 本発明の第3の実施の形態によるタスク管理
テーブルの構成例を示す説明図である。
FIG. 8 is an explanatory diagram showing a configuration example of a task management table according to a third embodiment of the present invention.

【図9】 本発明の第3の実施の形態によるタスク動作
例を示す説明図である。
FIG. 9 is an explanatory diagram showing a task operation example according to the third embodiment of the present invention.

【図10】本発明の第3の実施の形態におけるタスク切
り換え処理例を示すフローチャートである。
FIG. 10 is a flowchart illustrating an example of a task switching process according to the third embodiment of the present invention.

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

100…マルチタスクシステム、101…CPU、10
2…タイマ、103…記録装置、104…バス、105
…メモリ、110…タスク受付部、111…タスク実行
部、112…タスク管理テーブル、201…タスク識別
子、202…タスク情報、203…周期、204…周期
カウンタ、205…処理時間、206…処理時間カウン
タ。
100: Multitask system, 101: CPU, 10
2: timer, 103: recording device, 104: bus, 105
... Memory, 110 task accepting unit, 111 task executing unit, 112 task management table, 201 task identifier, 202 task information, 203 cycle, 204 cycle counter, 205 processing time, 206 processing time counter .

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 マルチタスクシステムで実行される各タ
スクごとに、タスクを実行する周期と、その1周期内で
タスク実行に使用可能な処理時間とをタスク管理テーブ
ルで管理し、それぞれの周期と処理時間に基づいて各タ
スクの実行制御を行うことにより、品質サービス制御を
行うタスク管理方法において、 任意の周期および処理時間を有する新規タスクの登録が
要求された場合は、 その新規タスクの周期および処理時間と、すでに管理テ
ーブルに登録されているタスクの周期および処理時間と
から、新規タスクの実行制御が可能か否か判断し、 実行制御可能であれば、タスク管理テーブルに所定周期
ごとに所定処理時間の割当が行なわれる品質サービス制
御対象タスクとして登録し、 タスク管理テーブルに登録されている各品質サービス制
御対象タスクを、それぞれの周期および処理時間に基づ
いて実行制御することを特徴とするタスク管理方法。
A task management table manages, for each task executed in a multitask system, a cycle at which the task is executed and a processing time available for executing the task within one cycle. In the task management method for quality service control by controlling the execution of each task based on the processing time, if registration of a new task having an arbitrary cycle and processing time is requested, the cycle and Based on the processing time, the cycle and the processing time of the task already registered in the management table, it is determined whether or not the execution control of the new task is possible. Each quality service registered as a quality service controlled task to which processing time is allocated and registered in the task management table The control target task, the task management method and executes control based on the respective periods and processing time.
【請求項2】 請求項1記載のタスク管理方法におい
て、 n個(nは2以上の整数)のタスクを周期の短い順に並
び替え、i番目(iは1≦i<nとなる整数)のタスク
iの周期をFi、1周期当りの処理時間をPiとし、X
をYで割った余りをmod(X/Y)と表した場合に、 mod(Fn/Fi)=0 のとき、Ri=Fn/Fi mod(Fn/Fi)≠0 のとき、Ri=Fn/Fi
+1 Fn−Pn>Σ(Ri×Pi) となる条件が成立した場合に、新規タスクの実行制御が
可能と判断することを特徴とするタスク管理方法。
2. The task management method according to claim 1, wherein n (n is an integer of 2 or more) tasks are rearranged in the order of shortest cycle, and the i-th task (i is an integer satisfying 1 ≦ i <n) is performed. The cycle of task i is Fi, the processing time per cycle is Pi, and X
Is expressed as mod (X / Y), when mod (Fn / Fi) = 0, Ri = Fn / Fi mod (Fn / Fi) ≠ 0, and Ri = Fn / Fi
+1 Fn-Pn> Σ (Ri × Pi) When a condition is satisfied, it is determined that execution control of a new task is possible.
【請求項3】 請求項1または2記載ののタスク管理方
法において、 すでにタスク管理テーブルに登録されている品質サービ
ス制御対象タスクから派生されたタスクについては、派
生元タスクと同一のタスクグループとして管理し、 任意のタスクグループに複数のタスクが属する場合は、
派生元タスクに割り当てられた処理時間をそのタスクグ
ループに属するタスクの数で分割して新たな処理時間を
算出し、 この新たな処理時間を、そのタスクグループに属する各
タスクに対して再割り当てすることを特徴とするタスク
管理方法。
3. The task management method according to claim 1, wherein a task derived from the quality service control target task already registered in the task management table is managed as the same task group as the derivation source task. If multiple tasks belong to any task group,
The processing time allocated to the derivation source task is divided by the number of tasks belonging to the task group to calculate a new processing time, and the new processing time is reallocated to each task belonging to the task group. A task management method characterized in that:
【請求項4】 請求項1または2記載のタスク管理方法
において、 すでにタスク管理テーブルに登録されている品質サービ
ス制御対象タスクから派生されたタスクについては、派
生元タスクと同一のタスクグループとして管理し、 任意のタスクグループに複数のタスクが属する場合は、
派生元タスクの実行可能時に、所定の切り換え時間単位
でこれらタスクを順番に切り換えて実行することを特徴
とするタスク管理方法。
4. The task management method according to claim 1, wherein a task derived from the quality service control target task already registered in the task management table is managed as the same task group as the derivation source task. , If multiple tasks belong to any task group,
A task management method characterized in that when a derivation source task is executable, these tasks are sequentially switched and executed in a predetermined switching time unit.
JP4940698A 1998-03-02 1998-03-02 Task management method Pending JPH11249915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4940698A JPH11249915A (en) 1998-03-02 1998-03-02 Task management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4940698A JPH11249915A (en) 1998-03-02 1998-03-02 Task management method

Publications (1)

Publication Number Publication Date
JPH11249915A true JPH11249915A (en) 1999-09-17

Family

ID=12830177

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4940698A Pending JPH11249915A (en) 1998-03-02 1998-03-02 Task management method

Country Status (1)

Country Link
JP (1) JPH11249915A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100462988B1 (en) * 2000-11-24 2004-12-23 엘지전자 주식회사 Method for managing multi process in computer system
WO2006126331A1 (en) * 2005-05-27 2006-11-30 Sony Computer Entertainment Inc. Information processing method, information processing device, and server
JP2015135644A (en) * 2014-01-20 2015-07-27 三菱電機株式会社 Control unit and vehicle control device using the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100462988B1 (en) * 2000-11-24 2004-12-23 엘지전자 주식회사 Method for managing multi process in computer system
WO2006126331A1 (en) * 2005-05-27 2006-11-30 Sony Computer Entertainment Inc. Information processing method, information processing device, and server
US8266621B2 (en) 2005-05-27 2012-09-11 Sony Computer Entertainment Inc. Information processing method, information processing apparatus, and server
JP2015135644A (en) * 2014-01-20 2015-07-27 三菱電機株式会社 Control unit and vehicle control device using the same

Similar Documents

Publication Publication Date Title
KR100864964B1 (en) Arithmetic Processing System and Arithmetic Processing Control Method, Task Management System and Task Management Method, and Storage Medium
US7137115B2 (en) Method for controlling multithreading
US6560628B1 (en) Apparatus, method, and recording medium for scheduling execution using time slot data
WO2012066640A1 (en) Computer system, migration method, and management server
JP2013232207A (en) Method, system, and apparatus for scheduling computer micro-jobs for execution without disruption
JP2007193471A (en) Reservation management program, reservation management device and reservation management method
JPH10283211A (en) Processor resource management method for multi-system environment
JPWO2007072544A1 (en) Information processing apparatus, computer, resource allocation method, and resource allocation program
CN115617497B (en) Thread processing method, scheduling component, monitoring component, server and storage medium
JP3664021B2 (en) Resource allocation method by service level
JPH11249915A (en) Task management method
CN112631994A (en) Data migration method and system
CN112416596A (en) Node scheduling method, device and equipment
JP2000056989A (en) Task designing method
JP2001236236A (en) Task controller and its task scheduling method
JP2010026828A (en) Method for controlling virtual computer
JP2001282560A (en) Virtual computer control method, its performing device and recording medium recording its processing program
JP2008225641A (en) Computer system, interrupt control method and program
JP5056346B2 (en) Information processing apparatus, information processing system, virtual server movement processing control method, and program
CN112948106A (en) Task allocation method and device
JP2000122883A (en) Task managing method
JP3839259B2 (en) Multithread control method, multithread control apparatus, recording medium, and program
JPH0612395A (en) Task allocating method in multiprocessor system
JP3998686B2 (en) CPU usage time counting method and job control apparatus using this CPU usage time
CN110968418A (en) Signal-slot-based large-scale constrained concurrent task scheduling method and device