JP6631124B2 - Information processing apparatus and image forming apparatus - Google Patents

Information processing apparatus and image forming apparatus Download PDF

Info

Publication number
JP6631124B2
JP6631124B2 JP2015187932A JP2015187932A JP6631124B2 JP 6631124 B2 JP6631124 B2 JP 6631124B2 JP 2015187932 A JP2015187932 A JP 2015187932A JP 2015187932 A JP2015187932 A JP 2015187932A JP 6631124 B2 JP6631124 B2 JP 6631124B2
Authority
JP
Japan
Prior art keywords
task
tasks
assigned
core
cores
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.)
Active
Application number
JP2015187932A
Other languages
Japanese (ja)
Other versions
JP2017062666A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2015187932A priority Critical patent/JP6631124B2/en
Publication of JP2017062666A publication Critical patent/JP2017062666A/en
Application granted granted Critical
Publication of JP6631124B2 publication Critical patent/JP6631124B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、情報処理装置および画像形成装置に関する。   The present invention relates to an information processing device and an image forming device.

複数のコアを有するプロセッサを用いた情報処理装置が知られている。このような情報処理装置においては、新たに発生したタスク(処理)をどのコアに割り振るかが、情報処理装置全体のパフォーマンスを左右する。特許文献1は複数のコアを有するプロセッサではなく複数のプロセッサを用いたシステムに関するものであるが、タスクをグループ化しておき、グループ毎に同一のプロセッサにタスクを割り当てる技術を開示している。特許文献2は、過去のタスクの割り振りを記憶しておき、以前と同じタスクが起動された場合には以前と同じコアにタスクを割り当てる技術を開示している。   An information processing device using a processor having a plurality of cores is known. In such an information processing device, the core to which a newly generated task (process) is assigned affects the performance of the entire information processing device. Patent Document 1 relates to a system using a plurality of processors instead of a processor having a plurality of cores, and discloses a technique in which tasks are grouped and tasks are assigned to the same processor for each group. Patent Literature 2 discloses a technique in which the assignment of past tasks is stored, and when the same task as before is started, the task is assigned to the same core as before.

特開平10−78942号公報JP-A-10-78942 特開平11−259318号公報JP-A-11-259318

複数のコアを有するプロセッサを用いた情報処理装置において、それぞれのコアにタスクを割り振る場合、単に同じタスク(または同じグループに属するタスク)を同じコアに割り当てるだけでは、特定のコアにタスクが集中してしまい、装置全体のパフォーマンスが必ずしも最適化されないという問題があった。   In an information processing apparatus using a processor having a plurality of cores, when allocating tasks to each core, simply assigning the same task (or a task belonging to the same group) to the same core causes the task to concentrate on a specific core. As a result, there is a problem that the performance of the entire apparatus is not always optimized.

本発明は、同じタスクを同じコアに関連付けて割り当てるよりも効率的に、複数のコアにタスクを割り当てる技術を提供する。   The present invention provides a technique for allocating a task to a plurality of cores more efficiently than allocating the same task in association with the same core.

本発明は、複数のコアを有する制御手段と、複数のタスクが各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段とを有する情報処理装置を提供する。   The present invention provides control means having a plurality of cores, first acquisition means for acquiring assignment information indicating to which of the plurality of cores each of the plurality of tasks is assigned, and association between the plurality of tasks. A second acquisition unit for acquiring attribute information to be represented, and when a new task occurs, refer to the assignment information acquired by the first acquisition unit and the attribute information acquired by the second acquisition unit, and There is provided an information processing apparatus having an assignment unit for assigning a new task to a core to which a task related to the new task is assigned among the cores.

前記属性情報は、前記関連性を表す情報として、前記複数のタスクにおける入力データまたは出力データの共通性を示す情報を含んでもよい。   The attribute information may include, as information indicating the association, information indicating commonality of input data or output data in the plurality of tasks.

前記属性情報においては、前記入力データの共通性と前記出力データの共通性とが互いに区別されていてもよい。   In the attribute information, commonality of the input data and commonality of the output data may be distinguished from each other.

前記属性情報は、前記関連性の重みを示す情報を含んでいてもよい。   The attribute information may include information indicating the weight of the association.

前記制御手段は、前記複数のコアで共用されるキャッシュメモリを有し、前記属性情報は、前記複数のタスクの各々における前記キャッシュメモリの使用量を含んでいてもよい。   The control unit may have a cache memory shared by the plurality of cores, and the attribute information may include a usage amount of the cache memory in each of the plurality of tasks.

この情報処理装置は、前記複数のタスクを実行するためのプログラムコードをコンパイルするコンパイル手段を有し、前記コンパイル手段は、前記複数のタスクのうち一のタスクを実行するためのプログラムコードをコンパイルする際、当該一のタスクの前記属性情報を生成してもよい。   The information processing apparatus includes a compiling unit that compiles a program code for executing the plurality of tasks, and the compile unit compiles a program code for executing one of the plurality of tasks. At this time, the attribute information of the one task may be generated.

この情報処理装置は、前記複数のタスクの優先度を示す優先度情報を取得する第3取得手段を有し、前記割り当て手段は、まだ前記複数のコアに割り当てられていないタスクのうち割り当ての対象となるタスクを、前記第3取得手段により取得された優先度情報に応じて選択してもよい。   The information processing apparatus has third acquisition means for acquiring priority information indicating the priority of the plurality of tasks, and the allocating means assigns an object to be allocated among tasks not yet allocated to the plurality of cores. May be selected according to the priority information acquired by the third acquiring means.

この情報処理装置は、前記制御手段のハードウェア構成を示す構成情報を取得する第4取得手段を有し、前記割り当て手段は、前記割り当て情報および前記属性情報に加え、前記第4取得手段により取得された構成情報を参照して、前記新たなタスクを割り当ててもよい。   The information processing apparatus includes a fourth acquisition unit that acquires configuration information indicating a hardware configuration of the control unit, and the assignment unit acquires the configuration information by the fourth acquisition unit in addition to the assignment information and the attribute information. The new task may be assigned with reference to the configured information.

前記複数のタスクは、ある単位で繰り返される画像処理を含み、この情報処理装置は、新たな単位分の画像処理に関するタスクの割り当てを決定する際、前記複数のコアに割り当て済みのタスクに関する前記属性情報のうち当該完了した画像処理に関する情報を初期化する初期化手段を有してもよい。   The plurality of tasks include image processing repeated in a certain unit, and the information processing apparatus determines the assignment of a task related to image processing for a new unit. The information processing apparatus may include an initialization unit that initializes information regarding the completed image processing among the information.

また、本発明は、複数のコアを有する制御手段と、複数の処理が各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段と、前記複数のコアに割り当てられたタスクにより出力されたデータに応じて画像を形成する画像形成手段とを有する画像形成装置を提供する。   The present invention also provides a control unit having a plurality of cores, a first obtaining unit for obtaining allocation information indicating to which of the plurality of cores each of the plurality of processes is allocated, and an association between the plurality of tasks. A second acquisition unit for acquiring attribute information indicating the property, and when a new task occurs, referencing the assignment information acquired by the first acquisition unit and the attribute information acquired by the second acquisition unit, Allocating means for allocating the new task to a core to which a task related to the new task is allocated among the plurality of cores, and an image according to data output by the task allocated to the plurality of cores. An image forming apparatus comprising: an image forming unit that forms an image;

請求項1に係る情報処理装置によれば、複数の処理間の関連性に応じて、複数のコアに処理を割り当てることができる。
請求項2に係る情報処理装置によれば、入力データまたは出力データの関連性に応じて、複数のコアに処理を割り当てることができる。
請求項3に係る情報処理装置によれば、入力データの関連性および出力データの関連性をそれぞれ別個に考慮して複数のコアに処理を割り当てることができる。
請求項4に係る情報処理装置によれば、複数の処理間の関連性に重みを付けることができる。
請求項5に係る情報処理装置によれば、キャッシュメモリの使用量を考慮して複数のコアに処理を割り当てることができる。
請求項6に係る情報処理装置によれば、プログラムコードに応じて属性情報を生成することができる。
請求項7に係る情報処理装置によれば、処理の優先度に応じて複数のコアに処理を割り当てることができる。
請求項8に係る情報処理装置によれば、制御手段のハードウェア構成に応じて複数のコアに処理を割り当てることができる。
請求項9に係る情報処理装置によれば、繰り返し行われる画像処理において、複数の処理間の関連性に応じて、複数のコアに処理を割り当てることができる。
請求項10に係る画像形成装置によれば、複数の処理間の関連性に応じて、複数のコアに処理を割り当てることができる。
According to the information processing apparatus according to the first aspect, a process can be assigned to a plurality of cores according to the relevance between the plurality of processes.
According to the information processing apparatus of the second aspect, it is possible to assign processing to a plurality of cores according to the relevance of input data or output data.
According to the information processing apparatus according to the third aspect, it is possible to assign processing to a plurality of cores while separately considering the relevance of input data and the relevance of output data.
According to the information processing apparatus of the fourth aspect, it is possible to weight the relevance between a plurality of processes.
According to the information processing apparatus of the fifth aspect, it is possible to allocate processing to a plurality of cores in consideration of the amount of cache memory used.
According to the information processing apparatus according to claim 6, attribute information can be generated according to the program code.
According to the information processing apparatus according to claim 7, it is possible to assign processing to a plurality of cores according to the priority of processing.
According to the information processing apparatus of claim 8, it is possible to assign processing to a plurality of cores according to the hardware configuration of the control means.
According to the information processing apparatus of the ninth aspect, in the image processing that is repeatedly performed, the processing can be assigned to the plurality of cores according to the relevance between the plurality of processings.
According to the image forming apparatus of the tenth aspect, it is possible to allocate a process to a plurality of cores according to the relevance between the plurality of processes.

関連技術に係るCPU90の構成を例示する図The figure which illustrates the structure of CPU90 concerning related technology. 関連技術に係るタスク割り当てを例示する図Diagram illustrating task assignment according to the related art タスク構造を例示する図Diagram illustrating task structure 関連技術に係るタスク割り当てを例示する図Diagram illustrating task assignment according to the related art 一実施形態に係る画像形成装置1の構成を示す図FIG. 1 is a diagram illustrating a configuration of an image forming apparatus 1 according to an embodiment. 画像形成装置1の機能構成を例示する図FIG. 2 illustrates a functional configuration of the image forming apparatus 1. 画像形成装置1の動作を例示するフローチャートFlow chart illustrating the operation of the image forming apparatus 1 コアに割り当て済みのタスクを例示する図Diagram illustrating tasks assigned to cores 図8のタスクの割り当てを示すスケジュール情報を例示する図The figure which illustrates the schedule information which shows the assignment of the task of FIG. 新規タスクを例示する図Diagram illustrating a new task 図10のタスクの属性情報を例示する図The figure which illustrates the attribute information of the task of FIG. タスクG〜Lの割り当て結果を例示する図Diagram exemplifying assignment results of tasks GL さらなる新規タスクを例示する図Diagram illustrating further new tasks タスクの属性情報を例示する図Diagram illustrating task attribute information タスクM〜Oの割り当て結果を例示する図Diagram exemplifying assignment results of tasks MO 動作例2に係る割り当て済みのタスクを例示する図The figure which illustrates the assigned task according to the operation example 2. 動作例2におけるタスクHおよびタスクIの属性情報を示す図The figure which shows the attribute information of the task H and the task I in the operation example 2 スケジュール情報を示す図Diagram showing schedule information 動作例2によるタスクの割り当て結果を示す図The figure which shows the allocation result of the task by the operation example 2 動作例3におけるタスクHおよびタスクIの属性情報を示す図The figure which shows the attribute information of the task H and the task I in the operation example 3 スケジュール情報を示す図Diagram showing schedule information 動作例3によるタスクの割り当て結果を示す図The figure which shows the allocation result of the task by the operation example 3 動作例4に係る割り当て済みのタスクを示す図The figure which shows the assigned task which concerns on the operation example 4. スケジュール情報を示す図Diagram showing schedule information 動作例4によるタスクの割り当て結果を示す図The figure which shows the allocation result of the task by the operation example 4 動作例5に係る割り当て済みのタスクを例示する図The figure which illustrates the assigned task according to the operation example 5. 動作例5におけるタスクHおよびタスクIの属性情報を示す図The figure which shows the attribute information of the task H and the task I in the operation example 5 スケジュール情報を示す図Diagram showing schedule information 動作例5によるタスクの割り当て結果を示す図The figure which shows the assignment result of the task by the operation example 5 動作例6に係るタスクを示す図The figure which shows the task which concerns on the operation example 6. 動作例6に係るタスクの属性情報を示す図The figure which shows the attribute information of the task which concerns on the operation example 6. 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 動作例6によるタスクの割り当てを示す図Diagram showing task assignment according to operation example 6 変形例1に係る新規タスクの割り当て処理を示すフローチャート9 is a flowchart illustrating a process of assigning a new task according to the first modification. 分類を含むタスク間の関連性を例示する図Diagram illustrating relevance between tasks including classification CPUのキャッシュメモリの構成を例示する図The figure which illustrates the structure of the cache memory of CPU. 割り当て制御テーブルを例示する図A diagram illustrating an assignment control table 変形例2に係る新規タスクの割り当て処理を示すフローチャート11 is a flowchart illustrating a process of assigning a new task according to the second modification. 変形例4に係る属性情報を例示する図The figure which illustrates the attribute information concerning the modification 4 変形例5におけるスケジュール情報を例示する図The figure which illustrates the schedule information in the modification 5 変形例6におけるスケジュール情報を例示する図The figure which illustrates the schedule information in the modification 6 属性情報の一部が消去されたスケジュール情報を例示する図FIG. 5 is a diagram illustrating schedule information in which part of attribute information has been deleted.

1.概要
図1は、関連技術に係るCPU(Central Processing Unit)90の構成を例示する図である。CPU90は、複数のコア、この例では、コア901〜904の4つのコアを有するプロセッサである。ここで、プロセッサの「コア」とは、プロセッサのうち命令の実行および演算を行う部分をいう。CPU90は、さらに、キャッシュメモリ911〜914およびキャッシュメモリ921〜922を有する。キャッシュメモリ911〜914は一次キャッシュ(いわゆるL1キャッシュ)であり、それぞれ、コア901〜904に専用のものである。キャッシュメモリ921および922は二次キャッシュ(いわゆるL2キャッシュ)である。キャッシュメモリ921はコア901および902で共用され、キャッシュメモリ922はコア903および904で共用される。なお一般にはL1キャッシュまで含めて「コア」という場合があるが、ここでは「コア」にL1キャッシュは含まれない。
1. 1. Outline FIG. 1 is a diagram illustrating a configuration of a CPU (Central Processing Unit) 90 according to the related art. The CPU 90 is a processor having a plurality of cores, in this example, four cores 901 to 904. Here, the “core” of the processor refers to a portion of the processor that executes and executes instructions. The CPU 90 further has cache memories 911 to 914 and 921 to 922. The cache memories 911 to 914 are primary caches (so-called L1 caches), and are dedicated to the cores 901 to 904, respectively. The cache memories 921 and 922 are secondary caches (so-called L2 caches). The cache memory 921 is shared by the cores 901 and 902, and the cache memory 922 is shared by the cores 903 and 904. In general, the “core” may include the L1 cache, but here, the “core” does not include the L1 cache.

一次キャッシュとはコアから最優先にアクセスされるキャッシュメモリをいい、二次キャッシュとは一次キャッシュの次の優先順位でアクセスされるキャッシュメモリをいう。一次キャッシュは、二次キャッシュよりも高速でかつ容量が小さい。メインメモリ(外部メモリ)へのアクセス要求が発生すると、コアはまずアクセス先のアドレスのデータが一次キャッシュに格納されているか調べる。アクセス先のアドレスのデータ(以下単に「アクセス先のデータ」という)が一次キャッシュに格納されていた場合、コアは一次キャッシュからデータを読み出す。アクセス先のデータがキャッシュメモリに格納されていることを「ヒット」といい、ヒットが発生する割合を「ヒット率」という。アクセス先のデータが一次キャッシュに格納されていなかった場合、コアは、アクセス先のデータが二次キャッシュに格納されていないか調べる。アクセス先のデータが二次キャッシュに格納されていた場合、コアは二次キャッシュからデータを読み出す。アクセス先のデータが二次キャッシュに格納されていなかった場合、コアはメインメモリからデータを読み出す。   The primary cache refers to a cache memory accessed from the core with the highest priority, and the secondary cache refers to a cache memory accessed at the next priority to the primary cache. The primary cache is faster and has a smaller capacity than the secondary cache. When an access request to the main memory (external memory) occurs, the core first checks whether data at the address of the access destination is stored in the primary cache. When the data of the address of the access destination (hereinafter, simply referred to as “data of the access destination”) is stored in the primary cache, the core reads the data from the primary cache. The fact that the data of the access destination is stored in the cache memory is called a "hit", and the rate at which the hits occur is called a "hit ratio". If the data of the access destination is not stored in the primary cache, the core checks whether the data of the access destination is stored in the secondary cache. When the data of the access destination is stored in the secondary cache, the core reads the data from the secondary cache. If the data of the access destination is not stored in the secondary cache, the core reads the data from the main memory.

