JP2007018268A - Task scheduling method, task scheduling device, and task scheduling program - Google Patents

Task scheduling method, task scheduling device, and task scheduling program Download PDF

Info

Publication number
JP2007018268A
JP2007018268A JP2005199161A JP2005199161A JP2007018268A JP 2007018268 A JP2007018268 A JP 2007018268A JP 2005199161 A JP2005199161 A JP 2005199161A JP 2005199161 A JP2005199161 A JP 2005199161A JP 2007018268 A JP2007018268 A JP 2007018268A
Authority
JP
Japan
Prior art keywords
task
response time
time ratio
processor
tasks
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
JP2005199161A
Other languages
Japanese (ja)
Inventor
Masa Ogino
雅 荻野
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.)
Sumitomo Heavy Industries Ltd
Original Assignee
Sumitomo Heavy Industries Ltd
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 Sumitomo Heavy Industries Ltd filed Critical Sumitomo Heavy Industries Ltd
Priority to JP2005199161A priority Critical patent/JP2007018268A/en
Publication of JP2007018268A publication Critical patent/JP2007018268A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve real-time property in task execution. <P>SOLUTION: In a task scheduling method which performs assignment of a plurality of tasks by a multiprocessor, the problem is solved by performing assignment of the above multiprocessor to a plurality of tasks based on; a task execution priority set up beforehand for each of a plurality of tasks; performance of each multiprocessor; turnaround time ratio of task execution performed in predetermined time among the multiprocessors; and the worst turnaround time ratio obtained from a result of measurement of the turnaround time ratio for predetermined number of times. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、タスクスケジューリング方法、タスクスケジューリング装置、及びタスクスケジューリングプログラムに係り、特にタスク実行におけるリアルタイム性を向上させるためのタスクスケジューリング方法、タスクスケジューリング装置、及びタスクスケジューリングプログラムに関する。   The present invention relates to a task scheduling method, a task scheduling apparatus, and a task scheduling program, and more particularly to a task scheduling method, a task scheduling apparatus, and a task scheduling program for improving real-time performance in task execution.

一般に、マルチプロセッサを用いて複数のタスクを実行させる場合には、それぞれのタスクをどのプロセッサに割り当てるかというスケジューリングが必要となる。図1は、マルチプロセッサシステムの概要構成の一例を示す図である。図1に示すように、マルチプロセッサシステム10においては、複数のプロセッサ11−1〜11−Nを有し、各プロセッサ11間は共有バス等のネットワーク12によってそれぞれが結合されている。また、ネットワーク12には、タスクスケジューリング装置13が接続されており、タスクスケジューリング装置13により、各プロセッサ11に対するタスクの割り当てを行っている。   Generally, when a plurality of tasks are executed using a multiprocessor, it is necessary to schedule to which processor each task is assigned. FIG. 1 is a diagram illustrating an example of a schematic configuration of a multiprocessor system. As shown in FIG. 1, the multiprocessor system 10 includes a plurality of processors 11-1 to 11 -N, and the processors 11 are coupled to each other by a network 12 such as a shared bus. Further, a task scheduling device 13 is connected to the network 12, and tasks are assigned to the processors 11 by the task scheduling device 13.

また、図2は、従来のマルチプロセッサシステムのスケジューリング方式の一例を示す図である。例えば、図2に示すように複数のタスク(タスク0〜タスク5)がある場合のスケジューリング方式は、通常予めプロセッサ11−1〜11−N毎に担当させるタスクを静的に割り当て、各タスクは割り当てられた各プロセッサ上でのみ実行を許される。   FIG. 2 is a diagram showing an example of a scheduling method of a conventional multiprocessor system. For example, as shown in FIG. 2, the scheduling method in the case where there are a plurality of tasks (task 0 to task 5) is normally statically assigned in advance to each processor 11-1 to 11-N in charge of each task. Only allowed to run on each assigned processor.

なお、上述したようなスケジューリング方式では、タスク毎に実行許可時間が存在する。図3は、タスクの実行許可時間を説明するための一例の図である。図3に示すように、タスクの実行許可時間とは、タスクの実行時間ではなく、起動要求発生からタスクの実行締め切りまでの時間を示す。また、タスクの応答時間とは、タスクの起動要求発生からタスクの実行完了までの時間を示す。このように、プロセッサの処理能力等に合わせて静的に実行するタスクが割り当てられる。   In the scheduling method as described above, there is an execution permission time for each task. FIG. 3 is an example of a task execution permission time. As shown in FIG. 3, the task execution permission time indicates not the task execution time but the time from the start request generation to the task execution deadline. The task response time indicates the time from when a task activation request is generated until the task execution is completed. In this way, tasks to be executed statically are allocated in accordance with the processing capacity of the processor.

なお、このようなスケジューリング方式を用いたマルチプロセッサシステムに関する技術として、プロセッサの負荷を指標とすることでプロセッサ毎のタスクの再割り当てを行うものがある(例えば、特許文献1参照。)。
特開2004-192400号公報
As a technique related to a multiprocessor system using such a scheduling method, there is one that reassigns a task for each processor by using a processor load as an index (see, for example, Patent Document 1).
JP 2004-192400 A

ところで、タスクによってはリアルタイム性が要求される場合がある。ここで、リアルタイム性とは、タスクの実行が実行許可時間以内に完了する性質を示す。このとき、プロセッサ毎に実行できるタスクが決められているため、あるプロセッサに処理時間の長いタスクが多く割り当てられる場合、リアルタイム性が確保できなくなるという問題がある。   By the way, some tasks may require real-time performance. Here, the real-time property indicates a property that task execution is completed within an execution permission time. At this time, since a task that can be executed for each processor is determined, there is a problem in that real-time performance cannot be ensured when many tasks having a long processing time are assigned to a certain processor.

また、特許文献1に示されているようなマルチプロセッサシステムのスケジューリング方式は、プロセッサの負荷を指標とすることでプロセッサ毎のタスクの再割り当てを行っており、プロセッサ毎に実行できるタスクの割り当てが動的に変更できる。しかしながら、特許文献1に示されているようなスケジューリング方式では、負荷の指標として計算処理速度と応答時間の短縮化については考慮されているもののリアルタイム性についての対応はされておらず、タスクの実行許可時間内にタスクの実行が完了されない状況が起こり得るという問題がある。   In addition, the scheduling method of a multiprocessor system as shown in Patent Document 1 reassigns tasks for each processor using the processor load as an index, and task assignment that can be executed for each processor is performed. Can be changed dynamically. However, in the scheduling method as shown in Patent Literature 1, although the calculation speed and response time reduction are considered as load indexes, the real time property is not dealt with, and task execution is not performed. There is a problem that a situation where the execution of the task is not completed within the permitted time may occur.

本発明は、上述した問題点に鑑みなされたものであり、タスク実行におけるリアルタイム性を向上させるためのタスクスケジューリング方法、タスクスケジューリング装置、及びタスクスケジューリングプログラムを提供することを特徴とする。   The present invention has been made in view of the above-described problems, and provides a task scheduling method, a task scheduling apparatus, and a task scheduling program for improving real-time performance in task execution.

上述の目的を達成するために、本発明は、マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリング方法において、前記複数のタスク毎に予め設定されたタスク実行の優先度と、前記マルチプロセッサ個々の処理能力と、前記マルチプロセッサのうち所定時間内に行ったタスク実行に対する応答時間比率と、前記応答時間比率を所定回数分計測した結果から得られる最悪応答時間比率とに基づいて、前記複数のタスクに対する前記マルチプロセッサの割り当てを行うことを特徴とする。   In order to achieve the above-described object, the present invention provides a task scheduling method for assigning a plurality of tasks by a multiprocessor, a task execution priority preset for each of the plurality of tasks, and each of the multiprocessors. The plurality of tasks based on processing power, a response time ratio for task execution performed within a predetermined time of the multiprocessor, and a worst response time ratio obtained from a result of measuring the response time ratio for a predetermined number of times The multiprocessor is assigned to the above.

また、本発明は、マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリング方法において、前記マルチプロセッサを構成する複数のプロセッサの個々の処理能力を計測する処理能力計測ステップと、前記複数のタスク毎に予め設定されたタスク優先度と、前記処理能力計測ステップにより得られる処理能力結果から各タスクに対する初期割り当て行う割り当てステップと、前記割り当てステップにより得られるタスクの割り当て結果に基づいてタスクを実行し、所定時間におけるタスクの応答時間比率を計測する応答時間比率計測ステップと、前記応答時間比率を所定回数分計測して、計測した複数の応答時間比率から最悪応答時間比率を選出する最悪応答比率選出ステップと、各タスクの前記最悪応答時間比率と設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行う再割り当てステップとを有することを特徴とする。   Further, the present invention provides a task scheduling method for allocating a plurality of tasks by a multiprocessor, a processing capacity measuring step for measuring individual processing capacities of a plurality of processors constituting the multiprocessor, and for each of the plurality of tasks. A task is executed based on a task priority set in advance, an allocation step for initial allocation to each task from the processing capability result obtained in the processing capability measurement step, and a task allocation result obtained in the allocation step. A response time ratio measuring step for measuring a response time ratio of a task in time; a worst response ratio selecting step for measuring the response time ratio for a predetermined number of times and selecting a worst response time ratio from the measured response time ratios; , The worst response time ratio and setting of each task Based on the rate, and having a re-allocation step of performing the re-allocation of the processor to the task.

これにより、タスクの優先度と、プロセッサ毎の処理能力と、応答時間比率と、最悪応答時間比率とに基づいて、最適なプロセッサにタスクを実行させることができる。したがって、タスク実行におけるリアルタイム性を向上させることができる。   As a result, it is possible to cause the optimum processor to execute the task based on the task priority, the processing capability of each processor, the response time ratio, and the worst response time ratio. Therefore, the real-time property in task execution can be improved.

更に、前記再割り当てステップは、前記タスクの再割り当てを行う際、各タスクにおける最悪応答時間比率の見積もりを行い、最悪応答時間比率が最も低いプロセッサに前記タスクの再割り当てを行うことが好ましい。これにより、予め各タスクの最悪応答時間比率の見積もりを行うことで、最適なプロセッサにタスクの割り当てを行うことができる。   Furthermore, it is preferable that the reassignment step estimates a worst response time ratio in each task when reassigning the task, and reassigns the task to a processor having the lowest worst response time ratio. Thereby, the task can be allocated to the optimum processor by estimating the worst response time ratio of each task in advance.

更に、前記再割り当てステップは、前記複数のプロセッサ毎にタスクの再割り当ての許可又は禁止を設定することが好ましい。これにより、再割り当てを行う前にプロセッサに対して再割り当ての許可又は禁止を設定することができる。したがって、無駄なく迅速に再割り当てを行うことができる。   Furthermore, it is preferable that the reassignment step sets permission or prohibition of task reassignment for each of the plurality of processors. Thereby, permission or prohibition of reassignment can be set for the processor before reassignment is performed. Therefore, reallocation can be performed quickly without waste.

