JP5692341B2 - Multiprocessor system, control method, and control program - Google Patents

Multiprocessor system, control method, and control program Download PDF

Info

Publication number
JP5692341B2
JP5692341B2 JP2013252407A JP2013252407A JP5692341B2 JP 5692341 B2 JP5692341 B2 JP 5692341B2 JP 2013252407 A JP2013252407 A JP 2013252407A JP 2013252407 A JP2013252407 A JP 2013252407A JP 5692341 B2 JP5692341 B2 JP 5692341B2
Authority
JP
Japan
Prior art keywords
thread
execution
cpu
standby power
threads
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2013252407A
Other languages
Japanese (ja)
Other versions
JP2014075149A (en
Inventor
宏真 山内
宏真 山内
浩一郎 山下
浩一郎 山下
鈴木 貴久
貴久 鈴木
康志 栗原
康志 栗原
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2013252407A priority Critical patent/JP5692341B2/en
Publication of JP2014075149A publication Critical patent/JP2014075149A/en
Application granted granted Critical
Publication of JP5692341B2 publication Critical patent/JP5692341B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Description

本発明は、マルチプロセッサシステム、制御方法、および制御プログラムに関する。   The present invention relates to a multiprocessor system, a control method, and a control program.

従来、シングルコアプロセッサシステムやマルチコアプロセッサシステムの各CPUにおいて、複数のスレッドが割り当てられた場合、たとえば、スレッドごとに定義された優先度により実行順を決定する技術(第1の従来技術)が知られている(たとえば、下記特許文献1を参照。)。   Conventionally, when a plurality of threads are assigned to each CPU of a single core processor system or a multi-core processor system, for example, a technique (first conventional technique) that determines an execution order based on a priority defined for each thread is known. (For example, refer to Patent Document 1 below.)

また、複数のスレッドが割り当てられた場合、ラウンドロビン方式を用いて複数のスレッドの各スレッドを一定時間ずつ順に実行する技術(第2の従来技術)が知られている(たとえば、下記特許文献2と下記非特許文献1とを参照。)。   In addition, when a plurality of threads are assigned, a technique (second conventional technique) is known in which each thread of a plurality of threads is sequentially executed for a predetermined time using a round robin method (for example, Patent Document 2 below). And non-patent document 1 below).

特開昭63−068934号公報JP-A-63-068934 特開2000−276360号公報JP 2000-276360 A

C.L.Liu,James W.LAYLAND,「Scheduling Algorithms for Multiprogramming in a Hard−Real−Time Environment」Journal of the Association for Computing Machinery,Vol.20,No.1,January 1973C. L. Liu, James W. LAYLAND, “Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment”, Journal of the Association for Computing Machinery, Vol. 20, no. 1, January 1973

しかしながら、第1の従来技術では、複数のスレッドのうちの優先度が低いスレッドの待機電力が大きい場合、消費電力が増加する問題点があった。また、第2の従来技術では、一定時間ごとにスレッドが切り替わるため、各スレッドの実行情報を一時的に格納するCPU内のキャッシュが競合してしまう。   However, the first conventional technique has a problem that power consumption increases when standby power of a thread having a low priority among a plurality of threads is large. Further, in the second prior art, threads are switched at regular intervals, so that the caches in the CPU that temporarily store the execution information of each thread compete.

たとえば、CPUで一のスレッドの実行中には該一のスレッドの実行情報がキャッシュ上に格納されるが、一のスレッドから他のスレッドの実行に切り替わると、該キャッシュ内の一のスレッドの実行情報が他のスレッドの実行情報に書き換えられる。つぎに、他のスレッドから一のスレッドの実行に切り替わると、該キャッシュ内の他のスレッドの実行情報を一のスレッドの実行情報に書き換えなければならず、実行の性能が劣化し、スループットが下がる問題点があった。   For example, while one thread is being executed by the CPU, execution information of the one thread is stored in the cache, but when one thread is switched to another thread, the execution of one thread in the cache is executed. Information is rewritten with execution information of other threads. Next, when the execution of one thread is switched from another thread, the execution information of the other thread in the cache must be rewritten with the execution information of the one thread, so that the execution performance deteriorates and the throughput decreases. There was a problem.

本発明は、上述した従来技術による問題点を解消するため、スループットを下げることなく、低消費電力化を図ることができるマルチプロセッサシステム、制御方法、および制御プログラムを提供することを目的とする。   An object of the present invention is to provide a multiprocessor system, a control method, and a control program capable of reducing power consumption without reducing the throughput in order to solve the above-described problems caused by the prior art.

本発明の一観点によれば、未実行の第1のスレッドと未実行の第2のスレッドとを検出し、検出された第2のスレッドの実行時間と検出された第1のスレッドの単位時間当たりの待機電力とを乗算することにより、前記第2のスレッドのつぎに前記第1のスレッドが実行された場合の前記第1のスレッドの待機電力を算出し、前記第1のスレッドの実行時間と前記第2のスレッドの単位時間当たりの待機電力とを乗算することにより、前記第1のスレッドのつぎに前記第2のスレッドが実行された場合の前記第2のスレッドの待機電力を算出し、算出された第1のスレッドの待機電力と算出された第2のスレッドの待機電力とを比較し、比較結果に基づいて前記第1のスレッドと前記第2のスレッドとの実行順を決定するマルチプロセッサシステム、制御方法、および制御プログラムが提供される。   According to an aspect of the present invention, an unexecuted first thread and an unexecuted second thread are detected, the detected execution time of the second thread and the detected unit time of the first thread The standby power of the first thread when the first thread is executed next to the second thread is calculated by multiplying by the standby power per hit, and the execution time of the first thread Is multiplied by the standby power per unit time of the second thread to calculate the standby power of the second thread when the second thread is executed next to the first thread. The calculated standby power of the first thread is compared with the calculated standby power of the second thread, and the execution order of the first thread and the second thread is determined based on the comparison result. Multiprocessor system Temu, control method, and control program are provided.

本マルチプロセッサシステム、制御方法、および制御プログラムによれば、スループットを下げることなく、低消費電力化を図ることができるという効果を奏する。   According to the present multiprocessor system, control method, and control program, there is an effect that low power consumption can be achieved without lowering the throughput.

本発明の一実施例を示す説明図である。It is explanatory drawing which shows one Example of this invention. 第1のスレッドに実行期限が定義されている場合の説明図である。It is explanatory drawing when the execution time limit is defined in the 1st thread | sled. 情報処理装置のハードウェアを示すブロック図である。It is a block diagram which shows the hardware of information processing apparatus. スレッドテーブル400の一例を示す説明図である。It is explanatory drawing which shows an example of the thread table. 割当管理テーブル500の一例を示す説明図である。It is explanatory drawing which shows an example of the allocation management table 500. FIG. 情報処理装置300の機能ブロック図である。3 is a functional block diagram of an information processing apparatus 300. FIG. スレッド#0の生成が検出される例を示す説明図である。It is explanatory drawing which shows the example in which the production | generation of thread | sled # 0 is detected. 割当管理テーブル500の更新例を示す説明図である。It is explanatory drawing which shows the example of an update of the allocation management table 500. 情報処理装置300による情報処理手順を示すフローチャート(その1)である。6 is a flowchart (part 1) illustrating an information processing procedure by the information processing apparatus 300; 情報処理装置300による情報処理手順を示すフローチャート(その2)である。6 is a flowchart (part 2) illustrating an information processing procedure by the information processing apparatus 300; 情報処理装置300による情報処理手順を示すフローチャート(その3)である。6 is a flowchart (part 3) illustrating an information processing procedure by the information processing apparatus 300; 図9で示した実行順の決定処理(ステップS907)の詳細な処理手順を示すフローチャート(その1)である。FIG. 10 is a flowchart (part 1) illustrating a detailed processing procedure of execution order determination processing (step S907) illustrated in FIG. 9; FIG. 図9で示した実行順の決定処理(ステップS907)の詳細な処理手順を示すフローチャート(その2)である。10 is a flowchart (part 2) illustrating a detailed processing procedure of the execution order determination process (step S907) illustrated in FIG. 9; 各OSによるスレッド割り当て時の情報処理手順を示すフローチャートである。It is a flowchart which shows the information processing procedure at the time of the thread | sled allocation by each OS. 各OSによるスレッド終了時の情報処理手順を示すフローチャートである。It is a flowchart which shows the information processing procedure at the time of the thread | end end by each OS.

以下に添付図面を参照して、本発明にかかるマルチプロセッサシステム、制御方法、および制御プログラムの好適な実施の形態を詳細に説明する。   Exemplary embodiments of a multiprocessor system, a control method, and a control program according to the present invention will be explained below in detail with reference to the accompanying drawings.

図1は、本発明の一実施例を示す説明図である。ここでは、未実行の第1のスレッドと未実行の第2のスレッドとを例に挙げて説明する。図1では、第1のスレッドと第2のスレッドの実行前に、実行順の組み合わせごとに待機電力がどのくらいかかるかを算出し、算出結果に基づいて実行順を決定する。   FIG. 1 is an explanatory view showing an embodiment of the present invention. Here, a description will be given by taking an unexecuted first thread and an unexecuted second thread as examples. In FIG. 1, before execution of the first thread and the second thread, the standby power is calculated for each combination of execution order, and the execution order is determined based on the calculation result.

まず、(1)実行順が第2のスレッド→第1のスレッドの順の場合、第2のスレッドの実行中には第1のスレッドは待機状態となる。よって、第1のスレッドの待機電力は下記となる。
・第1のスレッドの待機電力=第2のスレッドの実行時間[ms]×第1のスレッドの単位時間当たりの待機電力[mW/ms]
First, (1) when the execution order is the order of the second thread → the first thread, the first thread is in a standby state during the execution of the second thread. Therefore, the standby power of the first thread is as follows.
Standby power of the first thread = second thread execution time [ms] × standby power per unit time of the first thread [mW / ms]