また、CPU90は、いわゆるSMP(Symmetric Multi Processing)型のプロセッサであり、各コアの機能は同一である。マルチコア型のプロセッサには、この他、AMP(Asymmetric Multi Processing)型のプロセッサも存在するが、例えば、いわゆる複合機のように、処理すべきタスクが多く、かつ、プリント、スキャン、ファクシミリ送受信、UI処理、ネットワーク処理など、処理の組み合わせが多数ある機器においては、一般にSMP型のプロセッサが用いられる。例えば、画像処理のようにパイプラインにより連続演算を前提としたデータ処理を行う場合、キャッシュのヒット率が下がるとメインメモリへのアクセスによるコアの待ち時間が発生してプロセッサのパフォーマンスが低下してしまう。したがって、どのコアにどのタスクを割り当てるかというのは、プロセッサのパフォーマンスを左右する問題である。   The CPU 90 is a so-called SMP (Symmetric Multi Processing) type processor, and each core has the same function. In addition to the multi-core type processor, there is an AMP (Asymmetric Multi Processing) type processor. For example, there are many tasks to be processed, such as a so-called multifunction device, and print, scan, facsimile transmission / reception, and UI. In an apparatus having many combinations of processes such as processes and network processes, an SMP type processor is generally used. For example, when performing data processing on the premise of continuous operation by pipeline such as image processing, if the hit rate of the cache decreases, the waiting time of the core due to the access to the main memory occurs and the performance of the processor decreases. I will. Therefore, assigning which task to which core is a problem that affects the performance of the processor.

図2は、関連技術に係るタスク割り当てを例示する図である。この図は、各コアが実行すべきタスクを示しており、各コアがタスクを実行する予定(スケジュール)を示すものである。この例では、タスクA〜Gがコア902〜904の4つのコアに割り当てられる。タスクAおよびC、タスクBおよびD、並びにタスクEおよびFは、それぞれデータを共有することがあらかじめ分かっている。そこで、タスクAおよびC、タスクBおよびD、並びにタスクEおよびFは、それぞれグループ化されている。この例では、同一グループのタスクを同一のコアに割り当てるという規則が適用される。   FIG. 2 is a diagram illustrating task assignment according to the related art. This figure shows a task to be executed by each core, and shows a schedule (schedule) in which each core executes the task. In this example, tasks A to G are assigned to four cores 902 to 904. It is known in advance that tasks A and C, tasks B and D, and tasks E and F share data, respectively. Therefore, tasks A and C, tasks B and D, and tasks E and F are grouped, respectively. In this example, the rule of assigning the same group of tasks to the same core is applied.

ここで、複数のタスクが、A、B、C、D、E、F、A、B、C、D、G、F、A、B、C、D、E、およびGの順番で発生する例を考える。まず最初のタスクAはコア901に割り当てられる。2番目のタスクBはコア902に割り当てられる。3番目のタスクCは、タスクAとグループ化されているのでコア901に割り当てられる。4番目のタスクDは、タスクBとグループ化されているのでコア902に割り当てられる。5番目のタスクEは、コア901および902は既に処理予定が埋まっているので、コア903に割り当てられる。6番目のタスクFは、タスクEとグループ化されているのでコア903に割り当てられる。7番目のタスクGは、どのタスクともグループ化されていないので使用率が最も低いコア904に割り当てられる。以下同様にタスクを割り当てていくと、図2のように割り当てられる。   Here, an example in which a plurality of tasks occur in the order of A, B, C, D, E, F, A, B, C, D, G, F, A, B, C, D, E, and G think of. First, the first task A is assigned to the core 901. The second task B is assigned to the core 902. The third task C is assigned to the core 901 because it is grouped with the task A. The fourth task D is assigned to the core 902 because it is grouped with the task B. The fifth task E is assigned to the core 903 because the cores 901 and 902 have already completed the processing schedule. The sixth task F is assigned to the core 903 because it is grouped with the task E. The seventh task G is assigned to the core 904 having the lowest usage rate because it is not grouped with any task. Hereinafter, when tasks are assigned in the same manner, they are assigned as shown in FIG.

この例では、コア903およびコア904がアイドルになる割合が高く、4つあるコアを必ずしも有効に活用できておらず、改善の余地がある。   In this example, the ratio of the cores 903 and 904 becoming idle is high, and the four cores cannot always be used effectively, and there is room for improvement.

さらに別の例を考える。ここでは、画像形成装置のように、複数のタスクが直列に接続された、いわゆるパイプライン処理が、所定の単位(例えばページまたはバンド)毎に繰り返し行われる例を用いる。   Consider yet another example. Here, an example is used in which a so-called pipeline process in which a plurality of tasks are connected in series, such as an image forming apparatus, is repeatedly performed for each predetermined unit (for example, page or band).

図3は、タスク構造を例示する図である。タスクA〜Eの入力データを、データa〜eという。あるタスクの出力データが次のタスクの入力データとなっている。すなわち、タスクA〜Eはパイプライン処理を構成している。例えば、パイプライン処理にデータaが入力されると、まずタスクAによりデータbが出力される。タスクBはデータbを処理し、データcを出力する。以下同様に直列的に処理が行われ、タスクEはデータfを出力する。すなわち、このパイプライン処理にデータaを入力するとデータfが得られる。   FIG. 3 is a diagram illustrating a task structure. The input data of the tasks A to E are referred to as data a to e. The output data of one task is the input data of the next task. That is, the tasks A to E constitute a pipeline process. For example, when data a is input to the pipeline processing, first, data b is output by task A. Task B processes data b and outputs data c. Thereafter, the processing is similarly performed in series, and the task E outputs data f. That is, when data a is input to this pipeline processing, data f is obtained.

次に、タスクA〜Eに加え、パイプライン処理に含まれないタスクFおよびGをコア901〜904に割り当てる例を考える。この例では、タスクA〜Eがグループ化され、同じグループに属するタスクを、同じL2キャッシュを共有するコアに割り当てるという規則が適用される。   Next, an example in which tasks F and G, which are not included in the pipeline processing, are assigned to the cores 901 to 904 in addition to the tasks A to E will be considered. In this example, a rule is applied in which tasks A to E are grouped and tasks belonging to the same group are assigned to cores sharing the same L2 cache.

図4は、関連技術に係るタスク割り当てを例示する図である。この例では、タスクの割り当てはコア901および902に偏っており、コア903および904がアイドルになる割合が高い。4つあるコアを必ずしも有効に活用できておらず、改善の余地がある。   FIG. 4 is a diagram illustrating task assignment according to the related art. In this example, task allocation is biased toward cores 901 and 902, and the percentage of cores 903 and 904 becoming idle is high. The four cores are not always used effectively, and there is room for improvement.

ところで、図4の例では、第1ページ、第2ページ、および第3ページのパイプライン処理は、いずれもコア901またはコア902に割り当てられている。タスクA〜Eは、図3で説明したように同一ページ内ではデータを共有しているが、ページ間ではデータを共有していない。例えば、第1ページのパイプライン処理の出力であるデータfは、第2ページのパイプライン処理の入力であるデータaとは無関係である。したがって、キャッシュのヒット率を向上させるという観点では、第1ページのパイプライン処理と第2ページのパイプライン処理とをいずれもコア901および902に割り当てることはあまり意味がなく、むしろタスク割り当ての偏りを生じさせる一因となる。   By the way, in the example of FIG. 4, the pipeline processing of the first page, the second page, and the third page is all assigned to the core 901 or the core 902. Tasks A to E share data within the same page as described with reference to FIG. 3, but do not share data between pages. For example, the data f, which is the output of the first page pipeline processing, is irrelevant to the data a, which is the input of the second page pipeline processing. Therefore, from the viewpoint of improving the cache hit ratio, it is not meaningful to assign both the first page pipeline processing and the second page pipeline processing to the cores 901 and 902, and rather, the task allocation bias. Contribute to the occurrence of

これに対し本実施形態では、より効率的にタスクを割り当てる技術を提供する。   On the other hand, the present embodiment provides a technique for more efficiently allocating tasks.

2.構成
図5は、一実施形態に係る画像形成装置1の構成を示す図である。画像形成装置1は、画像を形成する機能を有する情報処理装置の一例であり、例えばいわゆる複合機である。画像形成装置1は、CPU10、メモリコントローラー20、主記憶装置(メインメモリ)30、IOコントローラー40、補助記憶装置41、画像読み取りユニット42、画像形成ユニット43、および通信ユニット44を有する。
2. Configuration FIG. 5 is a diagram illustrating a configuration of the image forming apparatus 1 according to an embodiment. The image forming apparatus 1 is an example of an information processing apparatus having a function of forming an image, and is, for example, a so-called multifunction peripheral. The image forming apparatus 1 includes a CPU 10, a memory controller 20, a main storage device (main memory) 30, an IO controller 40, an auxiliary storage device 41, an image reading unit 42, an image forming unit 43, and a communication unit 44.

CPU10は、画像形成装置1の各部を制御する制御装置(制御手段の一例)であり、各々異なる処理を実行するN個のコア(Nは2以上の自然数)を含む処理手段の一例である。この例ではN=4である。CPU10は、コア101〜104、キャッシュメモリ111〜114、およびキャッシュメモリ121〜122を有する。キャッシュメモリ111〜114は一次キャッシュ(L1キャッシュ)であり、それぞれコア101〜104に専用のものである。キャッシュメモリ121〜122は二次キャッシュ(L2キャッシュ)である。キャッシュメモリ121はコア101および102で共用され、キャッシュメモリ122はコア103および104で共用される。   The CPU 10 is a control device (an example of a control unit) that controls each unit of the image forming apparatus 1, and is an example of a processing unit including N cores (N is a natural number of 2 or more) that execute different processes. In this example, N = 4. The CPU 10 includes cores 101 to 104, cache memories 111 to 114, and cache memories 121 to 122. The cache memories 111 to 114 are primary caches (L1 caches) and are dedicated to the cores 101 to 104, respectively. The cache memories 121 to 122 are secondary caches (L2 caches). The cache memory 121 is shared by the cores 101 and 102, and the cache memory 122 is shared by the cores 103 and 104.

以下の説明において、同じL2キャッシュを共有する複数のコアを「コア群」という。図5の例ではコア101およびコア102は同一のコア群に属し、コア103およびコア104はそれと別のコア群に属する。例えば、コア102およびコア103により構成されるコア群を、「コア101/102」と記載する。   In the following description, a plurality of cores sharing the same L2 cache is referred to as a “core group”. In the example of FIG. 5, the core 101 and the core 102 belong to the same core group, and the core 103 and the core 104 belong to another core group. For example, a core group including the core 102 and the core 103 is referred to as “core 101/102”.

メモリコントローラー20は、主記憶装置30に対するデータの読み書きを制御する。主記憶装置30は主記憶装置であり、例えばDRAM(Dynamic Random Access Memory)を含む。主記憶装置30は、CPU10がプログラムを実行する際のワークエリアとして機能し、種々のデータを記憶する記憶手段の一例である。   The memory controller 20 controls reading and writing of data from and to the main storage device 30. The main storage device 30 is a main storage device and includes, for example, a DRAM (Dynamic Random Access Memory). The main storage device 30 functions as a work area when the CPU 10 executes a program, and is an example of a storage unit that stores various data.

IOコントローラー40は、周辺装置をCPU10に接続して制御する装置である。この例で、IOコントローラー40には、補助記憶装置41、画像読み取りユニット42、画像形成ユニット43、および通信ユニット44が接続されている。補助記憶装置41はデータおよびプログラムを記憶する不揮発性の記憶装置であり、例えばHDD(Hard Disk Drive)を含む。画像読み取りユニット42は、原稿を光学的に読み取る装置であり、例えばいわゆるスキャナーを含む。画像形成ユニット43は、媒体(例えば紙)に画像を形成する装置であり、例えば電子写真技術またはインクジェット技術により画像形成を行う。通信ユニット44は、他の機器と通信を行うインターフェースである。   The IO controller 40 is a device that controls peripheral devices by connecting them to the CPU 10. In this example, an auxiliary storage device 41, an image reading unit 42, an image forming unit 43, and a communication unit 44 are connected to the IO controller 40. The auxiliary storage device 41 is a nonvolatile storage device that stores data and programs, and includes, for example, an HDD (Hard Disk Drive). The image reading unit 42 is a device that optically reads a document, and includes, for example, a so-called scanner. The image forming unit 43 is a device that forms an image on a medium (for example, paper), and forms an image by, for example, an electrophotographic technique or an inkjet technique. The communication unit 44 is an interface for communicating with other devices.

図6は、画像形成装置1の機能構成を例示する図である。補助記憶装置41は、画像形成装置1のOS(Operating System)を機能させるためのプログラム(以下「OSプログラム」という)および各種アプリケーション(コピー機能、スキャナー機能、ファクシミリ送受信機能等)を実現するためのプログラム(以下「アプリケーションプログラム」という)を記憶している。CPU10がこれらのプログラムを実行することにより、画像形成装置1にOS50およびアプリケーション61〜63が実装される。   FIG. 6 is a diagram illustrating a functional configuration of the image forming apparatus 1. The auxiliary storage device 41 is used to implement a program (hereinafter, referred to as an “OS program”) for causing an OS (Operating System) of the image forming apparatus 1 to function and various applications (copy function, scanner function, facsimile transmission / reception function, and the like). A program (hereinafter, referred to as an “application program”) is stored. When the CPU 10 executes these programs, the OS 50 and the applications 61 to 63 are mounted on the image forming apparatus 1.

アプリケーション61〜63は、それぞれOS50に対しタスクの実行を命令する。すなわちタスクを要求する。ここでいうタスクとは、画像形成装置1のハードウェア資源を利用した処理をいい、ジョブを構成するものをいう。ジョブとは、アプリケーション61〜63により生成されるものであって、アプリケーションに係る処理、例えば、原稿をコピーする処理、原稿を読み取ってデータ化する処理、原稿を読み取ってファクシミリ送信する処理、与えられたデータに従って画像を形成する処理をいう。例えば、原稿をコピーするジョブは、画像読み取りユニット42を用いて原稿から画像を読み取るタスク、読み取った画像に対して画像処理をするタスク、および画像形成ユニット43を用いて媒体に画像を形成するタスクに分解される。OS50は、アプリケーションにより要求されたタスクを複数のコアのうちいずれかのコアに割り当てる。コア101〜104は、OS50によってそれぞれ独立したCPUとして認識される。   Each of the applications 61 to 63 instructs the OS 50 to execute a task. That is, the task is requested. Here, the task refers to a process using hardware resources of the image forming apparatus 1 and constitutes a job. The job is generated by the applications 61 to 63, and includes a process related to the application, for example, a process of copying a document, a process of reading and converting a document into data, a process of reading a document and transmitting a facsimile. Means a process of forming an image according to the data. For example, the job of copying a document includes a task of reading an image from a document using the image reading unit 42, a task of performing image processing on the read image, and a task of forming an image on a medium using the image forming unit 43. Is decomposed into The OS 50 allocates the task requested by the application to any one of the plurality of cores. The cores 101 to 104 are recognized by the OS 50 as independent CPUs.