また、本発明は、マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリング装置において、前記マルチプロセッサを構成する複数のプロセッサの個々の処理能力を計測する処理能力計測手段と、前記複数のタスク毎に予め設定されたタスク優先度と、前記処理能力計測手段により得られる処理能力結果から各タスクに対する初期割り当て行うタスク割当手段と、前記タスク割当手段により得られるタスクの割り当て結果に基づいてタスクを実行し、所定時間におけるタスクの応答時間比率を計測し、更に計測した前記応答時間比率を所定回数分計測して得られる複数の応答時間比率から最悪応答時間比率を選出する応答時間比率計測手段とを有し、前記タスク割当手段は、各タスクの前記最悪応答時間比率と設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行うことを特徴とする。これにより、タスクの優先度と、プロセッサ毎の処理能力と、応答時間比率と、最悪応答時間比率とに基づいて、最適なプロセッサにタスクを実行させることができる。したがって、タスク実行におけるリアルタイム性を向上させることができる。   Further, the present invention provides a task scheduling apparatus for allocating a plurality of tasks by a multiprocessor, a processing capacity measuring means for measuring individual processing capacities of a plurality of processors constituting the multiprocessor, and for each of the plurality of tasks. Based on the task priority set in advance and the processing capability result obtained by the processing capability measuring means, task allocation means for initial allocation to each task, and the task is executed based on the task allocation result obtained by the task allocation means. Response time ratio measuring means for measuring a response time ratio of a task at a predetermined time and further selecting a worst response time ratio from a plurality of response time ratios obtained by measuring the measured response time ratio for a predetermined number of times. And the task allocation means includes the worst response time ratio and the set ratio of each task. Based on, and performs reallocation of the processor to the task. As a result, it is possible to cause the optimum processor to execute the task based on the task priority, the processing capability of each processor, the response time ratio, and the worst response time ratio. Therefore, the real-time property in task execution can be improved.

更に、前記タスク割当手段は、前記タスクの再割り当てを行う際、各タスクにおける最悪応答時間比率の見積もりを行い、最悪応答時間比率が最も低いプロセッサに前記タスクの再割り当てを行うことが好ましい。これにより、予め各タスクの最悪応答時間比率の見積もりを行うことで、最適なプロセッサにタスクの割り当てを行うことができる。   Furthermore, it is preferable that the task allocating unit estimates a worst response time ratio in each task when reassigning the task, and reassigns the task to a processor having the lowest worst response time ratio. Thereby, the task can be allocated to the optimum processor by estimating the worst response time ratio of each task in advance.

更に、前記タスク割当手段は、前記複数のプロセッサ毎にタスクの再割り当ての許可又は禁止を設定することが好ましい。これにより、再割り当てを行う前にプロセッサに対して再割り当ての許可又は禁止を設定することができる。したがって、無駄なく迅速に再割り当てを行うことができる。   Furthermore, it is preferable that the task assignment unit sets permission or prohibition of task reassignment for each of the plurality of processors. Thereby, permission or prohibition of reassignment can be set for the processor before reassignment is performed. Therefore, reallocation can be performed quickly without waste.

また、本発明は、マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリングをコンピュータに実行させるためのタスクスケジューリングプログラムにおいて、前記マルチプロセッサを構成する複数のプロセッサの個々の処理能力を計測する処理能力計測処理と、前記複数のタスク毎に予め設定されたタスク優先度と、前記処理能力計測処理により得られる処理能力結果から各タスクに対する初期割り当て行う割り当て処理と、前記割り当て処理により得られるタスクの割り当て結果に基づいてタスクを実行し、所定時間におけるタスクの応答時間比率を計測する応答時間比率計測処理と、前記応答時間比率を所定回数計測して、計測した複数の応答時間比率から最悪応答時間比率を選出する最悪応答比率選出処理と、各タスクの前記最悪応答時間比率と設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行う再割り当て処理とをコンピュータに実行させる。これにより、タスクの優先度と、プロセッサ毎の処理能力と、応答時間比率と、最悪応答時間比率とに基づいて、最適なプロセッサにタスクを実行させることができる。したがって、タスク実行におけるリアルタイム性を向上させることができる。また、実行プログラムをコンピュータにインストールすることにより、容易にタスクスケジューリング処理を実現することができる。   Further, the present invention provides a task scheduling program for causing a computer to execute task scheduling for allocating a plurality of tasks by a multiprocessor, and measuring the processing capacity of each of the plurality of processors constituting the multiprocessor. Processing, task priority preset for each of the plurality of tasks, allocation processing for initial allocation to each task from the processing capability result obtained by the processing capability measurement processing, and task allocation result obtained by the allocation processing Based on the response time ratio measurement process for measuring the response time ratio of the task at a predetermined time, and measuring the response time ratio a predetermined number of times, and calculating the worst response time ratio from the measured response time ratios. The worst response ratio selection process to select and each Based on the above worst response time ratio and set the ratio of the disk, to perform a re-assignment processing for reallocation of the processor to the task to the computer. As a result, it is possible to cause the optimum processor to execute the task based on the task priority, the processing capability of each processor, the response time ratio, and the worst response time ratio. Therefore, the real-time property in task execution can be improved. In addition, task scheduling processing can be easily realized by installing an execution program in a computer.

更に、前記再割り当て処理は、前記タスクの再割り当てを行う際、各タスクにおける最悪応答時間比率の見積もりを行い、最悪応答時間比率が最も低いプロセッサに前記タスクの再割り当てを行うことが好ましい。これにより、予め各タスクの最悪応答時間比率の見積もりを行うことで、最適なプロセッサにタスクの割り当てを行うことができる。   Furthermore, it is preferable that the reassignment process estimates a worst response time ratio in each task when reassigning the task, and reassigns the task to a processor having the lowest worst response time ratio. Thereby, the task can be allocated to the optimum processor by estimating the worst response time ratio of each task in advance.

更に、前記再割り当て処理は、前記複数のプロセッサ毎にタスクの再割り当ての許可又は禁止を設定することを特徴とする。これにより、再割り当てを行う前にプロセッサに対して再割り当ての許可又は禁止を設定することができる。したがって、無駄なく迅速に再割り当てを行うことができる。   Furthermore, the reassignment process sets permission or prohibition of task reassignment for each of the plurality of processors. Thereby, permission or prohibition of reassignment can be set for the processor before reassignment is performed. Therefore, reallocation can be performed quickly without waste.

本発明によれば、タスク実行におけるリアルタイム性を向上させることができる。   According to the present invention, real-time performance in task execution can be improved.

以下に、本発明におけるタスクスケジューリング方法、タスクスケジューリング装置、及びタスクスケジューリングプログラムを好適に実施した形態について、図面を用いて説明する。なお、後述する本発明の実施形態において、マルチプロセッサシステムの概要構成は、上述した図1と同様の構成を用いる。   Hereinafter, preferred embodiments of a task scheduling method, a task scheduling apparatus, and a task scheduling program according to the present invention will be described with reference to the drawings. In the embodiment of the present invention described later, the general configuration of the multiprocessor system uses the same configuration as that in FIG.

図4は、タスクスケジューリング装置の機能構成の一例を示す図である。図4に示すタスクスケジューリング装置20は、送受信手段21と、処理能力計測手段22と、タスク割当手段23と、応答時間比率計測手段24と、記憶手段25と、制御手段26とを有するよう構成されている。なお、タスクスケジューリング装置20は、図1に示すタスクスケジューリング装置13と同様の位置に設置される。   FIG. 4 is a diagram illustrating an example of a functional configuration of the task scheduling apparatus. The task scheduling apparatus 20 shown in FIG. 4 is configured to include a transmission / reception unit 21, a processing capability measurement unit 22, a task allocation unit 23, a response time ratio measurement unit 24, a storage unit 25, and a control unit 26. ing. The task scheduling device 20 is installed at the same position as the task scheduling device 13 shown in FIG.

送受信手段21は、タスクスケジューリング装置20と各プロセッサ11−1〜11−N間との制御信号やデータ等の送受信をネットワーク12を介して行う。また、処理能力計測手段22は、システム起動時に各プロセッサの処理能力(パフォーマンス)を計測する。なお、処理能力を計測する際には、予め設定された処理を行って各プロセッサ11−1〜11−Nの処理能力が把握できるような計測用タスクを用いる。なお、計測用タスクは、予め記憶手段25に記憶されている。処理能力計測手段22は、この計測用タスクを送受信手段21からネットワーク12を介して各プロセッサ11−1〜11−Nに送信させる。また、各プロセッサ11で実行されることで得られる実行結果は、ネットワーク12を介して送受信手段21で受け取り記憶手段25に記憶される。なお、上述の制御は、制御手段26により行われる。   The transmission / reception means 21 transmits / receives control signals, data, and the like between the task scheduling apparatus 20 and the processors 11-1 to 11 -N via the network 12. Further, the processing capacity measuring means 22 measures the processing capacity (performance) of each processor when the system is activated. When measuring the processing capacity, a measurement task is used so that the processing capacity of each of the processors 11-1 to 11-N can be grasped by performing a preset process. The measurement task is stored in the storage unit 25 in advance. The processing capacity measurement unit 22 transmits the measurement task from the transmission / reception unit 21 to the processors 11-1 to 11-N via the network 12. The execution result obtained by being executed by each processor 11 is received by the transmission / reception means 21 via the network 12 and stored in the storage means 25. The above-described control is performed by the control means 26.

タスク割当手段23は、処理能力計測手段22により計測された各プロセッサ11−1〜11−Nの処理能力結果から実際に実行させる複数のタスクに予め設定された優先度(タスク優先度)に基づいてタスクの初期割り当てを行う。なお、この優先度は、任意に設定されていてもよく、また複数のタスクにおける順序や処理の複雑さ等に基づいて設定されていてもよい。また、タスク割当手段23は、初期割り当てが完了した後、制御手段26にマルチプロセッサシステムを実行状態に移行させる。なお、実際に実行させる複数のタスクは、予め記憶手段25に記憶されている。   The task allocation unit 23 is based on the priorities (task priorities) set in advance for a plurality of tasks to be actually executed from the processing capability results of the processors 11-1 to 11-N measured by the processing capability measuring unit 22. To perform initial task assignment. This priority may be set arbitrarily, or may be set based on the order of a plurality of tasks, the complexity of processing, and the like. Further, the task allocation unit 23 causes the control unit 26 to shift the multiprocessor system to the execution state after the initial allocation is completed. A plurality of tasks that are actually executed are stored in the storage unit 25 in advance.

また、タスク割当手段23は、予め設定されたタスクの実行許可時間内における実行時間の比率(実行時間比率)を算出し、その算出結果や後述する応答時間比率計測手段24により計測される各プロセッサに対する応答時間比率の計測結果等に基づいて、記憶手段25に記憶されているまだ実行されていないタスクの再割り当てを行う。なお、タスクの再割り当ては、タスクの優先度、プロセッサの処理能力、応答時間比率、及び最悪応答時間比率等を用いて、例えばタスクの実行が実行許可時間以内に完了し、最悪応答時間比率が各プロセッサ11−1〜11−Nに対して予め設定されている設定比率を超えないような予め設定された条件を満たすようにタスクの再割り当てを行う。つまり、各タスクの最悪応答時間比率及び各プロセッサ処理能力に基づいてプロセッサ毎のタスクの再割り当てを行う。更に、タスク割当手段23は、プロセッサ11−1〜11−N毎にタスクの再割り当ての許可又は禁止の制限を設定することもできる。なお、具体的なタスクの割り当て手法については後述する。   The task allocation unit 23 calculates a ratio of execution time (execution time ratio) within a preset execution permission time of the task, and each processor measured by the calculation result and a response time ratio measurement unit 24 described later. Based on the measurement result of the response time ratio to the task, the task that has not been executed yet and is stored in the storage unit 25 is reassigned. Note that task reallocation is performed using task priority, processor processing capacity, response time ratio, worst response time ratio, etc., for example, task execution is completed within the execution permission time, and the worst response time ratio is Tasks are reassigned so as to satisfy a preset condition that does not exceed a preset setting ratio for each of the processors 11-1 to 11-N. That is, the task is reassigned for each processor based on the worst response time ratio of each task and each processor processing capacity. Further, the task assignment unit 23 can set restrictions on whether to permit or prohibit task reassignment for each of the processors 11-1 to 11-N. A specific task assignment method will be described later.