つぎに、(2)実行順が第1のスレッド→第2のスレッドの順の場合、第1のスレッドの実行中には第2のスレッドは待機状態となる。よって、第2のスレッドの待機電力は下記となる。
・第2のスレッドの待機電力=第1のスレッドの実行時間[ms]×第2のスレッドの単位時間当たりの待機電力[mW/ms]
Next, (2) when the execution order is the order of the first thread → the second thread, the second thread is in a standby state during the execution of the first thread. Therefore, the standby power of the second thread is as follows.
Standby power of the second thread = first thread execution time [ms] × second thread standby power per unit time [mW / ms]

そして、情報処理装置が、第1のスレッドの待機電力と第2のスレッドの待機電力とを比較する。第1のスレッドの待機電力が第2のスレッドの待機電力以上であれば、情報処理装置が、実行順を第1のスレッド→第2のスレッドに決定する。第1のスレッドの待機電力が第2のスレッドの待機電力未満であれば、情報処理装置が、実行順を第2のスレッド→第1のスレッドに決定する。   Then, the information processing apparatus compares the standby power of the first thread with the standby power of the second thread. If the standby power of the first thread is equal to or higher than the standby power of the second thread, the information processing apparatus determines the execution order from the first thread to the second thread. If the standby power of the first thread is less than the standby power of the second thread, the information processing apparatus determines the execution order from the second thread to the first thread.

図2は、第1のスレッドに実行期限が定義されている場合の説明図である。図2では第1のスレッドに実行期限が定義され、第2のスレッドに実行期限が定義されていない例について説明する。ここで、第1のスレッドに実行期限が定義されているとは、第1のスレッドの生成時刻から第1のスレッドの実行期限までの時間が定義されていることを示す。   FIG. 2 is an explanatory diagram when an execution time limit is defined for the first thread. FIG. 2 illustrates an example in which an execution time limit is defined for the first thread and an execution time limit is not defined for the second thread. Here, the execution time limit defined for the first thread indicates that the time from the generation time of the first thread to the execution time limit of the first thread is defined.

第1のスレッドの生成時刻から第1のスレッドの実行期限までの時間(d)が定義されている場合には、実行順を第2のスレッドのつぎに第1のスレッドとした場合に第1のスレッドの実行期限を遵守できるか否かを判断する。すなわち、下記となるか否かが判断される。
・d−第1のスレッドの実行時間>第2のスレッドの実行時間
When the time (d) from the generation time of the first thread to the execution deadline of the first thread is defined, the first thread is set when the execution order is the first thread next to the second thread. It is determined whether or not the execution deadline of the thread can be observed. That is, it is determined whether or not the following is true.
D-execution time of the first thread> execution time of the second thread

図2のようにd−第1のスレッドの実行時間>第2のスレッドの実行時間であれば、図1で上述したように、情報処理装置が実行順の組み合わせごとに待機するスレッドの待機時間を算出し、実行順を決定する。一方、d−第1のスレッドの実行時間≦第2のスレッドの実行時間の場合、実行順が第2のスレッド→第1のスレッドであると、第1のスレッドの実行期限を遵守できないため、情報処理装置が実行順を第1のスレッド→第2のスレッドに決定する。   If d-first thread execution time> second thread execution time as shown in FIG. 2, as described above with reference to FIG. 1, the information processing apparatus waits for each combination of execution order. And the execution order is determined. On the other hand, if d-execution time of the first thread ≤ execution time of the second thread, if the execution order is the second thread-> first thread, the execution deadline of the first thread cannot be observed, The information processing apparatus determines the execution order from the first thread to the second thread.

本実施の形態では情報処理装置の一例としてマルチコアプロセッサシステムを挙げて説明する。ここで、マルチコアプロセッサシステムにおいて、マルチコアプロセッサとは、コアが複数搭載されたプロセッサである。コアが複数搭載されていれば、複数のコアが搭載された単一のプロセッサでもよく、シングルコアのプロセッサが並列されているプロセッサ群でもよい。なお、本実施の形態では、説明を単純化するため、シングルコアのプロセッサが並列されているプロセッサ群を例に挙げて説明する。   In the present embodiment, a multi-core processor system will be described as an example of the information processing apparatus. Here, in the multi-core processor system, the multi-core processor is a processor in which a plurality of cores are mounted. If a plurality of cores are mounted, a single processor having a plurality of cores may be used, or a processor group in which single core processors are arranged in parallel may be used. In the present embodiment, in order to simplify the explanation, a processor group in which single-core processors are arranged in parallel will be described as an example.

(情報処理装置のハードウェア)
図3は、情報処理装置のハードウェアを示すブロック図である。図3において、情報処理装置300は、CPU#0と、CPU#1と、共有メモリ302と、を有している。CPU#0と、CPU#1と、共有メモリ302とは、それぞれバス301を介して接続されている。
(Information processing equipment hardware)
FIG. 3 is a block diagram illustrating hardware of the information processing apparatus. In FIG. 3, the information processing apparatus 300 includes a CPU # 0, a CPU # 1, and a shared memory 302. CPU # 0, CPU # 1, and shared memory 302 are connected to each other via a bus 301.

CPU#0は、キャッシュと、レジスタと、コアと、を有している。CPU#1は、キャッシュと、レジスタと、コアと、を有している。CPU#0はOS310を実行し、情報処理装置の全体の制御を司る。OS310はマスタOSであり、スレッドをどのCPUに割り当てるかを制御する機能を有し、該CPU#0に割り当てられたスレッドを実行する。CPU#1はOS311を実行する。OS311はスレーブOSであり、CPU#1に割り当てられたスレッドを実行する。   The CPU # 0 has a cache, a register, and a core. The CPU # 1 has a cache, a register, and a core. CPU # 0 executes OS 310 and controls the entire information processing apparatus. The OS 310 is a master OS, has a function of controlling which CPU the thread is assigned to, and executes the thread assigned to the CPU # 0. CPU # 1 executes the OS 311. The OS 311 is a slave OS and executes a thread assigned to the CPU # 1.

共有メモリ302は、具体的には、たとえば、ROM(Read Only Memory)と、RAM(Random Access Memory)と、フラッシュROMなどを有している。たとえば、フラッシュROMがブートプログラムを記憶し、ROMがアプリケーションソフトウェアを記憶し、RAMがCPU#0〜CPU#1のワークエリアとして使用される。共有メモリ302に記憶されているプログラムは、各CPUにロードされることで、コーディングされている処理を該各CPUに実行させることとなる。共有メモリ302は、たとえば、スレッドテーブル400と、割当管理テーブル500と、を記憶している。   Specifically, the shared memory 302 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a flash ROM, and the like. For example, a flash ROM stores a boot program, a ROM stores application software, and a RAM is used as a work area for CPU # 0 to CPU # 1. The program stored in the shared memory 302 is loaded on each CPU, thereby causing each CPU to execute a coded process. The shared memory 302 stores, for example, a thread table 400 and an allocation management table 500.

図4は、スレッドテーブル400の一例を示す説明図である。スレッドテーブル400は、スレッドの識別情報の項目401と、優先度の項目402と、デッドラインの項目と、実行時間の項目404と、待機電力の項目405と、を有している。スレッドの識別情報の項目401には、各スレッドの識別情報が保持されている。優先度の項目402には、スレッドの識別情報の項目401に識別情報が保持されている各スレッドの優先度が高いか否かを示す情報が保持されている。優先度が高い場合、高優先が保持され、優先度が高くない場合、低優先が保持されている。   FIG. 4 is an explanatory diagram showing an example of the thread table 400. The thread table 400 includes a thread identification information item 401, a priority item 402, a deadline item, an execution time item 404, and a standby power item 405. The thread identification information item 401 holds identification information of each thread. The priority item 402 holds information indicating whether the priority of each thread whose identification information is held in the thread identification information item 401 is high. When the priority is high, the high priority is held, and when the priority is not high, the low priority is held.

デッドラインの項目403には、スレッドが生成された生成時刻から該スレッドの実行期限までの時間(ここでは、「デッドライン」と称する。)が保持されている。実行時間の項目404には、スレッドの識別情報の項目401に識別情報が保持されている各スレッドの実行時間が保持されている。待機電力の項目405には、スレッドの識別情報の項目401に識別情報が保持されている各スレッドの単位時間あたりの待機電力の値が保持されている。   The deadline item 403 holds the time from the generation time when the thread is generated to the execution deadline of the thread (herein referred to as “deadline”). The execution time item 404 holds the execution time of each thread whose identification information is held in the thread identification information item 401. In the standby power item 405, a value of standby power per unit time of each thread whose identification information is stored in the thread identification information item 401 is stored.

スレッド#0を例に挙げると、スレッド#0は高優先度のスレッドであり、デッドラインが10[ms]である。スレッド#0の実行時間が5[ms]であり、単位時間あたりの待機電力が100[mW/ms]である。   Taking thread # 0 as an example, thread # 0 is a high-priority thread and the deadline is 10 [ms]. The execution time of the thread # 0 is 5 [ms], and the standby power per unit time is 100 [mW / ms].

図5は、割当管理テーブル500の一例を示す説明図である。割当管理テーブル500は、CPUの識別情報の項目501と、LOCKの項目502と、割当済スレッドの識別情報の項目503と、実行状態の項目504と、を有している。CPUの識別情報の項目501には、CPUの識別情報が保持されている。   FIG. 5 is an explanatory diagram showing an example of the allocation management table 500. The allocation management table 500 includes a CPU identification information item 501, a LOCK item 502, an allocated thread identification information item 503, and an execution state item 504. The CPU identification information item 501 holds CPU identification information.

LOCKの項目502には、CPUの識別情報の項目501に識別情報が保持されているCPUがLOCKされているか否かを示す情報が保持されている。LOCKされているか否かとは、CPUに高優先度のスレッドが割り当てられているか否かを示す。CPUに高優先度のスレッドが割り当てられていなければ、LOCKの項目502には0が登録され、CPUに高優先度のスレッドが割り当てられていれば、LOCKの項目502には1が登録される。   The LOCK item 502 holds information indicating whether or not the CPU in which the identification information is held in the CPU identification information item 501 is LOCKed. Whether or not LOCK is set indicates whether or not a high priority thread is assigned to the CPU. If no high-priority thread is assigned to the CPU, 0 is registered in the LOCK item 502, and if a high-priority thread is assigned to the CPU, 1 is registered in the LOCK item 502. .