アプリケーションにおいて新たなタスクの要求が発生すると、OS50は、そのタスクをどこコアに実行させるか決定する。詳細には以下のとおりである。OS50は、取得手段51、取得手段52、取得手段53、取得手段54、記憶手段55、割り当て手段56、初期化手段57、および検知手段58を有する。検知手段58は、新たなタスクが発生したことを検知する。取得手段51は、割り当て情報を取得する。割り当て情報は、複数のタスクが各々コア101〜104のうちどのコアに割り当てられたかを示す。取得手段52は、属性情報を取得する。属性情報は、複数のタスク間の関連性を示す。タスク間の関連性とは、タスク間でデータを共有することをいう。例えば、あるタスクの出力データが別のタスクの入力データとして用いられる場合、これら2つのタスクは関連性を有するという。あるいはある共通の入力データを用いて、2つのタスクが2つの異なるデータを出力する場合、これら2つのタスクは関連性を有するという。取得手段53は、優先度情報を取得する。優先度情報は、複数のタスクの優先度を示す。取得手段54は、構成情報を取得する。構成情報は、CPU10のハードウェア構成を示す。この例では、割り当て情報、属性情報、優先度情報、および構成情報は、記憶手段55に記憶されており、取得手段51〜54は、記憶手段55から各情報を取得する。属性情報は、例えば、タスクを実行するためのプログラムをコンパイルするコンパイラ(コンパイル手段の一例)により生成される。優先度情報および構成情報は、例えば、システムによりあらかじめ設定されている。割り当て手段56は、新たなタスクが発生した場合、これらの情報の少なくとも一部を参照し、そのタスクの割り当て先となるコアを決定する(すなわちあるコアに新たなタスクを割り当てる)。初期化手段57は、特にタスクがある単位(例えばページまたはバンド)で繰り返される画像処理に係るものである場合、一単位分の画像処理が完了すると、コアに割り当て済みのタスクに関する属性情報のうち完了した画像処理に関する情報を初期化する。これらの情報および割り当て方法の詳細は後述する。   When a request for a new task occurs in the application, the OS 50 determines where the core executes the task. Details are as follows. The OS 50 includes an acquisition unit 51, an acquisition unit 52, an acquisition unit 53, an acquisition unit 54, a storage unit 55, an assignment unit 56, an initialization unit 57, and a detection unit 58. The detecting means 58 detects that a new task has occurred. The obtaining unit 51 obtains assignment information. The allocation information indicates to which of the cores 101 to 104 the plurality of tasks are allocated. The acquisition unit 52 acquires attribute information. The attribute information indicates an association between a plurality of tasks. The association between tasks means that data is shared between tasks. For example, if the output data of one task is used as the input data of another task, the two tasks are said to be related. Alternatively, if two tasks output two different data using some common input data, the two tasks are said to be related. The obtaining unit 53 obtains priority information. The priority information indicates the priority of a plurality of tasks. The obtaining unit 54 obtains configuration information. The configuration information indicates the hardware configuration of the CPU 10. In this example, the allocation information, the attribute information, the priority information, and the configuration information are stored in the storage unit 55, and the obtaining units 51 to 54 obtain the respective information from the storage unit 55. The attribute information is generated by, for example, a compiler (an example of a compiling unit) that compiles a program for executing a task. The priority information and the configuration information are set in advance by the system, for example. When a new task occurs, the allocating unit 56 refers to at least a part of the information and determines a core to which the task is allocated (that is, allocates a new task to a certain core). In particular, when the task is related to image processing that is repeated in a certain unit (for example, a page or a band), when the image processing for one unit is completed, the initialization unit 57 sets the attribute information of the task assigned to the core. Initialize information about the completed image processing. Details of the information and the assignment method will be described later.

なお図6の機能構成は一例であり、この一部が省略されてもよいし、これ以外の機能が追加されてもよい。以下の動作説明においては、初期化手段57の機能は省略する。   Note that the functional configuration in FIG. 6 is an example, and a part of the functional configuration may be omitted, or other functions may be added. In the following description of the operation, the function of the initialization means 57 is omitted.

3.動作
3−1.動作フロー
図7は、画像形成装置1の動作を例示するフローチャートである。ここでは特に、タスクをコアに割り当てる処理を記載している。図7のフローは、例えば、画像形成装置1の電源が投入されたことを契機として開始される。以下の説明においてOS50等のソフトウェアを処理の主体として記載することがあるが、これは、そのソフトウェアを実行しているCPU10が他のハードウェア資源と共働して処理を実行することを意味する。
3. Operation 3-1. Operation Flow FIG. 7 is a flowchart illustrating an operation of the image forming apparatus 1. Here, processing for allocating tasks to cores is particularly described. 7 is started, for example, when the power of the image forming apparatus 1 is turned on. In the following description, software such as the OS 50 may be described as a subject of processing, which means that the CPU 10 executing the software executes processing in cooperation with other hardware resources. .

ステップS100において、OS50は、新規タスクが発生したか判断する。新規タスクとは、アプリケーション61〜63から新たに要求されたタスクをいう。新たなタスクが発生すると、アプリケーション61〜63からOS50に要求が送られるので、OS50は新たなタスクの発生を検知することができる。OS50は、例えば各タスクに識別番号を付与することにより各タスクを識別する。同じ種類のタスクが繰り返し実行される場合、例えばタスクAが2回実行される場合には、1回目のタスクAおよび2回目のタスクAにはそれぞれ別の識別番号が付与され、別のタスクとして識別される。新規タスクが発生していないと判断された場合(S100:NO)、OS50は、新規タスクが発生するまで待機する。新規タスクが発生したと判断された場合(S100:YES)、OS50は、処理をステップS101に移行する。   In step S100, the OS 50 determines whether a new task has occurred. The new task is a task newly requested by the applications 61 to 63. When a new task occurs, a request is sent from the applications 61 to 63 to the OS 50, so that the OS 50 can detect the occurrence of the new task. The OS 50 identifies each task by, for example, assigning an identification number to each task. When the same type of task is repeatedly executed, for example, when task A is executed twice, different identification numbers are assigned to the first task A and the second task A, respectively. Be identified. When it is determined that a new task has not occurred (S100: NO), the OS 50 waits until a new task occurs. When it is determined that a new task has occurred (S100: YES), the OS 50 shifts the processing to Step S101.

ステップS101において、OS50は、未割り当てのタスクがあるか判断する。未割り当てのタスクとは、そのタスクを実行するコアが決定されていないタスクをいう。OS50は、コア毎にタスクの実行予定を記述したスケジュール情報(割り当て情報の一例)を保持しており、このスケジュール情報を参照して、未割り当てのタスクがあるか判断する。未割り当てのタスクがあると判断された場合(S101:YES)、OS50は、処理をステップS102に移行する。未割り当てのタスクがないと判断された場合(S101:NO)、OS50は、処理をステップS100に移行する。   In step S101, the OS 50 determines whether there is an unassigned task. An unassigned task is a task for which the core that executes the task has not been determined. The OS 50 holds schedule information (an example of allocation information) describing a task execution schedule for each core, and determines whether there is any unallocated task with reference to the schedule information. When it is determined that there is an unassigned task (S101: YES), the OS 50 shifts the processing to Step S102. When it is determined that there is no unassigned task (S101: NO), the OS 50 shifts the processing to Step S100.

ステップS102において、OS50は、未割り当てのタスクの中から、最も優先度が高い一のタスクを選択する。ここで選択されたタスクを以下「対象タスク」という。優先度が最も高いタスクが複数ある場合、OS50は、優先度が最も高い複数のタスクの中から、他の基準に従って対象タスクを選択する。他の基準は、例えば、処理が先に行われるものを先に対象タスクとして選択するという基準である。   In step S102, the OS 50 selects one task having the highest priority from unassigned tasks. The task selected here is hereinafter referred to as a “target task”. When there are a plurality of tasks having the highest priority, the OS 50 selects a target task from the plurality of tasks having the highest priority according to another criterion. The other criterion is, for example, a criterion for selecting an object to be processed first as a target task first.

ステップS103において、OS50は、対象タスクが、割り当て済みのタスクと関連性を有しているか判断する。割り当て済みのタスクとは、そのタスクを実行するコアが決定されており、そのタスクの実行予定がスケジュール情報に記述されているタスクをいう。すなわち、割り当て済タスクは、まだ実行されていないタスクをいう。実行済のタスクは、スケジュール情報から削除される。OS50は、タスク間の関連性を示す属性情報を保持しており、この属性情報を参照して対象タスクが割り当て済みのタスクと関連性を有しているか判断する。対象タスクが割り当て済みのタスクと関連性を有していると判断された場合(S103:YES)、OS50は、処理をステップS104に移行する。対象タスクが割り当て済みのタスクと関連性を有していないと判断された場合(S103:NO)、OS50は、処理をステップS105に移行する。   In step S103, the OS 50 determines whether the target task has a relationship with the assigned task. An assigned task is a task for which a core for executing the task has been determined and the execution schedule of the task is described in the schedule information. That is, an assigned task refers to a task that has not been executed yet. The executed task is deleted from the schedule information. The OS 50 holds attribute information indicating the relationship between the tasks, and determines whether the target task has a relationship with the assigned task by referring to the attribute information. When it is determined that the target task has a relationship with the assigned task (S103: YES), the OS 50 shifts the processing to Step S104. When it is determined that the target task has no relation with the assigned task (S103: NO), the OS 50 shifts the processing to Step S105.

ステップS104において、OS50は、対象タスクと関連性を有するタスクが割り当てられているコア群に、対象タスクを割り当てる。以下、対象タスクが割り当てられるコアを「割り当て先」という。割り当て先の候補となるコアが複数ある場合、OS50は、例えば以下の優先順位に従って割り当て先を決定する。
(i)割り当て済みのタスクの数が最少のコア群に属するコア。
(ii)割り当て済みのタスクの数が最少のコア。
(iii)識別番号が先のコア。
あるいは、OS50は、以下の優先順位に従って割り当て先を決定してもよい。
(i)割り当て済みのタスクの数が最少のコア群に属するコア。
(ii)割り当て済みのタスクの数が最少のコア。
(iii)関連性を有するタスクが割り当て済のコア。
(iv)より新しいタスクが割り当て済のコア。
OS50は、対象タスクと割り当て先との関係を、スケジュール情報に追加する。ステップS104の処理を終えると、OS50は、処理をステップS101に移行する。
In step S104, the OS 50 assigns the target task to a core group to which a task having a relationship with the target task is assigned. Hereinafter, the core to which the target task is assigned is referred to as “assignee”. When there are a plurality of cores that are candidates for the allocation, the OS 50 determines the allocation according to, for example, the following priority order.
(I) A core belonging to a core group with the smallest number of assigned tasks.
(Ii) The core with the least number of assigned tasks.
(Iii) The core whose identification number is earlier.
Alternatively, the OS 50 may determine the assignment destination according to the following priority order.
(I) A core belonging to a core group with the smallest number of assigned tasks.
(Ii) The core with the least number of assigned tasks.
(Iii) A core to which an associated task has been assigned.
(Iv) Cores with newer tasks assigned.
The OS 50 adds the relationship between the target task and the assignment destination to the schedule information. After finishing the process in step S104, the OS 50 shifts the process to step S101.

ステップS105において、OS50は、未割り当てのタスクの中に対象タスクと関連性を有するタスクが存在するか判断する。未割り当てのタスクの中に対象タスクと関連性を有するタスクがあると判断された場合(S105:YES)、OS50は、処理をステップS106に移行する。未割り当てのタスクの中に対象タスクと関連性を有するタスクがないと判断された場合(S105:NO)、OS50は、処理をステップS107に移行する。   In step S105, the OS 50 determines whether there is a task associated with the target task among the unassigned tasks. When it is determined that there is a task associated with the target task among the unassigned tasks (S105: YES), the OS 50 shifts the processing to Step S106. When it is determined that there is no task associated with the target task among the unallocated tasks (S105: NO), the OS 50 shifts the processing to Step S107.

ステップS106において、OS50は、複数のコア群のうち、割り当て済みのタスクが最も少ないコア群に属するコアにタスクを割り当てる。どのコアとどのコアが同一のコア群に属するかは、構成情報により示される。OS50は、構成情報を保持しており、この構成情報を参照して同一のコア群に属するコアを特定する。また、OS50は、スケジュール情報を参照して割り当て済みのタスクが最も少ないコア群を特定する。割り当て済タスクが最も少ないコア群が複数ある場合、OS50は、例えば以下の優先順位に従って割り当て先の候補となるコア群を1つに絞り込む。
(1)単一のコアに割り当て済タスクの数の最大値が少ないコア群。
(2)識別番号が早いコアを含むコア群。
OS50は、特定されたコア群に含まれるコアの中から以下の優先順位に従って割り当て先を決定する。
(i)割り当て済みのタスクの数が最少のコア。
(ii)識別番号が先のコア。
OS50は、対象タスクと割り当て先との関係を、スケジュール情報に追加する。ステップS106の処理を終えると、OS50は、処理をステップS101に移行する。
In step S106, the OS 50 assigns a task to a core belonging to the core group having the least assigned tasks among the plurality of core groups. Which cores and which cores belong to the same core group is indicated by the configuration information. The OS 50 holds configuration information, and specifies cores belonging to the same core group with reference to the configuration information. In addition, the OS 50 refers to the schedule information to specify a core group having the least number of assigned tasks. When there are a plurality of core groups with the least assigned tasks, the OS 50 narrows the number of core groups that are candidates for allocation to one according to, for example, the following priority order.
(1) A core group in which the maximum number of tasks assigned to a single core is small.
(2) A core group including a core having an early identification number.
The OS 50 determines an allocation destination from the cores included in the specified core group according to the following priority order.
(I) A core with the least number of assigned tasks.
(Ii) The core whose identification number is earlier.
The OS 50 adds the relationship between the target task and the assignment destination to the schedule information. After ending the processing of step S106, the OS 50 shifts the processing to step S101.

ステップS107において、OS50は、コア101〜104のうち割り当て済みのタスクが最も少ないコアに対象タスクを割り当てる。割り当て済タスクが最少のコアが複数ある場合、OS50は、例えば識別番号が先のコアを割り当て先として決定する。OS50は、対象タスクと割り当て先との関係を、スケジュール情報に追加する。ステップS107の処理を終えると、OS50は、処理をステップS101に移行する。   In step S107, the OS 50 assigns the target task to the core having the least assigned task among the cores 101 to 104. When there are a plurality of cores with the least assigned tasks, the OS 50 determines, for example, the core having the identification number earlier as the assignment destination. The OS 50 adds the relationship between the target task and the assignment destination to the schedule information. After ending the processing in step S107, the OS 50 shifts the processing to step S101.

タスクの割り当てとは独立して、OS50は、タスクを実行する。OS50は、スケジュール情報を参照して各コアに実行させるべきタスクを特定し、そのタスクを実行するよう各コアを制御する。タスクの実行が完了すると、OS50は、スケジュール情報からそのタスクに実行予定を削除する。   The OS 50 executes the task independently of the task assignment. The OS 50 refers to the schedule information, specifies a task to be executed by each core, and controls each core to execute the task. When the execution of the task is completed, the OS 50 deletes the execution schedule of the task from the schedule information.

3−2.動作例1
以下、具体例を用いて図7のフローに係る新規タスクの割り当て処理についてより詳細に説明する。なお動作例1ないし5においては、説明を簡単にするため、タスクの実行については考えない。
3-2. Operation example 1
Hereinafter, the assignment processing of the new task according to the flow of FIG. 7 will be described in more detail using a specific example. In the operation examples 1 to 5, execution of a task is not considered for the sake of simplicity.

図8は、コアに割り当て済みのタスクを例示する図である。この例では、タスク群801〜803の3群のタスク群がコアに割り当て済みである。タスク群801は、タスクAおよびタスクBが直列に接続された処理である。タスク群801にデータaが入力されると、最終的にタスクBからデータcが出力される。タスク群801は、例えば画像処理をするためのパイプライン処理である。タスク群802は、タスクDおよびタスクEが並列に接続された処理である。詳細には、タスク群802においてデータdが入力されると、タスクCによりデータeが出力され、さらにタスクDによりデータfが出力される。タスク群802は、例えばLUT(Look Up Table)を参照する処理である。タスク群803は、他のタスクとの関連性が無いタスクの集合である。タスク群803はタスクEおよびタスクFを含むが、両者は互いに独立しており、データを共有することはない。タスク群803は、例えば、ネットワークまたはUSB(Universal Serial Bus)などのインターフェース関連の処理である。   FIG. 8 is a diagram illustrating an example of a task that has been assigned to a core. In this example, three task groups of task groups 801 to 803 have been assigned to the core. The task group 801 is a process in which task A and task B are connected in series. When data a is input to the task group 801, data c is finally output from the task B. The task group 801 is, for example, pipeline processing for performing image processing. The task group 802 is a process in which the task D and the task E are connected in parallel. Specifically, when data d is input to the task group 802, data e is output by the task C, and data f is output by the task D. The task group 802 is processing for referring to, for example, an LUT (Look Up Table). The task group 803 is a set of tasks that are not related to other tasks. The task group 803 includes a task E and a task F, which are independent of each other and do not share data. The task group 803 is processing related to an interface such as a network or a USB (Universal Serial Bus).

図9は、図8のタスクの割り当てを示すスケジュール情報を例示する図である。図9の例では、各コアに割り当て済タスクが、その実行順を示す情報と共に記録されている。この時点で、コア101にはタスクAおよびタスクEが、コア102にはタスクBおよびタスクFが、コア103にはタスクCが、コア104にはタスクDが、それぞれ割り当てられている。この図では、より上の階層に記載されているものがより先に実行される。   FIG. 9 is a diagram exemplifying schedule information indicating task assignment in FIG. In the example of FIG. 9, the tasks assigned to each core are recorded together with information indicating the execution order. At this point, tasks A and E are assigned to the core 101, tasks B and F are assigned to the core 102, tasks C are assigned to the core 103, and tasks D are assigned to the core 104, respectively. In this figure, those described in higher layers are executed first.