次に、応答時間比率計測手段24は、予め設定されたタスクの実行許可時間内における応答時間(タスクの起動要求発生からタスクの実行完了までの時間)の比率(応答時間比率)を計測する。また、応答時間比率計測手段24は、応答時間比率の計測を予め設定された所定の回数分繰り返し行い、計測した応答時間比率の中で最大のもの(最悪応答時間比率)を選出する。また、応答時間比率計測手段24は、最悪応答時間比率と、設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行うか否かを判断し、必要に応じてタスク割当手段23に再割り当ての指示を出力する。また、応答時間比率計測手段24は、計測結果等を記憶手段25に記憶させる。   Next, the response time ratio measuring unit 24 measures the ratio (response time ratio) of the response time (time from the task activation request generation to the completion of task execution) within the preset task execution permission time. The response time ratio measuring means 24 repeatedly measures the response time ratio for a predetermined number of times set in advance, and selects the maximum one (worst response time ratio) among the measured response time ratios. Further, the response time ratio measuring unit 24 determines whether or not to reassign the processor to the task based on the worst response time ratio and the set ratio, and reassigns to the task allocation unit 23 as necessary. Output instructions. Further, the response time ratio measuring unit 24 stores the measurement result and the like in the storage unit 25.

記憶手段25は、上述した計測用タスクを記憶したり、タスク割当手段23により割り当てられた内容を記憶したり、応答時間比率計測手段24における計測結果等を記憶する。更に、記憶手段25は、マルチプロセッサシステムを終了する際、現時点で各タスクに対するプロセッサの割り当て先の情報を記憶する。これにより、今回のシステムの実行により設定された各タスクに対するプロセッサの割り当て先を次回のシステム再起動後に継続させることができる。これにより、再起動後に割り当て処理をやり直す必要がなく迅速にタスクの実行を行うことができる。   The storage unit 25 stores the above-described measurement task, stores the contents allocated by the task allocation unit 23, and stores the measurement results and the like in the response time ratio measurement unit 24. Further, when the multiprocessor system is terminated, the storage means 25 stores information on the processor assignment destination for each task at the present time. As a result, the processor assignment destination for each task set by the execution of the current system can be continued after the next system restart. As a result, the task can be executed quickly without having to redo the assignment process after restarting.

また、制御手段26は、各種演算やタスクスケジューリング装置20における各構成部とのデータの入出力や実行指示等の処理を行い、タスクスケジューリング装置20全体の制御を行う。具体的には、制御手段26は、例えばマルチプロセッサシステムを実行状態へ移行したり、タスク再割り当ての指示等を行う。   In addition, the control unit 26 performs various operations and processes such as data input / output with each component in the task scheduling apparatus 20 and execution instructions, and controls the entire task scheduling apparatus 20. Specifically, the control unit 26, for example, shifts the multiprocessor system to an execution state or issues a task reassignment instruction.

上述したタスクスケジューリング装置20を用いて、タスクの実行が実行許可時間以内に完了するように、プロセッサ毎のタスク割り当てを動的に変更するスケジューリング方式を実現することができる。これにより、マルチプロセッサシステムにおいてリアルタイム性を向上させることができる。   By using the task scheduling device 20 described above, it is possible to realize a scheduling method that dynamically changes task assignment for each processor so that task execution is completed within an execution permission time. Thereby, real-time property can be improved in a multiprocessor system.

ここで、本発明におけるタスクスケジューリング装置20は、上述した専用の装置構成等を用いて、マルチプロセッサシステムにおけるタスクスケジューリング処理を行うこともできるが、各構成における処理をコンピュータに実行させることができる実行プログラムを生成し、例えば、汎用のパーソナルコンピュータ、サーバ等にそのプログラムをインストールすることにより、本発明におけるタスクスケジューリング処理を実現することができる。   Here, the task scheduling apparatus 20 according to the present invention can perform task scheduling processing in a multiprocessor system using the above-described dedicated apparatus configuration, etc., but can execute a process in each configuration on a computer. By generating a program and installing the program in, for example, a general-purpose personal computer or server, the task scheduling process in the present invention can be realized.

<ハードウェア構成>
ここで、本発明におけるタスクスケジューリング処理が実行可能なコンピュータのハードウェア構成例について図を用いて説明する。図5は、本発明におけるタスクスケジューリング処理が実現可能なハードウェア構成の一例を示す図である。
<Hardware configuration>
Here, a hardware configuration example of a computer capable of executing the task scheduling process according to the present invention will be described with reference to the drawings. FIG. 5 is a diagram showing an example of a hardware configuration capable of realizing the task scheduling process according to the present invention.

図5におけるコンピュータ本体には、入力装置31と、出力装置32と、ドライブ装置33と、補助記憶装置34と、メモリ装置35と、各種制御を行うCPU(Central Processing Unit)36と、ネットワーク接続装置37とを有するよう構成されており、これらはシステムバスBで相互に接続されている。   5 includes an input device 31, an output device 32, a drive device 33, an auxiliary storage device 34, a memory device 35, a CPU (Central Processing Unit) 36 for performing various controls, and a network connection device. 37, and these are connected to each other by a system bus B.

入力装置31は、コンピュータを使用するユーザが操作するキーボード及びマウス等のポインティングデバイスを有しており、ユーザからのプログラムの実行等、各種操作信号を入力する。出力装置32は、本発明における処理を行うためのコンピュータ本体を操作するのに必要な各種ウィンドウやデータ等を表示するディスプレイ(モニタ)を有し、CPU36が有する制御プログラムによりタスクスケジューリングプログラムの実行経過や結果等を表示することができる。   The input device 31 has a pointing device such as a keyboard and a mouse operated by a user who uses a computer, and inputs various operation signals such as execution of a program from the user. The output device 32 has a display (monitor) for displaying various windows and data necessary for operating the computer main body for performing processing in the present invention, and the execution schedule of the task scheduling program is controlled by the control program of the CPU 36. And results can be displayed.

ここで、本発明において、コンピュータ本体にインストールされる実行プログラムは、例えば、CD−ROM等の記録媒体38等により提供することができる。プログラムを記録した記録媒体38は、ドライブ装置33にセット可能であり、記録媒体38に含まれる実行プログラムが、記録媒体38からドライブ装置33を介して補助記憶装置34にインストールされる。   Here, in the present invention, the execution program installed in the computer main body can be provided by the recording medium 38 such as a CD-ROM, for example. The recording medium 38 on which the program is recorded can be set in the drive device 33, and the execution program included in the recording medium 38 is installed in the auxiliary storage device 34 from the recording medium 38 via the drive device 33.

補助記憶装置34は、ハードディスク等のストレージ手段であり、本発明における実行プログラムや、コンピュータに設けられた制御プログラム、上述した計測用タスク等の複数のタスクや処理能力計測結果、応答時間比率計測結果等を蓄積し必要に応じて入出力を行うことができる。   The auxiliary storage device 34 is a storage unit such as a hard disk, and includes an execution program according to the present invention, a control program provided in a computer, a plurality of tasks such as the above-described measurement task, a processing performance measurement result, and a response time ratio measurement result. Etc. and can be input / output as necessary.

CPU36は、OS(Operating System)等の制御プログラム、及びメモリ装置35により読み出され格納されている実行プログラムに基づいて、各種演算や各ハードウェア構成部とのデータの入出力等、コンピュータ全体の処理を制御して、タスクスケジューリングプログラムにおける各処理を実現することができる。また、プログラムの実行中に必要な各種情報等は、補助記憶装置34から取得することができ、また格納することもできる。   Based on a control program such as an OS (Operating System) and an execution program read and stored by the memory device 35, the CPU 36 performs various operations and inputs / outputs data to / from each hardware component. Each process in the task scheduling program can be realized by controlling the process. Various information necessary during the execution of the program can be acquired from the auxiliary storage device 34 and can be stored.

ネットワーク接続装置37は、通信ネットワーク等と接続することにより、実行プログラムを通信ネットワークに接続されている他の端末等から取得したり、プログラムを実行することで得られた実行結果又は本発明における実行プログラムを他の端末等に提供することができる。また、ネットワーク接続装置37により各プロセッサと制御信号やデータの送受信を行うことができる。   The network connection device 37 acquires an execution program from another terminal connected to the communication network by connecting to a communication network or the like, or an execution result obtained by executing the program or an execution in the present invention The program can be provided to other terminals. Further, the network connection device 37 can transmit / receive control signals and data to / from each processor.

上述したようなハードウェア構成により、特別な装置構成を必要とせず、低コストで本発明におけるタスクスケジューリング処理を実現することができる。また、プログラムをインストールすることにより、容易にタスクスケジューリング処理を実現することができる。   With the hardware configuration as described above, the task scheduling process according to the present invention can be realized at a low cost without requiring a special device configuration. In addition, task scheduling processing can be easily realized by installing a program.

<タスクスケジューリング処理手順>
次に、本発明における実行プログラムにおけるタスクスケジューリング処理手順についてフローチャートを用いて説明する。図6は、本発明におけるタスクスケジューリング処理手順を示す一例のフローチャートである。
<Task scheduling procedure>
Next, a task scheduling process procedure in the execution program according to the present invention will be described with reference to a flowchart. FIG. 6 is a flowchart of an example showing a task scheduling processing procedure in the present invention.

システムの起動時やプログラムの実行開始指示等により、タスクスケジューリング処理が実行されると、まず各タスクに対するプロセッサの割り当て先が設定(記憶)されているかを判断する(S01)。これは、後述するS12において、前回のシステムの実行により設定された各タスクに対するプロセッサの割り当て先を今回のシステム再起動後に有効にすることで、システムの起動毎に割り当て処理を行う必要がなく迅速にタスクの実行を行うための処理である。   When the task scheduling process is executed at the time of starting the system or in response to a program execution start instruction, it is first determined whether or not a processor assignment destination is set (stored) for each task (S01). In S12, which will be described later, the processor assignment destination for each task set by the previous system execution is made effective after the current system restart, so that it is not necessary to perform the assignment process every time the system is started. This is a process for executing a task.