割当済スレッドの識別情報の項目503には、CPUの識別情報の項目501に識別情報が保持されているCPUに割り当てられたスレッドの識別情報が登録される。実行状態の項目504とは、割当済スレッドの識別情報の項目503に識別情報が登録されたスレッドの実行状態が登録される。実行状態としてはexe(execution)またはproh(prohibit)のいずれかが登録される。exeはスレッドが実行可能な状態であることを示し、prohはスレッドが実行禁止状態であることを示す。   In the assigned thread identification information item 503, the identification information of the thread assigned to the CPU whose identification information is held in the CPU identification information item 501 is registered. The execution state item 504 registers the execution state of the thread whose identification information is registered in the identification information item 503 of the assigned thread. Either exe (execution) or proh (prohibit) is registered as the execution state. exe indicates that the thread is in an executable state, and proh indicates that the thread is in an execution prohibited state.

ここで、各OSは、割当管理テーブル500によりCPU#0にはスレッド#1とスレッド#3とが割り当てられ、CPU#1にはスレッド#2とスレッド#4とが割り当てられていることを特定できる。また、各CPUの割当済スレッドの識別情報は割り当てられた順に登録されているため、各OSは割当管理テーブル500内の割当済スレッドの識別情報を順にアクセスすることで、割当順を特定することができる。   Here, each OS specifies that thread # 1 and thread # 3 are assigned to CPU # 0 and thread # 2 and thread # 4 are assigned to CPU # 1 by assignment management table 500 it can. In addition, since the identification information of the allocated threads of each CPU is registered in the order of allocation, each OS specifies the allocation order by sequentially accessing the identification information of the allocated threads in the allocation management table 500. Can do.

(情報処理装置300の機能ブロック図)
図6は、情報処理装置300の機能ブロック図である。情報処理装置300は、検出部601と、差分算出部602と、判断部603と、第1の算出部604と、第2の算出部605と、比較部606と、決定部607と、を有している。具体的には、たとえば、共有メモリ302に記憶され、検出部601〜決定部607の機能を有する情報処理プログラムをCPU#0がロードする。そして、CPU#0がロードした該情報処理プログラムにコーディングされている処理を実行することにより、検出部601〜決定部607の機能が実現される。
(Functional block diagram of information processing apparatus 300)
FIG. 6 is a functional block diagram of the information processing apparatus 300. The information processing apparatus 300 includes a detection unit 601, a difference calculation unit 602, a determination unit 603, a first calculation unit 604, a second calculation unit 605, a comparison unit 606, and a determination unit 607. doing. Specifically, for example, the CPU # 0 loads an information processing program stored in the shared memory 302 and having the functions of the detection unit 601 to the determination unit 607. And the function of the detection part 601-the determination part 607 is implement | achieved by performing the process coded by this information processing program which CPU # 0 loaded.

検出部601は、未実行の第1のスレッドと未実行の第2のスレッドとを検出する。   The detection unit 601 detects an unexecuted first thread and an unexecuted second thread.

第1の算出部604は、検出部601により検出された第2のスレッドの実行時間と検出部601により検出された第1のスレッドの単位時間当たりの待機電力とを乗算する。これにより、第1の算出部604は、第2のスレッドのつぎに第1のスレッドが実行された場合の第1のスレッドの待機電力を算出する。   The first calculation unit 604 multiplies the execution time of the second thread detected by the detection unit 601 and the standby power per unit time of the first thread detected by the detection unit 601. Thereby, the first calculation unit 604 calculates standby power of the first thread when the first thread is executed next to the second thread.

第2の算出部605は、第1のスレッドの実行時間と第2のスレッドの単位時間当たりの待機電力とを乗算することにより、第1のスレッドのつぎに第2のスレッドが実行された場合の第2のスレッドの待機電力を算出する。   When the second thread is executed next to the first thread, the second calculation unit 605 multiplies the execution time of the first thread by the standby power per unit time of the second thread. The standby power of the second thread is calculated.

比較部606は、第1の算出部604により算出された第1のスレッドの待機電力と第2の算出部605により算出された第2のスレッドの待機電力とを比較する。   The comparison unit 606 compares the standby power of the first thread calculated by the first calculation unit 604 with the standby power of the second thread calculated by the second calculation unit 605.

比較部607は、比較部606により比較された比較結果に基づいて第1のスレッドと第2のスレッドとの実行順を決定する。   The comparison unit 607 determines the execution order of the first thread and the second thread based on the comparison result compared by the comparison unit 606.

また、決定部607は、比較部606により第1のスレッドの待機電力が第2のスレッドの待機電力以上であると比較された場合、実行順を第1のスレッドのつぎに第2のスレッドとする。   In addition, when the comparison unit 606 compares the standby power of the first thread to be equal to or higher than the standby power of the second thread, the determination unit 607 sets the execution order to the second thread next to the first thread. To do.

また、決定部607は、比較部606により第1のスレッドの待機電力が第2のスレッドの待機電力未満であると比較された場合、実行順を第2のスレッドのつぎに第1のスレッドとする。   Further, when the comparison unit 606 compares the standby power of the first thread with less than the standby power of the second thread, the determination unit 607 changes the execution order to the first thread next to the second thread. To do.

差分算出部602は、検出部601により検出された第1のスレッドに実行期限が定義されている場合、第1のスレッドの生成時刻から実行期限までの時間と、第1のスレッドの実行時間との差分時間を算出する。   When the execution time limit is defined for the first thread detected by the detection unit 601, the difference calculation unit 602 includes the time from the generation time of the first thread to the execution time limit, the execution time of the first thread, The difference time is calculated.

判断部603は、差分算出部602により算出された差分時間が第2のスレッドの実行時間より大きいか否かを判断する。   The determination unit 603 determines whether or not the difference time calculated by the difference calculation unit 602 is greater than the execution time of the second thread.

第1の算出部604は、判断部603により差分時間が第2のスレッドの実行時間より大きいと判断された場合、第2のスレッドの実行時間と第1のスレッドの単位時間当たりの待機電力とを乗算することにより、第1のスレッドの待機電力を算出する。   When the determination unit 603 determines that the difference time is greater than the execution time of the second thread, the first calculation unit 604 determines the execution time of the second thread and the standby power per unit time of the first thread. The standby power of the first thread is calculated by multiplying.

第2の算出部605は、判断部603により差分時間が第2のスレッドの実行時間より大きいと判断された場合、第1のスレッドの実行時間と第2のスレッドの単位時間当たりの待機電力とを乗算することにより、第2のスレッドの待機電力を算出する。   When the determination unit 603 determines that the difference time is greater than the execution time of the second thread, the second calculation unit 605 determines the execution time of the first thread and the standby power per unit time of the second thread. The standby power of the second thread is calculated by multiplying.

決定部607は、判断部603により差分時間が第2のスレッドの実行時間以下であると判断された場合、実行順を第1のスレッドのつぎに第2のスレッドとする。   When the determination unit 603 determines that the difference time is equal to or less than the execution time of the second thread, the determination unit 607 sets the execution order to the second thread next to the first thread.

以上を踏まえて詳細に説明する。本実施の形態では、高優先度のスレッドが生成された場合に、低優先度のスレッドと高い優先度のスレッドとの実行順を決定する例を示す。また、本実施の形態では、低優先度のスレッドのみが割り当てられているCPUについては、割り当てられた順に実行することとする。   This will be described in detail based on the above. In the present embodiment, an example of determining the execution order of a low priority thread and a high priority thread when a high priority thread is generated will be described. In this embodiment, CPUs to which only low-priority threads are assigned are executed in the assigned order.

本実施の形態では、高優先度が割り当てられていないCPUごとに実行順が決定され、最も待機電力が削減可能なCPUに生成された高優先度のスレッド(対象スレッド)を割り当てることとする。   In this embodiment, the execution order is determined for each CPU to which a high priority is not assigned, and a high priority thread (target thread) generated is assigned to a CPU that can reduce the standby power most.

ここでは、実行順の決定方法を示す。まず、OS310が、高優先度のスレッドが割り当てられていないCPUのうち、任意のCPU(対象CPU)を選択する。そして、OS310が、対象CPUに割り当てられている割当済のスレッドを特定する。つぎに、OS310が、下記式をそれぞれ算出する。   Here, the execution order determination method is shown. First, the OS 310 selects an arbitrary CPU (target CPU) among CPUs to which no high priority thread is assigned. Then, the OS 310 identifies assigned threads assigned to the target CPU. Next, the OS 310 calculates the following formulas, respectively.

・ptotal=0
・r0=対象スレッドのデッドライン−対象スレッドの実行時間
・pst_high(対象スレッドの待機電力)=r0×対象スレッドの単位時間あたりの待機電力[mW/ms]
・pst_low(割当済のスレッドの待機電力)=対象スレッドの実行時間×(p1+p2+・・・pn)
・ Ptotal = 0
R0 = target thread deadline-target thread execution time pst_high (target thread standby power) = r0 × target thread standby power per unit time [mW / ms]
Pst_low (standby power of allocated thread) = execution time of target thread × (p1 + p2 +... Pn)

nは割当済スレッド数であり、割当順に沿って割当済スレッドに1〜nの番号が付されている。p1〜pnは、割当済スレッドの待機電力である。よって、(p1+p2+・・・pn)は、割当済スレッドの単位時間あたりの待機電力の合計値である。   n is the number of assigned threads. Numbers 1 to n are assigned to the assigned threads in the order of assignment. p1 to pn are standby powers of assigned threads. Therefore, (p1 + p2 +... Pn) is a total value of standby power per unit time of the assigned thread.

つぎに、OS310が、下記式を遵守するか否かを判断する。
・r0>(t1∨t2∨・・・∨tn)∧pst_high<pst_low ・・・式(1)
Next, the OS 310 determines whether or not to comply with the following formula.
R0> (t1∨t2∨ ... ∨tn) ∧pst_high <pst_low (1)