以上の状況において新規タスクが発生した場合に、その新規タスクがどのコアに割り当てられるか説明する。説明に先立って、まず新規タスクの構造および属性情報について説明する。   In the above situation, when a new task occurs, which core is assigned to the new task will be described. Prior to the description, the structure and attribute information of the new task will be described first.

図10は、新規タスクを例示する図である。例えばアプリケーションにより新たなジョブが発生すると、アプリケーションは、このジョブを実行するため、タスク群804〜806を起動する。タスク群804は、タスクGおよびタスクHが直列に接続された処理である。タスク群804にデータaが入力されると、最終的にタスクHからデータlが出力される。タスク群805は、タスクIおよびタスクJが並列に接続された処理である。タスク群805においてデータmが入力されると、タスクIによりデータnが出力され、タスクJによりデータoが出力される。タスク群806は、他のタスク群と関連性が無いタスクの集合である。この例ではタスクG〜Lの優先度は以下のとおり設定されている。
タスクG:優先度1(最高)
タスクH:優先度1(最高)
タスクI:優先度2
タスクJ:優先度3
タスクK:優先度4
タスクL:優先度5
FIG. 10 is a diagram illustrating a new task. For example, when a new job is generated by the application, the application activates task groups 804 to 806 to execute the job. The task group 804 is a process in which the task G and the task H are connected in series. When the data a is input to the task group 804, the data 1 is finally output from the task H. The task group 805 is a process in which the task I and the task J are connected in parallel. When data m is input to the task group 805, data n is output by task I and data o is output by task J. The task group 806 is a set of tasks that are not related to other task groups. In this example, the priorities of the tasks G to L are set as follows.
Task G: Priority 1 (highest)
Task H: Priority 1 (highest)
Task I: Priority 2
Task J: Priority 3
Task K: Priority 4
Task L: Priority 5

図11は、図10のタスクの属性情報を例示する図である。図10と図8を対比すると分かるように、タスクGはタスクAおよびタスクHと、タスクHはタスクGと、タスクIはタスクJと、タスクJはタスクIと、それぞれ関連性を有している。   FIG. 11 is a diagram illustrating attribute information of the task in FIG. As can be seen by comparing FIGS. 10 and 8, task G is associated with task A and task H, task H is task G, task I is task J, and task J is task I. I have.

コアへのタスクの割り当ての説明に移る。OS50は、図10の新規タスクが発生したことを検知する(ステップS100)。これらの新規タスクは、検出された時点では当然コアに割り当てられていない。したがって、フローはステップS101からS102に進む。OS50は、新規タスクの中から対象タスクを選択する。具体的には、OS50は、優先度が最も高いものを対象タスクとして選択する。したがって、まずはタスクGが対象タスクとして選択される(ステップS102)。処理はステップS103に進む。タスクGについて属性情報を見ると、割り当て済タスクAと関連性を有することが示されている(S103:YES)。したがって処理はステップS104に進む。タスクAが割り当て済のコア101/102が割り当て先の候補である。いまコア101およびコア102はいずれも割り当て済みのタスクの数が同じなので、識別番号が先のコア101に対象タスクが割り当てられる(ステップS104)。   Let's move on to assigning tasks to cores. The OS 50 detects that the new task in FIG. 10 has occurred (Step S100). These new tasks are not assigned to the core at the time of detection. Therefore, the flow proceeds from step S101 to S102. The OS 50 selects a target task from the new tasks. Specifically, the OS 50 selects the one with the highest priority as the target task. Therefore, first, the task G is selected as a target task (step S102). The process proceeds to step S103. Looking at the attribute information on the task G, it is shown that the task G has a relationship with the assigned task A (S103: YES). Therefore, the process proceeds to step S104. The cores 101/102 to which task A has been allocated are candidates for the allocation destination. Since both the core 101 and the core 102 have the same number of assigned tasks, the target task is assigned to the core 101 whose identification number is earlier (step S104).

次にタスクHが対象タスクとして選択される(ステップS102)。タスクHについて属性情報を見ると、タスクGと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクGが割り当てられているコア101/102が、割り当て先の候補である。いまコア102の方がコア101よりも割り当て済みのタスクの数が少ないので、コア102に対象タスクが割り当てられる(ステップS104)。   Next, task H is selected as a target task (step S102). Looking at the attribute information about the task H, it is shown that the task H has a relationship with the task G (S103: YES). Therefore, the flow proceeds to step S104. The cores 101/102 to which the task G is assigned are candidates for the assignment destination. Since the number of tasks already assigned to the core 102 is smaller than that of the core 101, the target task is assigned to the core 102 (step S104).

次にタスクIが対象タスクとして選択される(ステップS102)。タスクIについて属性情報を見ると、割り当て済みのタスク(タスクA〜H)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクIについて属性情報を見ると、未割り当てのタスクJと関連性を有することが示されている(S105:YES)。したがってフローはステップS106に進む。割り当て済タスクが少ないコア103/104が割り当て先の候補である。いまコア103およびコア104はいずれも割り当て済みのタスクの数が同じなので、番号が先のコア103に対象タスクが割り当てられる(ステップS106)。   Next, task I is selected as a target task (step S102). Looking at the attribute information on the task I, it is shown that there is no relationship with the assigned tasks (tasks A to H) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information of the task I, it is shown that the task I has a relationship with the unassigned task J (S105: YES). Therefore, the flow proceeds to step S106. The cores 103/104 with few assigned tasks are candidates for the assignment destination. Since both the core 103 and the core 104 have the same number of assigned tasks, the target task is assigned to the core 103 having the earlier number (step S106).

次にタスクJが対象タスクとして選択される(ステップS102)。タスクJについて属性情報を見ると、タスクIと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクIが割り当て済のコア103/104が、割り当て先の候補である。いまコア104の方がコア103よりも割り当て済みのタスクの数が少ないので、コア104に対象タスクが割り当てられる(ステップS104)。   Next, task J is selected as a target task (step S102). Looking at the attribute information on the task J, it is shown that the task J has relevance to the task I (S103: YES). Therefore, the flow proceeds to step S104. The cores 103/104 to which the task I has been allocated are candidates for the allocation destination. Since the number of tasks already assigned to the core 104 is smaller than that of the core 103, the target task is assigned to the core 104 (step S104).

次にタスクKが対象タスクとして選択される(ステップS102)。タスクKについて属性情報を見ると、割り当て済みのタスク(タスクA〜J)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクKについて属性情報を見ると、未割り当てのタスク(タスクL)とは関連性を有さないことが示されている(S105:NO)。したがってフローはステップS107に進む。この時点で割り当て済みのタスクが最も少ないコア103およびコア104が、割り当て先の候補である。OS50は、番号が先のコア103に対象タスクを割り当てる(ステップS107)。   Next, task K is selected as a target task (step S102). Looking at the attribute information of the task K, it is shown that the task K has no relationship with the assigned tasks (tasks A to J) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information of the task K, it is shown that the task K has no relationship with the unassigned task (task L) (S105: NO). Therefore, the flow proceeds to step S107. The cores 103 and 104 with the least number of tasks assigned at this time are candidates for assignment. The OS 50 assigns the target task to the core 103 whose number is earlier (Step S107).

次にタスクLが対象タスクとして選択される(ステップS102)。タスクLについて属性情報を見ると、割り当て済みのタスク(タスクA〜K)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。この時点で未割り当てのタスクは存在しない。したがって、対象タスクは未割り当てのタスクとは関連性を有さない(S105:NO)。フローはステップS107に進む。OS50は、この時点で割り当て済みのタスクが最も少ないコア104に対象タスクを割り当てる(ステップS107)。   Next, the task L is selected as a target task (Step S102). Looking at the attribute information of the task L, it is shown that the task L has no relationship with the assigned tasks (tasks A to K) (S103: NO). Therefore, the flow proceeds to step S105. At this point, there are no unassigned tasks. Therefore, the target task has no relationship with the unassigned task (S105: NO). The flow proceeds to step S107. The OS 50 assigns the target task to the core 104 having the least assigned task at this time (Step S107).

図12は、タスクG〜Lの割り当て結果を例示する図である。このように、本実施形態によれば、各コアにより均等にタスクが割り当てられる。引き続き、図12の状態からさらに新規タスクが発生した場合の、タスクの割り当てについて説明する。まずは、さらなる新規タスクの構造および属性情報について説明する。   FIG. 12 is a diagram illustrating an example of the assignment result of the tasks G to L. As described above, according to the present embodiment, the tasks are equally allocated to the respective cores. Next, a description will be given of task assignment when a new task occurs from the state of FIG. First, the structure and attribute information of a new task will be described.

図13は、さらなる新規タスクを例示する図である。タスク群807およびタスク群808が新規タスクである。タスク群807は、タスクOを含む。タスクOは、他のタスクと関連性を有さない。タスク群808は、タスクMおよびタスクNを含む。タスクMおよびタスクNは、共通の入力データを用いるタスクである。この例ではタスクM〜Oの優先度は以下のとおり設定されている。
タスクM:優先度3
タスクN:優先度2
タスクO:優先度1(最高)
FIG. 13 is a diagram illustrating a further new task. Task group 807 and task group 808 are new tasks. The task group 807 includes a task O. Task O has no relationship with other tasks. The task group 808 includes a task M and a task N. Task M and task N are tasks that use common input data. In this example, the priorities of the tasks M to O are set as follows.
Task M: Priority 3
Task N: priority 2
Task O: Priority 1 (highest)

図14は、タスクの属性情報を例示する図である。タスクMおよびタスクNが互いに関連性を有していることが示されている。   FIG. 14 is a diagram illustrating attribute information of a task. It is shown that task M and task N are related to each other.

コアへのタスクの割り当ての説明に移る。OS50は、図13の新規タスクが発生したことを検知する(ステップS100)。これらの新規タスクは、検出された時点では当然コアに割り当てられていない。したがって、フローはステップS101からS102に進む。OS50は、新規タスクの中から対象タスクを選択する。具体的には、OS50は、優先度が最も高いものを対象タスクとして選択する。したがって、まずはタスクOが対象タスクとして選択される(ステップS102)。処理はステップS103に進む。タスクOについて属性情報を見ると、割り当て済みのタスク(タスクA〜L)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクOについて属性情報を見ると、未割り当てのタスク(タスクMおよびタスクN)とは関連性を有さないことが示されている(S105:NO)。したがってフローはステップS107に進む。この時点で各コアに割り当て済みのタスクの数は同じであるので、コア101〜104が割り当て先の候補である。OS50は、このうち番号が最先のコア101に対象タスクを割り当てる(ステップS107)。   Let's move on to assigning tasks to cores. The OS 50 detects that the new task in FIG. 13 has occurred (Step S100). These new tasks are not assigned to the core at the time of detection. Therefore, the flow proceeds from step S101 to S102. The OS 50 selects a target task from the new tasks. Specifically, the OS 50 selects the one with the highest priority as the target task. Therefore, first, the task O is selected as the target task (Step S102). The process proceeds to step S103. Looking at the attribute information on the task O, it is shown that the task O does not have a relationship with the assigned tasks (tasks A to L) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information on the task O, it is shown that the task O has no relationship with the unassigned tasks (task M and task N) (S105: NO). Therefore, the flow proceeds to step S107. At this point, the number of tasks already assigned to each core is the same, and thus the cores 101 to 104 are candidates for the assignment destination. The OS 50 assigns the target task to the core 101 having the earliest number (step S107).

次にタスクMが対象タスクとして選択される(ステップS102)。タスクMについて属性情報を見ると、割り当て済みのタスク(タスクA〜LおよびO)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクMについて属性情報を見ると、未割り当てのタスクNと関連性を有することが示されている(S105:YES)。したがってフローはステップS106に進む。コア101/102、およびコア103/104に割り当て済みのタスクの数を比較すると、コア103/104の方が割り当て済タスクが少ないので割り当て先の候補となる。いまコア103およびコア104はいずれも割り当て済みのタスクの数が同じなので、番号が先のコア103に対象タスクが割り当てられる(ステップS106)。   Next, the task M is selected as a target task (step S102). Looking at the attribute information of the task M, it is shown that the task M has no relationship with the assigned tasks (tasks A to L and O) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information of the task M, it is shown that the task M has a relationship with the unassigned task N (S105: YES). Therefore, the flow proceeds to step S106. Comparing the number of tasks assigned to the cores 101/102 and 103/104, the core 103/104 is a candidate for the assignment destination because the number of assigned tasks is smaller. Since both the core 103 and the core 104 have the same number of assigned tasks, the target task is assigned to the core 103 having the earlier number (step S106).

次にタスクNが対象タスクとして選択される(ステップS102)。タスクNについて属性情報を見ると、タスクMと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクMが割り当て済のコア103/104が、割り当て先の候補である。いまコア104の方がコア103よりも割り当て済みのタスクの数が少ないので、コア104に対象タスクが割り当てられる(ステップS104)。   Next, task N is selected as a target task (step S102). Looking at the attribute information on the task N, it is shown that the task N has a relationship with the task M (S103: YES). Therefore, the flow proceeds to step S104. The cores 103/104 to which the task M has been allocated are candidates for the allocation destination. Since the number of tasks already assigned to the core 104 is smaller than that of the core 103, the target task is assigned to the core 104 (step S104).

図15は、タスクM〜Oの割り当て結果を例示する図である。このように、本実施形態によれば、各コアにより均等にタスクが割り当てられる。   FIG. 15 is a diagram illustrating an example of an assignment result of tasks MO. As described above, according to the present embodiment, the tasks are equally allocated to the respective cores.

3−3.動作例2
図16は、動作例2に係る割り当て済みのタスクを例示する図である。すなわち図16は、現時点でのスケジュール情報を示している。この例では、タスクA〜Gがコア101〜104に割り当てられている。この状況で、タスクHおよびタスクIが新たに発生した例を考える。
3-3. Operation example 2
FIG. 16 is a diagram illustrating an assigned task according to the operation example 2. That is, FIG. 16 shows schedule information at the present time. In this example, tasks A to G are assigned to cores 101 to 104. Consider an example in which task H and task I newly occur in this situation.

図17は、この例におけるタスクHおよびタスクIの属性情報を示す。タスクHはタスクEおよびタスクIと関連性を有しており、タスクIはタスクHと関連性を有している。新規タスクに関し、これ以外の関連性はない。新規タスクのうち、タスクHの優先度はタスクIの優先度よりも高い。   FIG. 17 shows the attribute information of task H and task I in this example. Task H has a relationship with task E and task I, and task I has a relationship with task H. There is no other relevance for the new task. Among the new tasks, the priority of the task H is higher than the priority of the task I.

まずタスクHが対象タスクとして選択される(ステップS102)。タスクHについて属性情報を見ると、割り当て済みのタスクEと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクEが割り当てられているコア101/102が、割り当て先の候補である。いコア101およびコア102に割り当て済みのタスクの数は同じなので、識別番号が先のコア101に対象タスクが割り当てられる(ステップS104)。   First, task H is selected as a target task (step S102). Looking at the attribute information on the task H, it is shown that the task H has a relationship with the assigned task E (S103: YES). Therefore, the flow proceeds to step S104. The cores 101/102 to which the task E is assigned are candidates for the assignment destination. Since the number of tasks already assigned to the cores 101 and 102 is the same, the target task is assigned to the core 101 whose identification number is earlier (step S104).

図18は、この時点のスケジュール情報を示す図である。   FIG. 18 is a diagram showing schedule information at this point.

次にタスクIが対象タスクとして選択される(ステップS102)。タスクIについて属性情報を見ると、割り当て済みのタスクHと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクHが割り当てられているコア101/102が、割り当て先の候補である。いまコア102の方がコア101よりも割り当て済みのタスクが少ない。したがって、コア102に対象タスクが割り当てられる(ステップS104)。   Next, task I is selected as a target task (step S102). Looking at the attribute information on the task I, it is shown that the task I has a relationship with the assigned task H (S103: YES). Therefore, the flow proceeds to step S104. The cores 101/102 to which the task H is assigned are candidates for the assignment destination. Now, the core 102 has fewer tasks assigned than the core 101. Therefore, the target task is assigned to the core 102 (step S104).

図19は、動作例2によるタスクの割り当て結果を示す図である。   FIG. 19 is a diagram illustrating a task assignment result according to the operation example 2.

3−4.動作例3
動作例2と同じ割り当て済みのタスク(図16)を考える。タスクA〜Gがコア101〜104に割り当てられている。この状況で、タスクHおよびタスクIが新たに発生した例を考える。
3-4. Operation example 3
Consider the same assigned task (FIG. 16) as in Operation Example 2. Tasks A to G are assigned to cores 101 to 104. Consider an example in which task H and task I newly occur in this situation.

図20は、動作例3におけるタスクHおよびタスクIの属性情報を示す。タスクHはタスクIと関連性を有しており、タスクIはタスクHと関連性を有している。新規タスクに関し、これ以外の関連性はない。新規タスクのうちタスクHの優先度はタスクIの優先度よりも高い。   FIG. 20 shows attribute information of task H and task I in the operation example 3. Task H has a relationship with task I, and task I has a relationship with task H. There is no other relevance for the new task. Among the new tasks, the priority of the task H is higher than the priority of the task I.

まずタスクHが対象タスクとして選択される(ステップS102)。タスクHについて属性情報を見ると、割り当て済みのタスク(タスクA〜G)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクHについて属性情報を見ると、未割り当てのタスクIと関連性を有することが示されている(S105:YES)。したがってフローはステップS106に進む。コア101/102とコア103/104とを比較すると、コア103/104に割り当て済みのタスクの方が少ない。したがって、コア103/コア104が割り当て先の候補である。いまコア103の方がコア104よりも割り当て済みのタスクの数が少ないので、コア103に対象タスクが割り当てられる(ステップS106)。   First, task H is selected as a target task (step S102). Looking at the attribute information of the task H, it is shown that the task H has no relationship with the assigned tasks (tasks A to G) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information about the task H, it is shown that the task H has a relationship with the unassigned task I (S105: YES). Therefore, the flow proceeds to step S106. Comparing the cores 101/102 and 103/104, there are fewer tasks assigned to the cores 103/104. Therefore, the core 103 / core 104 are candidates for the allocation destination. Since the number of tasks already assigned to the core 103 is smaller than that of the core 104, the target task is assigned to the core 103 (step S106).

図21は、この時点でのスケジュール情報を示す図である。   FIG. 21 is a diagram showing schedule information at this point.

次にタスクIが対象タスクとして選択される(ステップS102)。タスクIについて属性情報を見ると、割り当て済みのタスクHと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクHが割り当てられているコア103が属するコア103/104が割り当て先の候補である。いまコア103および104に割り当て済みのタスクの数は同じである。したがって、識別番号の早いコア103に対象タスクが割り当てられる(ステップS104)。   Next, task I is selected as a target task (step S102). Looking at the attribute information on the task I, it is shown that the task I has a relationship with the assigned task H (S103: YES). Therefore, the flow proceeds to step S104. The core 103/104 to which the core 103 to which the task H is allocated belongs is a candidate for the allocation destination. The number of tasks already assigned to the cores 103 and 104 is the same. Therefore, the target task is assigned to the core 103 having the earlier identification number (step S104).

図22は、動作例3によるタスクの割り当て結果を示す図である。   FIG. 22 is a diagram illustrating a task assignment result according to the third operation example.

3−5.動作例4
図23は、動作例4に係る割り当て済みのタスクを示す図である。すなわち図23は、現時点でのスケジュール情報を示している。この例では、タスクA〜GおよびJがコア101〜104に割り当てられている。この状況で、タスクHおよびタスクIが新たに発生した例を考える。タスクHおよびタスクIの属性情報は、動作例3(図20)と同じである。
3-5. Operation example 4
FIG. 23 is a diagram illustrating assigned tasks according to the operation example 4. That is, FIG. 23 shows schedule information at the present time. In this example, tasks A to G and J are assigned to cores 101 to 104. Consider an example in which task H and task I newly occur in this situation. The attribute information of task H and task I is the same as in operation example 3 (FIG. 20).

まずタスクHが対象タスクとして選択される(ステップS102)。タスクHについて属性情報を見ると、割り当て済みのタスク(タスクA〜GおよびJ)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクHについて属性情報を見ると、未割り当てのタスクIと関連性を有することが示されている(S105:YES)。したがってフローはステップS106に進む。コア101/102とコア103/104とを比較すると、割り当て済みのタスクの数は同じである。コアに割り当て済みのタスクの最大数を比較すると、コア101/102が2つであり、コア103/104が3つである。したがって、コア101/102が割り当て先の候補となる。いまコア101およびコア102は割り当て済みのタスクの数が同じなので、識別番号の早いコア101に対象タスクが割り当てられる(ステップS106)。   First, task H is selected as a target task (step S102). Looking at the attribute information of the task H, it is shown that the task H has no relationship with the assigned tasks (tasks A to G and J) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information about the task H, it is shown that the task H has a relationship with the unassigned task I (S105: YES). Therefore, the flow proceeds to step S106. Comparing the cores 101/102 and the cores 103/104, the number of assigned tasks is the same. Comparing the maximum number of tasks assigned to the cores, there are two cores 101/102 and three cores 103/104. Therefore, the cores 101/102 are candidates for the allocation destination. Since the number of tasks already assigned to the core 101 and the core 102 is the same, the target task is assigned to the core 101 having the earlier identification number (step S106).

図24は、この時点でのスケジュール情報を示す図である。   FIG. 24 is a diagram showing schedule information at this point.

次にタスクIが対象タスクとして選択される(ステップS102)。タスクIについて属性情報を見ると、割り当て済みのタスクHと関連性を有することが示されている(S103:YES)。したがってフローはステップS104に進む。タスクHが割り当てられているコア101が属するコア103/104が割り当て先の候補である。いまコア102の方がコア101よりも割り当て済みのタスクが少ない。したがって、コア102に対象タスクが割り当てられる(ステップS104)。   Next, task I is selected as a target task (step S102). Looking at the attribute information on the task I, it is shown that the task I has a relationship with the assigned task H (S103: YES). Therefore, the flow proceeds to step S104. The cores 103/104 to which the core 101 to which the task H is assigned belong are candidates for the assignment destination. Now, the core 102 has fewer tasks assigned than the core 101. Therefore, the target task is assigned to the core 102 (step S104).

図25は、動作例4によるタスクの割り当て結果を示す図である。動作例4(図22)と対比すると、新規タスクの属性情報が同じであっても、その時点で割り当て済みのタスクの状況に応じて割り当て先が変わることがわかる。   FIG. 25 is a diagram illustrating a task assignment result according to the operation example 4. In comparison with the operation example 4 (FIG. 22), it can be seen that even if the attribute information of the new task is the same, the assignment destination changes according to the status of the task already assigned at that time.

3−6.動作例5
図26は、動作例5に係る割り当て済みのタスクを例示する図である。すなわち図26は、現時点でのスケジュール情報を示している。この例では、タスクA〜GおよびJがコア101〜104に割り当てられている。タスクGは2回発生しており、いずれもコア104に割り当て済みである。この状況で、タスクHおよびタスクIが新たに発生した例を考える。
3-6. Operation example 5
FIG. 26 is a diagram illustrating an assigned task according to the operation example 5. That is, FIG. 26 shows schedule information at the present time. In this example, tasks A to G and J are assigned to cores 101 to 104. Task G has occurred twice, and both have been assigned to the core 104. Consider an example in which task H and task I newly occur in this situation.

図27は、この例におけるタスクHおよびタスクIの属性情報を示す。タスクHおよびタスクIはいずれも、他のタスクと関連性を有してない。新規タスクのうち、タスクHの優先度はタスクIの優先度よりも高い。   FIG. 27 shows the attribute information of task H and task I in this example. Neither task H nor task I has an association with another task. Among the new tasks, the priority of the task H is higher than the priority of the task I.

まずタスクHが対象タスクとして選択される(ステップS102)。タスクHについて属性情報を見ると、割り当て済みのタスク(タスクA〜GおよびJ)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。タスクHについて属性情報を見ると、未割り当てのタスク(タスクI)とは関連性を有さないことが示されている(S105:NO)。したがってフローはステップS107に進む。この時点でコア103に割り当て済みのタスクの数が最も少ない。したがって、コア103に対象タスクが割り当てられる(ステップS107)。   First, task H is selected as a target task (step S102). Looking at the attribute information of the task H, it is shown that the task H has no relationship with the assigned tasks (tasks A to G and J) (S103: NO). Therefore, the flow proceeds to step S105. Looking at the attribute information on the task H, it is shown that the task H has no relationship with the unassigned task (task I) (S105: NO). Therefore, the flow proceeds to step S107. At this point, the number of tasks assigned to the core 103 is the smallest. Therefore, the target task is assigned to the core 103 (step S107).

図28は、この時点でのスケジュール情報を示す図である。   FIG. 28 is a diagram showing schedule information at this point.

次にタスクIが対象タスクとして選択される(ステップS102)。タスクIについて属性情報を見ると、割り当て済みのタスク(タスクA〜G、J、およびH)とは関連性を有さないことが示されている(S103:NO)。したがってフローはステップS105に進む。この時点で未割り当てのタスクはない。つまり対象タスクは未割り当てのタスクとは関連性を有さない(S105:NO)。したがってフローはステップS107に進む。この時点でコア101〜103に割り当て済みのタスクの数が最も少ない。したがって、このうち識別番号が最も早いコア101に対象タスクが割り当てられる(ステップS107)。   Next, task I is selected as a target task (step S102). Looking at the attribute information of the task I, it is shown that there is no relationship with the assigned tasks (tasks A to G, J, and H) (S103: NO). Therefore, the flow proceeds to step S105. There are no unassigned tasks at this time. That is, the target task has no relationship with the unassigned task (S105: NO). Therefore, the flow proceeds to step S107. At this time, the number of tasks assigned to the cores 101 to 103 is the smallest. Therefore, the target task is assigned to the core 101 having the earliest identification number (step S107).

図29は、動作例5によるタスクの割り当て結果を示す図である。   FIG. 29 is a diagram illustrating a task assignment result according to the fifth operation example.

3−7.動作例6
図30は、動作例6に係るタスクを示す図である。動作例6に係るタスクは、タスクA〜Gを含む。タスクA〜Eは、一連のパイプライン処理を構成する。タスクFおよびGはそれぞれ他のタスクとは独立している。この例では、タスクA〜Eが繰り返し発生する。
3-7. Operation example 6
FIG. 30 is a diagram illustrating a task according to the operation example 6. The tasks according to the operation example 6 include tasks A to G. Tasks A to E constitute a series of pipeline processing. Tasks F and G are independent of each other. In this example, tasks AE occur repeatedly.

図31は、動作例6に係るタスクの属性情報を示す図である。タスクAはタスクBと、タスクBはタスクAおよびCと、タスクCはタスクBおよびDと、タスクDはタスクCおよびEと、タスクEはタスクDと、それぞれ関連性を有する。タスクFおよびタスクGは他のタスクと関連性を有さない。優先度は、高い方から順に、タスクA、B、C、D、E、F、Gである。   FIG. 31 is a diagram illustrating task attribute information according to the operation example 6. Task A is associated with task B, task B is associated with tasks A and C, task C is associated with tasks B and D, task D is associated with tasks C and E, and task E is associated with task D. Task F and task G have no relationship with other tasks. The priorities are tasks A, B, C, D, E, F, and G in descending order.

図32〜42は、動作例6によるタスクの割り当てを示す図である。ここでは、タスクの発生、割り当て、および実行を時系列で示している。図の縦軸は、タスクの実行に要する時間を単位とする時間の経過を表している。ここでは説明を簡単にするため、各タスクの実行に要する時間は等しい例を用いる。ここでは、繰り返し発生する同種のタスクを区別するため、タスクの後に添字を付している。例えば「A1」は1回目に発生したタスクAを示している。この図には、タスク発生、タスク割り当て、およびタスク割り当て(比較例)の欄がある。タスク発生の欄には、その時刻に新たに発生したタスクが記載されている。例えば時刻t1に、タスクA1、B1、C1、D1、E1、およびF1が発生している。タスク割り当ての欄には、その時刻から次の時刻までの間に実行されるタスクが記載されている。例えば時刻t1から時刻t2の間に、タスクA1、B1、およびF1が実行される。タスク割り当て(比較例)の欄には、比較例におけるタスク実行予定が記載されている。なお比較例においては、割り当て先がタスク毎にあらかじめ決められている。また、以下においては、比較例のタスク割り当てについては特に詳細な説明はしない。   32 to 42 are diagrams illustrating task assignment according to the operation example 6. FIG. Here, the occurrence, assignment, and execution of tasks are shown in chronological order. The vertical axis in the figure represents the passage of time in units of the time required to execute the task. Here, for simplicity of description, an example in which the time required to execute each task is equal will be used. Here, subscripts are added after tasks to distinguish repetitive tasks of the same type. For example, “A1” indicates task A that has occurred for the first time. This figure includes columns for task occurrence, task assignment, and task assignment (comparative example). The task occurrence column describes a task that has newly occurred at that time. For example, at time t1, tasks A1, B1, C1, D1, E1, and F1 occur. The task assignment column describes the tasks to be executed between that time and the next time. For example, tasks A1, B1, and F1 are executed between time t1 and time t2. In the column of task assignment (comparative example), a task execution schedule in the comparative example is described. In the comparative example, the assignment destination is determined in advance for each task. In the following, the task assignment of the comparative example is not specifically described in detail.

時刻t1において、タスクA1、B1、C1、D1、E1、およびF1が発生する。時刻t1以前には、どのコアにも割り当て済タスクは無い。コア101にタスクA1、D1、およびE1が、コア102にタスクB1およびC1が、コア103にタスクF1が、それぞれ割り当てられる(図32)。時刻t2になった時点で1行目のタスクは実行が完了している。時刻t2に発生するタスクは無い。   At time t1, tasks A1, B1, C1, D1, E1, and F1 occur. Before time t1, no core has an assigned task. Tasks A1, D1, and E1 are assigned to the core 101, tasks B1 and C1 to the core 102, and task F1 to the core 103, respectively (FIG. 32). At the time t2, the execution of the task on the first line has been completed. No task occurs at time t2.

時刻t3において、タスクA2、B2、C2、D2、E2、およびG1が発生する。この時点で、コア101にタスクE1が割り当て済である。コア103/104に割り当てられているタスクがゼロなので、まずタスクA2がコア103に割り当てられる。以下、すべてのタスクの割り当てが完了すると、コア101にタスクE1が、コア102にタスクG2が、コア103にタスクA2、D2、およびE2が、コア104にタスクB2およびC2が割り当てられる(図33)。なお時刻t3において実行済のタスクはハッチングで示している。以下の図において同様である。   At time t3, tasks A2, B2, C2, D2, E2, and G1 occur. At this point, the task E1 has been assigned to the core 101. Since the tasks assigned to the cores 103/104 are zero, first, the task A2 is assigned to the core 103. When the assignment of all tasks is completed, the task E1 is assigned to the core 101, the task G2 is assigned to the core 102, the tasks A2, D2, and E2 are assigned to the core 103, and the tasks B2 and C2 are assigned to the core 104 (FIG. 33). ). Tasks that have been executed at time t3 are indicated by hatching. The same applies to the following drawings.

時刻t4において、タスクF2が発生する。この時点で、コア103にタスクD2およびE2が、コア104にタスクC2が割り当て済である。タスクF2は、コア101に割り当てられる(図34)。   At time t4, a task F2 occurs. At this point, the tasks D2 and E2 have been assigned to the core 103, and the task C2 has been assigned to the core 104. Task F2 is allocated to core 101 (FIG. 34).

時刻t5において、タスクA3、B3、C3、D3、およびE3が発生する。この時点で、コア103にタスクE2が割り当て済である。コア101にタスクA3、D3、およびE3が、コア102にタスクB3およびC3が割り当てられる(図35)。時刻t6に発生するタスクは無い。   At time t5, tasks A3, B3, C3, D3, and E3 occur. At this point, the task E2 has been assigned to the core 103. Tasks A3, D3, and E3 are assigned to the core 101, and tasks B3 and C3 are assigned to the core 102 (FIG. 35). No task occurs at time t6.

時刻t7において、タスクA4、B4、C4、D4、E4、およびF3が発生する。この時点で、コア101にタスクE3が割り当て済である。コア102にタスクF3が、コア103にタスクA4、C4、およびE4が、コア104にタスクB4およびC4が割り当てられる(図36)。   At time t7, tasks A4, B4, C4, D4, E4, and F3 occur. At this point, the task E3 has been assigned to the core 101. A task F3 is assigned to the core 102, tasks A4, C4, and E4 are assigned to the core 103, and tasks B4 and C4 are assigned to the core 104 (FIG. 36).

時刻t8において、タスクG2が発生する。この時点で、コア103にタスクC4およびE4が、コア104にタスクC4が割り当て済である。コア101にタスクG2が割り当てられる(図37)。   At time t8, a task G2 occurs. At this point, the tasks C4 and E4 have been assigned to the core 103, and the task C4 has been assigned to the core 104. The task G2 is allocated to the core 101 (FIG. 37).

時刻t9において、タスクA5、B5、C5、D5、E5、およびF4が発生する。この時点で、コア103にタスクE4が割り当て済である。コア101にタスクA5、D5、およびE5が、コア102にタスクB5およびC5が、コア104にタスクF4が割り当てられる(図38)。時刻t10において発生するタスクは無い。   At time t9, tasks A5, B5, C5, D5, E5, and F4 occur. At this point, the task E4 has been assigned to the core 103. Tasks A5, D5, and E5 are assigned to the core 101, tasks B5 and C5 to the core 102, and task F4 to the core 104 (FIG. 38). No task occurs at time t10.

時刻t11において、タスクA6、B6、C6、D6、およびE6が発生する。この時点で、コア101にタスクE5が割り当て済である。コア103にタスクA6、D6、およびE6が、コア104にタスクB6およびC6が割り当てられる(図39)。   At time t11, tasks A6, B6, C6, D6, and E6 occur. At this point, the task E5 has been assigned to the core 101. Tasks A6, D6, and E6 are assigned to the core 103, and tasks B6 and C6 are assigned to the core 104 (FIG. 39).

時刻t12において、タスクF5およびG3が発生する。この時点で、コア103にタスクD6およびE6が、コア104にタスクC6が割り当て済である。コア101にタスクF5が、コア102にタスクG3が割り当てられる(図40)。   At time t12, tasks F5 and G3 occur. At this point, tasks D6 and E6 have been allocated to the core 103, and task C6 has been allocated to the core 104. The task F5 is assigned to the core 101 and the task G3 is assigned to the core 102 (FIG. 40).

時刻t13において、タスクA7、B7、C7、D7、およびE7が発生する。この時点で、コア103にタスクE6が割り当て済である。コア101にタスクA7、D7、およびE7が、コア102にタスクB7およびC7が割り当てられる(図41)。時刻t14において発生するタスクは無い。   At time t13, tasks A7, B7, C7, D7, and E7 occur. At this point, the task E6 has been assigned to the core 103. Tasks A7, D7, and E7 are assigned to the core 101, and tasks B7 and C7 are assigned to the core 102 (FIG. 41). No task occurs at time t14.

時刻t15において、タスクA8、B8、C8、D8、E8、およびF6が発生する。この時点で、コア101にタスクE7が割り当て済である。コア102にタスクF6が、コア103にタスクA8、D8、およびE8が、コア104にタスクB8およびC8が割り当てられる(図42)。   At time t15, tasks A8, B8, C8, D8, E8, and F6 occur. At this point, the task E7 has been assigned to the core 101. The task F6 is assigned to the core 102, the tasks A8, D8, and E8 are assigned to the core 103, and the tasks B8 and C8 are assigned to the core 104 (FIG. 42).

時刻t16において、タスクG4が発生する。この時点で、コア103にタスクD8およびE8が、コア104にタスクC8が割り当て済である。コア101にタスクG4が割り当てられる(図43)。   At time t16, a task G4 occurs. At this point, the tasks D8 and E8 have been allocated to the core 103, and the task C8 has been allocated to the core 104. The task G4 is assigned to the core 101 (FIG. 43).

以上で割り当てられたタスクは、時刻t18にはすべて実行が完了する。一方で比較例においては、割り当てられたタスクの実行が完了するのは時刻t21である。このように、本実施形態によれば、タスクがより効率的にコアに割り当てられる。これにより、CPU10のパフォーマンスが向上する。   Execution of all the tasks assigned as described above is completed at time t18. On the other hand, in the comparative example, the execution of the assigned task is completed at time t21. Thus, according to the present embodiment, tasks are more efficiently allocated to cores. Thereby, the performance of the CPU 10 is improved.

4.変形例
本発明は上述の実施形態に限定されるものではなく、種々の変形実施が可能である。以下、変形例をいくつか説明する。以下の変形例のうち2つ以上のものが組み合わせて用いられてもよい。
4. Modifications The present invention is not limited to the above-described embodiment, and various modifications can be made. Hereinafter, some modified examples will be described. Two or more of the following modifications may be used in combination.

4−1.変形例1
図43は、変形例1に係る新規タスクの割り当て処理を示すフローチャートである。変形例1に係る処理は、タスクの関連性の種類およびCPUのハードウェア構成(キャッシュメモリの構成)の組み合わせによって、タスク割り当てのアルゴリズムを変更する点が図7のフローと異なっている。以下この処理を、図7のフローと対比しつつ説明する。
4-1. Modification 1
FIG. 43 is a flowchart illustrating a process of assigning a new task according to the first modification. The process according to the first modification is different from the flow of FIG. 7 in that the algorithm of task assignment is changed depending on the combination of the type of task relevance and the hardware configuration of the CPU (the configuration of the cache memory). Hereinafter, this processing will be described in comparison with the flow of FIG.

ステップS200において、OS50は、新規タスクが発生したか判断する。新規タスクが発生していないと判断された場合(S200:NO)、OS50は、新規タスクが発生するまで待機する。新規タスクが発生したと判断された場合(S200:YES)、OS50は、処理をステップS201に移行する。
ステップS201において、OS50は、未割り当てのタスクがあるか判断する。未割り当てのタスクがあると判断された場合(S201:YES)、OS50は、処理をステップS202に移行する。未割り当てのタスクがないと判断された場合(S201:NO)、OS50は、処理をステップS200に移行する。ステップS202において、OS50は、未割り当てのタスクの中から、最も優先度が高い一のタスクを対象タスクとして選択する。ステップS200〜S202の処理は、ステップS100〜S102の処理に相当する。
In step S200, the OS 50 determines whether a new task has occurred. When it is determined that a new task has not occurred (S200: NO), the OS 50 waits until a new task occurs. When it is determined that a new task has occurred (S200: YES), the OS 50 shifts the processing to Step S201.
In step S201, the OS 50 determines whether there is an unassigned task. When it is determined that there is an unassigned task (S201: YES), the OS 50 shifts the processing to Step S202. When it is determined that there is no unassigned task (S201: NO), the OS 50 shifts the processing to Step S200. In step S202, the OS 50 selects one task having the highest priority from unassigned tasks as a target task. The processing of steps S200 to S202 corresponds to the processing of steps S100 to S102.

ステップS203において、OS50は、割り当て制御テーブルを読み込む。割り当て制御テーブルは、タスクの割り当てアルゴリズムを決定するための情報が記録されたテーブルである。タスクの割り当てアルゴリズムは、タスク間の関連性およびCPUのキャッシュメモリ構造に応じて決定される。   In step S203, the OS 50 reads the assignment control table. The assignment control table is a table in which information for determining a task assignment algorithm is recorded. The task allocation algorithm is determined according to the relevance between tasks and the cache memory structure of the CPU.

まずタスクの関連性の分類について説明する。この例では、タスクの関連性が3つのカテゴリ(カテゴリα〜γという)に分類される。カテゴリαは、いわゆるパイプライン処理における関連性に相当する分類である。これは例えばタスク群801(図8)のような構造に相当する。例えば複合機で行われる画像処理ではデータサイズが大きいため、タスク間のデータ受け渡しのレイテンシが大きいとパフォーマンスに大きな悪影響を与える。したがって、この分類の処理においてはキャッシュヒット率が高いことが期待される。   First, the classification of task relevance will be described. In this example, the relevance of the tasks is classified into three categories (categories α to γ). The category α is a classification corresponding to relevance in so-called pipeline processing. This corresponds to, for example, a structure like the task group 801 (FIG. 8). For example, in image processing performed by a multifunction peripheral, the data size is large, so that a large data transfer latency between tasks has a significant adverse effect on performance. Therefore, a high cache hit rate is expected in this classification process.

カテゴリβは、LUTを参照する処理における関連性に相当する分類であり、例えば、タスク群802(図8)のような構造に相当する。この処理は、あるデータテーブルを参照してデータを置換するような処理に用いられる。例えば複合機で行われる色空間変換の場合、参照されるLUTのデータサイズが大きく、また画像により参照するデータが異なる。そのため、カテゴリαと比較すると、キャッシュのヒット率が高いことは期待されない。   The category β is a classification corresponding to the relevance in the processing for referring to the LUT, and corresponds to, for example, a structure such as the task group 802 (FIG. 8). This process is used for a process of replacing data with reference to a certain data table. For example, in the case of color space conversion performed by a multifunction peripheral, the data size of the referenced LUT is large, and the referenced data differs depending on the image. Therefore, it is not expected that the hit rate of the cache is high as compared with the category α.

カテゴリγは、他のタスクとは独立した処理における関連性であり、例えば、タスク群803(図8)のような構造に相当する。この処理は、例えば、検知系の処理やインターフェース処理に用いられる。これらの処理ではキャッシュのヒット率が高くなることはほとんど期待されないし、その必要もない。   The category γ is relevance in processing independent of other tasks, and corresponds to, for example, a structure such as a task group 803 (FIG. 8). This processing is used, for example, for processing of a detection system and interface processing. In these processes, it is hardly expected that the cache hit rate will increase, and it is not necessary.

以上の事情を考慮すると、一般に、タスク間の関連性の強さは、α>β>γとなる。したがってこの例では、関連性の強さに応じて、タスク割り当てのアルゴリズムを変更する。例えばソフトウェアをコンパイルするときに、各タスクについて他のタスクとの関連性を、上記の分類を含む情報として抽出することができる。   In consideration of the above circumstances, generally, the strength of the relationship between tasks is α> β> γ. Therefore, in this example, the algorithm of task assignment is changed according to the strength of the association. For example, when compiling software, the relevance of each task to other tasks can be extracted as information including the above classification.

図44は、分類を含むタスク間の関連性を例示する図である。この例では、例えばタスクAはタスクBとカテゴリαの関連性を有することが示されている。また、タスクJはタスクCとカテゴリαの関連性を有し、かつタスクIとカテゴリβの関連性を有することが示されている。   FIG. 44 is a diagram illustrating a relationship between tasks including a classification. In this example, for example, it is shown that task A has a relationship between task B and category α. It is also shown that task J has a relationship between task C and category α, and has a relationship between task I and category β.

図45は、CPUのキャッシュメモリの構成を例示する図である。キャッシュメモリの構成は、例えばカテゴリW〜Zに分類される。カテゴリWは、L2キャッシュを2つのコアで共有する構造に相当する。カテゴリXは、L2キャッシュを4つのコアで共有する構造に相当する。カテゴリYは、L2キャッシュを2つのコアで共有し、かつL3キャッシュを4つのコアで共有する構造に相当する。カテゴリZは、L2キャッシュを4つのコアで共有し、かつL3キャッシュを4つのコアで共有する構造に相当する。   FIG. 45 is a diagram illustrating the configuration of the cache memory of the CPU. The configuration of the cache memory is classified into, for example, categories W to Z. Category W corresponds to a structure in which the L2 cache is shared by two cores. Category X corresponds to a structure in which the L2 cache is shared by four cores. Category Y corresponds to a structure in which the L2 cache is shared by two cores and the L3 cache is shared by four cores. Category Z corresponds to a structure in which the L2 cache is shared by four cores and the L3 cache is shared by four cores.

図46は、割り当て制御テーブルを例示する図である。割り当て制御テーブルには、CPUのキャッシュメモリ構造およびタスクの関連性の分類毎に、タスク割り当てのアルゴリズムを特定する情報が記録されている。この例では、タスク割り当てのアルゴリズムとして第1アルゴリズムおよび第2アルゴリズムが用いられる。第1アルゴリズムは、実施形態で説明したアルゴリズム、すなわち割り当て済タスクとの関連性を考慮したアルゴリズムである。第2アルゴリズムは、第1アルゴリズムと異なるアルゴリズムである。なお、カテゴリα〜γの分類は、適用される割り当てアルゴリズムに影響を与えているという意味において、タスク間の関連性の重みを示しているといえる。   FIG. 46 is a diagram illustrating an assignment control table. In the assignment control table, information for specifying a task assignment algorithm is recorded for each cache memory structure of the CPU and each category of task relevance. In this example, the first algorithm and the second algorithm are used as the algorithm for task assignment. The first algorithm is an algorithm described in the embodiment, that is, an algorithm that considers the relevance to the assigned task. The second algorithm is an algorithm different from the first algorithm. It can be said that the classification of the categories α to γ indicates the weight of relevance between tasks in the sense that it affects the applied allocation algorithm.

例えば、CPU10(図5)はカテゴリWの構造を有しているので、カテゴリαの関連性を有するタスクについては第1アルゴリズムによるタスクの割り当てが、カテゴリβおよびγの関連性を有するタスクについては第2アルゴリズムによるタスクの割り当てが、それぞれ行われる。   For example, since the CPU 10 (FIG. 5) has the structure of the category W, the task is assigned by the first algorithm for the task having the category α, and the task is assigned by the first algorithm for the task having the category β. Each task is assigned according to the second algorithm.

再び図43を参照する。ステップS204において、OS50は、割り当て済タスクの中に対象タスクと第1アルゴリズムを適用する関係にあるタスクが存在するか判断する。割り当て済タスクの中に対象タスクと第1アルゴリズムを適用する関係タスクが存在すると判断された場合(S204:YES)、OS50は、処理をステップS205に移行する。割り当て済タスクの中に対象タスクと第1アルゴリズムを適用する関係にあるタスクが存在しないと判断された場合(S204:NO)、OS50は、処理をステップS206に移行する。   FIG. 43 is referred to again. In step S204, the OS 50 determines whether or not there is a task that has a relationship to apply the first algorithm with the target task among the assigned tasks. When it is determined that there is a target task and a related task to which the first algorithm is applied among the allocated tasks (S204: YES), the OS 50 shifts the processing to step S205. When it is determined that there is no task that has a relationship to apply the first algorithm with the target task among the assigned tasks (S204: NO), the OS 50 shifts the processing to step S206.

ステップS205において、OS50は、対象タスクと第1アルゴリズムを適用する関係にあるタスクが割り当てられているコア群に、対象タスクを割り当てる。ステップS205の処理はステップS104の処理に相当する。ステップS205の処理を終えると、OS50は、処理をステップS201に移行する。   In step S205, the OS 50 assigns the target task to a core group to which a task having a relationship to apply the first algorithm to the target task is assigned. The processing in step S205 corresponds to the processing in step S104. After finishing the processing in step S205, the OS 50 shifts the processing to step S201.

ステップS206において、OS50は、未割り当てのタスクの中に対象タスクと第1アルゴリズムを適用する関係にあるタスクが存在するか判断する。未割り当てのタスクの中に対象タスクと第1アルゴリズムを適用する関係にあるタスクが存在すると判断された場合(S206:YES)、OS50は、処理をステップS207に移行する。未割り当てのタスクの中に対象タスクと第1アルゴリズムを適用する関係にあるタスクが存在しないと判断された場合(S206:NO)、OS50は、処理をステップS208に移行する。   In step S206, the OS 50 determines whether or not there is a task that has a relationship to which the first algorithm is applied with the target task among unassigned tasks. When it is determined that there is a task that has a relationship to apply the first algorithm with the target task among the unallocated tasks (S206: YES), the OS 50 shifts the processing to Step S207. When it is determined that there is no task that has a relationship to apply the first algorithm to the target task among the unallocated tasks (S206: NO), the OS 50 shifts the processing to Step S208.

ステップS207において、OS50は、複数のコア群のうち、割り当て済みのタスクが最も少ないコア群に属するコアにタスクを割り当てる。ステップS207の処理はステップS106の処理に相当する。ステップS106の処理を終えると、OS50は、処理をステップS201に移行する。   In step S207, the OS 50 assigns a task to a core belonging to the core group having the least assigned task among the plurality of core groups. The processing in step S207 corresponds to the processing in step S106. After finishing the process in step S106, the OS 50 shifts the processing to step S201.

ステップS208において、OS50は、コア101〜104のうち割り当て済みのタスクが最も少ないコアに対象タスクを割り当てる。ステップS208の処理はステップS107の処理に相当する。ステップS208の処理を終えると、OS50は、処理をステップS201に移行する。   In step S208, the OS 50 assigns the target task to the core having the least assigned task among the cores 101 to 104. The processing in step S208 corresponds to the processing in step S107. After finishing the process in step S208, the OS 50 shifts the process to step S201.

変形例1においては、CPUのキャッシュメモリ構造との関係において効果が高いことが期待されるタスクに対してのみ、タスクの関連性を考慮したタスク割り当てが行われる。   In the first modification, task assignment in consideration of task relevance is performed only for a task expected to be highly effective in relation to the cache memory structure of the CPU.

4−2.変形例2
図47は、変形例2に係る新規タスクの割り当て処理を示すフローチャートである。変形例2に係る処理は、タスク間で共有されるデータのサイズを考慮する点において図7のフローと異なっている。以下この処理を、図7のフローと対比しつつ説明する。
4-2. Modification 2
FIG. 47 is a flowchart illustrating a process of assigning a new task according to the second modification. The process according to the second modification is different from the flow in FIG. 7 in that the size of data shared between tasks is considered. Hereinafter, this processing will be described in comparison with the flow of FIG.

ステップS300において、OS50は、新規タスクが発生したか判断する。新規タスクが発生していないと判断された場合(S300:NO)、OS50は、新規タスクが発生するまで待機する。新規タスクが発生したと判断された場合(S300:YES)、OS50は、処理をステップS301に移行する。
ステップS301において、OS50は、未割り当てのタスクがあるか判断する。未割り当てのタスクがあると判断された場合(S301:YES)、OS50は、処理をステップS302に移行する。未割り当てのタスクがないと判断された場合(S301:NO)、OS50は、処理をステップS300に移行する。ステップS302において、OS50は、未割り当てのタスクの中から、最も優先度が高い一のタスクを対象タスクとして選択する。ステップS300〜S302の処理は、ステップS100〜S102の処理に相当する。
In step S300, the OS 50 determines whether a new task has occurred. When it is determined that a new task has not occurred (S300: NO), the OS 50 waits until a new task occurs. When it is determined that a new task has occurred (S300: YES), the OS 50 shifts the processing to Step S301.
In step S301, the OS 50 determines whether there is an unassigned task. When it is determined that there is an unassigned task (S301: YES), the OS 50 shifts the processing to Step S302. When it is determined that there is no unassigned task (S301: NO), the OS 50 shifts the processing to Step S300. In step S302, the OS 50 selects one task having the highest priority as a target task from unassigned tasks. The processing of steps S300 to S302 corresponds to the processing of steps S100 to S102.

ステップS303において、OS50は、割り当て済タスクの中に対象タスクと関連性を有するタスクが存在するか判断する。割り当て済タスクの中に対象タスクと関連性を有するタスクが存在すると判断された場合(S303:YES)、OS50は、処理をステップS304に移行する。割り当て済タスクの中に対象タスクと関連性を有するタスクが存在しないと判断された場合(S304:NO)、OS50は、処理をステップS307に移行する。ステップS303の処理はステップS103の処理に相当する。   In step S303, the OS 50 determines whether or not there is a task related to the target task among the assigned tasks. If it is determined that there is a task associated with the target task among the assigned tasks (S303: YES), the OS 50 shifts the processing to Step S304. If it is determined that there is no task associated with the target task among the assigned tasks (S304: NO), the OS 50 shifts the processing to Step S307. The processing in step S303 corresponds to the processing in step S103.

ステップS304において、OS50は、対象タスクおよび対象タスクと関連性を有するタスクとが共有するデータのサイズが、L1キャッシュのサイズより大きいか判断する。タスク間で共有するデータのサイズは、属性情報により示される。L1キャッシュのサイズは、構成情報により示される。OS50は、これらの情報を参照して判断する。共有するデータのサイズがL1キャッシュのサイズより大きいと判断された場合(S304:YES)、OS50は、処理をステップS305に移行する。共有するデータのサイズがL1キャッシュのサイズ以下であると判断された場合(S304:NO)、OS50は、処理をステップS306に移行する。   In step S304, the OS 50 determines whether the size of the data shared by the target task and the task related to the target task is larger than the size of the L1 cache. The size of data shared between tasks is indicated by attribute information. The size of the L1 cache is indicated by the configuration information. The OS 50 makes the determination with reference to these pieces of information. When it is determined that the size of the shared data is larger than the size of the L1 cache (S304: YES), the OS 50 shifts the processing to Step S305. When it is determined that the size of the shared data is equal to or smaller than the size of the L1 cache (S304: NO), the OS 50 shifts the processing to Step S306.

ステップS305において、OS50は、対象タスクと関連性を有するタスクが割り当て済タスク群に対象タスクを割り当てる。ステップS305の処理はステップS104の処理に相当する。ステップS305の処理を終えると、OS50は、処理をステップS301に移行する。   In step S305, the OS 50 assigns the target task to a group of tasks to which tasks having a relationship with the target task have been assigned. The processing in step S305 corresponds to the processing in step S104. After finishing the process in step S305, the OS 50 shifts the processing to step S301.

ステップS306において、OS50は、対象タスクと関連性を有するタスクが割り当て済タスクに対象タスクを割り当てる。ステップS306の処理を終えると、OS50は、処理をステップS301に移行する。   In step S306, the OS 50 assigns the target task to a task to which a task related to the target task has been assigned. After ending the processing in step S306, the OS 50 shifts the processing to step S301.

ステップS307において、OS50は、未割り当てのタスクの中に対象タスクと関連性を有するタスクが存在するか判断する。未割り当てのタスクの中に対象タスクと関連性を有するタスクが存在すると判断された場合(S307:YES)、OS50は、処理をステップS308に移行する。未割り当てのタスクの中に対象タスクと関連性を有するタスクが存在しないと判断された場合(S307:NO)、OS50は、処理をステップS310に移行する。ステップS307の処理はステップS105の処理に相当する。   In step S307, the OS 50 determines whether there is a task related to the target task among the unassigned tasks. When it is determined that there is a task associated with the target task among the unallocated tasks (S307: YES), the OS 50 shifts the processing to Step S308. When it is determined that there is no task having a relationship with the target task among the unallocated tasks (S307: NO), the OS 50 shifts the processing to Step S310. The process in step S307 corresponds to the process in step S105.

ステップS308において、OS50は、対象タスクおよび対象タスクと関連性を有するタスクとが共有するデータのサイズが、L1キャッシュのサイズより大きいか判断する。共有するデータのサイズがL1キャッシュのサイズより大きいと判断された場合(S308:YES)、OS50は、処理をステップS309に移行する。共有するデータのサイズがL1キャッシュのサイズ以下であると判断された場合(S308:NO)、OS50は、処理をステップS310に移行する。   In step S308, the OS 50 determines whether the size of the data shared by the target task and the task related to the target task is larger than the size of the L1 cache. When it is determined that the size of the shared data is larger than the size of the L1 cache (S308: YES), the OS 50 shifts the processing to Step S309. When it is determined that the size of the shared data is equal to or smaller than the size of the L1 cache (S308: NO), the OS 50 shifts the processing to Step S310.

ステップS309において、OS50は、複数のコア群のうち、割り当て済タスクが最も少ないコア群に属するコアにタスクを割り当てる。ステップS309の処理はステップS106の処理に相当する。ステップS309の処理を終えると、OS50は、処理をステップS301に移行する。   In step S309, the OS 50 assigns a task to a core belonging to the core group having the least assigned task among the plurality of core groups. The processing in step S309 corresponds to the processing in step S106. After finishing the process in step S309, the OS 50 moves the process to step S301.

ステップS310において、OS50は、コア101〜104のうち割り当て済みのタスクが最も少ないコアに対象タスクを割り当てる。ステップS310の処理はステップS107の処理に相当する。ステップS310の処理を終えると、OS50は、処理をステップS301に移行する。   In step S310, the OS 50 assigns the target task to the core having the least assigned task among the cores 101 to 104. The processing in step S310 corresponds to the processing in step S107. After finishing the process in step S310, the OS 50 shifts the processing to step S301.

変形例2においては、タスク間で共有されるデータのサイズがL1キャッシュのサイズ以下である場合には、これらのタスクは同じコアに割り当てられる。   In the second modification, when the size of data shared between tasks is equal to or smaller than the size of the L1 cache, these tasks are assigned to the same core.

4−3.変形例3
変形例1において、CPUのキャッシュメモリ構造を考慮せず、タスク間の関連性の種類に応じてタスクを割り当ててもよい。
4-3. Modification 3
In the first modification, the tasks may be allocated according to the type of association between the tasks without considering the cache memory structure of the CPU.

4−4.変形例4
図48は、変形例4に係る属性情報を例示する図である。この例では、属性情報において入力データの関連性と出力データの関連性とが区別されている。この図は、図8のタスク群801〜803における属性情報を示している。タスクAの出力データがタスクBの入力データとなっているので、タスクAの「出力」の項にタスクBが記録されている。同様に、タスクBの「入力」の項にタスクAが、「出力」の項にタスクCが記録されている。
4-4. Modification 4
FIG. 48 is a diagram illustrating attribute information according to the fourth modification. In this example, the relevance of input data and the relevance of output data are distinguished in the attribute information. This figure shows attribute information in the task groups 801 to 803 in FIG. Since the output data of task A is the input data of task B, task B is recorded in the “output” section of task A. Similarly, task A is recorded in the “input” section of task B, and task C is recorded in the “output” section.

このような属性情報を用いることにより、タスク間の関連性がより詳細に定義される。この場合、図7のフローは例えば以下のとおり改変される。ステップS103において、OS50は、割り当て済タスクの中に対象タスクと入力データの関連性を有するタスクがあるか判断する。図48のタスクBが対象タスクである場合、対象タスクは、割り当て済タスクAと入力データの関連性を有すると判断される。タスクAが対象タスクであった場合、割り当て済タスクにタスクBが含まれていても、対象タスクと入力データの関連性を有する割り当て済タスクは無いと判断される。割り当て済タスクの中に対象タスクと入力データの関連性を有するタスクがあると判断された場合(S103:YES)、OS50は、処理をステップS104に移行する。割り当て済タスクの中に対象タスクと入力データの関連性を有するタスクが無いと判断された場合(S103:NO)、OS50は、処理をステップS105に移行する。   By using such attribute information, the association between tasks is defined in more detail. In this case, the flow of FIG. 7 is modified as follows, for example. In step S103, the OS 50 determines whether there is a task having a relationship between the target task and the input data among the assigned tasks. When the task B in FIG. 48 is the target task, it is determined that the target task has a relationship between the assigned task A and the input data. When the task A is the target task, it is determined that there is no assigned task having a relationship between the target task and the input data even if the assigned task includes the task B. When it is determined that there is a task having a relationship between the target task and the input data among the assigned tasks (S103: YES), the OS 50 shifts the processing to Step S104. When it is determined that there is no task having a relationship between the target task and the input data among the assigned tasks (S103: NO), the OS 50 shifts the processing to step S105.

ステップS105において、OS50は、未割り当てのタスクの中に対象タスクと出力データの関連性を有するタスクがあるか判断する。図48のタスクBが対象タスクである場合、対象タスクは、未割り当てのタスクにタスクAが含まれていても、対象タスクと出力データの関連性を有するタスクは無いと判断される。タスクAが対象タスクであった場合、未割り当てのタスクBは対象タスクと出力データの関連性を有すると判断される。   In step S105, the OS 50 determines whether there is a task having a relationship between the target task and the output data among the unassigned tasks. When the task B in FIG. 48 is the target task, it is determined that there is no task having a relationship between the target task and the output data even if the task A is included in the unassigned task. If the task A is the target task, it is determined that the unassigned task B has a relationship between the target task and the output data.

4−5.変形例5
ステップS103等において対象タスクと割り当て済タスクとの関連性を判断する際に参照する属性情報は、記憶手段55に独立して記憶されているものに限定されない。「独立して記憶されている」とは、スケジュール情報等の他の情報とは別に記憶されていることをいう。スケジュール情報すなわち割り当て情報に、割り当て済タスクの属性情報を含めてもよい。具体的には以下のとおりである。
4-5. Modification 5
The attribute information referred to when determining the relevance between the target task and the assigned task in step S103 and the like is not limited to the information stored independently in the storage unit 55. "Independently stored" means stored separately from other information such as schedule information. The schedule information, that is, the assignment information, may include attribute information of the assigned task. The details are as follows.

スケジュール情報に記録されていない種類のタスクを新たにスケジュール情報に記録する際、OS50は、記憶手段55に独立して記憶されている属性情報を参照して、対象タスクの属性情報を、対象タスクと割り当て先コアとの関係とともに、スケジュール情報に追加する。   When a task of a type not recorded in the schedule information is newly recorded in the schedule information, the OS 50 refers to the attribute information independently stored in the storage unit 55, and stores the attribute information of the target task into the target task. And the relationship with the allocation destination core and the schedule information.

図49は、変形例5におけるスケジュール情報を例示する図である。この例では、コア101にタスクAが、コア102にタスクBおよびCが、コア103にタスクDが、コア104にタスクEが、それぞれ割り当て済である。スケジュール情報には、コアとタスクとの対応関係に加え、各タスクの属性情報が含まれている。例えば、タスクEの属性情報として、タスクDおよびFと関連性を有することが記録されている。なおこの例では、入力データの関連性と出力データの関連性とは区別されていない。   FIG. 49 is a diagram illustrating schedule information according to the fifth modification. In this example, a task A is assigned to the core 101, tasks B and C are assigned to the core 102, a task D is assigned to the core 103, and a task E is assigned to the core 104. The schedule information includes attribute information of each task in addition to the correspondence between the core and the task. For example, the attribute information of task E is recorded as having relevance to tasks D and F. In this example, the relevance of input data and the relevance of output data are not distinguished.

図49の状態でタスクFの割り当てを考える。OS50は、スケジュール情報を参照する。すると、タスクFは割り当て済のタスクEと関連性を有することが示されている。したがって、OS50は、対象タスクが割り当て済タスクと関連性を有すると判断する(S103:YES)。実施形態においては、ステップS103の判断を行うため、スケジュール情報に加え、それとは別個の属性情報にアクセスする必要があった。これに対し変形例5においては、OS50はスケジュール情報にアクセスするだけで判断を行う。   Consider the assignment of task F in the state of FIG. The OS 50 refers to the schedule information. Then, it is shown that the task F has a relationship with the assigned task E. Therefore, the OS 50 determines that the target task has a relationship with the assigned task (S103: YES). In the embodiment, in order to make the determination in step S103, it is necessary to access not only the schedule information but also the attribute information that is separate from the schedule information. On the other hand, in the fifth modification, the OS 50 makes the determination only by accessing the schedule information.

4−6.変形例6
図50は、変形例6におけるスケジュール情報を例示する図である。スケジュール情報は、変形例5で説明したように、割り当て済タスクの属性情報も含んでいる。入力データの関連性と出力データの関連性とは区別されていない。ここでは、初期化手段57の機能の詳細について説明する。
4-6. Modification 6
FIG. 50 is a diagram illustrating schedule information according to the sixth modification. As described in the fifth modification, the schedule information also includes attribute information of the assigned task. There is no distinction between input data relevance and output data relevance. Here, the details of the function of the initialization means 57 will be described.

いま、図50のようにタスクA1〜F1が割り当てられた状態で、これらのタスクが実行される前にタスクA2〜E2が発生した例を考える。まずタスクA2が対象タスクとなる。OS50は、スケジュール情報を参照し、割り当て済タスクの中に対象タスクと関連性を有するタスクが存在するか判断する。スケジュール情報にはタスクB1の属性情報として、タスクAと関連を有することが記録されている。したがって、OS50は、割り当て済タスクの中に対象タスク(タスクA2)と関連性を有するタスク(タスクB1)が存在すると判断する(S103:YES)。したがって、タスクA2はコア102に割り当てられ、以下、タスクB2〜E2もコア101/102に割り当てられる。   Now, consider an example in which tasks A2 to E2 occur before tasks are executed in a state where tasks A1 to F1 are allocated as shown in FIG. First, the task A2 is a target task. The OS 50 refers to the schedule information and determines whether there is a task related to the target task among the assigned tasks. In the schedule information, the attribute information of the task B1 is recorded as having an association with the task A. Therefore, the OS 50 determines that there is a task (task B1) related to the target task (task A2) among the assigned tasks (S103: YES). Therefore, task A2 is assigned to core 102, and tasks B2 to E2 are also assigned to cores 101/102.

しかし、例えば、タスクA1〜E1が第1ページの画像処理に関するものであり、タスクA2〜E2が第2ページの画像処理に関するものである場合、共有されるデータが無いことから、キャッシュヒット率の向上という観点ではタスクA1〜E1とタスクA2〜E2とを同じコア群に割り当てる意義は無い。ところが、図50のスケジュール情報を参照してタスクA2〜E2を割り当てようとすると、タスクA2の割り当てを決定する際に、タスクAとタスクBとの関連性に引きずられ、タスクA2はタスクB1が割り当てられているコア群に割り当てられてしまう。これは、タスク割り当ての偏りを生じさせる原因となる。   However, for example, when the tasks A1 to E1 are related to the image processing of the first page and the tasks A2 to E2 are related to the image processing of the second page, there is no data to be shared. From the viewpoint of improvement, it is meaningless to assign the tasks A1 to E1 and the tasks A2 to E2 to the same core group. However, if it is attempted to assign the tasks A2 to E2 with reference to the schedule information in FIG. 50, when determining the assignment of the task A2, the relevance between the tasks A and B is dragged, and the task A2 is It is assigned to the assigned core group. This causes a bias in task assignment.

変形例6において、OS50は、まず対象タスクが新たなページのタスクとなったときに、スケジュール情報に含まれている属性情報を、主記憶装置30上の記憶領域にコピーする。この例でタスクには処理の対象となるページを特定する情報が含まれており、OS50は、この情報を参照して対象タスクが新たなページのタスクとなったと判断する。   In the sixth modification, the OS 50 first copies the attribute information included in the schedule information to a storage area on the main storage device 30 when the target task becomes a task of a new page. In this example, the task includes information for specifying a page to be processed, and the OS 50 refers to this information to determine that the target task has become a task of a new page.

割り当て済タスクの属性情報をコピーすると、OS50は、スケジュール情報に記録されている属性情報のうち、消去フラグが「消去」を示しているものを消去すなわち初期化する。一連のパイプライン処理のうち2番目のタスク(この例ではタスクB)の属性情報のうち入力データを共有するタスク(この例ではタスクA)との関連性を示す情報の消去フラグが「消去」を示している。これ以外の属性情報の消去フラグは「消去」を示していない。   When the attribute information of the assigned task is copied, the OS 50 deletes, that is, initializes, of the attribute information recorded in the schedule information, the one whose deletion flag indicates “delete”. In the attribute information of the second task (task B in this example) of the series of pipeline processing, the deletion flag of the information indicating the relevance to the task (task A in this example) sharing the input data is “deletion”. Is shown. The erasure flags of the other attribute information do not indicate “delete”.

図51は、属性情報の一部が消去されたスケジュール情報を例示する図である。属性情報の消去を行った後で、OS50は、ステップS103の判断に進む。ここで、割り当て済タスクの属性情報には、タスクAとの関連性を示す情報は含まれていない(S103:NO)。したがって処理はステップS105に進む。未割り当てのタスクとの関連性を判断するときは、OS50は、スケジュール情報を参照する。あるいは、OS50は、コピーされた属性情報を参照してもよい。この例では、対象タスクは未割り当てのタスクと関連性を有すると判断される(S105:YES)ので、ステップS106において、OS50は、割り当て済タスクが最も少ないタスク群103/104に対象タスクを割り当てる。OS50は、対象タスクと割り当て先との対応関係に加え、コピーされた属性情報に含まれる関連性の情報を、スケジュール情報に書き込む。この例によれば前述の問題が解消され、より偏りの少ない割り当てが行われる。   FIG. 51 is a diagram illustrating schedule information in which part of the attribute information has been deleted. After erasing the attribute information, the OS 50 proceeds to the determination in step S103. Here, the attribute information of the assigned task does not include information indicating the relevance to task A (S103: NO). Therefore, the process proceeds to step S105. When determining the association with the unassigned task, the OS 50 refers to the schedule information. Alternatively, the OS 50 may refer to the copied attribute information. In this example, since the target task is determined to be related to the unallocated task (S105: YES), the OS 50 allocates the target task to the task group 103/104 having the least allocated tasks in step S106. . The OS 50 writes, in the schedule information, the association information included in the copied attribute information, in addition to the correspondence between the target task and the assignment destination. According to this example, the above-described problem is solved, and assignment with less bias is performed.

4−7.他の変形例
CPU10の構成は図5に例示したものに限定されない。コアの数やキャッシュメモリの階層構造はあくまで例示である。CPU10は、少なくとも、第1キャッシュメモリを共用する2つのコアと、第1キャッシュメモリと別の第2キャッシュメモリを用いる少なくとも1つのコアを有して入ればよい。第1キャッシュメモリが3つ以上のコアで共用されてもよい。また、CPU10は、L2キャッシュの下層にL3キャッシュを有していてもよい。
4-7. Other Modifications The configuration of the CPU 10 is not limited to the configuration illustrated in FIG. The number of cores and the hierarchical structure of the cache memory are merely examples. The CPU 10 may include at least two cores sharing the first cache memory and at least one core using the first cache memory and another second cache memory. The first cache memory may be shared by three or more cores. Further, the CPU 10 may have an L3 cache below the L2 cache.

また、CPU10は、物理的に1つのチップに複数のコアおよびキャッシュメモリを搭載したものに限定されない。複数のCPUチップで1つのキャッシュメモリを共用する情報処理装置に対し、本発明が適用されてもよい。   In addition, the CPU 10 is not limited to a physical chip in which a plurality of cores and a cache memory are mounted. The present invention may be applied to an information processing apparatus in which one cache memory is shared by a plurality of CPU chips.

さらに、実施形態における「複数のコア」は物理的に異なる複数のコアに限定されない。物理的に1つのコアが、時分割で論理的に(擬似的に)複数のコアとして用いられてもよい。   Further, the “plural cores” in the embodiments are not limited to a plurality of physically different cores. One physical core may be used as a plurality of cores logically (pseudo) in a time sharing manner.

本発明に係る情報処理装置は、図2に例示した画像形成装置1に限定されない。CPU10を用いて複数の処理を並列実行するものであれば、情報処理装置はどのような装置であってもよい。例えば、情報処理装置は、パーソナルコンピュータ、スマートフォン、またはタブレット端末であってもよい。   The information processing apparatus according to the present invention is not limited to the image forming apparatus 1 illustrated in FIG. The information processing device may be any device as long as a plurality of processes are executed in parallel using the CPU 10. For example, the information processing device may be a personal computer, a smartphone, or a tablet terminal.

情報処理装置のソフトウェア構成は図3に例示したものに限定されない。OSおよびアプリケーションによる機能の分担はあくまで例示である。情報処理装置は、処理を発生させるソフトウェアコンポーネント、および発生した処理を実行させるコアを決定するソフトウェアコンポーネントを有していればよい。   The software configuration of the information processing device is not limited to that illustrated in FIG. The sharing of functions by the OS and the application is merely an example. The information processing device only needs to have a software component that generates a process and a software component that determines a core that executes the generated process.

1…画像形成装置、10…CPU、20…メモリコントローラー、30…主記憶装置、40…IOコントローラー、41…補助記憶装置、42…画像読み取りユニット、43…画像形成ユニット、44…通信ユニット、50…OS、51…取得手段、52…取得手段、53…取得手段、54…取得手段、55…記憶手段、56…割り当て手段、57…初期化手段、58…検知手段、61〜63…アプリケーション、90…CPU、101〜104…コア、111〜114…キャッシュメモリ(L1)、121〜122…キャッシュメモリ(L2)、901〜904…コア、911〜914…キャッシュメモリ(L1)、921〜922…キャッシュメモリ(L2) DESCRIPTION OF SYMBOLS 1 ... Image forming apparatus, 10 ... CPU, 20 ... Memory controller, 30 ... Main storage device, 40 ... IO controller, 41 ... Auxiliary storage device, 42 ... Image reading unit, 43 ... Image forming unit, 44 ... Communication unit, 50 ... OS, 51 acquisition means, 52 acquisition means, 53 acquisition means, 54 acquisition means, 55 storage means, 56 assignment means, 57 initialization means, 58 detection means, 61 to 63 applications, 90 CPU, 101-104 core, 111-114 cache memory (L1), 121-122 cache memory (L2), 901-904 core, 911-914 cache memory (L1), 921-922 Cache memory (L2)

Claims (8)

複数のコアを有する制御手段と、
複数のタスクが各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、
複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、
新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段と
を有し、
前記属性情報は、前記関連性を表す情報として、前記複数のタスクにおける入力データまたは出力データの共通性を示す情報を含み、
前記属性情報においては、前記入力データの共通性と前記出力データの共通性とが互いに区別されている
情報処理装置。
Control means having a plurality of cores;
First acquisition means for acquiring assignment information indicating to which core a plurality of tasks are respectively assigned to the plurality of cores;
A second acquisition unit for acquiring attribute information indicating a relationship between a plurality of tasks;
When a new task occurs, the task related to the new task among the plurality of cores is referred to by referring to the assignment information acquired by the first acquisition means and the attribute information acquired by the second acquisition means. Assigning means for assigning the new task to the assigned core;
Has,
The attribute information, as the information indicating the association, includes information indicating commonality of input data or output data in the plurality of tasks,
In the attribute information, the commonality of the input data and the commonality of the output data are distinguished from each other.
複数のコアを有する制御手段と、
複数のタスクが各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、
複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、
新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段と
を有し、
前記属性情報は、前記関連性の重みを示す情報を含む
情報処理装置。
Control means having a plurality of cores;
First acquisition means for acquiring assignment information indicating to which core a plurality of tasks are respectively assigned to the plurality of cores;
A second acquisition unit for acquiring attribute information indicating a relationship between a plurality of tasks;
When a new task occurs, the task related to the new task among the plurality of cores is referred to by referring to the assignment information acquired by the first acquisition means and the attribute information acquired by the second acquisition means. Assigning means for assigning the new task to the assigned core;
Has,
The information processing device, wherein the attribute information includes information indicating a weight of the association.
複数のコアを有する制御手段と、
複数のタスクが各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、
複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、
新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段と
を有し、
前記制御手段は、前記複数のコアで共用されるキャッシュメモリを有し、
前記属性情報は、前記複数のタスクの各々における前記キャッシュメモリの使用量を含む
情報処理装置。
Control means having a plurality of cores;
First acquisition means for acquiring assignment information indicating to which core a plurality of tasks are respectively assigned to the plurality of cores;
A second acquisition unit for acquiring attribute information indicating a relationship between a plurality of tasks;
When a new task occurs, the task related to the new task among the plurality of cores is referred to by referring to the assignment information acquired by the first acquisition means and the attribute information acquired by the second acquisition means. Assigning means for assigning the new task to the assigned core;
Has,
The control means has a cache memory shared by the plurality of cores,
The information processing device, wherein the attribute information includes a usage amount of the cache memory in each of the plurality of tasks.
複数のコアを有する制御手段と、
複数のタスクが各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、
複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、
新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段と、
前記制御手段のハードウェア構成を示す構成情報を取得する第4取得手段
を有し、
前記割り当て手段は、前記割り当て情報および前記属性情報に加え、前記第4取得手段により取得された構成情報を参照して、前記新たなタスクを割り当てる
情報処理装置。
Control means having a plurality of cores;
First acquisition means for acquiring assignment information indicating to which core a plurality of tasks are respectively assigned to the plurality of cores;
A second acquisition unit for acquiring attribute information indicating a relationship between a plurality of tasks;
When a new task occurs, the task related to the new task among the plurality of cores is referred to by referring to the assignment information acquired by the first acquisition means and the attribute information acquired by the second acquisition means. Assigning means for assigning the new task to the assigned core;
A fourth obtaining means for obtaining configuration information showing a hardware configuration of the control means,
The information processing apparatus, wherein the assigning unit assigns the new task by referring to the configuration information acquired by the fourth acquiring unit, in addition to the assignment information and the attribute information.
複数のコアを有する制御手段と、
複数のタスクが各々前記複数のコアのうちどのコアに割り当てられたか示す割り当て情報を取得する第1取得手段と、
複数のタスク間の関連性を表す属性情報を取得する第2取得手段と、
新たなタスクが発生した場合、前記第1取得手段により取得された割り当て情報および前記第2取得手段により取得された属性情報を参照し、前記複数のコアのうち当該新たなタスクと関連するタスクが割り当てられているコアに、当該新たなタスクを割り当てる割り当て手段と
を有し、
前記複数のタスクは、ある単位で繰り返される画像処理を含み、
新たな単位分の画像処理に関するタスクの割り当てを決定する際、前記複数のコアに割り当て済みのタスクに関する前記属性情報のうち当該完了した画像処理に関する情報を初期化する初期化手段を有する
情報処理装置。
Control means having a plurality of cores;
First acquisition means for acquiring assignment information indicating to which core a plurality of tasks are respectively assigned to the plurality of cores;
A second acquisition unit for acquiring attribute information indicating a relationship between a plurality of tasks;
When a new task occurs, the task related to the new task among the plurality of cores is referred to by referring to the assignment information acquired by the first acquisition means and the attribute information acquired by the second acquisition means. Assigning means for assigning the new task to the assigned core;
Has,
The plurality of tasks include image processing repeated in a certain unit,
An information processing apparatus, comprising: an initialization unit configured to initialize information regarding the completed image processing among the attribute information regarding the tasks allocated to the plurality of cores when determining the assignment of the task regarding the image processing for the new unit. .
前記複数のタスクを実行するためのプログラムコードをコンパイルするコンパイル手段を有し、
前記コンパイル手段は、前記複数のタスクのうち一のタスクを実行するためのプログラムコードをコンパイルする際、当該一のタスクの前記属性情報を生成する
ことを特徴とする請求項1ないし5のいずれか一項に記載の情報処理装置。
Compiling means for compiling program code for executing the plurality of tasks,
The compile means, when compiling a program code for executing one of the plurality of tasks, generates the attribute information of the one task. 6. An information processing device according to claim 1.
前記複数のタスクの優先度を示す優先度情報を取得する第3取得手段を有し、
前記割り当て手段は、まだ前記複数のコアに割り当てられていないタスクのうち割り当ての対象となるタスクを、前記第3取得手段により取得された優先度情報に応じて選択する
ことを特徴とする請求項1ないし6のいずれか一項に記載の情報処理装置。
A third obtaining unit configured to obtain priority information indicating a priority of the plurality of tasks,
The assignment unit selects a task to be assigned among tasks that have not been assigned to the plurality of cores, according to the priority information acquired by the third acquisition unit. The information processing device according to any one of claims 1 to 6.
請求項1ないし7のいずれか一項に記載の情報処理装置と、
前記複数のコアに割り当てられたタスクにより出力されたデータに応じて画像を形成する画像形成手段と
を有する画像形成装置。
An information processing apparatus according to any one of claims 1 to 7,
And an image forming unit that forms an image in accordance with data output by a task assigned to the plurality of cores.
JP2015187932A 2015-09-25 2015-09-25 Information processing apparatus and image forming apparatus Active JP6631124B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015187932A JP6631124B2 (en) 2015-09-25 2015-09-25 Information processing apparatus and image forming apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015187932A JP6631124B2 (en) 2015-09-25 2015-09-25 Information processing apparatus and image forming apparatus

Publications (2)

Publication Number Publication Date
JP2017062666A JP2017062666A (en) 2017-03-30
JP6631124B2 true JP6631124B2 (en) 2020-01-15

Family

ID=58430127

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015187932A Active JP6631124B2 (en) 2015-09-25 2015-09-25 Information processing apparatus and image forming apparatus

Country Status (1)

Country Link
JP (1) JP6631124B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11644834B2 (en) * 2017-11-10 2023-05-09 Nvidia Corporation Systems and methods for safe and reliable autonomous vehicles
JP2021043654A (en) 2019-09-10 2021-03-18 富士通株式会社 Information processing device and process arrangement determination program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009053829A (en) * 2007-08-24 2009-03-12 Fuji Xerox Co Ltd Information processor and information processing program
JP2009069921A (en) * 2007-09-11 2009-04-02 Hitachi Ltd Multiprocessor system

Also Published As

Publication number Publication date
JP2017062666A (en) 2017-03-30

Similar Documents

Publication Publication Date Title
US20230196502A1 (en) Dynamic kernel memory space allocation
JP2008140046A (en) Image processor, image processing program
JP5121896B2 (en) Multi-core processor system and multi-core processor
KR20200052558A (en) Computing system and method for operating computing system
US7911639B2 (en) Image forming device
JP6631124B2 (en) Information processing apparatus and image forming apparatus
JP2007188523A (en) Task execution method and multiprocessor system
JP5832556B2 (en) Image processing apparatus and image forming apparatus
US20120066470A1 (en) Method and system for allocating memory to a pipeline
JP2016001469A (en) Image processing method and image processing apparatus
US10048953B2 (en) Compiler program, compiling method, and compiling device
JP5158576B2 (en) I / O control system, I / O control method, and I / O control program
EP2808798B1 (en) Memory management apparatus and process for moving, expanding or writing of a virtual area
JPH10289066A (en) Image processor and its method
US8060680B2 (en) Method of allocating memory
JP5419134B2 (en) Vector processor and vector instruction issuing method
JP6372315B2 (en) Image processing apparatus, parallel processing control program, and parallel processing control method
JPWO2014027444A1 (en) Scheduling apparatus and scheduling method
JP6551069B2 (en) INFORMATION PROCESSING APPARATUS AND IMAGE FORMING APPARATUS
JP5589582B2 (en) Image processing apparatus and program
JP2017058738A (en) Information processing apparatus and image forming apparatus
JP4727480B2 (en) Information processing method, information processing system, information processing apparatus, multiprocessor, information processing program, and computer-readable storage medium storing information processing program
JP7080698B2 (en) Information processing equipment
JP2009053829A (en) Information processor and information processing program
JP2012060562A (en) Image formation device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180831

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190531

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190611

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190809

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: 20191112

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191125

R150 Certificate of patent or registration of utility model

Ref document number: 6631124

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350