ここで、各タスクに対するプロセッサの割り当て先が設定されていない場合(S01において、NO)、プロセッサの処理能力を計測する(S02)。このとき、上述したように予め計測用タスクを用意しておき、その計測用タスクを各プロセッサに用いることによりプロセッサ毎の処理能力(パフォーマンス)を計測する。次に、プロセッサ処理能力及び各タスクに与えられた優先度(タスク優先度)よりタスクの初期割り当てを行う(S03)。   Here, when the processor assignment destination for each task is not set (NO in S01), the processing capacity of the processor is measured (S02). At this time, as described above, a measurement task is prepared in advance, and the processing task (performance) for each processor is measured by using the measurement task for each processor. Next, the task is initially assigned based on the processor processing capacity and the priority (task priority) given to each task (S03).

次に、S03の処理が終了後、又はS01の処理において予めプロセッサの割り当て先が設定されている場合(S01において、YES)、マルチプロセッサシステムをタスク実行状態に移行させる(S04)。   Next, after the processing of S03 is completed or when the processor allocation destination is set in advance in the processing of S01 (YES in S01), the multiprocessor system is shifted to the task execution state (S04).

次に、実行後から所定の周期になったかを判断し(S05)、所定周期になった場合(S05において、YES)、実行許可時間に対する各タスクの応答時間の比率(応答時間比率)を算出することで計測する(S06)。なお、S06の処理により計測された各タスクの応答時間比率は、記憶手段等により記憶される。また、S06の処理が終了後、応答時間比率の計測(算出)が所定回数を超えたかを判断する(S07)。   Next, it is determined whether or not a predetermined period has been reached after execution (S05). If the predetermined period has been reached (YES in S05), the ratio of the response time of each task to the execution permission time (response time ratio) is calculated. To measure (S06). In addition, the response time ratio of each task measured by the process of S06 is stored by a storage unit or the like. Further, after the process of S06 is completed, it is determined whether the measurement (calculation) of the response time ratio exceeds a predetermined number (S07).

ここで、所定回数を超えている場合(S07において、YES)、つまり、応答時間比率の計測を所定回数分繰り返した後、応答時間比率の中で最大のもの(最悪応答時間比率)を選出する(S08)。また、S08の処理が終了後、タスクの再割り当ての必要があるかを判断し(S09)、タスクの再割り当ての必要がある場合(S09において、YES)、各タスクの最悪応答時間比率及び各プロセッサ処理能力に基づいてプロセッサ毎のタスクの再割り当てを行う(S10)。なお、S10の処理では、最悪応答時間比率が予め設定されている設定比率を超えているプロセッサがあれば、設定比率を超えていないプロセッサにタスクの再割り当てを行う。また、タスクの再割り当てを行う際、各タスクの最悪応答時間比率の見積もりを行い、再割り当て先のプロセッサ上でタスクが設定比率を超えないように割り当てを行う。また、S10の処理後は、S05に戻って上述した処理を繰り返し行う。   Here, when the predetermined number of times is exceeded (YES in S07), that is, after repeating the measurement of the response time ratio for the predetermined number of times, the largest response time ratio (worst response time ratio) is selected. (S08). Further, after the process of S08 is completed, it is determined whether the task needs to be reassigned (S09). If the task needs to be reassigned (YES in S09), the worst response time ratio of each task and each The task is reassigned for each processor based on the processor processing capacity (S10). In the process of S10, if there is a processor whose worst response time ratio exceeds a preset setting ratio, the task is reassigned to a processor that does not exceed the setting ratio. Further, when performing task reassignment, the worst response time ratio of each task is estimated, and assignment is performed so that the task does not exceed the set ratio on the reassigned processor. Moreover, after the process of S10, it returns to S05 and repeats the process mentioned above.

なお、S05の処理において所定周期に達していない場合(S05において、NO)、S07の処理において所定回数を超えていない場合(S07において、NO)、S09の処理においてタスクの再割り当ての必要がない場合(S09において、NO)、又はS10の処理が終了後、タスクスケジューリング処理を終了するか否かの判断を行い(S11)、処理を終了しない場合(S11において、NO)、S05に戻り上述した処理を繰り返し行う。   If the predetermined period has not been reached in the process of S05 (NO in S05), or if the predetermined number of times has not been exceeded in the process of S07 (NO in S07), there is no need to reassign tasks in the process of S09. In the case (NO in S09), or after the process of S10 is finished, it is determined whether or not the task scheduling process is finished (S11). If the process is not finished (NO in S11), the process returns to S05 and described above. Repeat the process.

また、S11の処理において、処理を終了させる場合(S11において、YES)、現時点で各タスクに対するプロセッサの割り当て先を記憶して(S12)タスクスケジューリング処理を終了する。   Further, when the process is terminated in the process of S11 (YES in S11), the assignment destination of the processor for each task is stored at this time (S12), and the task scheduling process is terminated.

上述したタスクスケジューリング処理により、タスクの優先度と、プロセッサ毎の処理能力と、応答時間比率と、最悪応答時間比率とに基づいて、最適なプロセッサにタスクを実行させることができる。したがって、タスク実行におけるリアルタイム性を向上させることができる。また、プロセッサの負荷分散が高精度に実現できる。また、プログラムをインストールすることにより、容易にタスクスケジューリング処理を実現することができる。   By the task scheduling process described above, it is possible to cause the optimum processor to execute the task based on the task priority, the processing capability for each processor, the response time ratio, and the worst response time ratio. Therefore, the real-time property in task execution can be improved. Further, load distribution of the processor can be realized with high accuracy. In addition, task scheduling processing can be easily realized by installing a program.

<タスクスケジューリング処理の具体例>
次に、タスクスケジューリング処理の具体例について図を用いて説明する。まず、システム起動時に各プロセッサの処理能力(パフォーマンス)を計測し、記憶媒体等の記憶手段等に記録しておく。次に、各タスクの優先度とプロセッサの処理能力とに基づいて、プロセッサ毎のタスクの割り当てを行う。ここで、図7は、プロセッサ及び処理能力の対応表と、タスクに対する設定内容の一例を示す図である。まず、図7(a)に示す対応表は、各プロセッサIDにおける処理能力を数値で表したものである。なお、プロセッサIDは、各プロセッサを識別するための情報であり、数値や桁数は特に限定されるものではなく、また文字等を用いたり、数値及び文字を組み合わせてもよい。また、処理能力の数値は、計測用タスクに対応する予め設定された処理能力を「1」としておき、その処理能力に対して何倍の処理能力があるかを示している。つまり、図7に示す処理能力の数値が高いほど処理能力も高いことになる。
<Specific example of task scheduling processing>
Next, a specific example of task scheduling processing will be described with reference to the drawings. First, the processing capacity (performance) of each processor is measured at the time of system startup and recorded in a storage means such as a storage medium. Next, tasks are assigned to each processor based on the priority of each task and the processing capability of the processor. Here, FIG. 7 is a diagram illustrating an example of a correspondence table of processors and processing capabilities and setting contents for tasks. First, the correspondence table shown in FIG. 7A shows the processing capability of each processor ID by a numerical value. The processor ID is information for identifying each processor, and the numerical value and the number of digits are not particularly limited, and characters or the like may be used or numerical values and characters may be combined. Further, the numerical value of the processing capacity indicates how many times the processing capacity is set with respect to the processing capacity set in advance as “1” corresponding to the measurement task. That is, the higher the processing capability value shown in FIG. 7, the higher the processing capability.

また、図7(b)に示すタスクに対する設定内容は、タスクID毎にタスク優先度及び起動周期が予め設定されている。ここで、タスクIDは、タスクを識別するための情報であり、数値や桁数は特に限定されるものではなく、例えば上述したように文字等を用いてもよい。また、図7(b)におけるタスク優先度は、数値が小さいほど優先度が高いものとして設定しているが、本発明においてこの限りではなく、例えば逆であってもよい。また、タスク優先度は数値に限定されず、例えば「高」、「中」、「低」等の文字やその組み合わせ等を用いてもよい。   In the setting contents for the task shown in FIG. 7B, the task priority and the activation cycle are set in advance for each task ID. Here, the task ID is information for identifying the task, and the numerical value and the number of digits are not particularly limited. For example, as described above, a character or the like may be used. In addition, the task priority in FIG. 7B is set such that the smaller the numerical value is, the higher the priority is. However, the present invention is not limited to this, and may be reversed, for example. The task priority is not limited to a numerical value, and for example, characters such as “high”, “medium”, and “low”, or combinations thereof may be used.

更に、図7(b)に示す起動周期には、例えば、2〔ms〕や3〔ms〕等の時間情報が蓄積される。なお、周期的な実行を行わない単発的なタスクの場合には、非周期起動情報として、例えば「0」や「非」等の数値、文字等が設定される。   Furthermore, time information such as 2 [ms] or 3 [ms] is accumulated in the activation cycle shown in FIG. In the case of a single task that does not execute periodically, for example, a numerical value such as “0” or “non”, a character, or the like is set as the aperiodic activation information.

図7に示すように設定された各タスクの優先度と上述した各プロセッサの処理能力に基づいて、プロセッサ毎のタスクの割り当てを行う。なお、タスクの割り当ては、処理能力の高いプロセッサから順にタスクを1つずつ割り当てる。また、割り当てる順序としては、例えばタスクの優先度順等があるが、本発明においては特に限定されるものではない。   Based on the priority of each task set as shown in FIG. 7 and the processing capability of each processor described above, task assignment for each processor is performed. Note that tasks are assigned one by one in order from the processor with the highest processing capability. The order of allocation includes, for example, task priority order, but is not particularly limited in the present invention.

ここで、図8は、プロセッサ毎のタスクの割り当ての一例を示す図である。図8に示す例では、割り当ての様子をより明確に説明するために図8の上から優先順位の高いタスク及び優先順位の高いプロセッサを配列している。ここで、まず各タスクのプロセッサへの割り当ては優先順位の高いタスクから処理能力の高いプロセッサに順々に割り当てを行う。また、上述そして、全てのプロセッサに1つのタスクを割り当てた後、その後のタスク(優先度:最大−N−1)は、処理能力の最も高いプロセッサ11−1から割り当てられ、更にその後のタスクも順々に処理能力の高いプロセッサ順に割り当てられる。   Here, FIG. 8 is a diagram illustrating an example of task assignment for each processor. In the example shown in FIG. 8, in order to explain the state of assignment more clearly, tasks with a high priority and processors with a high priority are arranged from the top of FIG. Here, first, each task is assigned to a processor in order from a task having a high priority to a processor having a high processing capability. In addition, as described above, after assigning one task to all the processors, the subsequent tasks (priority: maximum -N-1) are assigned from the processor 11-1 having the highest processing capability, and the subsequent tasks are also assigned. They are assigned in order of the processors with the highest processing capabilities.

ここで、優先度の同じタスクが複数存在するときは、起動周期の短いものから優先的に割り当てることとし、周期起動されないタスクは最低の優先度にする。また、全てのタスクの割り当てが完了後、タスクの割り当てを記憶媒体等の記憶手段に記録しておく。ここで、図9は、タスクIDとプロセッサとの割り当て対応表の一例を示す図である。図9に示すように割り当て完了後は、各タスクIDに対応する割り当て先のプロセッサIDが記憶される。なお、プロセッサID「0」はプロセッサ11−1のプロセッサIDに対応し、プロセッサID「1」以降もそれぞれプロセッサ11−2以降に対応している。   Here, when there are a plurality of tasks having the same priority, the task with the short activation cycle is assigned with priority, and the task that is not cyclically activated is set to the lowest priority. Further, after all task assignments are completed, the task assignments are recorded in a storage means such as a storage medium. Here, FIG. 9 is a diagram illustrating an example of an assignment correspondence table between task IDs and processors. As shown in FIG. 9, after the assignment is completed, the assignment destination processor ID corresponding to each task ID is stored. The processor ID “0” corresponds to the processor ID of the processor 11-1, and the processor ID “1” and later also correspond to the processor 11-2 and later.

また、プロセッサIDは、プロセッサを識別できる情報であればよく、数値に限定されず例えば文字等であってもよい。なお、図9に示すようなプロセッサIDの割り当てについては、プロセッサが過負荷状態にならないように予めプロセッサの能力とタスクの負荷に応じてタスク数の上限を決めておく必要がある。   Moreover, processor ID should just be information which can identify a processor, and is not limited to a numerical value, For example, a character etc. may be sufficient. Note that for the assignment of processor IDs as shown in FIG. 9, it is necessary to determine the upper limit of the number of tasks in advance according to the processor capacity and the task load so that the processor does not become overloaded.

次に、上述したように設定したタスクを割り当てた後、マルチプロセッサシステムを実行状態にして各タスクを実行させる。また、所定時間における各タスクの応答時間比率を計測する。更に計測処理を所定回数分繰り返し行い、その都度記憶媒体等の記憶手段に蓄積しておく。ここで、図10は、応答時間比率の計測結果の一例を示す図である。図10に示すように、応答時間比率の計測により記録される内容は、タスクIDとそのタスクIDに対応する応答時間比率である。次に、上述の応答時間比率を複数回分記録し、記録された応答時間比率の中から最悪応答時間比率を選出して、予め設定されている各タスクの優先度と合わせて、記憶媒体内に蓄積しておく。   Next, after assigning the tasks set as described above, the multiprocessor system is put into an execution state to execute each task. Moreover, the response time ratio of each task in a predetermined time is measured. Further, the measurement process is repeated a predetermined number of times, and is stored in a storage means such as a storage medium each time. Here, FIG. 10 is a diagram illustrating an example of a response time ratio measurement result. As shown in FIG. 10, the contents recorded by measuring the response time ratio are the task ID and the response time ratio corresponding to the task ID. Next, the response time ratio described above is recorded for a plurality of times, the worst response time ratio is selected from the recorded response time ratios, and the preset priority of each task is stored in the storage medium. Accumulate.

ここで、図11は、記憶する各タスクの最悪応答時間比率の結果の一例を示す図である。図11に示すように、記憶する内容は、各タスクIDに対するタスク優先度及び最悪応答時間比率である。次に、割り当てられた全てのタスクについて最悪応答時間比率が設定比率を超えるタスクの有無を確認する。ここで、設定比率を超えるタスク(オーバーランを含む)が割り当てられたプロセッサについてのみ、後述する再割り当て処理を行う。   Here, FIG. 11 is a diagram illustrating an example of the result of the worst response time ratio of each task to be stored. As shown in FIG. 11, the contents to be stored are the task priority and worst response time ratio for each task ID. Next, the presence / absence of a task whose worst response time ratio exceeds the set ratio for all assigned tasks is confirmed. Here, only a processor to which a task (including overrun) exceeding the set ratio is assigned performs a reallocation process described later.

ただし、この条件の下で割り当てられたタスクが1つしか存在しない場合はプロセッサ11−1〜11−N毎に予め設定されている再割り当て禁止フラグをONにする。これにより、タスク割当手段におけるタスクの再割り当てにおいて、割り当て対象のプロセッサから除かれることになる。つまり、再割り当てを行う前にプロセッサに対して再割り当ての許可又は禁止を設定することができ、無駄なく迅速に再割り当てを行うことができる。また、プロセッサの負荷の集中を防止することができる。   However, if there is only one task assigned under this condition, the reassignment prohibition flag set in advance for each of the processors 11-1 to 11-N is turned ON. Thereby, in the task reassignment in the task assigning means, it is removed from the processor to be assigned. That is, it is possible to set permission or prohibition of reassignment to a processor before performing reassignment, and reassignment can be performed quickly without waste. Further, concentration of processor load can be prevented.

したがって、再割り当て禁止フラグがONとなっている場合と最悪応答時間比率が設定比率を超えない場合は、後述する再割り当て処理は行わずに所定時間の各タスクの応答時間比率を測定する処理へ戻り、上述した処理を繰り返し行う。なお、本発明では、禁止フラグに限定されるものではなく、例えば許可フラグを設けていれば、許可フラグをOFFにする等により対応を行うことができる。   Therefore, when the reassignment prohibition flag is ON and when the worst response time ratio does not exceed the set ratio, the process proceeds to the process of measuring the response time ratio of each task for a predetermined time without performing the reallocation process described later. Returning, the process described above is repeated. In the present invention, the present invention is not limited to the prohibition flag. For example, if a permission flag is provided, the countermeasure can be taken by turning off the permission flag.

なお、タスクの終了後、又は処理終了後には、システム再起動後に割り当てた内容を有効にするため、上述した図9に示す割り当て先のプロセッサIDを更新しておいてもよい。これにより、タスクを最適なプロセッサに割り当てることができる。   Note that after the end of the task or after the end of the processing, the assignment destination processor ID shown in FIG. 9 may be updated in order to validate the contents assigned after the system restart. Thereby, a task can be assigned to an optimal processor.

<タスクの再割り当て処理>
次に、上述したタスクの再割り当て処理について説明する。まず、上述した処理において選出したタスクの最悪応答時間比率が、設定比率を超えているプロセッサにおける最低優先度のタスクの実行時間を算出する。なお、算出手順としては、まず最低優先度タスク以外の全てのタスクについて最低優先度タスクの実行許可時間内における起動回数を算出する。この起動回数に基づいて最低優先度タスク以外のタスクの実行時間を算出する。また、算出した実行時間と、最低優先度タスクの実行許可時間、最低優先度タスクの最悪応答時間比率を用いて、最低優先度タスクの実行時間を算出する。
<Task reassignment process>
Next, the task reallocation process described above will be described. First, the execution time of the task with the lowest priority in the processor in which the worst response time ratio of the task selected in the above-described process exceeds the set ratio is calculated. As a calculation procedure, first, the number of activations within the execution permission time of the lowest priority task is calculated for all tasks other than the lowest priority task. The execution time of tasks other than the lowest priority task is calculated based on the number of activations. Also, the execution time of the lowest priority task is calculated using the calculated execution time, the execution permission time of the lowest priority task, and the worst response time ratio of the lowest priority task.

ここで、最低優先度タスクの実行時間を算出する方法について図を用いて説明する。図12は、最悪応答時間比率が設定比率を超えた場合のタスクの割り当ての一例を示す図である。図12に示す例では、ある1つのプロセッサ上に優先度の異なる3つのタスクが割り当てられている。割り当てられているタスクは、タスク0(起動周期=1ms,優先度=高)、タスク1(起動周期=2ms,優先度=中)、及びタスク2(起動周期=3ms,優先度=低)となっている。また、タスク毎の最悪応答時間比率は、タスク0の最悪応答時間比率=0.6、タスク1の最悪応答時間比率=0.45、タスク2の最悪応答時間比率=0.6であるとする。   Here, a method for calculating the execution time of the lowest priority task will be described with reference to the drawings. FIG. 12 is a diagram illustrating an example of task assignment when the worst response time ratio exceeds the set ratio. In the example shown in FIG. 12, three tasks having different priorities are assigned to a certain processor. The assigned tasks are task 0 (startup cycle = 1 ms, priority = high), task 1 (startup cycle = 2 ms, priority = medium), and task 2 (startup cycle = 3 ms, priority = low). It has become. Further, the worst response time ratio for each task is assumed to be the worst response time ratio of task 0 = 0.6, the worst response time ratio of task 1 = 0.45, and the worst response time ratio of task 2 = 0.6. .

タスク1の最悪応答時間比率Rwr1と起動周期Cよりタスク1の1周期当たりの最悪応答時間Twr1は、Twr1=Rwr1×C=0.45×2=0.9msとなる。また、タスク0の起動周期CとTwr1との関係は“C>Twr1”となる。このため、タスク1の1周期当たりのタスク0の起動回数は1回となる。 From the worst response time ratio R wr1 of task 1 and the start cycle C 1 , the worst response time T wr1 per cycle of task 1 is T wr1 = R wr1 × C 1 = 0.45 × 2 = 0.9 ms. Further , the relationship between the task 0 activation cycle C 0 and T wr1 is “C 0 > T wr1 ”. For this reason, the number of activations of task 0 per cycle of task 1 is one.

次に、タスク0は最高優先度であるため、常に最悪応答時間で実行している。即ち実行時間=最悪応答時間と見なすことができる。ここで、タスク0の最悪応答時間比率Rwr0及び起動周期Cにより、タスク1の最悪応答時間におけるタスク0の実行時間Te0は、Te0=Rwr0×(1×C)=0.6×(1×1)=0.6msとなる。上述により、タスク1の1周期当たりの実行時間Te1は、Te1=Twr1−Te0=0.9−0.6=0.3msとなる。また、タスク1の1周期当たりの応答時間比率Re1は、Re1=Te1÷C1=0.3÷2=0.15となる。 Next, since task 0 has the highest priority, it is always executed with the worst response time. That is, it can be considered that execution time = worst response time. Here, due to the worst response time ratio R wr0 of task 0 and the activation period C 0 , the execution time T e0 of task 0 in the worst response time of task 1 is T e0 = R wr0 × (1 × C 0 ) = 0. 6 × (1 × 1) = 0.6 ms. As described above, the execution time T e1 per cycle of the task 1 is T e1 = T wr1 −T e0 = 0.9−0.6 = 0.3 ms. Further, the response time ratio R e1 per cycle of the task 1 is R e1 = T e1 ÷ C1 = 0.3 ÷ 2 = 0.15.

次に、図12のタスク2における最悪応答時間比率Rwr2と起動周期Cにより、タスク2の1周期当たりの最悪応答時間Twr2は、Twr2=Rwr2×C=0.6×3=1.8msとなる。また、タスク0の起動周期CとTwr2との関係は、“2×Co>Twr2”となるため、タスク2の1周期当たりのタスク0の起動回数は2回となる。また、タスク1の起動周期CとTwr2との関係が、“C1>Twr2”となるため、タスク2の1周期当たりのタスク1の起動回数は1回となる。 Next, the worst case response time ratio R wr2 the activation period C 2 in the task 2 in FIG. 12, the worst response time T wr2 per one period of the task 2, T wr2 = R wr2 × C 2 = 0.6 × 3 = 1.8 ms. Further , since the relationship between the activation cycle C 0 of task 0 and T wr2 is “2 × Co> T wr2 ”, the number of activations of task 0 per cycle of task 2 is two. Further , since the relationship between the activation cycle C 1 of task 1 and T wr2 is “C1> T wr2 ”, the number of activations of task 1 per cycle of task 2 is one.

また、タスク2の最悪応答時間におけるタスク0の実行時間Te0’は、Te0’=Rwr0×(2×C)=0.6×(2×1)=1.2msとなる。また、タスク2の最悪応答時間におけるタスク1の実行時間Te1’は、Te1’=Re1×(1×C)=0.15×(1×2)=0.3msとなる。 Also, the execution time T e0 ′ of task 0 in the worst response time of task 2 is T e0 ′ = R wr0 × (2 × C 0 ) = 0.6 × (2 × 1) = 1.2 ms. In addition, the execution time T e1 ′ of task 1 in the worst response time of task 2 is T e1 ′ = R e1 × (1 × C 1 ) = 0.15 × (1 × 2) = 0.3 ms.

また、タスク2の1周期当たりの実行時間Te2’は、Te2’=Twr2−Te0’−Te1’=1.8−1.2−0.3=0.3msとなる。また、タスク2の1周期当たりの実行時間比率Re2’は、Re2’=Te2’÷C=0.3÷3=0.1となる。 Further, the execution time T e2 ′ per cycle of the task 2 is T e2 ′ = T wr2 −T e0 ′ −T e1 ′ = 1.8−1.2−0.3 = 0.3 ms. Further, the execution time ratio R e2 ′ per cycle of the task 2 is R e2 ′ = T e2 ′ / C 2 = 0.3 ÷ 3 = 0.1.

次に、上述にて割り当てられた全てのタスクについて最悪応答時間比率が、設定比率を超えていないプロセッサのうち、プロセッサの処理能力(パフォーマンス)が最も高いプロセッサを選出する。また、選出されたプロセッサにて割り当てられた全てのタスクの実行時間を算出する。手順としては、まず最低優先度タスク以外の全てのタスクについて最低優先度タスクの実行許可時間内における起動回数を算出する。また、算出した起動回数に基づいて最低優先度タスク以外のタスクの実行時間を算出する。   Next, a processor having the highest processing capability (performance) is selected from among the processors whose worst response time ratios do not exceed the set ratio for all the tasks assigned above. In addition, the execution time of all tasks assigned by the selected processor is calculated. As a procedure, first, for all tasks other than the lowest priority task, the number of activations within the execution permission time of the lowest priority task is calculated. Also, the execution time of tasks other than the lowest priority task is calculated based on the calculated number of activations.

更に、割り当て先を変更するタスク(設定比率を超えているプロセッサに割り当てられたタスクのうち、最低優先度のタスク)について、新しい割り当て先プロセッサでの実行時間を算出する。また、上述にて得られた割り当て先を変えるタスクの1周期当たりの実行時間TeOLD、現在割り当てられているプロセッサの処理能力AOLD、新しい割り当て先プロセッサの処理能力ANEWとした場合、新しい割り当て先プロセッサでの実行時間TeNEWは、TeNEW=TeOLD×(ANEW÷AOLD)となり、実行時間比率RNEWは、起動周期CよりReNEW=TeNEW÷Cとなる。 Furthermore, the execution time in the new assignment destination processor is calculated for the task for changing the assignment destination (the task with the lowest priority among the tasks assigned to the processors exceeding the set ratio). In addition, when the execution time T eOLD per one cycle of the task for changing the assignment destination obtained as described above, the processing capacity A OLD of the currently assigned processor, and the processing ability A NEW of the new assignment destination processor, the new assignment is obtained. The execution time T eNEW in the previous processor becomes T eNEW = T eOLD × (A NEW ÷ A OLD ), and the execution time ratio R NEW becomes R eNEW = T eNEW ÷ C from the start cycle C.

これにより、算出された割り当て先を変更するタスクの新しい割り当て先プロセッサでの実行時間TeNEW及び起動周期と、現在プロセッサに割り当てられたタスク全ての実行時間比率及び起動周期とにより、新しくタスク割り当てを行った状態での各タスクの最悪応答時間比率の見積もりを行う。なお、新しくタスク割り当てを行った状態での各タスクの最悪応答時間比率の見積もり方法の詳細については後述する。 As a result, a new task assignment can be made based on the execution time TNEW and the start cycle of the task to change the calculated assignment destination in the new assign destination processor and the execution time ratio and start cycle of all the tasks currently assigned to the processor. Estimate the worst response time ratio of each task in the performed state. Details of a method for estimating the worst response time ratio of each task in a state where task assignment is newly performed will be described later.

ここで、図13は、最悪応答時間比率の見積もりを行った後のタスク割り当ての様子を説明するための一例の図である。上述の見積もりを行った後、新しくタスク割り当てを行ったプロセッサのうち設定比率を超えるタスクが1つ以上存在した場合、図13(a)に示すように、現状のタスクの割り当てを中止し、次に処理能力が高いプロセッサを割り当てて処理を行う。つまり、図13(a)に示すタスク(優先度:最大−K(K>N))は、一端プロセッサ11−2に割り当てられたが、タスク(優先度:最大−K)がプロセッサ11−2の設定比率を超えるタスクであったため、次に処理能力が高いプロセッサ(図13(a)におけるプロセッサ11−3)にタスク(優先度:最大−K)を割り当てて処理を行わせる。   Here, FIG. 13 is a diagram illustrating an example of task assignment after the worst response time ratio is estimated. After performing the above estimation, if one or more tasks exceeding the set ratio exist among newly assigned processors, as shown in FIG. 13A, the current task assignment is stopped and the next task assignment is stopped. Allocate a processor with high processing capacity to That is, the task (priority: maximum -K (K> N)) shown in FIG. 13A is assigned to the processor 11-2, but the task (priority: maximum -K) is assigned to the processor 11-2. Therefore, the task (priority: maximum -K) is assigned to the processor having the next highest processing capability (the processor 11-3 in FIG. 13A).

また、タスク(優先度:最大−K)が次に処理能力が高いプロセッサへの割り当てもできず、以降のプロセッサ11−Nまで割り当てができなかった場合は、図13(b)示すようにプロセッサ11−1に再割り当てを行い禁止フラグをONに変更して、タスク(優先度:最大−K)が終了するまで又は最悪応答時間比率(見積もり値)が設定比率内になるまで等の条件を設けて、他のタスクがプロセッサ11−1に割り当てられないようにする。また、上述したように所定時間の各タスクの応答時間比率の計測を行う。ここで、各タスクの最悪応答時間比率(見積もり値)が設定比率内であれば、再割り当てされた各タスクに対するプロセッサの割り当て先を記憶して所定時間の各タスクの応答時間比率の計測等、それ以降の処理を行う。   If the task (priority: maximum -K) cannot be assigned to the processor with the next highest processing capability, and the subsequent processor 11-N cannot be assigned, the processor as shown in FIG. 13B. Reassign to 11-1 and change the prohibition flag to ON, and conditions such as until the task (priority: maximum -K) is completed or the worst response time ratio (estimated value) is within the set ratio To prevent other tasks from being assigned to the processor 11-1. Further, as described above, the response time ratio of each task for a predetermined time is measured. Here, if the worst response time ratio (estimated value) of each task is within the set ratio, the processor allocation destination for each reassigned task is stored and the response time ratio of each task for a predetermined time is measured, etc. The subsequent processing is performed.

<最悪応答時間比率の見積もり方法>
ここで、新しくタスク割り当てを行った状態での、各タスクの最悪応答時間比率の見積もり方法について図を用いて説明する。図14は、最悪応答時間比率の見積もり例を説明するための図である。図14の例では、まず図14(a)に示す予め2つのタスク(タスクAとタスクB)が割り当てられていたプロセッサに、新しくタスクCが割り当てられた状態(図14(b))を表している。なお、図14に示す3つのタスクは、タスクA(起動周期C=1ms,優先度=高)、タスクB(起動周期C=4ms,優先度=低)、タスクC(起動周期Cc=3ms,優先度=中)となっている。また、タスク毎の実行時間比率は、タスクAの実行時間比率ReAが0.6、タスクBの実行時間比率ReBは0.1であるとする。更に、タスクCの実行時間比率ReCは0.15であるとする。
<Estimation of worst response time ratio>
Here, a method for estimating the worst response time ratio of each task in a state where task assignment is newly performed will be described with reference to the drawings. FIG. 14 is a diagram for explaining an example of estimating the worst response time ratio. In the example of FIG. 14, first, a state (FIG. 14 (b)) in which a task C is newly assigned to the processor to which two tasks (task A and task B) are assigned in advance as shown in FIG. 14 (a) is shown. ing. Note that the three tasks shown in FIG. 14 are task A (activation cycle C A = 1 ms, priority = high), task B (activation cycle C B = 4 ms, priority = low), task C (activation cycle Cc = 3 ms, priority = medium). The execution time ratio of each task, the execution time ratio R eA of the task A is 0.6, the execution time ratio R eB task B is assumed to be 0.1. Further, it is assumed that the execution time ratio ReC of task C is 0.15.

タスクAは最高優先度であるため、タスクAの最悪応答時間比率RwrAは、RwrA’=ReA=0.6となる。次に、タスクAのみを実行させる場合のタスクAの1周期当たりの空き時間TfAを算出する。TfAは、TfA=(1−RwrA’)×C=(1−0.6)×1=0.4msとなる。 Since task A has the highest priority, the worst response time ratio R wrA of task A is R wrA ′ = R eA = 0.6. Next, the free time T fA per cycle of task A when only task A is executed is calculated. T fA is T fA = (1−R wrA ′) × C A = (1−0.6) × 1 = 0.4 ms.

次に、タスクAと、次に優先度の高いタスクCのみを実行させる場合を仮定する。この仮定では、TfAにおいてタスクCが常に実行可能であると見なせる。タスクCの1周期当たりの実行時間TeCは、TeC=ReC×Cc=0.15×3=0.45msと算出される。そのため、TeCにおけるTfAの割合RfAは、RfA=TfA÷TeC=0.4÷0.45=0.89となる。つまり、0.5<RfA<1となるため、タスクCが完了するにはタスクAの2周期分の時間があれば十分であることがわかる。 Next, it is assumed that only task A and task C having the next highest priority are executed. In this assumption, regarded as the task C is always executable in T fA. The execution time T eC per cycle of the task C is calculated as T eC = R eC × Cc = 0.15 × 3 = 0.45 ms. Therefore, the ratio R fA of T fA in T eC is R fA = T fA ÷ T eC = 0.4 ÷ 0.45 = 0.89. That is, since 0.5 <R fA <1, it can be seen that it is sufficient to have two cycles of task A to complete task C.

上述したタスクAとタスクCの優先度の関係より、タスクCの実行完了までの待ち時間はタスクAの実行時間×2となる。これにより、タスクCの最悪応答時間TwrCは、TwrC={(ReA×C)×2}+TeC={(0.6×1)×2}+0.45=1.65となる。したがって、タスクCの最悪応答時間比率RwrCは、RwrC=TwrC÷Cc=1.65÷3=0.55となる。 From the above-described relationship between the priorities of the task A and the task C, the waiting time until the completion of the execution of the task C is the execution time of the task A × 2. As a result, the worst response time T wrC of task C becomes T wrC = {(R eA × C A ) × 2} + T eC = {(0.6 × 1) × 2} + 0.45 = 1.65. . Therefore, the worst response time ratio R wrC of task C is R wrC = T wrC ÷ Cc = 1.65 ÷ 3 = 0.55.

最後に、タスクAとタスクCとに加えて、残された最低優先度のタスクBを実行させる状況を考える。上述より、タスクAの2周期分の時間(C×2)において、タスクA(起動要求回数=2)、タスクC(起動要求回数=1)は、全て完了していて、かつ空き時間も存在する。このとき、空き時間TfACは、TfAC=2×C−TwrC=2×1−1.65=0.35msとなる。また、タスクCはタスクAの2周期目の時間(C×2)にて実行が完了している。そのため、タスクAの3周期目(C×2以降の時間)における空き時間(TfA=0.4ms)は、全てタスクBの実行に割り当て可能と見なすことができる。更に、タスクBの1周期当たりのタスクBの実行時間TeBは、TeB=C×ReB=4×0.1=0.4msとなる。 Finally, let us consider a situation in which the remaining lowest priority task B is executed in addition to task A and task C. As described above, task A (startup request count = 2) and task C (startup request count = 1) are all completed and free time is available in the time of task A for two cycles (C A × 2). Exists. At this time, the free time T fAC is T fAC = 2 × C A −T wrC = 2 × 1-1.65 = 0.35 ms. In addition, execution of task C is completed at time (C A × 2) in the second cycle of task A. Therefore, it can be considered that all the idle time (T fA = 0.4 ms) in the third period (time after C A × 2) of task A can be allocated to the execution of task B. Furthermore, the execution time T eB of task B per cycle of task B is T eB = C B × R eB = 4 × 0.1 = 0.4 ms.

上述した内容から、TfAC<TeB<(TfAC+TfA)の関係が成立する。したがって、タスクBの最悪応答時間TwrB’は、TwrB’={(ReA×C)×3}+TeC+TeB={(0.6×1)×3}+0.45+0.4=2.65となる。したがって、タスクBの最悪応答時間比率RwrB’は、RwrB’=TwrB’÷C=2.65÷4=0.66となる。 From the above-described contents, the relationship T fAC <T eB <(T fAC + T fA ) is established. Therefore, the worst response time T wrB ′ of task B is T wrB ′ = {(R eA × C A ) × 3} + T eC + T eB = {(0.6 × 1) × 3} + 0.45 + 0.4 = 2.65. Therefore, the worst response time ratio R wrB ′ of task B is R wrB ′ = T wrB ′ / C B = 2.65 ÷ 4 = 0.66.

ここで、図15は、タスクの再割り当ての一例を示す図である。図15に示すように、プロセッサ11−1に設定されていたタスク(優先度:最大−K)は、上述した算出等を行うことによりプロセッサ11−2に割り当てられる。上述したように、タスクの再割り当てを行うことにより、タスク実行におけるリアルタイム性を向上させることができる。   Here, FIG. 15 is a diagram illustrating an example of task reallocation. As shown in FIG. 15, the task (priority: maximum -K) set in the processor 11-1 is assigned to the processor 11-2 by performing the above-described calculation and the like. As described above, real-time performance in task execution can be improved by reassigning tasks.

また、上述した割り当て結果は、システム再起動後のときにもこの割り当て内容を有効にするため記憶手段等に蓄積する。これによってタスクの再割り当てがなされる。   Further, the above-described assignment result is accumulated in the storage means or the like in order to validate the assignment contents even after the system is restarted. This reassigns tasks.

上述したように本発明によれば、タスク実行におけるリアルタイム性を向上させることができる。具体的には、マルチプロセッサを用いたタスク実行のスケジューリングにおいて、タスクの優先度とプロセッサの処理能力、応答時間比率、最悪応答時間比率を用いることにより、タスクの実行が実行許可時間以内に完了し、かつ最悪応答時間比率が設定比率を超えないようタスクの再割り当てを行うことができる。   As described above, according to the present invention, real-time performance in task execution can be improved. Specifically, in task execution scheduling using multiprocessors, task execution is completed within the execution permission time by using task priority, processor capacity, response time ratio, and worst response time ratio. The task can be reassigned so that the worst response time ratio does not exceed the set ratio.

なお、上述した本発明に係るタスクスケジューリング装置は、一般的な機械装置の制御システムに適用可能であり、また家電に組み込まれる小規模なシステムからサーバやスーパーコンピュータに代表される大規模な並列計算機まで幅広く適用することができる。更に、1つのCPUの中に演算コアが複数設けられているチップマルチプロセッサ上のリアルタイムシステム上にて運用をする場合においても本発明は有効である。   Note that the above-described task scheduling apparatus according to the present invention is applicable to a general machine control system, and is a large-scale parallel computer represented by a server or supercomputer from a small-scale system incorporated in a home appliance. Can be widely applied. Furthermore, the present invention is also effective when operating on a real-time system on a chip multiprocessor in which a plurality of arithmetic cores are provided in one CPU.

以上本発明の好ましい実施例について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形、変更が可能である。   The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to such specific embodiments, and various modifications, within the scope of the gist of the present invention described in the claims, It can be changed.

マルチプロセッサシステムの概要構成の一例を示す図である。It is a figure which shows an example of schematic structure of a multiprocessor system. 従来のマルチプロセッサシステムのスケジューリング方式の一例を示す図である。It is a figure which shows an example of the scheduling system of the conventional multiprocessor system. タスクの実行許可時間を説明するための一例の図である。It is a figure of an example for demonstrating the execution permission time of a task. タスクスケジューリング装置の機能構成の一例を示す図である。It is a figure which shows an example of a function structure of a task scheduling apparatus. 本発明におけるタスクスケジューリング処理が実現可能なハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions which can implement | achieve the task scheduling process in this invention. 本発明におけるタスクスケジューリング処理手順を示す一例のフローチャートである。It is a flowchart of an example which shows the task scheduling processing procedure in this invention. プロセッサ及び処理能力の対応表と、タスクに対する設定内容の一例を示す図である。It is a figure which shows an example of the setting content with respect to a correspondence table | surface of a processor and processing capability, and a task. プロセッサ毎のタスクの割り当ての一例を示す図である。It is a figure which shows an example of assignment of the task for every processor. タスクIDとプロセッサとの割り当て対応表の一例を示す図である。It is a figure which shows an example of the allocation correspondence table | surface of task ID and a processor. 応答時間比率の計測結果の一例を示す図である。It is a figure which shows an example of the measurement result of a response time ratio. 記憶する各タスクの最悪応答時間比率の結果の一例を示す図である。It is a figure which shows an example of the result of the worst response time ratio of each task memorize | stored. 最悪応答時間比率が設定比率を超えた場合のタスクの割り当ての一例を示す図である。It is a figure which shows an example of assignment of the task when the worst response time ratio exceeds a setting ratio. 最悪応答時間比率の見積もりを行った後の割り当ての様子を説明するための一例の図である。It is an example for demonstrating the mode of the allocation after estimating the worst response time ratio. 最悪応答時間比率の見積もり例を説明するための図である。It is a figure for demonstrating the example of estimation of the worst response time ratio. タスクの再割り当ての一例を示す図である。It is a figure which shows an example of reassignment of a task.

符号の説明Explanation of symbols

10 マルチプロセッサシステム
11 プロセッサ
12 ネットワーク
13,21 タスクスケジューリング装置
22 処理能力計測手段
23 タスク割当手段
24 応答時間比率計測手段
25 記憶手段
26 制御手段
31 入力装置
32 出力装置
33 ドライブ装置
34 補助記憶装置
35 メモリ装置
36 CPU
37 ネットワーク接続装置
38 記録媒体
DESCRIPTION OF SYMBOLS 10 Multiprocessor system 11 Processor 12 Network 13, 21 Task scheduling apparatus 22 Processing capacity measurement means 23 Task allocation means 24 Response time ratio measurement means 25 Storage means 26 Control means 31 Input device 32 Output device 33 Drive device 34 Auxiliary storage device 35 Memory Device 36 CPU
37 Network connection device 38 Recording medium

Claims (10)

マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリング方法において、
前記複数のタスク毎に予め設定されたタスク実行の優先度と、前記マルチプロセッサ個々の処理能力と、前記マルチプロセッサのうち所定時間内に行ったタスク実行に対する応答時間比率と、前記応答時間比率を所定回数分計測した結果から得られる最悪応答時間比率とに基づいて、前記複数のタスクに対する前記マルチプロセッサの割り当てを行うことを特徴とするタスクスケジューリング方法。
In a task scheduling method for assigning a plurality of tasks by a multiprocessor,
The priority of task execution preset for each of the plurality of tasks, the processing capability of each of the multiprocessors, the response time ratio for task execution performed within a predetermined time among the multiprocessors, and the response time ratio A task scheduling method, comprising: allocating the multiprocessor to the plurality of tasks based on a worst response time ratio obtained from a result measured for a predetermined number of times.
マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリング方法において、
前記マルチプロセッサを構成する複数のプロセッサの個々の処理能力を計測する処理能力計測ステップと、
前記複数のタスク毎に予め設定されたタスク優先度と、前記処理能力計測ステップにより得られる処理能力結果から各タスクに対する初期割り当て行う割り当てステップと、
前記割り当てステップにより得られるタスクの割り当て結果に基づいてタスクを実行し、所定時間におけるタスクの応答時間比率を計測する応答時間比率計測ステップと、
前記応答時間比率を所定回数分計測して、計測した複数の応答時間比率から最悪応答時間比率を選出する最悪応答比率選出ステップと、
各タスクの前記最悪応答時間比率と設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行う再割り当てステップとを有することを特徴とするタスクスケジューリング方法。
In a task scheduling method for assigning a plurality of tasks by a multiprocessor,
A processing capability measuring step for measuring individual processing capabilities of a plurality of processors constituting the multiprocessor;
An assignment step for initial assignment to each task from a task priority set in advance for each of the plurality of tasks and a processing capability result obtained by the processing capability measurement step;
A response time ratio measuring step for executing a task based on a task assignment result obtained by the assigning step and measuring a response time ratio of the task at a predetermined time;
Worst response ratio selection step of measuring the response time ratio a predetermined number of times and selecting the worst response time ratio from a plurality of measured response time ratios;
A task scheduling method comprising: a reassignment step of reassigning a processor to a task based on the worst response time ratio and the set ratio of each task.
前記再割り当てステップは、
前記タスクの再割り当てを行う際、各タスクにおける最悪応答時間比率の見積もりを行い、最悪応答時間比率が最も低いプロセッサに前記タスクの再割り当てを行うことを特徴とする請求項2に記載のタスクスケジューリング方法。
The reassigning step includes
3. The task scheduling according to claim 2, wherein when performing the task reassignment, an estimation of a worst response time ratio in each task is performed, and the task is reassigned to a processor having the lowest worst response time ratio. Method.
前記再割り当てステップは、
前記複数のプロセッサ毎にタスクの再割り当ての許可又は禁止を設定することを特徴とする請求項2又は3に記載のタスクスケジューリング方法。
The reassigning step includes
4. The task scheduling method according to claim 2, wherein permission or prohibition of task reassignment is set for each of the plurality of processors.
マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリング装置において、
前記マルチプロセッサを構成する複数のプロセッサの個々の処理能力を計測する処理能力計測手段と、
前記複数のタスク毎に予め設定されたタスク優先度と、前記処理能力計測手段により得られる処理能力結果から各タスクに対する初期割り当て行うタスク割当手段と、
前記タスク割当手段により得られるタスクの割り当て結果に基づいてタスクを実行し、所定時間におけるタスクの応答時間比率を計測し、更に計測した前記応答時間比率を所定回数分計測して得られる複数の応答時間比率から最悪応答時間比率を選出する応答時間比率計測手段とを有し、
前記タスク割当手段は、各タスクの前記最悪応答時間比率と設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行うことを特徴とするタスクスケジューリング装置。
In a task scheduling device that assigns a plurality of tasks by a multiprocessor,
Processing capability measuring means for measuring individual processing capabilities of a plurality of processors constituting the multiprocessor;
Task allocation means for performing initial allocation to each task from the task priority set in advance for each of the plurality of tasks and the processing capability result obtained by the processing capability measuring unit;
A plurality of responses obtained by executing a task based on a task allocation result obtained by the task allocation means, measuring a response time ratio of the task at a predetermined time, and further measuring the measured response time ratio for a predetermined number of times. Response time ratio measuring means for selecting the worst response time ratio from the time ratio,
The task allocating means reallocates processors to tasks based on the worst response time ratio and setting ratio of each task.
前記タスク割当手段は、
前記タスクの再割り当てを行う際、各タスクにおける最悪応答時間比率の見積もりを行い、最悪応答時間比率が最も低いプロセッサに前記タスクの再割り当てを行うことを特徴とする請求項5に記載のタスクスケジューリング装置。
The task assignment means includes:
6. The task scheduling according to claim 5, wherein when performing the task reassignment, an estimation of a worst response time ratio in each task is performed, and the task is reassigned to a processor having the lowest worst response time ratio. apparatus.
前記タスク割当手段は、
前記複数のプロセッサ毎にタスクの再割り当ての許可又は禁止を設定することを特徴とする請求項5又は6に記載のタスクスケジューリング装置。
The task assignment means includes:
7. The task scheduling apparatus according to claim 5, wherein permission or prohibition of task reassignment is set for each of the plurality of processors.
マルチプロセッサにより複数のタスクの割り当てを行うタスクスケジューリングをコンピュータに実行させるためのタスクスケジューリングプログラムにおいて、
前記マルチプロセッサを構成する複数のプロセッサの個々の処理能力を計測する処理能力計測処理と、
前記複数のタスク毎に予め設定されたタスク優先度と、前記処理能力計測処理により得られる処理能力結果から各タスクに対する初期割り当て行う割り当て処理と、
前記割り当て処理により得られるタスクの割り当て結果に基づいてタスクを実行し、所定時間におけるタスクの応答時間比率を計測する応答時間比率計測処理と、
前記応答時間比率を所定回数計測して、計測した複数の応答時間比率から最悪応答時間比率を選出する最悪応答比率選出処理と、
各タスクの前記最悪応答時間比率と設定比率とに基づいて、タスクに対するプロセッサの再割り当てを行う再割り当て処理とをコンピュータに実行させるためのタスクスケジューリングプログラム。
In a task scheduling program for causing a computer to execute task scheduling for assigning a plurality of tasks by a multiprocessor,
A processing capability measurement process for measuring individual processing capabilities of a plurality of processors constituting the multiprocessor;
A task priority set in advance for each of the plurality of tasks, and an allocation process for performing initial allocation to each task from the processing capability result obtained by the processing capability measurement process;
A response time ratio measurement process that executes a task based on the task assignment result obtained by the assignment process and measures a response time ratio of the task at a predetermined time;
Measuring the response time ratio a predetermined number of times, and selecting a worst response time ratio from a plurality of measured response time ratios;
A task scheduling program for causing a computer to execute a reassignment process for reassigning a processor to a task based on the worst response time ratio and the set ratio of each task.
前記再割り当て処理は、
前記タスクの再割り当てを行う際、各タスクにおける最悪応答時間比率の見積もりを行い、最悪応答時間比率が最も低いプロセッサに前記タスクの再割り当てを行うことを特徴とする請求項8に記載のタスクスケジューリングプログラム。
The reallocation process includes:
9. The task scheduling according to claim 8, wherein when performing the task reassignment, the worst response time ratio in each task is estimated, and the task is reassigned to a processor having the lowest worst response time ratio. program.
前記再割り当て処理は、
前記複数のプロセッサ毎にタスクの再割り当ての許可又は禁止を設定することを特徴とする請求項8又は9に記載のタスクスケジューリングプログラム。
The reallocation process includes:
10. The task scheduling program according to claim 8, wherein permission or prohibition of task reassignment is set for each of the plurality of processors.
JP2005199161A 2005-07-07 2005-07-07 Task scheduling method, task scheduling device, and task scheduling program Pending JP2007018268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005199161A JP2007018268A (en) 2005-07-07 2005-07-07 Task scheduling method, task scheduling device, and task scheduling program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005199161A JP2007018268A (en) 2005-07-07 2005-07-07 Task scheduling method, task scheduling device, and task scheduling program

Publications (1)

Publication Number Publication Date
JP2007018268A true JP2007018268A (en) 2007-01-25

Family

ID=37755390

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005199161A Pending JP2007018268A (en) 2005-07-07 2005-07-07 Task scheduling method, task scheduling device, and task scheduling program

Country Status (1)

Country Link
JP (1) JP2007018268A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010064394A1 (en) * 2008-12-01 2010-06-10 日本電気株式会社 Data processing system, computer program thereof, and data processing method
WO2011102219A1 (en) * 2010-02-19 2011-08-25 日本電気株式会社 Real time system task configuration optimization system for multi-core processors, and method and program
JP5348315B2 (en) * 2010-03-19 2013-11-20 富士通株式会社 Multi-core processor system, control program, and control method
JP5770721B2 (en) * 2010-05-24 2015-08-26 パナソニック インテレクチュアル プロパティ コーポレーション オブアメリカPanasonic Intellectual Property Corporation of America Information processing system
KR20160125137A (en) * 2015-04-21 2016-10-31 삼성전자주식회사 Application processor and system on chip
CN107301500A (en) * 2017-06-02 2017-10-27 北京工业大学 A kind of workflow schedule method looked forward to the prospect based on critical path task
WO2018123456A1 (en) * 2016-12-27 2018-07-05 東芝三菱電機産業システム株式会社 Programmable controller, management device, and control system
WO2020211358A1 (en) * 2019-04-15 2020-10-22 平安普惠企业管理有限公司 Database scheduling method and apparatus, and computer device and storage medium
CN111882152A (en) * 2020-06-18 2020-11-03 科大讯飞股份有限公司 Task allocation method and related device
US11640263B2 (en) * 2020-10-07 2023-05-02 SK Hynix Inc. Memory system and operating method thereof

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010064394A1 (en) * 2008-12-01 2010-06-10 日本電気株式会社 Data processing system, computer program thereof, and data processing method
JPWO2010064394A1 (en) * 2008-12-01 2012-05-10 日本電気株式会社 Data processing system, computer program thereof, and data processing method
JP2014139845A (en) * 2008-12-01 2014-07-31 Nec Corp Data processing system, computer program thereof and data processing method
WO2011102219A1 (en) * 2010-02-19 2011-08-25 日本電気株式会社 Real time system task configuration optimization system for multi-core processors, and method and program
US8887165B2 (en) 2010-02-19 2014-11-11 Nec Corporation Real time system task configuration optimization system for multi-core processors, and method and program
JP5348315B2 (en) * 2010-03-19 2013-11-20 富士通株式会社 Multi-core processor system, control program, and control method
US9092273B2 (en) 2010-03-19 2015-07-28 Fujitsu Limited Multicore processor system, computer product, and control method
JP5770721B2 (en) * 2010-05-24 2015-08-26 パナソニック インテレクチュアル プロパティ コーポレーション オブアメリカPanasonic Intellectual Property Corporation of America Information processing system
KR20160125137A (en) * 2015-04-21 2016-10-31 삼성전자주식회사 Application processor and system on chip
KR102247742B1 (en) 2015-04-21 2021-05-04 삼성전자주식회사 Application processor and system on chip
WO2018123456A1 (en) * 2016-12-27 2018-07-05 東芝三菱電機産業システム株式会社 Programmable controller, management device, and control system
JP2018106440A (en) * 2016-12-27 2018-07-05 東芝インフラシステムズ株式会社 Programmable controller, management device, and control system
TWI664509B (en) * 2016-12-27 2019-07-01 日商東芝三菱電機產業系統股份有限公司 Programmable controller, management device and control system
KR20190087520A (en) * 2016-12-27 2019-07-24 도시바 미쓰비시덴키 산교시스템 가부시키가이샤 Programmable controller, management device and control system
CN110114732A (en) * 2016-12-27 2019-08-09 东芝三菱电机产业系统株式会社 Programmable controller, managing device and control system
US10956238B2 (en) 2016-12-27 2021-03-23 Toshiba Mitsubishi-Electric Industrial Systems Corporation Programmable controller, management device, and control system
KR102258542B1 (en) * 2016-12-27 2021-05-28 도시바 미쓰비시덴키 산교시스템 가부시키가이샤 Programmable controllers, management units and control systems
CN110114732B (en) * 2016-12-27 2022-02-25 东芝三菱电机产业系统株式会社 Programmable controller, management device, and control system
CN107301500A (en) * 2017-06-02 2017-10-27 北京工业大学 A kind of workflow schedule method looked forward to the prospect based on critical path task
WO2020211358A1 (en) * 2019-04-15 2020-10-22 平安普惠企业管理有限公司 Database scheduling method and apparatus, and computer device and storage medium
CN111882152A (en) * 2020-06-18 2020-11-03 科大讯飞股份有限公司 Task allocation method and related device
US11640263B2 (en) * 2020-10-07 2023-05-02 SK Hynix Inc. Memory system and operating method thereof

Similar Documents

Publication Publication Date Title
JP2007018268A (en) Task scheduling method, task scheduling device, and task scheduling program
KR101651871B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
JP4308241B2 (en) Job execution method, job execution system, and job execution program
JP5402226B2 (en) Management apparatus, information processing system, control program for information processing system, and control method for information processing system
US9015724B2 (en) Job dispatching with scheduler record updates containing characteristics combinations of job characteristics
WO2012066640A1 (en) Computer system, migration method, and management server
JP2005346433A (en) Program execution reservation method, device, processing program therefor and program execution system
KR101640848B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
KR20110075297A (en) Apparatus and method for parallel processing in consideration of degree of parallelism
TW202246977A (en) Task scheduling method and apparatus, computer device and storage medium
KR20070090649A (en) Apparatus and method for providing cooperative scheduling on multi-core system
CN107977275B (en) Task processing method based on message queue and related equipment
JP6010975B2 (en) Job management apparatus, job management method, and program
JPH012145A (en) Resource management method for virtual computer system
JP5790758B2 (en) Scheduling method and scheduling system
KR20140006351A (en) Task scheduling scheme using information based on estimated execution time and heterogeneous multi-core processor system using the scheme
CN114816777A (en) Command processing device, method, electronic device and computer readable storage medium
JP3893136B2 (en) Embedded computer control program, recording medium recording the program, and embedded system
JP2008225641A (en) Computer system, interrupt control method and program
JP2010211496A (en) Dynamic reconfiguration device
JP5045576B2 (en) Multiprocessor system and program execution method
JP2008139907A (en) Job allocation program and job allocation method
JP4211645B2 (en) A computer system with a dedicated processor
JP2015026132A (en) Resource control device, method and program
JP6191361B2 (en) Information processing system, information processing system control method, and control program