∧は論理積であり、∨は論理和である。t1〜tnは、割当済スレッドの実行時間である。OS310が、上記式(1)がTrueである(遵守する)と、対象スレッドよりも先に実行する低優先度スレッドである割当済のスレッドを決定する。   ∧ is a logical product, and ∨ is a logical sum. t1 to tn are execution times of assigned threads. When the above expression (1) is True (observance), the OS 310 determines an assigned thread that is a low priority thread to be executed before the target thread.

そして、OS310が、r0>(t1∨t2∨・・・∨tn)となる割当済スレッドの中で、単位時間あたりの待機電力が最も大きいスレッドを対象スレッドよりも先に実行するスレッドとして選択する。ここで、たとえば、割当済スレッドの中で、1番目に割り当てられたスレッドが対象スレッドよりも先に実行するスレッド(先行スレッド)として選択されたと仮定する。   Then, the OS 310 selects a thread having the largest standby power per unit time as a thread to be executed before the target thread among the assigned threads satisfying r0> (t1∨t2∨... ∨tn). . Here, for example, it is assumed that the first assigned thread among the assigned threads is selected as a thread (previous thread) to be executed before the target thread.

そして、OS310が、(a)下記式を算出する。
・ptotal=ptotal+t1×p0 ・・・式(2)
・pst_high=pst_high−t1×p0 ・・・式(3)
・pst_low=pst_low−t1×p0 ・・・式(4)
・r0=r0−t1 ・・・式(5)
Then, the OS 310 calculates (a) the following formula.
Ptotal = ptotal + t1 × p0 (2)
Pst_high = pst_high−t1 × p0 Formula (3)
Pst_low = pst_low−t1 × p0 (4)
R0 = r0-t1 Formula (5)

そして、OS310が、(b)下記式を遵守するか否かを判断する。
・pst_high<pst_low ・・・式(6)
Then, the OS 310 determines whether or not (b) the following formula is observed.
Pst_high <pst_low (6)

そして、OS310が、(b)上記式(6)を遵守すると判断した場合、r0>(t2∨・・・∨tn)となる割当済スレッドの中で、単位時間あたりの待機電力が最も大きいスレッドを、先行スレッドのつぎで、対象スレッドよりも先に実行するスレッドとして選択する。   When the OS 310 determines that (b) the above equation (6) is observed, the thread having the largest standby power per unit time among the assigned threads satisfying r0> (t2∨... ∨tn). Is selected as a thread to be executed after the preceding thread and before the target thread.

そして、OS310が、(a)〜(b)の処理を繰り返すことで、対象CPUに割り当てた場合の実行順を決定する。そして、OS310が、対象CPUに対象スレッドが割り当てられた場合の実行順が決定すると、高優先度のスレッドが割り当てられていないCPUのうち、対象CPUとして未選択のCPUを対象CPUに選択する。そして、OS310が、該選択した対象CPUに対象スレッドが割り当てられた場合の実行順を決定する。   Then, the OS 310 repeats the processes (a) to (b), thereby determining the execution order when assigned to the target CPU. When the execution order when the target thread is assigned to the target CPU is determined, the OS 310 selects an unselected CPU as the target CPU among the CPUs to which no high priority thread is assigned. Then, the OS 310 determines the execution order when the target thread is assigned to the selected target CPU.

そして、高優先度のスレッドが割り当てられていないCPUのうち、該CPUごとに算出されたptotalが最も大きい値であるCPUを対象スレッドの割当先CPUに決定する。そして、決定した実行順を該割当先CPUに通知し、割当先CPUが通知された実行順に基づいて該割当先CPUに割り当てられたスレッドを実行する。   Of the CPUs to which no high-priority thread is assigned, the CPU having the largest ptotal calculated for each CPU is determined as the assignment destination CPU of the target thread. Then, the determined execution order is notified to the assignment destination CPU, and the thread assigned to the assignment destination CPU is executed based on the notified execution order.

つぎに、具体的な数値を用いて詳細に説明する。   Next, it will be described in detail using specific numerical values.

図7は、スレッド#0の生成が検出される例を示す説明図である。まず、OS310が(1)スレッド#0の生成を検出すると、スレッド#0の優先度が高いか否かをスレッド#0の識別情報に基づきスレッドテーブル400を用いて判断する。ここでは、スレッド#0の優先度は高いと判断される。つぎに、OS310が、マルチコアプロセッサのうち、(2)高優先度のスレッドが割り当てられていないCPUを割当管理テーブル500に基づいて特定する。ここでは、CPU#0とCPU#1とが特定される。まず、OS310が、CPU#0とCPU#1のうち、CPU#0を対象CPUに選択する。   FIG. 7 is an explanatory diagram illustrating an example in which the generation of thread # 0 is detected. First, when the OS 310 detects (1) the generation of the thread # 0, it determines whether or not the priority of the thread # 0 is high using the thread table 400 based on the identification information of the thread # 0. Here, it is determined that the priority of thread # 0 is high. Next, the OS 310 identifies (2) a CPU to which a high priority thread is not allocated among the multi-core processors based on the allocation management table 500. Here, CPU # 0 and CPU # 1 are specified. First, the OS 310 selects CPU # 0 as the target CPU from among CPU # 0 and CPU # 1.

・r0(CPU#0)=スレッド#0のデッドライン−スレッド#0の実行時間
=10[ms]−5[ms]
=5[ms]
・pst_high(CPU#0)=r0×スレッド#0の単位時間あたりの待機電力[mW/ms]
=5[ms]×100[mW/ms]
=500[mW]
・pst_low(CPU#0)=スレッド#0の実行時間×(スレッド#1の単位時間あたりの待機電力+スレッド#3の単位時間あたりの待機電力)
=5[ms]×(100[mW/ms]+80[mW/ms])
=900[ms]
R0 (CPU # 0) = dead line of thread # 0−execution time of thread # 0
= 10 [ms] -5 [ms]
= 5 [ms]
Pst_high (CPU # 0) = r0 × standby power per unit time of thread # 0 [mW / ms]
= 5 [ms] x 100 [mW / ms]
= 500 [mW]
Pst_low (CPU # 0) = execution time of thread # 0 × (standby power per unit time of thread # 1 + standby power per unit time of thread # 3)
= 5 [ms] × (100 [mW / ms] +80 [mW / ms])
= 900 [ms]

つぎに、OS310が、上記式(1)に算出した各値を代入して上記式(1)を遵守するか否かを判断する。
・5[ms](r0(CPU#0))>(3[ms](スレッド#1の実行時間)∨2[ms](スレッド#3の実行時間))∧500[mW](pst_high(CPU#0))<900[ms](pst_low(CPU#0))
Next, the OS 310 assigns each calculated value to the above equation (1) and determines whether or not the above equation (1) is observed.
5 [ms] (r0 (CPU # 0))> (3 [ms] (execution time of thread # 1) ∨2 [ms] (execution time of thread # 3)) ∧500 [mW] (pst_high (CPU # 0)) <900 [ms] (pst_low (CPU # 0))

そして、OS310が、上記式(1)を遵守すると判断すると、r0(CPU#0)>(3[ms](スレッド#1の実行時間)∨2[ms](スレッド#3の実行時間))となる割当済スレッドの中で、単位時間あたりの待機電力が最大のスレッドを特定する。そして、OS310が、特定したスレッドをスレッド#0よりも先に実行するスレッドとして選択する。なお、選択結果を実行順情報として、共有メモリ302などの記憶領域に出力する。
・CPU#0の実行順情報:スレッド#1
When the OS 310 determines that the above equation (1) is observed, r0 (CPU # 0)> (3 [ms] (execution time of thread # 1) ∨2 [ms] (execution time of thread # 3)) Among the assigned threads, the thread having the maximum standby power per unit time is specified. Then, the OS 310 selects the identified thread as a thread to be executed before the thread # 0. The selection result is output to the storage area such as the shared memory 302 as execution order information.
CPU # 0 execution order information: thread # 1

そして、OS310が、上記式(2)〜(6)を算出する。
・ptotal(CPU#0)=ptotal(CPU#0)+スレッド#1の実行時間×スレッド#0の単位時間あたりの待機電力
=0+3[ms]×100[mW/ms]
=300[mW]
・pst_high(CPU#0)=pst_high(CPU#0)−スレッド#1の実行時間×スレッド#0の単位時間あたりの待機電力
=500[mW]−3[ms]×100[mW/ms]
=200[mW]
・pst_low(CPU#0)=pst_low(CPU#0)−スレッド#1の実行時間×スレッド#0の単位時間あたりの待機電力
=900[ms]−3[ms]×100[mW/ms]
=600[mW]
・r0(CPU#0)=r0(CPU#0)−スレッド#1の実行時間
=5[ms]−3[ms]
=2[ms]
Then, the OS 310 calculates the above formulas (2) to (6).
Ptotal (CPU # 0) = total (CPU # 0) + execution time of thread # 1 × standby power per unit time of thread # 0
= 0 + 3 [ms] × 100 [mW / ms]
= 300 [mW]
Pst_high (CPU # 0) = pst_high (CPU # 0) −execution time of thread # 1 × standby power per unit time of thread # 0
= 500 [mW] -3 [ms] × 100 [mW / ms]
= 200 [mW]
Pst_low (CPU # 0) = pst_low (CPU # 0) −execution time of thread # 1 × standby power per unit time of thread # 0
= 900 [ms] -3 [ms] × 100 [mW / ms]
= 600 [mW]
R0 (CPU # 0) = r0 (CPU # 0) -Thread # 1 execution time
= 5 [ms] -3 [ms]
= 2 [ms]

そして、OS310が、上記式(6)を遵守するか否かを判断する。
・200[mW]<600[mW]
Then, the OS 310 determines whether to comply with the above formula (6).
・ 200 [mW] <600 [mW]

そして、OS310が、上記式(6)を遵守すると判断し、r0(CPU#0)>(スレッド#3の実行時間)となる割当済スレッドの中で、単位時間あたりの待機電力が最も大きいスレッドを、先行スレッドのつぎで、対象スレッドよりも先に実行するスレッドとして選択する。そして、選択結果を上述のCPU#0の実行順情報に追加する。
・CPU#0の実行順情報:スレッド#1→スレッド#3
Then, the OS 310 determines that the above equation (6) is observed, and among the assigned threads satisfying r0 (CPU # 0)> (execution time of thread # 3), the thread having the largest standby power per unit time Is selected as a thread to be executed after the preceding thread and before the target thread. Then, the selection result is added to the execution order information of CPU # 0 described above.
CPU # 0 execution order information: thread # 1 → thread # 3

そして、OS310が、上記式(2)を算出する。
・ptotal(CPU#0)=ptotal(CPU#0)+スレッド#3の実行時間×スレッド#0の単位時間あたりの待機電力
=300[mW]+2[ms]×100[mW/ms]
=500[mW]
Then, the OS 310 calculates the above equation (2).
Ptotal (CPU # 0) = total (CPU # 0) + execution time of thread # 3 × standby power per unit time of thread # 0
= 300 [mW] + 2 [ms] x 100 [mW / ms]
= 500 [mW]

ここで、CPU#0に割り当てられているスレッドがスレッド#1とスレッド#3のみであるため、CPU#0の実行順情報にスレッド#0を追加する。
・CPU#0の実行順情報:スレッド#1→スレッド#3→スレッド#0
Here, since the threads assigned to the CPU # 0 are only the thread # 1 and the thread # 3, the thread # 0 is added to the execution order information of the CPU # 0.
CPU # 0 execution order information: thread # 1 → thread # 3 → thread # 0

つぎに、OS310が、CPU#0とCPU#1のうち、CPU#1を対象CPUに選択する。   Next, the OS 310 selects CPU # 1 as the target CPU from among CPU # 0 and CPU # 1.

・r0(CPU#1)=スレッド#0のデッドライン−スレッド#0の実行時間
=10[ms]−5[ms]
=5[ms]
・pst_high(CPU#1)=r0×スレッド#0の単位時間あたりの待機電力[mW/ms]
=5[ms]×100[mW/ms]
=500[mW]
・pst_low(CPU#1)=スレッド#0の実行時間×(スレッド#2の単位時間あたりの待機電力+スレッド#4の単位時間あたりの待機電力)
=5[ms]×(50[mW/ms]+70[mW/ms])
=600[ms]
R0 (CPU # 1) = deadline of thread # 0−execution time of thread # 0
= 10 [ms] -5 [ms]
= 5 [ms]
Pst_high (CPU # 1) = r0 × standby power per unit time of thread # 0 [mW / ms]
= 5 [ms] x 100 [mW / ms]
= 500 [mW]
Pst_low (CPU # 1) = execution time of thread # 0 × (standby power per unit time of thread # 2 + standby power per unit time of thread # 4)
= 5 [ms] × (50 [mW / ms] +70 [mW / ms])
= 600 [ms]

つぎに、OS310が、上記式(1)に算出した各値を代入して上記式(1)を遵守するか否かを判断する。
・5[ms](r0(CPU#1))>(4[ms](スレッド#2の実行時間)∨5[ms](スレッド#4の実行時間))∧500[mW](pst_high(CPU#1))<600[ms](pst_low(CPU#1))
Next, the OS 310 assigns each calculated value to the above equation (1) and determines whether or not the above equation (1) is observed.
5 [ms] (r0 (CPU # 1))> (4 [ms] (execution time of thread # 2) ∨5 [ms] (execution time of thread # 4)) ∧500 [mW] (pst_high (CPU # 1)) <600 [ms] (pst_low (CPU # 1))

そして、OS310が、上記式(1)を遵守すると判断すると、r0(CPU#1)>(4[ms](スレッド#2の実行時間))となる割当済スレッドの中で、単位時間あたりの待機電力が最大のスレッドを特定する。そして、OS310が、特定したスレッドをスレッド#0よりも先に実行するスレッドとして選択する。なお、選択結果を実行順情報として、共有メモリ302などの記憶領域に出力する。
・CPU#1の実行順情報:スレッド#2
Then, when the OS 310 determines that the above equation (1) is observed, the assigned thread per unit time among the allocated threads satisfying r0 (CPU # 1)> (4 [ms] (execution time of thread # 2)). Identify the thread with the highest standby power. Then, the OS 310 selects the identified thread as a thread to be executed before the thread # 0. The selection result is output to the storage area such as the shared memory 302 as execution order information.
CPU # 1 execution order information: thread # 2

そして、OS310が、上記式(2)を算出する。
・ptotal(CPU#1)=ptotal(CPU#1)+スレッド#2の実行時間×スレッド#0の単位時間あたりの待機電力
=0+4[ms]×100[mW/ms]
=400[mW]
Then, the OS 310 calculates the above equation (2).
Ptotal (CPU # 1) = total (CPU # 1) + execution time of thread # 2 × standby power per unit time of thread # 0
= 0 + 4 [ms] × 100 [mW / ms]
= 400 [mW]

ここで、r0(CPU#1)未満であるスレッドがスレッド#2のみであるため、CPU#1の実行順情報にスレッド#0を登録し、さらに、スレッド#4を登録する。
・CPU#1の実行順情報:スレッド#2→スレッド#0→スレッド#4
Here, since the thread less than r0 (CPU # 1) is only thread # 2, thread # 0 is registered in the execution order information of CPU # 1, and thread # 4 is further registered.
CPU # 1 execution order information: thread # 2 → thread # 0 → thread # 4

つぎに、OS310がCPU#0とCPU#1のうち、ptotalが大きいCPUをスレッド#0の割当先CPUに決定する。ここでは、ptotal(CPU#0)が500[mW]であり、ptotal(CPU#1)が400[mW]であるため、CPU#0がスレッド#0の割当先CPUに決定される。   Next, the OS 310 determines a CPU having a large total of CPU # 0 and CPU # 1 as an assignment destination CPU of the thread # 0. Here, since ptotal (CPU # 0) is 500 [mW] and ptotal (CPU # 1) is 400 [mW], CPU # 0 is determined as the allocation CPU of thread # 0.

図8は、割当管理テーブル500の更新例を示す説明図である。OS310が、割当管理テーブル500内のCPUの識別情報がCPU#0に、割当済スレッドの識別情報の項目503にスレッド#0の識別情報を登録する。そして、OS310が、スレッド#1の実行状態の項目504にexeを設定し、スレッド#3の実行状態の項目504にprohを設定し、スレッド#0の実行状態の項目504にprohを設定する。そして、OS310が、スレッド#1の実行を開始する。   FIG. 8 is an explanatory diagram showing an example of updating the allocation management table 500. The OS 310 registers the identification information of the CPU in the allocation management table 500 in the CPU # 0 and the identification information of the thread # 0 in the allocated thread identification information item 503. The OS 310 sets exe in the execution state item 504 of the thread # 1, sets proh in the execution state item 504 of the thread # 3, and sets proh in the execution state item 504 of the thread # 0. Then, the OS 310 starts executing the thread # 1.

(情報処理手順)
図9〜11は、情報処理装置300による情報処理手順を示すフローチャートである。実行主体はマスタOSであるOS310である。まず、OS310が、スレッドの生成を検出したか否かを判断する(ステップS901)。OS310が、スレッドの生成を検出していないと判断した場合(ステップS901:No)、ステップS901へ戻る。OS310が、スレッドの生成を検出したと判断した場合(ステップS901:Yes)、生成されたスレッド(対象スレッド)が高優先度スレッドであるか否かを判断する(ステップS902)。
(Information processing procedure)
9 to 11 are flowcharts illustrating an information processing procedure performed by the information processing apparatus 300. The execution subject is the OS 310 which is the master OS. First, the OS 310 determines whether or not the generation of a thread has been detected (step S901). When the OS 310 determines that the generation of a thread is not detected (step S901: No), the process returns to step S901. When the OS 310 determines that the generation of a thread has been detected (step S901: Yes), it determines whether the generated thread (target thread) is a high priority thread (step S902).

OS310が、対象スレッドが高優先度スレッドであると判断した場合(ステップS902:Yes)、高優先度スレッドの割り当てに関するロックがかかっていないCPUを特定する(ステップS903)。そして、OS310が、高優先度スレッドの割り当てに関するロックがかかっていないCPUを特定できたか否かを判断する(ステップS904)。   When the OS 310 determines that the target thread is a high priority thread (step S902: Yes), it identifies a CPU that is not locked with respect to the allocation of the high priority thread (step S903). Then, the OS 310 determines whether or not the CPU that is not locked with respect to the assignment of the high priority thread has been identified (step S904).

OS310が、高優先度スレッドの割り当てに関するロックがかかっていないCPUを特定できたと判断した場合(ステップS904:Yes)、ロックがかかっていないCPUのうち、未選択なCPUがあるか否かを判断する(ステップS905)。   When the OS 310 determines that a CPU that is not locked with respect to the assignment of the high priority thread has been identified (step S904: Yes), it is determined whether there is an unselected CPU among the CPUs that are not locked. (Step S905).

OS310が、未選択なCPUがあると判断した場合(ステップS905:Yes)、未選択なCPUから任意のCPUを対象CPUに選択する(ステップS906)。そして、OS310が、実行順の決定処理を実行し(ステップS907)、対象CPUの識別情報と実行順情報とptotalとを関連付けて出力し(ステップS908)、ステップS905へ戻る。   If the OS 310 determines that there is an unselected CPU (step S905: Yes), an arbitrary CPU is selected from the unselected CPUs as the target CPU (step S906). Then, the OS 310 executes execution order determination processing (step S907), outputs the target CPU identification information, execution order information, and ptotal in association with each other (step S908), and returns to step S905.

OS310が、対象スレッドが高優先度スレッドでないと判断した場合(ステップS902:No)、最小負荷のCPUを特定する(ステップS909)。そして、OS310が、対象スレッドの割当先CPUを特定した最小負荷のCPUに設定し(ステップS910)、ステップS901へ戻る。   When the OS 310 determines that the target thread is not a high priority thread (step S902: No), the CPU with the minimum load is specified (step S909). Then, the OS 310 sets the CPU to which the target thread is assigned as the specified minimum load CPU (step S910), and the process returns to step S901.

OS310が、高優先度スレッドの割り当てに関するロックがかかっていないCPUを特定できなかったと判断した場合(ステップS904:No)、未選択なCPUがあるか否かを判断する(ステップS911)。そして、OS310が、未選択なCPUがあると判断した場合(ステップS911:Yes)、未選択なCPUから任意のCPUを選択する(ステップS912)。   When the OS 310 determines that the CPU that is not locked with respect to the assignment of the high priority thread cannot be identified (step S904: No), it determines whether there is an unselected CPU (step S911). If the OS 310 determines that there is an unselected CPU (step S911: Yes), an arbitrary CPU is selected from the unselected CPUs (step S912).

OS310が、選択したCPUの実行順情報に登録されたスレッドを抽出し(ステップS913)、抽出したスレッドの実行時間の合計値を算出する(ステップS914)。OS310が、抽出したスレッドの実行時間の合計値<対象スレッドのデッドライン(d0)−対象スレッドの実行時間(t0)であるか否かを判断する(ステップS915)。   The OS 310 extracts threads registered in the execution order information of the selected CPU (step S913), and calculates the total execution time of the extracted threads (step S914). The OS 310 determines whether or not the total value of the extracted thread execution times <the target thread deadline (d0) −the target thread execution time (t0) (step S915).

OS310が、抽出したスレッドの実行時間の合計値<d0−t0であると判断した場合(ステップS915:Yes)、対象CPUを、d0を遵守可能なCPUに決定し(ステップS916)、ステップS911へ戻る。一方、抽出したスレッドの実行時間の合計値<d0−t0でないと判断した場合(ステップS915:No)、ステップS911へ戻る。   When the OS 310 determines that the total execution time of the extracted threads <d0−t0 (step S915: Yes), the target CPU is determined as a CPU that can comply with d0 (step S916), and the process proceeds to step S911. Return. On the other hand, when it is determined that the total execution time of the extracted threads is not less than d0−t0 (step S915: No), the process returns to step S911.

OS310が、未選択なCPUがないと判断した場合(ステップS911:No)、d0を遵守可能なCPUがあるか否かを判断する(ステップS917)。OS310が、d0を遵守可能なCPUがあると判断した場合(ステップS917:Yes)、d0を遵守可能なCPUのうち、未選択なCPUがあるか否かを判断する(ステップS918)。   When the OS 310 determines that there is no unselected CPU (step S911: No), it determines whether there is a CPU that can comply with d0 (step S917). When the OS 310 determines that there is a CPU that can comply with d0 (step S917: Yes), it determines whether there is an unselected CPU among CPUs that can comply with d0 (step S918).

OS310が、d0を遵守可能なCPUのうち、未選択なCPUがあると判断した場合(ステップS918:Yes)、未選択なCPUから任意のCPUを対象CPUに選択する(ステップS919)。そして、OS310が、実行順の決定処理を実行し(ステップS920)、対象CPUの識別情報と実行順情報とptotalとを関連付けて出力し(ステップS921)、ステップS905へ戻る。   When the OS 310 determines that there is an unselected CPU among CPUs that can comply with d0 (step S918: Yes), an arbitrary CPU is selected from the unselected CPUs as a target CPU (step S919). Then, the OS 310 executes execution order determination processing (step S920), outputs the target CPU identification information, execution order information, and ptotal in association with each other (step S921), and returns to step S905.

ステップS918において、OS310が、d0を遵守可能なCPUのうち、未選択なCPUがないと判断した場合(ステップS918:No)、d0を遵守可能なCPUのうち、最もptotalの値が大きいCPUを特定する(ステップS922)。そして、OS310が、特定したCPUの実行順情報を特定したCPUに通知し(ステップS923)、対象スレッドの割当先CPUを特定したCPUに設定し(ステップS924)、ステップS901へ戻る。   In step S918, when the OS 310 determines that there is no unselected CPU among the CPUs that can comply with d0 (step S918: No), the CPU with the largest ptotal value among the CPUs that can comply with d0. Specify (step S922). Then, the OS 310 notifies the identified CPU of the execution order information of the identified CPU (step S923), sets the assignment destination CPU of the target thread to the identified CPU (step S924), and returns to step S901.

OS310が、d0を遵守可能なCPUがないと判断した場合(ステップS917:No)、各CPUに割当済の高優先度のスレッドのうち、実行時間が最小のスレッドを特定する(ステップS925)。つぎに、OS310が、特定したスレッドの割当先CPUを対象スレッドの割当先CPUに設定し(ステップS926)、実行順情報の破棄指示に対象スレッドの割当先CPUに通知し(ステップS927)、ステップS901へ戻る。   When the OS 310 determines that there is no CPU that can comply with d0 (step S917: No), it identifies the thread with the shortest execution time among the high priority threads assigned to each CPU (step S925). Next, the OS 310 sets the specified thread allocation destination CPU as the target thread allocation destination CPU (step S926), and notifies the target thread allocation destination CPU of the execution order information discard instruction (step S927). Return to S901.

ステップS905において、OS310が、未選択なCPUがないと判断した場合(ステップS905:No)、ロックがかかっていないCPUのうち、最もptotalの値が大きいCPUを特定する(ステップS928)。そして、OS310が、特定したCPUの実行順情報を特定したCPUに通知し(ステップS929)、対象スレッドの割当先CPUを特定したCPUに設定し(ステップS930)、ステップS901へ戻る。   In step S905, when the OS 310 determines that there is no unselected CPU (step S905: No), the CPU having the largest ptotal value among the unlocked CPUs is identified (step S928). Then, the OS 310 notifies the identified CPU of the execution order information of the identified CPU (step S929), sets the assignment destination CPU of the target thread to the identified CPU (step S930), and returns to step S901.

図12および図13は、図9で示した実行順の決定処理(ステップS907)の詳細な処理手順を示すフローチャートである。実行順の決定処理がステップS907またはステップS920の場合、実行主体はOS310であるが、実行順の決定処理がステップS1511(図15)の処理の場合、実行主体は各OSである。まず、OSが、r0=対象スレッドのデッドライン(d0)−対象スレッドの実行時間(t0)を算出し(ステップS1201)、pst_high=r0×対象スレッドの単位時間あたりの待機電力(p0)を算出する(ステップS1202)。   12 and 13 are flowcharts showing the detailed processing procedure of the execution order determination processing (step S907) shown in FIG. When the execution order determination process is step S907 or step S920, the execution subject is the OS 310, but when the execution order determination process is the process of step S1511 (FIG. 15), the execution subject is each OS. First, the OS calculates r0 = dead line of target thread (d0) −target thread execution time (t0) (step S1201), and pst_high = r0 × standby power per unit time of target thread (p0). (Step S1202).

つぎに、OSが、ptotal=0とし(ステップS1203)、m=1とし(ステップS1204)、対象CPUに割当済のCPUを特定する(ステップS1205)。OSが、特定した割当済のスレッドのうち、r0よりも実行時間が小さいスレッドを特定する(ステップS1206)。そして、OSが、r0よりも実行時間が小さいスレッドを特定できたか否かを判断する(ステップS1207)。   Next, the OS sets ptotal = 0 (step S1203), m = 1 (step S1204), and identifies the CPU assigned to the target CPU (step S1205). The OS specifies a thread whose execution time is shorter than r0 among the specified assigned threads (step S1206). Then, it is determined whether or not the OS has identified a thread whose execution time is shorter than r0 (step S1207).

OSが、r0よりも実行時間が小さいスレッドを特定できたと判断した場合(ステップS1207:Yes)、割当済のスレッドの待機電力の合計値(psum)を算出する(ステップS1208)。OSが、pst_low=psum×t0を算出し(ステップS1209)、pst_high>pst_lowであるか否かを判断する(ステップS1210)。   When the OS determines that a thread having an execution time shorter than r0 has been identified (step S1207: YES), the total value (psum) of standby power of the allocated threads is calculated (step S1208). The OS calculates pst_low = psum × t0 (step S1209), and determines whether pst_high> pst_low is satisfied (step S1210).

OSが、pst_high>pst_lowであると判断した場合(ステップS1210:Yes)、r0よりも実行時間が小さいスレッドのうち、未選択なスレッドがあるか否かを判断する(ステップS1211)。OSが、未選択なスレッドがあると判断した場合(ステップS1211:Yes)、未選択なスレッドのうち、最も単位時間あたりの待機電力が大きいスレッドを選択する(ステップS1212)。   When the OS determines that pst_high> pst_low (step S1210: Yes), it is determined whether there is an unselected thread among threads whose execution time is shorter than r0 (step S1211). When the OS determines that there is an unselected thread (step S1211: Yes), the unselected thread having the largest standby power per unit time is selected (step S1212).

そして、OSが、選択したスレッドの識別情報とmの値とを関連付けて実行順情報に出力する(ステップS1213)。OSが、ptotal=ptotal+t0×選択したスレッドの単位時間当たりの待機電力を算出し(ステップS1214)、pst_low=pst_low−t0×選択したスレッドの単位時間当たりの待機電力を算出する(ステップS1215)。   Then, the OS associates the identification information of the selected thread and the value of m, and outputs them in the execution order information (step S1213). The OS calculates ptotal = ptotal + t0 × standby power per unit time of the selected thread (step S1214), and pst_low = pst_low−t0 × standby power per unit time of the selected thread (step S1215).

OSが、pst_high=pst_high−選択したスレッドの実行時間×p0を算出し(ステップS1216)、m=m+1とし(ステップS1217)、ステップS1211へ戻る。   The OS calculates pst_high = pst_high−the execution time of the selected thread × p0 (step S1216), sets m = m + 1 (step S1217), and returns to step S1211.

ステップS1207において、OSが、r0よりも実行時間が小さいスレッドを特定できなかったと判断した場合(ステップS1207:No)、対象スレッドの識別情報とmの値とを関連付けて実行順情報に出力し(ステップS1218)、ステップS908へ移行する。   In step S1207, when the OS determines that a thread having an execution time shorter than r0 could not be identified (step S1207: No), the identification information of the target thread is associated with the value of m and output to the execution order information ( Step S1218) and the process proceeds to Step S908.

また、ステップS1210において、OSが、pst_high>pst_lowでないと判断した場合(ステップS1210:No)、ステップS1218へ移行する。   In step S1210, if the OS determines that pst_high> pst_low is not satisfied (step S1210: No), the process proceeds to step S1218.

また、ステップS1211において、OSが、未選択なスレッドがないと判断した場合(ステップS1211:No)、ステップS1218へ移行する。   In step S1211, when the OS determines that there is no unselected thread (step S1211: No), the process proceeds to step S1218.

図14は、各OSによるスレッド割り当て時の情報処理手順を示すフローチャートである。まず、OSが、実行順情報の通知を受け付け、実行順情報の破棄指示を受け付け、またはスレッドの割り当てを検出したか否かを判断する(ステップS1401)。OSが、実行順情報の通知を受け付け、実行順情報の破棄指示を受け付け、およびスレッドの割り当てを検出していないと判断した場合(ステップS1401:No)、ステップS1401へ戻る。   FIG. 14 is a flowchart illustrating an information processing procedure when a thread is assigned by each OS. First, the OS receives a notification of execution order information, receives an instruction to discard execution order information, or determines whether or not a thread assignment has been detected (step S1401). When the OS receives the notification of the execution order information, receives the instruction to discard the execution order information, and determines that the thread assignment is not detected (step S1401: No), the process returns to step S1401.

OSが、実行順情報の通知を受け付けたと判断した場合(ステップS1401:実行順情報の通知)、保存済の実行順情報を破棄し、受け付けた実行順情報を保存する(ステップS1402)。   If the OS determines that the notification of execution order information has been received (step S1401: notification of execution order information), the stored execution order information is discarded and the received execution order information is stored (step S1402).

OSが、スレッドの割り当てを検出したと判断した場合(ステップS1401:スレッドの割り当て)、割り当てを検出したスレッドが高優先度スレッドであるか否かを判断する(ステップS1403)。OSが、割り当てを検出したスレッドが高優先度スレッドであると判断した場合(ステップS1403:Yes)、高優先度スレッドの割り当てに関するロックをかける(ステップS1404)。   When the OS determines that a thread assignment has been detected (step S1401: thread assignment), it determines whether the thread that has detected the assignment is a high priority thread (step S1403). When the OS determines that the thread that has detected the assignment is a high priority thread (step S1403: Yes), it locks the assignment of the high priority thread (step S1404).

そして、OSが、実行順情報内の先頭スレッドの実行状態をexeに設定する(ステップS1405)、実行順情報内の先頭スレッドを除く割当済スレッドの実行状態をprohに設定する(ステップS1406)。つぎに、OSが、実行順情報内の先頭スレッドの実行を開始し(ステップS1407)、ステップS1401へ戻る。   Then, the OS sets the execution state of the first thread in the execution order information to exe (step S1405), and sets the execution state of the allocated thread excluding the first thread in the execution order information to proh (step S1406). Next, the OS starts execution of the first thread in the execution order information (step S1407), and returns to step S1401.

ステップS1403において、OSが、割り当てを検出したスレッドが高優先度スレッドでないと判断した場合(ステップS1403:No)、高優先度スレッドの割り当てに関するロックがかかっているか否かを判断する(ステップS1408)。OSが、高優先度スレッドの割り当てに関するロックがかかっていると判断した場合(ステップS1408:Yes)、割り当てを検出したスレッドが実行順情報内の先頭スレッドであるか否かを判断する(ステップS1409)。   In step S1403, when the OS determines that the thread that detected the assignment is not a high priority thread (step S1403: No), the OS determines whether or not a lock relating to the assignment of the high priority thread is applied (step S1408). . When the OS determines that the lock relating to the assignment of the high priority thread is applied (step S1408: Yes), it is determined whether the thread that detected the assignment is the first thread in the execution order information (step S1409). ).

そして、OSが、割り当てを検出したスレッドが実行順情報内の先頭スレッドでないと判断した場合(ステップS1409:No)、検出したスレッドの実行状態をprohに設定し(ステップS1410)、ステップS1401へ戻る。OSが、割り当て指示を検出したスレッドが実行順情報内の先頭スレッドであると判断した場合(ステップS1409:Yes)、検出したスレッドの実行状態をexeに設定し(ステップS1411)、ステップS1401へ戻る。   If the OS determines that the thread whose allocation is detected is not the first thread in the execution order information (step S1409: No), the execution state of the detected thread is set to proh (step S1410), and the process returns to step S1401. . When the OS determines that the thread that detected the allocation instruction is the first thread in the execution order information (step S1409: Yes), the execution state of the detected thread is set to exe (step S1411), and the process returns to step S1401. .

ステップS1408において、OSが、高優先度スレッドの割り当てに関するロックがかかっていないと判断した場合(ステップS1408:No)、ランキューの最後尾に検出したスレッドを登録し(ステップS1412)、ステップS1401へ戻る。   In step S1408, when the OS determines that the lock relating to the assignment of the high priority thread is not applied (step S1408: No), the thread detected at the end of the run queue is registered (step S1412), and the process returns to step S1401. .

ステップS1401において、OSが、実行順情報の破棄指示の通知を受け付けたと判断した場合(ステップS1401:実行順情報の破棄指示の通知)、保存済の実行順情報を破棄する(ステップS1413)。そして、OSが、割当済の高優先度のスレッドのうち、最も先に割り当てられたスレッドの実行を開始し(ステップS1414)、ステップS1401へ戻る。   If the OS determines in step S1401 that the execution order information discard instruction has been received (step S1401: execution order information discard instruction notification), the stored execution order information is discarded (step S1413). Then, the OS starts executing the thread assigned first among the assigned high priority threads (step S1414), and returns to step S1401.

図15は、各OSによるスレッド終了時の情報処理手順を示すフローチャートである。まず、OSが、スレッドの終了またはスレッドの切り替えを検出したか否かを判断する(ステップS1501)。そして、OSが、スレッドの終了またはスレッドの切り替えを検出していないと判断した場合(ステップS1501:No)、ステップS1501に戻る。   FIG. 15 is a flowchart showing an information processing procedure at the time of thread termination by each OS. First, it is determined whether or not the OS detects the end of a thread or the switching of a thread (step S1501). If the OS determines that the end of the thread or the switching of the thread is not detected (step S1501: No), the process returns to step S1501.

OSが、スレッドの終了を検出したと判断した場合(ステップS1501:スレッドの終了)、終了したスレッドが高優先度スレッドであるか否かを判断する(ステップS1502)。OSが、終了したスレッドが高優先度スレッドでないと判断した場合(ステップS1502:No)、高優先度スレッドの割り当てに関するロックがかかっているか否かを判断する(ステップS1503)。   If the OS determines that the end of the thread has been detected (step S1501: end of thread), it determines whether the ended thread is a high priority thread (step S1502). When the OS determines that the terminated thread is not a high priority thread (step S1502: No), it determines whether or not a lock relating to the assignment of the high priority thread is applied (step S1503).

OSが、高優先度スレッドの割り当てに関するロックがかかっていると判断した場合(ステップS1503:Yes)、ステップS1509に移行する。OSが、高優先度スレッドの割り当てに関するロックがかかっていないと判断した場合(ステップS1503:No)、ステップS1505へ移行する。   When the OS determines that the lock related to the assignment of the high priority thread is applied (step S1503: Yes), the process proceeds to step S1509. When the OS determines that the lock relating to the assignment of the high priority thread is not applied (step S1503: No), the process proceeds to step S1505.

OSが、終了したスレッドが高優先度スレッドであると判断した場合(ステップS1502:Yes)、割当済のスレッドの中に、終了したスレッドを除いて高優先度のスレッドがあるか否かを判断する(ステップS1504)。OSが、割当済のスレッドの中に、終了したスレッドを除いて高優先度のスレッドがないと判断した場合(ステップS1504:No)、高優先度のスレッドの割り当てに関するロックを解除する(ステップS1505)。   When the OS determines that the terminated thread is a high-priority thread (step S1502: Yes), it determines whether there is a high-priority thread other than the terminated thread among the allocated threads. (Step S1504). When the OS determines that there is no high priority thread other than the terminated threads among the assigned threads (step S1504: No), the lock relating to the assignment of the high priority thread is released (step S1505). ).

そして、OSが、割当済のすべてのスレッドの実行状態をexeに設定し(ステップS1506)、割当済のスレッドの中で、最も割り当てが先のスレッドの実行を開始し(ステップS1507)、ステップS1501へ戻る。   Then, the OS sets the execution state of all the allocated threads to exe (step S1506), and starts the execution of the thread with the highest allocation among the allocated threads (step S1507), and step S1501. Return to.

ステップS1504において、OSが、割当済のスレッドの中に、終了したスレッドを除いて高優先度のスレッドがあると判断した場合(ステップS1504:Yes)、実行順情報内に未実行のスレッドがあるか否かを判断する(ステップS1508)。OSが、実行順情報内に未実行のスレッドがあると判断した場合(ステップS1508:Yes)、実行順情報で未実行のスレッドのうち、先頭のスレッドの実行状態をexeに設定する(ステップS1509)。   In step S1504, when the OS determines that there is a high-priority thread among the allocated threads except for the terminated thread (step S1504: Yes), there is an unexecuted thread in the execution order information. Whether or not (step S1508). When the OS determines that there is an unexecuted thread in the execution order information (step S1508: Yes), the execution state of the first thread among the unexecuted threads in the execution order information is set to exe (step S1509). ).

OSが、先頭のスレッドの実行を開始し(ステップS1510)、ステップS1501へ戻る。OSが、実行順情報内に未実行のスレッドがないと判断した場合(ステップS1508:No)、実行順の決定処理を実行し(ステップS1511)、ステップS1501へ戻る。   The OS starts execution of the first thread (step S1510) and returns to step S1501. When the OS determines that there is no unexecuted thread in the execution order information (step S1508: No), the execution order determination process is executed (step S1511), and the process returns to step S1501.

以上説明したように、マルチプロセッサシステム、制御方法、および制御プログラムによれば、第1のスレッドと第2のスレッドとが未実行の時に、各スレッドの待機電力の比較により実行順を決定する。これにより、スレッドを切り替えずに低消費電力化を図ることができる。   As described above, according to the multiprocessor system, the control method, and the control program, when the first thread and the second thread are not executed, the execution order is determined by comparing the standby power of each thread. As a result, low power consumption can be achieved without switching threads.

また、第1のスレッドの待機電力が第2のスレッドの待機電力以上である場合、第1のスレッドのつぎに第2のスレッドを実行する。これにより、待機電力の大きいスレッドを先に実行でき、低消費電力化を図ることができる。   Further, when the standby power of the first thread is equal to or higher than the standby power of the second thread, the second thread is executed next to the first thread. Thereby, a thread with large standby power can be executed first, and power consumption can be reduced.

また、第1のスレッドの待機電力が第2のスレッドの待機電力未満である場合、第2のスレッドのつぎに第1のスレッドを実行する。これにより、待機電力の大きいスレッドを先に実行でき、低消費電力化を図ることができる。   When the standby power of the first thread is less than the standby power of the second thread, the first thread is executed next to the second thread. Thereby, a thread with large standby power can be executed first, and power consumption can be reduced.

また、第1のスレッドに実行期限が定義されている場合、第1のスレッドの前に第2のスレッドを実行しても第1のスレッドが実行期限を遵守できるか否かを判断する。そして、第1のスレッドの前に第2のスレッドを実行しても第1のスレッドが実行期限を遵守できると判断された場合において、第1のスレッドの待機電力と第2のスレッドの待機電力に基づき実行順を決定する。これにより、実行期限のあるスレッドの実行時にも、低消費電力化を図ることができる。   If an execution time limit is defined for the first thread, it is determined whether or not the first thread can comply with the execution time limit even if the second thread is executed before the first thread. When it is determined that the first thread can comply with the execution deadline even if the second thread is executed before the first thread, the standby power of the first thread and the standby power of the second thread are determined. The execution order is determined based on the above. As a result, power consumption can be reduced even when a thread with an execution deadline is executed.

また、第1のスレッドの前に第2のスレッドを実行したら第1のスレッドが実行期限を遵守できないと判断された場合において、実行順を第1のスレッドのつぎに第2のスレッドとすることで、第1のスレッドのスループットが下がるのを防止することができる。   In addition, if it is determined that if the second thread is executed before the first thread, the first thread cannot comply with the execution deadline, the execution order is set to the second thread next to the first thread. Thus, it is possible to prevent the throughput of the first thread from decreasing.

300 情報処理装置
601 検出部
602 差分算出部
603 判断部
604 第1の算出部
605 第2の算出部
606 比較部
607 決定部
300 Information processing apparatus 601 Detection unit 602 Difference calculation unit 603 Determination unit 604 First calculation unit 605 Second calculation unit 606 Comparison unit 607 Determination unit

Claims (3)

複数のスレッドを実行する複数のコアと、
前記複数のスレッドのそれぞれの実行に要する時間を示す実行時間情報および実行前の待機時に発生する電力を示す待機電力情報を記憶する記憶部と、
を有するマルチプロセッサシステムであって、前記複数のコアのいずれかは、
前記複数のスレッドのうち第1のスレッドおよび第2のスレッドの実行要求に応じ、前記実行時間情報および前記待機電力情報に基づき、前記第1のスレッドと前記第2のスレッドの実行順序を変えてそれぞれの前記実行順序ごとの待機電力を算出し、算出した前記待機電力に基づく実行順序で前記第1のスレッドおよび前記第2のスレッドを前記複数のコアのうちいずれかに割り当てる
マルチプロセッサシステム。
Multiple cores running multiple threads,
A storage unit for storing execution time information indicating a time required for execution of each of the plurality of threads and standby power information indicating power generated during standby before execution;
A multiprocessor system having any one of the plurality of cores,
The execution order of the first thread and the second thread is changed based on the execution time information and the standby power information in response to execution requests of the first thread and the second thread among the plurality of threads. A multiprocessor system that calculates standby power for each of the execution orders and assigns the first thread and the second thread to any of the plurality of cores in an execution order based on the calculated standby power.
複数のスレッドを実行する複数のコアと、前記複数のスレッドのそれぞれの実行に要する時間を示す実行時間情報および実行前の待機時に発生する電力を示す待機電力情報を記憶する記憶部を有するマルチプロセッサシステムの制御方法であって、前記マルチプロセッサシステムが、
前記複数のスレッドのうち第1のスレッドおよび第2のスレッドの実行要求に応じ、前記実行時間情報および前記待機電力情報に基づき、前記第1のスレッドと前記第2のスレッドの実行順序を変えてそれぞれの前記実行順序ごとの待機電力を算出する処理と、
算出した前記待機電力に基づき決定した実行順序で前記第1のスレッドおよび前記第2のスレッドを前記複数のコアのうちいずれかに割り当てる処理と
を実行するマルチプロセッサシステムの制御方法。
A multiprocessor having a plurality of cores that execute a plurality of threads, and a storage unit that stores execution time information indicating the time required to execute each of the plurality of threads and standby power information indicating power generated during standby before execution A method for controlling a system, wherein the multiprocessor system comprises:
The execution order of the first thread and the second thread is changed based on the execution time information and the standby power information in response to execution requests of the first thread and the second thread among the plurality of threads. Processing for calculating standby power for each execution order;
A control method for a multiprocessor system, which executes a process of assigning the first thread and the second thread to any one of the plurality of cores in an execution order determined based on the calculated standby power.
複数のスレッドを実行する複数のコアと、前記複数のスレッドのそれぞれの実行に要する時間を示す実行時間情報および実行前の待機時に発生する電力を示す待機電力情報を記憶する記憶部を有するマルチプロセッサシステムの制御プログラムであって、前記マルチプロセッサシステムに、
前記複数のスレッドのうち第1のスレッドおよび第2のスレッドの実行要求に応じ、前記実行時間情報および前記待機電力情報に基づき、前記第1のスレッドと前記第2のスレッドの実行順序を変えてそれぞれの前記実行順序ごとの待機電力を算出する処理と、
算出した前記待機電力に基づき決定した実行順序で前記第1のスレッドおよび前記第2のスレッドを前記複数のコアのうちいずれかに割り当てる処理と
を実行させるマルチプロセッサシステムの制御プログラム。
A multiprocessor having a plurality of cores that execute a plurality of threads, and a storage unit that stores execution time information indicating the time required to execute each of the plurality of threads and standby power information indicating power generated during standby before execution A system control program, comprising:
The execution order of the first thread and the second thread is changed based on the execution time information and the standby power information in response to execution requests of the first thread and the second thread among the plurality of threads. Processing for calculating standby power for each execution order;
A control program for a multiprocessor system that executes a process of assigning the first thread and the second thread to any one of the plurality of cores in an execution order determined based on the calculated standby power.
JP2013252407A 2013-12-05 2013-12-05 Multiprocessor system, control method, and control program Expired - Fee Related JP5692341B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013252407A JP5692341B2 (en) 2013-12-05 2013-12-05 Multiprocessor system, control method, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013252407A JP5692341B2 (en) 2013-12-05 2013-12-05 Multiprocessor system, control method, and control program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2012544019A Division JP5429402B2 (en) 2010-11-15 2010-11-15 Information processing apparatus, information processing program, and information processing method

Publications (2)

Publication Number Publication Date
JP2014075149A JP2014075149A (en) 2014-04-24
JP5692341B2 true JP5692341B2 (en) 2015-04-01

Family

ID=50749209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013252407A Expired - Fee Related JP5692341B2 (en) 2013-12-05 2013-12-05 Multiprocessor system, control method, and control program

Country Status (1)

Country Link
JP (1) JP5692341B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07168726A (en) * 1993-12-16 1995-07-04 Matsushita Electric Ind Co Ltd Scheduling method for electronic computer and multiprocess operating system
JP2012504800A (en) * 2008-10-03 2012-02-23 ザ ユニバーシティ オブ シドニー Scheduling applications for execution in heterogeneous computing systems
JP5293289B2 (en) * 2009-03-11 2013-09-18 富士通株式会社 Multi-core processor and control method thereof

Also Published As

Publication number Publication date
JP2014075149A (en) 2014-04-24

Similar Documents

Publication Publication Date Title
JP5650952B2 (en) Multi-core / thread workgroup calculation scheduler
US8893145B2 (en) Method to reduce queue synchronization of multiple work items in a system with high memory latency between processing nodes
JP5429402B2 (en) Information processing apparatus, information processing program, and information processing method
US20090113181A1 (en) Method and Apparatus for Executing Instructions
JP2008191949A (en) Multi-core system, and method for distributing load of the same
EP2710481B1 (en) Decentralized allocation of resources and interconnect structures to support the execution of instruction sequences by a plurality of engines
JP5745868B2 (en) Multiprocessor system
US20140359636A1 (en) Multi-core system performing packet processing with context switching
KR20110075296A (en) Job allocation method on multi-core system and apparatus thereof
WO2012120654A1 (en) Task scheduling method and multi-core system
CN113010286A (en) Parallel task scheduling method and device, computer equipment and storage medium
CN112114877B (en) Method for dynamically compensating thread bundle warp, processor and computer storage medium
US20130132708A1 (en) Multi-core processor system, computer product, and control method
US20210133184A1 (en) Data sharing method that implements data tag to improve data sharing on multi-computing-unit platform
JP5692341B2 (en) Multiprocessor system, control method, and control program
US9436503B2 (en) Concurrency control mechanisms for highly multi-threaded systems
US9367326B2 (en) Multiprocessor system and task allocation method
JP6156379B2 (en) Scheduling apparatus and scheduling method
JP7217341B2 (en) How processors and registers are inherited
US11132228B2 (en) SMT processor to create a virtual vector register file for a borrower thread from a number of donated vector register files
EP2710480B1 (en) An interconnect structure to support the execution of instruction sequences by a plurality of engines
US8595734B2 (en) Reduction of processing time when cache miss occurs
US20130191839A1 (en) Information processing apparatus, control method therefor, and computer-readable storage medium
JP5621896B2 (en) Multiprocessor system, control program, and control method
CN116521351B (en) Multithreading task scheduling method and device, storage medium and processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140814

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140930

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141201

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150119

R150 Certificate of patent or registration of utility model

Ref document number: 5692341

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees