JP6774147B2 - Control device - Google Patents

Control device Download PDF

Info

Publication number
JP6774147B2
JP6774147B2 JP2016252912A JP2016252912A JP6774147B2 JP 6774147 B2 JP6774147 B2 JP 6774147B2 JP 2016252912 A JP2016252912 A JP 2016252912A JP 2016252912 A JP2016252912 A JP 2016252912A JP 6774147 B2 JP6774147 B2 JP 6774147B2
Authority
JP
Japan
Prior art keywords
task
control device
synchronization mechanism
unit
synchronization
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
JP2016252912A
Other languages
Japanese (ja)
Other versions
JP2018106472A (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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2016252912A priority Critical patent/JP6774147B2/en
Priority to PCT/JP2017/045437 priority patent/WO2018123707A1/en
Publication of JP2018106472A publication Critical patent/JP2018106472A/en
Application granted granted Critical
Publication of JP6774147B2 publication Critical patent/JP6774147B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Description

本発明は、制御装置に関する。 The present invention relates to a control device.

車載制御装置などの電子制御装置には、マルチプロセッサが採用されている。また1つのプロセッサに複数のプロセッサコア(以下「コア」)を持つマルチコア構成が取られている。OS(Operating System)の制御により並行動作する処理(プロセス、タスク、スレッドなど)や、プロセッサコア間で並列動作する処理の間では、同期が必要とされる場合がある。同期のために掛かる処理のオーバーヘッドは小さい方が好ましい。 Multiprocessors are used in electronic control devices such as in-vehicle control devices. Further, a multi-core configuration having a plurality of processor cores (hereinafter referred to as "cores") in one processor is adopted. Synchronization may be required between processes that operate in parallel under the control of the OS (Operating System) (processes, tasks, threads, etc.) and processes that operate in parallel between processor cores. It is preferable that the processing overhead required for synchronization is small.

OSの種類には、SMP(Symmetric Multiprocesing)とAMP(Asymmetric Multiprocessing)とがある。SMPでは、1つのOSが複数のプロセッサコアを扱い、実行状態に移される処理は空いているコアで実行される。つまり処理を実行するコアは動的に選択される。これに対しAMPでは、処理が実行されるコアは事前に決定されており、静的に選択される。SMP OSはコア間で処理負荷の平準化を図ることができ、AMP OSはリアルタイム性が確保しやすい、などの特徴がそれぞれある。 Types of OS include SMP (Symmetric Multiprocessing) and AMP (Asymmetry Multiprocessing). In SMP, one OS handles a plurality of processor cores, and the process of being transferred to the execution state is executed by an empty core. That is, the core that executes the process is dynamically selected. On the other hand, in AMP, the core to be processed is determined in advance and is statically selected. The SMP OS can level the processing load between cores, and the AMP OS has features such as easy real-time performance.

一方、マルチコアプロセッサを用いたシステムでは、稼働するコアを動的に変更する場合がある。例えば消費電力低減のために、実行する処理が少ない制御モードでは、いくつかのコアを休止し、残りのコアだけで動作を継続する。この場合、AMP OSでは、コアへの処理の再配置が生じる。 On the other hand, in a system using a multi-core processor, the operating core may be dynamically changed. For example, in order to reduce power consumption, in a control mode in which less processing is executed, some cores are paused and only the remaining cores continue to operate. In this case, in the AMP OS, the processing is relocated to the core.

コアへの処理配置が変わるときのように、処理の動作状況に変化があるときには、同期が必要な処理について、適切な同期機構を選択し直す余地が生じる。 When there is a change in the operating status of processing, such as when the processing arrangement on the core changes, there is room to reselect an appropriate synchronization mechanism for processing that requires synchronization.

特許文献1では、スレッドの状態や属性に応じて、同期機構を選択している。具体的には、スレッド間で通信などを行い密接に連携して動作するスレッドは「密結合スレッドグループ」に属し、バッファを用いてデータ交換するスレッドは「疎結合スレッドグループ」に属すとして、密結合スレッドグループのスレッドはハードウェアなどによる高速な同期機構を、疎結合スレッドグループのスレッドはOSのサービスなどによる低速な同期機構を使う、としている。 In Patent Document 1, the synchronization mechanism is selected according to the thread state and attributes. Specifically, threads that communicate with each other and operate in close cooperation belong to a "tightly coupled thread group", and threads that exchange data using a buffer belong to a "loosely coupled thread group". The threads of the combined thread group use a high-speed synchronization mechanism by hardware, etc., and the threads of the loosely-coupled thread group use a low-speed synchronization mechanism by OS services, etc.

特許文献2では、スレッドの動作数とスレッドが動作しているコアの数に応じて、バリア同期の方式を選択する方法を開示している。スレッド数≦コア数のときには、ビジーウェイト方式のバリア同期を、またスレッド数>コア数のときには、サスペンド・リジューム方式のバリア同期を選択する。ビジーウェイト方式の長所は待ち時間が小さいことであるが、プロセッサ負荷が発生し、並列動作している他スレッドの動作を妨げる恐れのある点が短所である。これに対し、スレッド数≦コア数のときにはコアごとに動作するスレッド数は1つ以下であり、ビジーウェイトを行っても他スレッドの動作を妨げることがないので、ビジーウェイト方式の短所の影響を受けずに用いることができる。 Patent Document 2 discloses a method of selecting a barrier synchronization method according to the number of thread operations and the number of cores in which threads are operating. When the number of threads ≤ the number of cores, the busy wait method barrier synchronization is selected, and when the number of threads> the number of cores, the suspend / resume method barrier synchronization is selected. The advantage of the busy waiting method is that the waiting time is small, but the disadvantage is that it causes a processor load and may interfere with the operation of other threads operating in parallel. On the other hand, when the number of threads ≤ the number of cores, the number of threads operating for each core is one or less, and even if busy waiting is performed, the operation of other threads is not hindered, so that the disadvantage of the busy waiting method is affected. It can be used without receiving it.

特開2005-100264号公報Japanese Patent Application Laid-Open No. 2005-100264 特開2016-062388号公報JP-A-2016-062388

特許文献1では、OSはSMPであり、スレッドが実行されるプロセッサコアは動的に選択される想定となっている。このため、同期が必要なスレッドのプロセッサコアへの配置状況は時点により異なる。このような動作条件では、スレッドが動作するコアによらずに同期を実現できる機構を利用する必要がある。これに対しAMP OSのように、処理の動作するコアが静的に決定されている場合、その情報を利用すれば、処理の動作状況によっては、オーバーヘッドがより小さい同期機構を利用できる可能性がある。 In Patent Document 1, it is assumed that the OS is SMP and the processor core on which the thread is executed is dynamically selected. Therefore, the placement status of threads that require synchronization on the processor core differs from time to time. Under such operating conditions, it is necessary to use a mechanism that can realize synchronization regardless of the core in which the thread operates. On the other hand, when the core on which the processing operates is statically determined, such as the AMP OS, if that information is used, there is a possibility that a synchronization mechanism with a smaller overhead can be used depending on the operating status of the processing. is there.

特許文献2は、スレッドの動作数とスレッドが動作しているコアの数に応じて適切な同期方式を選択することができるが、対象となる同期機構がバリア同期に限定されている。スレッド(またはプロセスやタスク)やコアの動作状況に応じて選択する同期機構の対象をバリア同期以外にも広げれば、処理性能や消費電力などの点で改善を期待できる。しかしこの場合、同期機構の選択方法を明らかにしなければならない。 In Patent Document 2, an appropriate synchronization method can be selected according to the number of thread operations and the number of cores in which threads are operating, but the target synchronization mechanism is limited to barrier synchronization. If the target of the synchronization mechanism to be selected according to the operating status of threads (or processes or tasks) and cores is expanded to other than barrier synchronization, improvement in processing performance and power consumption can be expected. However, in this case, it is necessary to clarify how to select the synchronization mechanism.

本発明の目的は、複数の処理の配置状況に応じて、複数種類の同期機構のいずれかを用いて同期を行う又は同期機構を使用しないことを切り替えることができる制御装置を提供することにある。 An object of the present invention is to provide a control device capable of performing synchronization using any of a plurality of types of synchronization mechanisms or switching between not using the synchronization mechanism, depending on the arrangement status of a plurality of processes. ..

上記目的を達成するために、本発明は、複数のプロセッサと、前記複数のプロセッサへの複数の処理の配置状況を検出する検出部と、前記複数の処理の間の同期をとる複数種類の同期機構と、前記配置状況と、前記同期機構を使用する第1処理又は前記同期機構を使用しない第2処理を示す識別子と、を対応づけて記憶するメモリと、前記検出部によって検出された前記配置状況に対応する前記識別子が示す前記第1処理又は前記第2処理を実行する実行部と、を備える。 In order to achieve the above object, the present invention has a plurality of processors, a detection unit that detects the arrangement status of the plurality of processes on the plurality of processors, and a plurality of types of synchronization for synchronizing between the plurality of processes. A memory that stores the mechanism, the arrangement status, and an identifier indicating the first process that uses the synchronization mechanism or the second process that does not use the synchronization mechanism in association with each other, and the arrangement detected by the detection unit. It includes an execution unit that executes the first process or the second process indicated by the identifier corresponding to the situation.

本発明によれば、複数の処理の配置状況に応じて、複数種類の同期機構のいずれかを用いて同期を行う又は同期機構を使用しないことを切り替えることができる。上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。 According to the present invention, it is possible to switch between performing synchronization using any of a plurality of types of synchronization mechanisms or not using the synchronization mechanism, depending on the arrangement status of the plurality of processes. Issues, configurations and effects other than those described above will be clarified by the description of the following embodiments.

本発明の第1の実施形態によるコントローラを含むシステムのハードウェア構成を示す図である。It is a figure which shows the hardware composition of the system including the controller by 1st Embodiment of this invention. タスクの構成を示す図である。It is a figure which shows the structure of a task. 本発明の第1の実施形態によるコントローラの機能構成を示す図である。It is a figure which shows the functional structure of the controller by 1st Embodiment of this invention. 同期機構選択部の処理フローを示す図である。It is a figure which shows the processing flow of the synchronization mechanism selection part. 同期機構選択ルールの構成を示す図である。It is a figure which shows the structure of the synchronization mechanism selection rule. 処理ルーチン選択ルールの構成を示す図である。It is a figure which shows the structure of the processing routine selection rule. タスクのコアへの配置(通常モード)を示す図である。It is a figure which shows the arrangement (normal mode) of a task to the core. タスクの動作(通常モード)を示す図である。It is a figure which shows the operation (normal mode) of a task. タスクのコアへの配置(低消費電力1モード)を示す図である。It is a figure which shows the arrangement (low power consumption 1 mode) to the core of a task. タスクの動作(低消費電力1モード)を示す図である。It is a figure which shows the operation of a task (low power consumption 1 mode). タスクのコアへの配置(低消費電力2モード)を示す図である。It is a figure which shows the arrangement (low power consumption 2 mode) in the core of a task. タスクの動作(低消費電力2モード)を示す図である。It is a figure which shows the operation of a task (low power consumption 2 mode). 本発明の第2の実施形態によるコントローラに含まれるデータ授受部及びデータアクセス制御部の動作を説明するための図である。It is a figure for demonstrating the operation of the data transfer part and the data access control part included in the controller by 2nd Embodiment of this invention.

以下、図面を用いて、本発明の第1〜第2の実施形態によるコントローラ(制御装置)の構成及び動作について説明する。なお、各図において、同一符号は同一部分を示す。 Hereinafter, the configuration and operation of the controller (control device) according to the first to second embodiments of the present invention will be described with reference to the drawings. In each figure, the same reference numerals indicate the same parts.

(第1の実施形態)
図1は本発明を適用した制御システムのハードウェア構成例を示している。コントローラ101はセンサ102、アクチュエータ103と接続しており、センサ102から得られる情報を入力として、アクチュエータ103に制御信号を出力している。センサ102の例としてホール素子、アクチュエータ103の例としてブラシレスDCモータがある。センサ102やアクチュエータ103はそれぞれ複数あってもよい。
(First Embodiment)
FIG. 1 shows a hardware configuration example of a control system to which the present invention is applied. The controller 101 is connected to the sensor 102 and the actuator 103, and outputs a control signal to the actuator 103 by inputting the information obtained from the sensor 102. An example of the sensor 102 is a Hall element, and an example of an actuator 103 is a brushless DC motor. There may be a plurality of sensors 102 and actuators 103, respectively.

コントローラ101内において、センサ102は入力回路111と、アクチュエータ103は出力回路112に接続され、さらに入力回路111と出力回路112はマイクロコンピュータ110の入出力回路130(IO)と接続されている。マイクロコンピュータ110には4つのプロセッサコア121〜124(複数のプロセッサ)、RAM140(Random Access Memory)、ROM150(Read Only Memory)、不揮発メモリ160(NVRAM)を備え、入出力回路130も含めて、これらの回路はバスで接続されている。またコントローラ101は電源回路113を有する。 In the controller 101, the sensor 102 is connected to the input circuit 111, the actuator 103 is connected to the output circuit 112, and the input circuit 111 and the output circuit 112 are connected to the input / output circuit 130 (IO) of the microcomputer 110. The microcomputer 110 includes four processor cores 121 to 124 (plural processors), a RAM 140 (Random Access Memory), a ROM 150 (Read Only Memory), and a non-volatile memory 160 (NVRAM), including the input / output circuit 130. The circuit is connected by a bus. The controller 101 also has a power supply circuit 113.

以下では、図1のシステムにおけるソフトウェア構成例を説明する。コア121〜124(PC1〜PC4)にはそれぞれAMP OSが配置されている。OSのタスクは初期状態として、タスクA〜Eの5つが用意されている。タスクA〜Cが制御に直接関係し、タスクD,Eは制御に直接関係しない診断などの処理である。これらのタスクはOSにより周期的に実行されている。また、タスクA〜EにはそれぞれタスクIDとして16進数表現で0x10〜0x14が付与されている。 The software configuration example in the system of FIG. 1 will be described below. The AMP OS is arranged in each of the cores 121 to 124 (PC1 to PC4). As the initial state of the OS task, five tasks A to E are prepared. Tasks A to C are directly related to control, and tasks D and E are processes such as diagnosis that are not directly related to control. These tasks are periodically executed by the OS. Further, each of the tasks A to E is assigned 0x10 to 0x14 as a task ID in hexadecimal notation.

図2はタスクA〜Cの構成を示している。タスクAはサブタスクa1(関数で構成される)とa2を、タスクBはサブタスクbを、タスクCはサブタスクcを実行する。制御の処理の流れは、サブタスクa1、b、cがセンサ102から信号を取得して入力とし、入力に対して中間データd1、d2、d3をそれぞれ生成し、その後でサブタスクa2が中間データd1〜d3を入力として、制御信号を計算し、その信号をアクチュエータ103に出力する。 FIG. 2 shows the configuration of tasks A to C. Task A executes subtasks a1 (composed of functions) and a2, task B executes subtask b, and task C executes subtask c. In the flow of control processing, subtasks a1, b, and c acquire signals from the sensor 102 and use them as inputs, generate intermediate data d1, d2, and d3 for each input, and then subtasks a2 generate intermediate data d1 to. A control signal is calculated with d3 as an input, and the signal is output to the actuator 103.

図3は本発明を適用した制御システムの機能構成、および機能間の信号やデータの流れを示している。各機能はソフトウェアプログラムにより実現される。これらソフトウェアプログラムはマイクロコンピュータ110にて、ROM150に格納され、RAM140を一時記憶として利用し、コア121〜124上で動作し、データの記録・読出しを不揮発メモリ160に対して行う。 FIG. 3 shows the functional configuration of the control system to which the present invention is applied, and the flow of signals and data between the functions. Each function is realized by a software program. These software programs are stored in the ROM 150 by the microcomputer 110, use the RAM 140 as a temporary storage, operate on the cores 121 to 124, and record / read data to the non-volatile memory 160.

動作単位制御部31は、OSのタスクとして実行する処理を規定し、各タスクを実行するコアを選択して、タスクを配置する。動作状況管理部32は、動作単位制御部31からタスクのコアへの配置情報(タスク配置情報P_task)を取得する。また、動作状況管理部32は、各コアの動作情報O_coreや各タスクの動作情報O_taskをマイクロコンピュータ110やOSから取得する。 The operation unit control unit 31 defines a process to be executed as an OS task, selects a core to execute each task, and arranges the task. The operation status management unit 32 acquires the arrangement information (task arrangement information P_task) from the operation unit control unit 31 to the core of the task. Further, the operation status management unit 32 acquires the operation information O_core of each core and the operation information O_task of each task from the microcomputer 110 and the OS.

換言すれば、動作状況管理部32(検出部)は、コア121〜124(複数のプロセッサ)への複数のタスク(処理)の配置状況を検出する。 In other words, the operation status management unit 32 (detection unit) detects the arrangement status of a plurality of tasks (processes) in the cores 121 to 124 (plurality of processors).

同期機構利用部33(33−1〜33−n)は、各タスクにおいて同期が必要な点に配置されており、同期を取る複数の同期機構利用部33には共通のID(以下「同期ID」)が付与されている。同期機構利用部33は同期ID(ID_sync)とタスクID(ID_task)をパラメータ値として、同期機構選択部34を呼び出す。 The synchronization mechanism utilization unit 33 (33-1 to 33-n) is arranged at a point where synchronization is required in each task, and a common ID (hereinafter, “synchronization ID”) is shared by a plurality of synchronization mechanism utilization units 33 that synchronize. ") Is given. The synchronization mechanism utilization unit 33 calls the synchronization mechanism selection unit 34 with the synchronization ID (ID_sync) and the task ID (ID_task) as parameter values.

同期機構選択部34は、動作状況管理部32から各タスクのコアへの配置情報(タスク配置情報P_task:どのコアに配置されているか、または配置されていないか)、および各タスクの動作情報O_task(例えばOSが示す動作モードとして、動作中、待機中、実行待ち、実行可能のいずれか)を取得する。各コアの動作情報O_core(例えば動作中、休止中のいずれか)を、タスクの動作情報O_taskとは別に取得してもよい。以降では動作状況管理部32から取得されるこれらの情報をまとめて「タスク配置動作情報」と呼ぶ。同期機構選択部34は同期機構利用部33からの呼び出しを受けて、タスク配置動作情報をもとに、同期ID(ID_sync)に対応して適切な同期機構を同期機構35(35−1〜35−m)から選択し、実行する。この選択には、後述の「同期機構選択ルール」や「処理ルーチン選択ルール」を用いる。 The synchronization mechanism selection unit 34 is arranged from the operation status management unit 32 to the core of each task (task arrangement information P_task: which core is arranged or not arranged), and the operation information O_task of each task. (For example, as the operation mode indicated by the OS, one of operating, waiting, waiting for execution, and executable) is acquired. The operation information O_core of each core (for example, either in operation or in hibernation) may be acquired separately from the operation information O_task of the task. Hereinafter, these pieces of information acquired from the operation status management unit 32 are collectively referred to as "task arrangement operation information". The synchronization mechanism selection unit 34 receives a call from the synchronization mechanism utilization unit 33, and based on the task arrangement operation information, sets an appropriate synchronization mechanism corresponding to the synchronization ID (ID_sync) to the synchronization mechanism 35 (35-1 to 35). Select from −m) and execute. For this selection, the "synchronization mechanism selection rule" and "processing routine selection rule" described later are used.

換言すれば、複数種類の同期機構35(35−1〜35−m)は、複数のタスク(処理)の間の同期をとる。実行部40は、動作状況管理部32(検出部)によって取得(検出)された複数のタスク(処理)の配置状況に対応する識別子が示す第1処理又は第2処理を実行する。ここで、識別子は、同期機構35を使用する第1処理又は同期機構35を使用しない第2処理を示す。識別子の詳細については、図5Aを用いて、後述する。 In other words, the plurality of types of synchronization mechanisms 35 (35-1 to 35-m) synchronize between a plurality of tasks (processes). The execution unit 40 executes the first process or the second process indicated by the identifier corresponding to the arrangement status of the plurality of tasks (processes) acquired (detected) by the operation status management unit 32 (detection unit). Here, the identifier indicates a first process that uses the synchronization mechanism 35 or a second process that does not use the synchronization mechanism 35. The details of the identifier will be described later with reference to FIG. 5A.

なお、実行部40は、コア121〜124の少なくとも1つが所定のプログラムを実行することにより実現される。本実施形態では、実行部40は、同期機構利用部33、同期機構選択部34、データ授受部36、データアクセス制御部37から構成されるが、後述する「同期機構選択ルール」や「処理ルーチン選択ルール」に応じて、その構成要素を削除、変更してもよい。 The execution unit 40 is realized by at least one of the cores 121 to 124 executing a predetermined program. In the present embodiment, the execution unit 40 is composed of a synchronization mechanism utilization unit 33, a synchronization mechanism selection unit 34, a data transfer unit 36, and a data access control unit 37, and the "synchronization mechanism selection rule" and "processing routine" described later. The component may be deleted or changed according to the "selection rule".

図2のタスクA〜Cには同期機構利用部33−1〜33−3が配置されており、33−1がサブタスクa1の最後に、33−2がbの最後に、33−3がcの最後に配置されている。また同期機構利用部31−1〜31−3には、共通の同期IDとして16進数表現で0x01が付与されている。 The synchronization mechanism utilization units 33-1 to 33-3 are arranged in tasks A to C in FIG. 2, with 33-1 at the end of subtask a1, 33-2 at the end of b, and 33-3 at the end of c. It is placed at the end of. Further, 0x01 is assigned in hexadecimal notation as a common synchronization ID to the synchronization mechanism utilization units 31 to 1-31-3.

データ授受部36(36−1〜36−k)は、同期を取るタスクに配置されている。データ授受部36はデータアクセス制御部37に対し、データのIDを指定してデータの読み書きを行う。データアクセス制御部37はRAM140上に設けられたデータバッファに対してデータの読み書きを行う。その際、データアクセス制御部37は、動作状況管理部32からのタスク配置動作情報に基づき、読み書き位置の制御を行う。データ授受部36がデータアクセス制御部37を介してデータの読み書きを行うことで、同期を取るタスク間でのデータの受け渡しがなされる。 The data transfer unit 36 (36-1 to 36-k) is assigned to the task to be synchronized. The data transfer unit 36 specifies a data ID to the data access control unit 37 to read / write data. The data access control unit 37 reads and writes data to and from the data buffer provided on the RAM 140. At that time, the data access control unit 37 controls the read / write position based on the task arrangement operation information from the operation status management unit 32. When the data transfer unit 36 reads and writes data via the data access control unit 37, data is exchanged between tasks to be synchronized.

図4は同期機構選択部34が同期機構利用部33の呼び出しに応じて実行する処理のフローである。処理を開始後、ステップ41にて、タスク配置動作情報を取得する。次にステップ42にて、タスク配置動作情報から、同期機構選択ルールに基づき、利用する同期機構35の種類を選択する。詳細については、図5Aを用いて、後述する。 FIG. 4 is a flow of processing executed by the synchronization mechanism selection unit 34 in response to a call from the synchronization mechanism utilization unit 33. After starting the process, the task placement operation information is acquired in step 41. Next, in step 42, the type of synchronization mechanism 35 to be used is selected from the task arrangement operation information based on the synchronization mechanism selection rule. Details will be described later with reference to FIG. 5A.

次にステップ43にて、同期機構利用部33の同期IDから、ステップ42で選択された同期機構35の種類に対応した同期オブジェクトを選択する。また、選択された同期機構35の種類から、処理ルーチン選択ルールに基づき、同期オブジェクトを利用する処理ルーチンも選択する。同期機構35の種類によっては、タスクIDごとに同期オブジェクトの利用方法が異なる。その場合には、同期IDおよびタスクIDに対応する処理ルーチンも選択する。同期オブジェクトと処理ルーチンとを合わせて、同期機構35である。詳細については、詳細については、図5Bを用いて、後述する。 Next, in step 43, a synchronization object corresponding to the type of synchronization mechanism 35 selected in step 42 is selected from the synchronization ID of the synchronization mechanism utilization unit 33. Further, from the selected synchronization mechanism 35 types, a processing routine that uses a synchronization object is also selected based on the processing routine selection rule. Depending on the type of synchronization mechanism 35, the method of using the synchronization object differs for each task ID. In that case, the processing routine corresponding to the synchronization ID and the task ID is also selected. The synchronization mechanism 35 is a combination of the synchronization object and the processing routine. The details will be described later with reference to FIG. 5B.

次にステップ44にて、ステップ43で選択した同期機構35の同期オブジェクトと、処理ルーチンを用いて同期処理を実行する。以上で処理を終了する。 Next, in step 44, synchronization processing is executed using the synchronization object of the synchronization mechanism 35 selected in step 43 and the processing routine. This completes the process.

図5Aの同期機構選択ルール50は、同期機構選択ルールの例を表形式で示したものである。同期機構選択ルール50の各行が1つのルールに対応している。列の項目には「制御モード」「コア1」「コア2」「同期機構」がある。「制御モード」はシステムの制御モードである。ここでは、制御モードがタスク配置動作情報と関連している、つまり制御モードに対してタスクのコアへの配置や、タスクの動作有無が静的に決定されている。 The synchronization mechanism selection rule 50 of FIG. 5A shows an example of the synchronization mechanism selection rule in a tabular format. Each line of the synchronization mechanism selection rule 50 corresponds to one rule. The items in the column include "control mode", "core 1", "core 2", and "synchronization mechanism". The "control mode" is the control mode of the system. Here, the control mode is related to the task placement operation information, that is, the placement of the task in the core and the presence / absence of the task operation are statically determined with respect to the control mode.

換言すれば、動作状況管理部32(検出部)は、コントローラ101(制御装置)の消費電力(通常、低消費電力1、低消費電力2)を示す制御モードを検出する。同期機構選択ルール50は、制御モードと、配置状況と、を対応づけて記憶する。動作単位制御部31は、動作状況管理部32によって検出される制御モードに対応する配置状況に基づいて、複数のタスク(処理)をコア121〜124(複数のプロセッサ)へ配置する。これにより、制御モードに応じて、複数のタスクが静的にコア121〜124へ配置される。 In other words, the operation status management unit 32 (detection unit) detects a control mode indicating the power consumption (usually low power consumption 1, low power consumption 2) of the controller 101 (control device). The synchronization mechanism selection rule 50 stores the control mode and the arrangement status in association with each other. The operation unit control unit 31 arranges a plurality of tasks (processes) in the cores 121 to 124 (plurality of processors) based on the arrangement state corresponding to the control mode detected by the operation state management unit 32. As a result, a plurality of tasks are statically arranged in the cores 121 to 124 according to the control mode.

なお、同期機構選択ルール50は、例えば、ROM150、不揮発メモリ160等のメモリに記憶される。動作状況管理部32(検出部)は、上位システムに現在の制御モードを問い合わせてもよいし、上位システム等によって所定のメモリに記憶された現在の制御モードを読み出してもよい。 The synchronization mechanism selection rule 50 is stored in, for example, a memory such as a ROM 150 or a non-volatile memory 160. The operation status management unit 32 (detection unit) may inquire of the host system about the current control mode, or may read the current control mode stored in a predetermined memory by the host system or the like.

「コア1」「コア2」は各コアで動作しているタスク、「同期機構」は選択される同期機構の種類を示す値が入る。制御モードや同期機構などの項目の値は、図5Aでは「通常」といった名称が入っているが、実際のプログラムではIDが入る。 "Core 1" and "Core 2" are tasks that are operating in each core, and "Synchronization mechanism" is a value indicating the type of synchronization mechanism to be selected. The values of items such as the control mode and the synchronization mechanism include a name such as "normal" in FIG. 5A, but an ID is entered in an actual program.

換言すれば、同期機構選択ルール50は、コア121〜124(複数のプロセッサ)への複数のタスク(処理)の配置状況と、同期機構35を使用する第1処理又は同期機構35を使用しない第2処理を示す識別子と、を対応づけて記憶する。 In other words, the synchronization mechanism selection rule 50 determines the arrangement status of a plurality of tasks (processes) in the cores 121 to 124 (multiple processors), and the first process that uses the synchronization mechanism 35 or the first process that does not use the synchronization mechanism 35. 2 The identifier indicating the process and the identifier indicating the process are stored in association with each other.

同期機構選択ルール50には、制御モードが「通常」「低消費電力1」「低消費電力2」の3つのモードに対応するルールが定義されている。同期機構選択部34は、タスク配置動作情報から同期機構の選択を行う。または、動作状況管理部32から現在の制御モードを取得し、制御モードに合致する同期機構を選択してもよい。以下の説明は、タスク配置動作情報から選択することを前提とする。 The synchronization mechanism selection rule 50 defines rules corresponding to three control modes, "normal", "low power consumption 1", and "low power consumption 2". The synchronization mechanism selection unit 34 selects the synchronization mechanism from the task arrangement operation information. Alternatively, the current control mode may be acquired from the operation status management unit 32, and a synchronization mechanism matching the control mode may be selected. The following description is premised on selecting from task placement operation information.

同期機構選択ルール50にて、1行目は制御モードが「通常」であり、「コア1」の列には「タスクA,B」,「コア2」の列には「タスクC」と記されている。「コア1」はプロセッサコア121、「コア2」はコア122のことである。つまり、コア121でタスクAとタスクBが動作し、コア122でタスクCが動作している状況を示す。このようなタスクのコアへの配置およびタスクの動作時には、同期機構としてバリア同期が選択される設定となっている。 In the synchronization mechanism selection rule 50, the control mode is "normal" in the first row, "tasks A and B" are written in the "core 1" column, and "task C" is written in the "core 2" column. Has been done. “Core 1” is a processor core 121, and “core 2” is a core 122. That is, the situation where task A and task B are operating on the core 121 and task C is operating on the core 122 is shown. Barrier synchronization is selected as the synchronization mechanism when such tasks are placed in the core and the tasks are operated.

同様に、2行目は制御モードが「低消費電力1」であり、コア1ではタスクAが、コア2ではタスクCが動作する状況を示しており、同期機構としてはスピンロックが選択される設定となっている。また、3行目は制御モードが「低消費電力2」であり、コア1でタスクAとタスクCが動作する状況を示しており、同期機構としてはOSのイベントが選択される設定となっている。 Similarly, the second line shows the situation where the control mode is "low power consumption 1", task A operates in core 1, task C operates in core 2, and spinlock is selected as the synchronization mechanism. It is set. In addition, the third line shows the situation where the control mode is "low power consumption 2" and task A and task C operate in core 1, and the OS event is selected as the synchronization mechanism. There is.

なお、動作単位制御部31は、同期機構選択ルール50に従い、動作状況管理部32(検出部)によって検出される制御モード(通常、低消費電力1、低消費電力2)が示すコントローラ101(制御装置)の消費電力が小さくなるにつれて、複数の処理の数を減らす。また、動作単位制御部31は、動作状況管理部32によって検出される制御モードが示すコントローラ101の消費電力が小さくなるにつれて、使用するコア(プロセッサ)の数を減らす。ここで、制御モードが、「通常」、「低消費電力1」、「低消費電力2」の場合の電力値を、それぞれ、Pn、P1、P2とすると、Pn>P1>P2の関係が成立する。 The operation unit control unit 31 is the controller 101 (control) indicated by the control mode (usually low power consumption 1, low power consumption 2) detected by the operation status management unit 32 (detection unit) according to the synchronization mechanism selection rule 50. As the power consumption of the device) decreases, the number of multiple processes is reduced. Further, the operation unit control unit 31 reduces the number of cores (processors) used as the power consumption of the controller 101 indicated by the control mode detected by the operation status management unit 32 decreases. Here, assuming that the power values when the control modes are "normal", "low power consumption 1", and "low power consumption 2" are Pn, P1, and P2, respectively, the relationship of Pn> P1> P2 is established. To do.

上記では、「コア1」「コア2」が特定のプロセッサコア(例えば、プロセッサコア121、122)を意味することを前提としているが、特定のコアでないことを前提としてもよい。この前提では、例えば、プロセッサコア122でタスクAとタスクBが動作し、プロセッサコア124でタスクCが動作している場合も、同期機構選択ルール50の1行目の状況に合致する。つまり、2つのコアが動作しており、一方のコアでタスクA、Bが動作し、他方のコアでタスクCが動作していればNo.1のルールが適用される。 In the above, it is assumed that "core 1" and "core 2" mean specific processor cores (for example, processor cores 121 and 122), but it may be assumed that they are not specific processor cores. Under this premise, for example, when task A and task B are operating on the processor core 122 and task C is operating on the processor core 124, the situation on the first line of the synchronization mechanism selection rule 50 is matched. That is, if two cores are operating, tasks A and B are operating on one core, and task C is operating on the other core, No. Rule 1 is applied.

また上記では、「タスクA」のように特定のタスクを意味する値を同期機構選択ルールに記載しているが、特定のタスクでない値としてもよい。例えば、同期機構選択ルール50の1行目に置いて、「コア1」に「タスク1,2」、「コア2」に「タスク3」と記載されているとする。タスク1〜3は、それぞれ異なるタスクであることを意味している。この場合、プロセッサコア121にてタスクAとタスクBが動作し、コア122にてタスクCが動作している状況は、1行目に合致する。つまり、2つのコアが動作しており、一方のコアで異なる2つのタスクが動作し、他方のコアで別の1つのタスクが動作していればNo.1のルールが適用される。 Further, in the above, a value meaning a specific task such as "task A" is described in the synchronization mechanism selection rule, but a value other than the specific task may be used. For example, it is assumed that "tasks 1 and 2" are described in "core 1" and "task 3" is described in "core 2" in the first line of the synchronization mechanism selection rule 50. Tasks 1 to 3 mean that they are different tasks. In this case, the situation in which task A and task B are operating in the processor core 121 and task C is operating in the core 122 matches the first line. That is, if two cores are operating, two different tasks are operating on one core, and another task is operating on the other core, No. Rule 1 is applied.

以上に、コアを特定のものとする場合と非特定のものとする場合、およびタスクを特定のものとする場合と非特定のものとする場合とを説明した。コアとタスクの両方を特定のものとする場合は、同期機構選択ルールは同期しないタスクも記載することで、タスクのコアへの割り当てを定義する設定情報と共用化することができる。一方、タスクやコアを非特定のものとすると、タスクのコア割り当てやタスクの動作状況をパターン化することになり、1つのルールで対応する状況の数が増える。このため、ルール数の縮小(すなわちルールのデータサイズの縮小)や、ルールの再利用性向上を実現することができる。 In the above, the case where the core is specific and the case where it is non-specific, and the case where the task is specific and non-specific have been described. When both the core and the task are specific, the synchronization mechanism selection rule can be shared with the setting information that defines the assignment of the task to the core by describing the task that is not synchronized. On the other hand, if the task or core is non-specific, the core allocation of the task and the operation status of the task are patterned, and the number of situations supported by one rule increases. Therefore, it is possible to reduce the number of rules (that is, reduce the data size of the rules) and improve the reusability of the rules.

上記では、同期機構選択ルールは複数の同期IDで共通とする前提で説明したが、同期IDごとに切り替えてもよい。後者の実現方法の1つは、ルールテーブルに同期IDの列を追加するものである。 In the above, the synchronization mechanism selection rule has been described on the premise that it is common to a plurality of synchronization IDs, but it may be switched for each synchronization ID. One of the latter implementation methods is to add a column of synchronization IDs to the rule table.

図5Bの処理ルーチン選択ルール51は、処理ルーチン選択ルールの例を表形式で示したものである。処理ルーチン選択ルール51の各行が1つのルールに対応している。列の項目には「同期ID」「タスクID」「同期機構」「処理ルーチン」がある。「同期機構」の値は、同期機構選択ルール50における「同期機構」に記された値が入る。「処理ルーチン」は、同期オブジェクトを利用する処理に付与されたIDが入る。 The processing routine selection rule 51 of FIG. 5B shows an example of the processing routine selection rule in a tabular format. Each line of the processing routine selection rule 51 corresponds to one rule. The column items include "synchronization ID", "task ID", "synchronization mechanism", and "processing routine". The value of the "synchronization mechanism" is the value described in the "synchronization mechanism" in the synchronization mechanism selection rule 50. In the "processing routine", the ID assigned to the processing using the synchronization object is entered.

処理ルーチン選択ルール51は、1行目から5行目まで全て、同期IDが0x01についてのルールである。1行目は、タスクIDを問わず、同期機構の種類がバリア同期であれば、処理ルーチンのIDはR1であることを示している。2行目は、タスクIDが0x10すなわちタスクAであり、同期機構の種類がスピンロックであれば、処理ルーチンのIDはR2であることを示している。3行目以降も同様である。 The processing routine selection rule 51 is a rule for the synchronization ID of 0x01 in all the first to fifth lines. The first line shows that the ID of the processing routine is R1 regardless of the task ID if the type of synchronization mechanism is barrier synchronization. The second line shows that if the task ID is 0x10, that is, task A, and the type of synchronization mechanism is spinlock, the processing routine ID is R2. The same applies to the third and subsequent lines.

以下では、システムが制御モードを変更し、それに伴いタスクのコアへの配置も変更すると共に、選択される同期機構が同期機構選択ルール50に沿って変更されていく様子を説明する。制御モードはシステムの初期化の後、「通常」から開始するとする。各同期機構の仕組みは公知であるため、本実施形態では同期機構内部の処理の説明を省略する。 In the following, it will be described that the system changes the control mode, the assignment of the task to the core is changed accordingly, and the selected synchronization mechanism is changed according to the synchronization mechanism selection rule 50. The control mode is assumed to start from "normal" after system initialization. Since the mechanism of each synchronization mechanism is known, the description of the processing inside the synchronization mechanism will be omitted in the present embodiment.

(制御モードが通常のときの動作)
最初に、システムの制御モードが「通常」のときの動作を説明する。図6は、制御モードが「通常」のときの、タスクのコアへの配置例を示している。コア121にタスクAとタスクBが、コア122にタスクCとタスクEが、コア123にタスクDが配置されている。タスクの優先度はAがBより、CがEより高く設定されている。これらのタスク配置や優先度設定は、動作単位制御部31が行う。
(Operation when the control mode is normal)
First, the operation when the control mode of the system is "normal" will be described. FIG. 6 shows an example of assigning a task to the core when the control mode is “normal”. Task A and task B are arranged on the core 121, task C and task E are arranged on the core 122, and task D is arranged on the core 123. The priority of the task is set so that A is higher than B and C is higher than E. The operation unit control unit 31 performs these task arrangements and priority settings.

このタスク配置にて、タスクA〜Cが動作するとき、同期機構選択部34は同期機構35としてバリア同期を選択する。同期機構選択部34に選択され、同期IDが0x01に対応したバリア同期のオブジェクトは、同期数が3に設定されている。図6の場合には、サスペンド・リジューム方式が選択されるべきである。同期機構選択ルール50にて、バリア同期がビジーウェイト方式かサスペンド・リジューム方式かを指定してもよいし、予めサスペンド・リジューム方式に固定してもよい。 In this task arrangement, when tasks A to C operate, the synchronization mechanism selection unit 34 selects barrier synchronization as the synchronization mechanism 35. The number of synchronizations of the barrier synchronization object selected by the synchronization mechanism selection unit 34 and corresponding to the synchronization ID of 0x01 is set to 3. In the case of FIG. 6, the suspend / resume method should be selected. In the synchronization mechanism selection rule 50, it may be specified whether the barrier synchronization is the busy wait method or the suspend / resume method, or the barrier synchronization may be fixed to the suspend / resume method in advance.

図7は、制御モードが「通常」のときの、タスク動作のタイムチャート例を示している。タスクAが起動して動作状態となり、サブタスクa1を実行し、時刻t1にサブタスクa1は同期機構利用部33−1から同期機構選択部34を呼び出し、待ち状態に入る。これにより、同じコアで動作するタスクBがOSの優先度制御により動作状態となり、サブタスクbが実行される。時刻t2に、サブタスクbは同期機構利用部33−2から同期機構選択部34を呼び出し、待ち状態に入る。一方、タスクCはタスクAと並行に起動・動作して、サブタスクcを実行する。時刻t2より前に、サブタスクcは同期機構利用部33−3から同期機構選択部34を呼び出し、待ち状態に入る。時刻t2には同期が成立し、タスクAが再開されてサブタスクa2が実行される。この例では、同期機構35の処理ルーチンは、どのタスクでも同じであり、処理ルーチン選択ルール51におけるIDはR1である。 FIG. 7 shows an example of a time chart of task operation when the control mode is “normal”. Task A is activated to enter the operating state, subtask a1 is executed, and at time t1, subtask a1 calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-1 and enters the waiting state. As a result, the task B operating on the same core is put into the operating state by the priority control of the OS, and the subtask b is executed. At time t2, the subtask b calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-2 and enters the waiting state. On the other hand, task C is started and operated in parallel with task A to execute subtask c. Before the time t2, the subtask c calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-3 and enters the waiting state. At time t2, synchronization is established, task A is restarted, and subtask a2 is executed. In this example, the processing routine of the synchronization mechanism 35 is the same for all tasks, and the ID in the processing routine selection rule 51 is R1.

(制御モードが低消費電力1のときの動作)
次に、システムが制御モードを「通常」から「低消費電力1」に変更したときのシステムの動作を説明する。図8は、制御モードが「低消費電力1」のときの、タスクのコアへの配置例を示している。コア121にタスクAとタスクDが、コア122にタスクCとタスクEが配置されている。タスクBは配置されておらず、動作しない。サブタスクa2は、データd1とd3を利用し、d2は利用しない。タスクの優先度は、AがDより、CがEより高く設定されている。コア123とコア124は休止する。
(Operation when the control mode is low power consumption 1)
Next, the operation of the system when the system changes the control mode from "normal" to "low power consumption 1" will be described. FIG. 8 shows an example of arranging the task in the core when the control mode is “low power consumption 1”. Task A and task D are arranged on the core 121, and task C and task E are arranged on the core 122. Task B is not placed and does not work. Subtask a2 uses data d1 and d3, and does not use d2. The priority of the task is set so that A is higher than D and C is higher than E. Core 123 and core 124 rest.

制御モードが変更されたときに、動作単位制御部31がこのタスクのコアへの再配置を行う。動作状況管理部32はタスク再配置を検出し、同期機構選択部34に通知する。同期機構選択部34は、同期機構35を初期化する。 When the control mode is changed, the operation unit control unit 31 relocates the task to the core. The operation status management unit 32 detects the task relocation and notifies the synchronization mechanism selection unit 34. The synchronization mechanism selection unit 34 initializes the synchronization mechanism 35.

上記のタスク配置にて、タスクAとタスクCが動作するとき、同期機構選択部34は同期機構35としてスピンロックを選択する。正確には、スピンロックと処理完了フラグを一緒にしたものである。サブタスクcに処理完了フラグが用意されている。同期機構選択部34はタスクIDをパラメータ値として呼出しされるので、タスクAから呼び出された時には、サブタスクcの処理完了フラグが有効になるまでフラグを読み続け、有効になったらタスクの処理に復帰して、サブタスクa2を実行する。タスクCから呼び出された時には、サブタスクcの完了フラグを有効にする。スピンロックはこれら処理完了フラグへの排他的アクセスに利用される。この例では、同期機構35の処理ルーチンは、タスクAとタスクCとで異なり、処理ルーチン選択ルール51におけるIDはそれぞれ、R2とR3である。 In the above task arrangement, when the task A and the task C operate, the synchronization mechanism selection unit 34 selects the spinlock as the synchronization mechanism 35. To be precise, it is a combination of spinlock and processing completion flag. A processing completion flag is prepared for the subtask c. Since the synchronization mechanism selection unit 34 is called with the task ID as a parameter value, when it is called from task A, it keeps reading the flag until the processing completion flag of subtask c becomes valid, and when it becomes valid, it returns to the task processing. Then, the subtask a2 is executed. When called from task C, the completion flag of subtask c is enabled. Spinlocks are used for exclusive access to these processing completion flags. In this example, the processing routine of the synchronization mechanism 35 is different between task A and task C, and the IDs in the processing routine selection rule 51 are R2 and R3, respectively.

図9は、制御モードが「低消費電力1」のときの、タスク動作のタイムチャート例を示している。タスクAが起動して動作状態となり、サブタスクa1を実行する。時刻t3にサブタスクa1は同期機構利用部33−1から同期機構選択部34を呼び出し、サブタスクcの動作完了を確認し続ける。一方、タスクCはタスクAと並行に起動・動作して、サブタスクcを実行する。時刻t4に、サブタスクcは同期機構利用部33−3から同期機構選択部34を呼び出し、処理完了フラグ(動作完了フラグ)を有効にする。時刻t4にタスクAが再開されてサブタスクa2が実行される。 FIG. 9 shows an example of a time chart of task operation when the control mode is “low power consumption 1”. Task A is activated, enters an operating state, and executes subtask a1. At time t3, the subtask a1 calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-1 and continues to confirm the completion of the operation of the subtask c. On the other hand, task C is started and operated in parallel with task A to execute subtask c. At time t4, the subtask c calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-3 to enable the processing completion flag (operation completion flag). Task A is restarted at time t4 and subtask a2 is executed.

上記のようなスピンロックの利用により、例えばタスクAとタスクCが、コア121とコア122へのネットワーク通信などによる共通の通知をもとに、毎周期に同時に実行開始され、サブタスクa1とcとがほぼ同時に処理完了すると期待される場合には、同期のための待ち時間を短くすることができる。バリア同期は一般的にオーバーヘッドが大きいが、そのオーバーヘッドの軽減を図ることができる。 By using the spinlock as described above, for example, task A and task C are simultaneously started to be executed every cycle based on a common notification by network communication to core 121 and core 122, and subtasks a1 and c are combined. If it is expected that the processing will be completed almost at the same time, the waiting time for synchronization can be shortened. Barrier synchronization generally has a large overhead, but the overhead can be reduced.

(制御モードが低消費電力2のときの動作)
次に、システムが制御モードを「低消費電力1」から「低消費電力2」に変更したときのシステムの動作を説明する。図10は、制御モードが「低消費電力2」の、タスクのコアへの配置例を示している。コア121にタスクAとタスクCが配置されている。タスクB,D,Eは配置されておらず、動作しない。サブタスクa2は、データd1とd3を利用し、d2は利用しない。タスクの優先度は、AがCより高く設定されている。コア122〜124は休止する。
(Operation when the control mode is low power consumption 2)
Next, the operation of the system when the system changes the control mode from "low power consumption 1" to "low power consumption 2" will be described. FIG. 10 shows an example of arranging the task in the core when the control mode is “low power consumption 2”. Task A and task C are arranged on the core 121. Tasks B, D, and E are not placed and do not work. Subtask a2 uses data d1 and d3, and does not use d2. As for the priority of the task, A is set higher than C. Cores 122-124 rest.

換言すれば、動作単位制御部31は、動作状況管理部32(検出部)によって検出される制御モードがコントローラ101(制御装置)の最小の消費電力(低消費電力2)を示す場合、複数のタスク(処理)をコア121〜124(複数のプロセッサ)のうちの1つに配置する。これにより、コントローラ101の消費電力を抑制することができる。 In other words, the operation unit control unit 31 may have a plurality of control modes detected by the operation status management unit 32 (detection unit) when the control mode indicates the minimum power consumption (low power consumption 2) of the controller 101 (control device). The task (process) is assigned to one of the cores 121 to 124 (plural processors). As a result, the power consumption of the controller 101 can be suppressed.

図11は、制御モードが「低消費電力2」のときの、タスク動作のタイムチャート例を示している。タスクAが起動して動作状態となり、サブタスクa1を実行する。時刻t5にサブタスクa1は同期機構利用部33−1から同期機構選択部34を呼び出し、同期ID0x01に対応したイベントの待機状態に入る。これにより、タスクCがOSの優先度制御により開始され、サブタスクcを実行する。時刻t6に、サブタスクcは同期機構利用部33−3から同期機構選択部34を呼び出し、同期機構選択部34は同期ID0x01に対応したイベントを発行して、処理を終了する。これによりタスクAが再開され、サブタスクa2が実行される。この例では、同期機構35の処理ルーチンは、タスクAとタスクCとで異なり、処理ルーチン選択ルール51におけるIDはそれぞれ、R4とR5である。 FIG. 11 shows an example of a time chart of task operation when the control mode is “low power consumption 2”. Task A is activated, enters an operating state, and executes subtask a1. At time t5, the subtask a1 calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-1 and enters the standby state of the event corresponding to the synchronization ID 0x01. As a result, the task C is started by the priority control of the OS, and the subtask c is executed. At time t6, the subtask c calls the synchronization mechanism selection unit 34 from the synchronization mechanism utilization unit 33-3, and the synchronization mechanism selection unit 34 issues an event corresponding to the synchronization ID 0x01 to end the process. As a result, task A is restarted and subtask a2 is executed. In this example, the processing routine of the synchronization mechanism 35 is different between task A and task C, and the IDs in the processing routine selection rule 51 are R4 and R5, respectively.

OSのイベントを用いた同期は、バリア同期と比較して処理が軽量であり、ビジーウェイトするスピンロックのように、プロセッサコアの処理能力を占有しない。 Synchronization using OS events is lighter in processing than barrier synchronization and does not occupy the processing power of the processor core like busy-waiting spinlocks.

制御モードが「低消費電力2」のときの別の実施形態として、動作単位制御部31がタスクAとタスクCを統合し、サブタスクa1、c、a2の順で処理を実行する新しいタスクFを作成して実行する方法がある。この場合、同期処理が不要になるので、同期機構選択ルール50の3行目における同期機構は「なし」となる。同期機構がなしの場合、同期機構選択部34は何も行わない。これにより、同期処理のオーバーヘッドをなくすことができる。 As another embodiment when the control mode is "low power consumption 2", a new task F in which the operation unit control unit 31 integrates task A and task C and executes processing in the order of subtasks a1, c, and a2 is performed. There is a way to create and run it. In this case, since the synchronization process becomes unnecessary, the synchronization mechanism in the third line of the synchronization mechanism selection rule 50 is "none". When there is no synchronization mechanism, the synchronization mechanism selection unit 34 does nothing. As a result, the overhead of synchronization processing can be eliminated.

換言すれば、実行部40は、複数のタスク(処理)がコア121〜124(複数のプロセッサ)のうちの1つのみに配置される場合、同期機構35を使用しない第2処理を実行する。詳細には、実行部40は、第2処理として、複数のタスク(処理)を1つに統合し、統合された1つのタスク(処理)を実行する。 In other words, when the plurality of tasks (processes) are arranged in only one of the cores 121 to 124 (plurality of processors), the execution unit 40 executes the second process without using the synchronization mechanism 35. Specifically, as the second process, the execution unit 40 integrates a plurality of tasks (processes) into one and executes one integrated task (process).

以上のように、タスクのコアへの配置や、タスクの動作状況をもとに、適切な同期機構を選択可能とすることにより、同期処理に掛かるオーバーヘッドを小さくする、または無くすことができ、消費電力低減や、応答時間の改善(待ち時間の短縮)を実現することができる。 As described above, by making it possible to select an appropriate synchronization mechanism based on the placement of the task in the core and the operating status of the task, the overhead required for the synchronization process can be reduced or eliminated, and consumption It is possible to reduce power consumption and improve response time (shorten waiting time).

消費電力や応答時間は、例えば電源回路113から各コアへの電源線にて計測する。消費電力は、タスクが同期の成立待ちであり、他のタスクが動作中でないときに、極小値を取る。同期処理のオーバーヘッドの縮小は、この極小値の低減や、極小値を取る時間幅の短縮となって観測される。 The power consumption and the response time are measured, for example, by the power supply line from the power supply circuit 113 to each core. The power consumption takes a minimum value when a task is waiting for synchronization to be established and another task is not in operation. The reduction of the overhead of synchronization processing is observed by reducing this minimum value and shortening the time width for taking the minimum value.

上記ではタスクがコアに再配置される場合を説明したが、一部のタスクが休止するだけで、タスクの再配置はなしにシステムが動作を継続する場合もありうる。その場合には、利用されている同期機構の条件だけを変更する。例えば図6のタスク配置にて、タスクBが休止したとき、動作状況管理部32がタスクBの休止を検出し、同期機構選択部34に通知する。同期機構選択部は、同期ID0x01に対応するバリア同期のオブジェクトについて、同期数を3から2に変更する。ただし、タスクBが休止するのは、バリア同期による待ち状態に入る前とする。 In the above, the case where the task is relocated to the core has been described, but it is possible that the system continues to operate without relocating the task even if only some tasks are paused. In that case, only the conditions of the synchronization mechanism used are changed. For example, in the task arrangement shown in FIG. 6, when the task B is paused, the operation status management unit 32 detects the pause of the task B and notifies the synchronization mechanism selection unit 34. The synchronization mechanism selection unit changes the number of synchronizations from 3 to 2 for the barrier synchronization object corresponding to the synchronization ID 0x01. However, task B is paused before entering the waiting state due to barrier synchronization.

以上説明したように、本実施形態によれば、複数の処理の配置状況に応じて、複数種類の同期機構のいずれかを用いて同期を行う又は同期機構を使用しないことを切り替えることができる。 As described above, according to the present embodiment, it is possible to switch between performing synchronization using any of a plurality of types of synchronization mechanisms or not using the synchronization mechanism, depending on the arrangement status of the plurality of processes.

(変形例)
上記ではOSがAMPであることを前提としたが、以下ではOSがSMPとAMPとでモード切り替えをできるものであると想定する。動作状況管理部32がOSのモード情報(AMP/SMP)を同期機構選択部34に提供し、同期機構選択部34がそのモード情報に応じて、利用する同期機構選択ルールを切り替える。この場合、図5Aの同期機構選択ルール50は、OSがAMPで動作するときに利用される。
(Modification example)
In the above, it is assumed that the OS is AMP, but in the following, it is assumed that the OS can switch modes between SMP and AMP. The operation status management unit 32 provides OS mode information (AMP / SMP) to the synchronization mechanism selection unit 34, and the synchronization mechanism selection unit 34 switches the synchronization mechanism selection rule to be used according to the mode information. In this case, the synchronization mechanism selection rule 50 of FIG. 5A is used when the OS operates in AMP.

換言すれば、動作状況管理部32(検出部)は、コントローラ101(制御装置)にインストールされるオペレーションシステムが対称型(SMP)であるか又は非対称型(AMP)であるかを示すOSモードを検出する。同期機構選択ルール50は、OSモード及び配置状況の組合せと、識別子とを対応づけて記憶する。実行部40は、動作状況管理部32によって検出されたOSモード及び配置状況の組合せに対応する識別子が示す第1処理又は第2処理を実行する。これにより、OSモード及び配置状況に応じて、複数種類の同期機構のいずれかを用いて同期を行う又は同期機構を使用しないことを切り替えることができる。 In other words, the operation status management unit 32 (detection unit) sets the OS mode indicating whether the operation system installed in the controller 101 (control device) is a symmetric type (SMP) or an asymmetric type (AMP). To detect. The synchronization mechanism selection rule 50 stores the combination of the OS mode and the arrangement status and the identifier in association with each other. The execution unit 40 executes the first process or the second process indicated by the identifier corresponding to the combination of the OS mode and the arrangement status detected by the operation status management unit 32. As a result, it is possible to switch between performing synchronization using any of a plurality of types of synchronization mechanisms or not using the synchronization mechanism, depending on the OS mode and the arrangement status.

OSがSMPのときは、例えば同期機構選択ルール50の2行目にて、同期機構をスピンロックではなくOSのリソースにする。OSのリソースの使われ方は、図8と図9で説明したスピンロックと同様である。OSのリソースを利用する場合、ビジーウェイトすることなしに、容易な手順で同期を取ることができる。このように、OSのモード情報(AMP/SMP)を利用することで、より適切な同期機構を選択することができる。 When the OS is SMP, for example, in the second line of the synchronization mechanism selection rule 50, the synchronization mechanism is set as an OS resource instead of a spinlock. The usage of OS resources is the same as the spinlock described with reference to FIGS. 8 and 9. When using OS resources, synchronization can be performed in a simple procedure without busy waiting. In this way, by using the OS mode information (AMP / SMP), a more appropriate synchronization mechanism can be selected.

以上では、時間経過と共に動作するタスクが減少する場合の例を説明した。制御モードが「低消費電力2」から「通常」に戻る場合には、動作するタスクは増加する。この場合の同期機構の選択方法は、上記と同じで問題ない。 In the above, an example has been described in which the number of tasks that operate over time decreases. When the control mode returns from "low power consumption 2" to "normal", the number of tasks to be operated increases. The method of selecting the synchronization mechanism in this case is the same as above, and there is no problem.

一方で、動的機能配置と呼ばれるタスクの配置の仕方がある。これは、システムの稼働中に制御ネットワーク上で、コントローラおよびそのプロセッサコアにタスクを追加するものである。動的機能配置が実行される場合には、同期機構選択ルールも同時に更新すればよい。その際、同期機構選択ルールを、制御ネットワークからコントローラ101に配信してもよい。 On the other hand, there is a method of arranging tasks called dynamic function allocation. It adds tasks to the controller and its processor cores on the control network while the system is running. When the dynamic function allocation is executed, the synchronization mechanism selection rule may be updated at the same time. At that time, the synchronization mechanism selection rule may be distributed from the control network to the controller 101.

(第2の実施形態)
以下では、図12を用いて、データ授受部36、データアクセス制御部37の動作例を説明する。タスク配置は当初、図6の制御モードが「通常」の状況とする。
(Second Embodiment)
Hereinafter, an operation example of the data transfer unit 36 and the data access control unit 37 will be described with reference to FIG. Initially, the task arrangement is set so that the control mode shown in FIG. 6 is "normal".

サブタスクa1にはデータ授受部36−1が配置されており、データアクセス制御部37を介して、データバッファ120にデータd1を書き込む。同様に、サブタスクbにはデータ授受部36−2が、サブタスクcにはデータ授受部36−3が配置されており、データバッファ120にそれぞれデータd2、データd3を書き込む。サブタスクa2にはデータ授受部36−4が配置されており、データアクセス制御部37を介して、データバッファ120からデータd1〜d3を読み込む。 A data transfer unit 36-1 is arranged in the subtask a1, and data d1 is written to the data buffer 120 via the data access control unit 37. Similarly, a data transfer unit 36-2 is arranged in the subtask b, and a data transfer unit 36-3 is arranged in the subtask c, and data d2 and data d3 are written in the data buffer 120, respectively. A data transfer unit 36-4 is arranged in the subtask a2, and data d1 to d3 are read from the data buffer 120 via the data access control unit 37.

データバッファ120は、バッファxとバッファyの2面構成となっており、それぞれにデータd1、d2、d3の領域が確保されている。しかし制御モードが「通常」のときには、バッファxのみが用いられる。サブタスクa1が書き込むデータd1とサブタスクa2が読み込むデータd1は、RAM140上で同じ位置に存在する。データd2、d3も読み込みと書き込みが同じ位置である。 The data buffer 120 has a two-sided configuration of a buffer x and a buffer y, and areas for data d1, d2, and d3 are secured in each of the two surfaces. However, when the control mode is "normal", only buffer x is used. The data d1 written by the subtask a1 and the data d1 read by the subtask a2 exist at the same position on the RAM 140. Data d2 and d3 are also read and written at the same position.

データアクセス制御部37は、動作状況管理部32から(タスク配置と関連付いた)現在の制御モードを受け取り、「通常」である場合には、データの読み込みにも書き込みにも、バッファxを用いる。またデータアクセス制御部37は、データ授受部36から指定されるデータIDから、事前に決められたデータ配置情報を検索して、バッファx内のデータの位置を求める。 The data access control unit 37 receives the current control mode (related to the task arrangement) from the operation status management unit 32, and when it is "normal", uses the buffer x for both reading and writing data. .. Further, the data access control unit 37 searches for predetermined data arrangement information from the data ID designated by the data transfer unit 36, and obtains the position of the data in the buffer x.

今、制御モードが「通常」から「低消費電力1」に切り替わったとする。さらに、同期機構選択ルール50の2行目の同期機構に「なし」が指定されているとする。タスクAとタスクCとは同期が取られない。データd3のサブタスクcによる更新からサブタスクa2による取得までには遅延が生じうる。この遅延の最大値は周期タスクの実行周期で決まるが、遅延の最大値は設計上の許容範囲に収まっているとする。 Now, suppose that the control mode is switched from "normal" to "low power consumption 1". Further, it is assumed that "None" is specified for the synchronization mechanism in the second line of the synchronization mechanism selection rule 50. Task A and task C are not synchronized. There may be a delay from the update of the data d3 by the subtask c to the acquisition by the subtask a2. The maximum value of this delay is determined by the execution cycle of the periodic task, but it is assumed that the maximum value of the delay is within the design tolerance.

データアクセス制御部37は制御モードが「低消費電力1」の場合には、書き込みと読み込みでバッファxとバッファyを使い分ける。最初に、書き込みにバッファxを、読み込みにバッファyを利用する。データアクセス制御部37は、例えば、サブタスクcによるデータd3の書き込みが完了した時点で、バッファを切り替える。つまり、書き込みにバッファyを、読み込みにバッファxを用いるように変更する。このようにバッファ2面を用いることで、読み書きするタスク同士の同期を取っていなくても、同じ領域に同時に読み書きすることを回避できる。 When the control mode is "low power consumption 1", the data access control unit 37 uses the buffer x and the buffer y properly for writing and reading. First, the buffer x is used for writing and the buffer y is used for reading. The data access control unit 37 switches the buffer, for example, when the writing of the data d3 by the subtask c is completed. That is, the buffer y is changed for writing and the buffer x is used for reading. By using the two buffer surfaces in this way, it is possible to avoid reading and writing to the same area at the same time even if the tasks to be read and written are not synchronized.

換言すれば、コントローラ101(制御装置)は、バッファx(第1バッファ)とバッファy(第2バッファ)を備える。実行部40は、同期機構35を使用しない第2処理を実行する場合、第1期間において、複数のタスク(処理)の書き込みにバッファxを用い、複数のタスク(処理)の読み込みにバッファyを用い、第1期間の後の第2期間において、複数のタスクの書き込みにバッファyを用い、複数のタスクの読み込みにバッファxを用いる。 In other words, the controller 101 (control device) includes a buffer x (first buffer) and a buffer y (second buffer). When the execution unit 40 executes the second process that does not use the synchronization mechanism 35, the execution unit 40 uses the buffer x for writing the plurality of tasks (processes) and the buffer y for reading the plurality of tasks (processes) in the first period. In the second period after the first period, the buffer y is used for writing a plurality of tasks, and the buffer x is used for reading a plurality of tasks.

以上のように、データアクセス制御部37はタスク配置と動作に応じて、バッファの読み書き位置を変更する。同期機構の有無もタスク配置と動作に応じて選択されるので、データアクセス制御部37は、同期機構の有無に応じてバッファの読み書き位置を制御しているともいえる。これにより、タスク間の同期機構をなくしても、データの排他制御を実現できる。なおデータアクセス制御部37は再入可能とするか、同期機構を用いて排他的な実行を行う必要がある。 As described above, the data access control unit 37 changes the read / write position of the buffer according to the task arrangement and operation. Since the presence / absence of the synchronization mechanism is also selected according to the task arrangement and operation, it can be said that the data access control unit 37 controls the read / write position of the buffer according to the presence / absence of the synchronization mechanism. As a result, exclusive control of data can be realized without a synchronization mechanism between tasks. The data access control unit 37 needs to be re-enterable or exclusively executed by using a synchronization mechanism.

なお、本発明は上記した実施形態に限定されるものではなく、様々な変形例が含まれる。例えば、上述した実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることが可能であり、また、ある実施形態の構成に他の実施形態の構成を加えることも可能である。また、各実施形態の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 The present invention is not limited to the above-described embodiment, and includes various modifications. For example, the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the described configurations. Further, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Further, it is possible to add / delete / replace a part of the configuration of each embodiment with another configuration.

上記実施形態では、マイクロコンピュータ110(コントローラ101)は、マルチコアプロセッサを備えるが、マルチプロセッサを備えていてもよい。 In the above embodiment, the microcomputer 110 (controller 101) includes a multi-core processor, but may include a multi-processor.

また、上記の各構成、機能等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサ(マイクロコンピュータ)がそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。 Further, each of the above configurations, functions and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. In addition, each of the above configurations, functions, and the like may be realized by software by the processor (microcomputer) interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be stored in a memory, a recording device such as a hard disk or SSD (Solid State Drive), or a recording medium such as an IC card, SD card, or DVD.

なお、本発明の実施形態は、以下の態様であってもよい。 The embodiment of the present invention may have the following aspects.

(1)複数のプロセッサと、前記複数のプロセッサに対する複数の処理の配置状況を管理する配置状況管理手段と、前記複数の処理間の同期状態を前記配置状況に基づいて設定する同期状態設定手段と、を備える制御装置。 (1) A plurality of processors, an arrangement status management means for managing the arrangement status of a plurality of processes for the plurality of processors, and a synchronization state setting means for setting a synchronization state between the plurality of processes based on the arrangement status. A control device including.

(2)(1)の制御装置は、処理の構成や処理のプロセッサへの配置を決定する動作単位制御手段を備え、前記動作単位制御手段は、前記同期状態設定手段が同期状態をなしとする場合に、もとは並列または並行に実行される複数の処理を統合して、直列に実行される処理に構成することを特徴とする、制御装置。 (2) The control device of (1) includes an operation unit control means for determining the configuration of the process and the arrangement of the process on the processor, and the operation unit control means has the synchronization state setting means in a synchronous state. A control device, characterized in that a plurality of processes originally executed in parallel or in parallel are integrated into a process executed in series.

(3)(1)において、前記同期状態設定手段は、オペレーションシステムの動作モードも同期状態の設定に利用することを特徴とする、制御装置。 (3) The control device according to (1), wherein the synchronization state setting means also uses the operation mode of the operation system for setting the synchronization state.

(4)(1)の制御装置は、前記配置状況に基づいてデータの読み書き位置を制御するデータアクセス制御手段を備えることを特徴とする、制御装置。 (4) The control device according to (1) is a control device including a data access control means for controlling a data read / write position based on the arrangement state.

上記(1)〜(4)によれば、コアへの処理配置が変わるとき、可能であれば同期機構をオーバーヘッドがより小さいにものに変える、あるいは同期機構の利用を無くすことにより、処理性能の向上や消費電力の低減を実現する。また同期機構のオーバーヘッドが小さくなる、または無くなると、プロセッサの処理能力に余裕が出て、1つのコアにより多くの処理を配置しやすくなり、コア縮退時に稼働させるコア数を減らしやすくなり、消費電力の低減をさらに図ることができる。 According to the above (1) to (4), when the processing arrangement to the core changes, the processing performance can be improved by changing the synchronization mechanism to one with a smaller overhead if possible, or by eliminating the use of the synchronization mechanism. Achieve improvement and reduction of power consumption. In addition, when the overhead of the synchronization mechanism becomes smaller or eliminated, the processing power of the processor becomes more marginal, it becomes easier to allocate more processing to one core, it becomes easier to reduce the number of cores to be operated when the core is degenerated, and power consumption. Can be further reduced.

31…動作単位制御部
32…動作状況管理部
33…同期機構利用部
34…同期機構選択部
35…同期機構
36…データ授受部
37…データアクセス制御部
40…実行部
50…同期機構選択ルール
51…処理ルーチン選択ルール
101…コントローラ
102…センサ
103…アクチュエータ
110…マイクロコンピュータ
111…入力回路
112…出力回路
113…電源回路
120…データバッファ
121〜124…プロセッサコア
130…入出力回路
140…RAM
150…ROM
160…不揮発メモリ
31 ... Operation unit control unit 32 ... Operation status management unit 33 ... Synchronization mechanism utilization unit 34 ... Synchronization mechanism selection unit 35 ... Synchronization mechanism 36 ... Data transfer unit 37 ... Data access control unit 40 ... Execution unit 50 ... Synchronization mechanism selection rule 51 ... Processing routine selection rule 101 ... Controller 102 ... Sensor 103 ... Actuator 110 ... Microcomputer 111 ... Input circuit 112 ... Output circuit 113 ... Power supply circuit 120 ... Data buffer 121-124 ... Processor core 130 ... Input / output circuit 140 ... RAM
150 ... ROM
160 ... Non-volatile memory

Claims (8)

複数のプロセッサと、
前記複数のプロセッサへの複数の処理の配置状況を検出する検出部と、
前記複数の処理の間の同期をとる複数種類の同期機構と、
前記配置状況と、前記同期機構を使用する第1処理又は前記同期機構を使用しない第2処理を示す識別子と、を対応づけて記憶するメモリと、
前記検出部によって検出された前記配置状況に対応する前記識別子が示す前記第1処理又は前記第2処理を実行する実行部と、
を備えることを特徴とする制御装置。
With multiple processors
A detector that detects the arrangement status of a plurality of processes on the plurality of processors, and
A plurality of types of synchronization mechanisms that synchronize between the plurality of processes, and
A memory that stores the arrangement status in association with an identifier indicating a first process that uses the synchronization mechanism or a second process that does not use the synchronization mechanism.
An execution unit that executes the first process or the second process indicated by the identifier corresponding to the arrangement status detected by the detection unit.
A control device characterized by comprising.
請求項1に記載の制御装置であって、
前記検出部は、
前記制御装置の消費電力を示す制御モードを検出し、
前記メモリは、
前記制御モードと、前記配置状況と、を対応づけて記憶し、
前記制御装置は、
前記検出部によって検出される前記制御モードに対応する前記配置状況に基づいて、前記複数の処理を前記複数のプロセッサへ配置する動作単位制御部を備える
ことを特徴とする制御装置。
The control device according to claim 1.
The detection unit
A control mode indicating the power consumption of the control device is detected.
The memory is
The control mode and the arrangement status are stored in association with each other.
The control device is
A control device including an operation unit control unit that allocates the plurality of processes to the plurality of processors based on the arrangement status corresponding to the control mode detected by the detection unit.
請求項2に記載の制御装置であって、
前記動作単位制御部は、
前記検出部によって検出される前記制御モードが前記制御装置の最小の消費電力を示す場合、前記複数の処理を前記複数のプロセッサのうちの1つに配置し、
前記実行部は、
前記複数の処理が前記複数のプロセッサのうちの1つのみに配置される場合、前記第2処理を実行する
ことを特徴とする制御装置。
The control device according to claim 2.
The operation unit control unit
When the control mode detected by the detection unit indicates the minimum power consumption of the control device, the plurality of processes are arranged in one of the plurality of processors.
The execution unit
A control device characterized in that when the plurality of processes are arranged in only one of the plurality of processors, the second process is executed.
請求項3に記載の制御装置であって、
前記実行部は、
前記第2処理として、前記複数の処理を1つに統合し、統合された1つの処理を実行する
ことを特徴とする制御装置。
The control device according to claim 3.
The execution unit
As the second process, a control device characterized in that the plurality of processes are integrated into one and one integrated process is executed.
請求項2に記載の制御装置であって、
前記検出部は、
前記制御装置にインストールされるオペレーションシステムが対称型であるか又は非対称型であるかを示すOSモードを検出し、
前記メモリは、
前記OSモード及び前記配置状況の組合せと、前記識別子とを対応づけて記憶し、
前記実行部は、
前記検出部によって検出された前記OSモード及び前記配置状況の組合せに対応する前記識別子が示す前記第1処理又は前記第2処理を実行する
ことを特徴とする制御装置。
The control device according to claim 2.
The detection unit
The OS mode indicating whether the operating system installed in the control device is symmetric or asymmetric is detected, and the OS mode is detected.
The memory is
The combination of the OS mode and the arrangement status and the identifier are stored in association with each other.
The execution unit
A control device for executing the first process or the second process indicated by the identifier corresponding to the combination of the OS mode and the arrangement status detected by the detection unit.
請求項2に記載の制御装置であって、
第1バッファと第2バッファを備え、
前記実行部は、
前記第2処理を実行する場合、第1期間において、前記複数の処理の書き込みに前記第1バッファを用い、前記複数の処理の読み込みに前記第2バッファを用い、前記第1期間の後の第2期間において、前記複数の処理の書き込みに前記第2バッファを用い、前記複数の処理の読み込みに前記第1バッファを用いる
ことを特徴とする制御装置。
The control device according to claim 2.
It has a first buffer and a second buffer.
The execution unit
When the second process is executed, in the first period, the first buffer is used for writing the plurality of processes, the second buffer is used for reading the plurality of processes, and the second after the first period. A control device characterized in that the second buffer is used for writing the plurality of processes and the first buffer is used for reading the plurality of processes in two periods.
請求項2に記載の制御装置であって、
前記動作単位制御部は、
前記検出部によって検出される前記制御モードが示す前記制御装置の消費電力が小さくなるにつれて、前記複数の処理の数を減らす
ことを特徴とする制御装置。
The control device according to claim 2.
The operation unit control unit
A control device characterized in that the number of the plurality of processes is reduced as the power consumption of the control device indicated by the control mode detected by the detection unit decreases.
請求項7に記載の制御装置であって、
前記動作単位制御部は、
前記検出部によって検出される前記制御モードが示す前記制御装置の消費電力が小さくなるにつれて、使用するプロセッサの数を減らす
ことを特徴とする制御装置。
The control device according to claim 7.
The operation unit control unit
A control device characterized in that the number of processors used is reduced as the power consumption of the control device indicated by the control mode detected by the detection unit decreases.
JP2016252912A 2016-12-27 2016-12-27 Control device Active JP6774147B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016252912A JP6774147B2 (en) 2016-12-27 2016-12-27 Control device
PCT/JP2017/045437 WO2018123707A1 (en) 2016-12-27 2017-12-19 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016252912A JP6774147B2 (en) 2016-12-27 2016-12-27 Control device

Publications (2)

Publication Number Publication Date
JP2018106472A JP2018106472A (en) 2018-07-05
JP6774147B2 true JP6774147B2 (en) 2020-10-21

Family

ID=62707510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016252912A Active JP6774147B2 (en) 2016-12-27 2016-12-27 Control device

Country Status (2)

Country Link
JP (1) JP6774147B2 (en)
WO (1) WO2018123707A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021026613A (en) * 2019-08-07 2021-02-22 株式会社デンソーテン Calculation device, calculation method and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003084990A (en) * 2001-09-12 2003-03-20 Chuo Electronics Co Ltd General communication method between task
JP4057989B2 (en) * 2003-09-26 2008-03-05 株式会社東芝 Scheduling method and information processing system
JP5540799B2 (en) * 2010-03-19 2014-07-02 富士通株式会社 Data input / output control method, data input / output control program, and data input / output control device
US9201707B2 (en) * 2011-02-02 2015-12-01 Nec Corporation Distributed system, device, method, and program
JP6259388B2 (en) * 2014-12-03 2018-01-10 日本電信電話株式会社 Power control device, server virtualization system, and power control method

Also Published As

Publication number Publication date
WO2018123707A1 (en) 2018-07-05
JP2018106472A (en) 2018-07-05

Similar Documents

Publication Publication Date Title
US9411646B2 (en) Booting secondary processors in multicore system using kernel images stored in private memory segments
US9047120B2 (en) Virtual queue processing circuit and task processor
CN109997113B (en) Method and device for data processing
CN108920267B (en) Task processing device
TWI426452B (en) Work processing device
US20100268862A1 (en) Reconfigurable processor and method of reconfiguring the same
WO2008062647A1 (en) Multiprocessor system, system configuration method in multiprocessor system, and program thereof
JP4963018B2 (en) Scheduling method and scheduling apparatus
JP2016508647A5 (en)
TWI426451B (en) Work processing device
CN105786603B (en) Distributed high-concurrency service processing system and method
JP2012104140A (en) Sharing processor execution resources in waiting state
US8819680B2 (en) Computer system for controlling the execution of virtual machines
WO2012120654A1 (en) Task scheduling method and multi-core system
JP2010539592A (en) Method and system for exchanging data
KR101472186B1 (en) Information processing apparatus and method of controlling information processing apparatus
JP6774147B2 (en) Control device
US20050066093A1 (en) Real-time processor system and control method
JP2007058279A (en) Power-down shifting system
WO2019178178A1 (en) Thread scheduling for multithreaded data processing environments
JP2010244332A (en) Means of task assignment for multi-core system, method of the same, and program of the same
JP2006126938A (en) Data transfer system and its data transfer method
WO2017067402A1 (en) Computing device and computing device memory component management method and system
TW201828086A (en) Computing apparatus and management method and system of storage component of the computing apparatus capable of facilitates the maximum utilization of the components of different life cycles
KR100748715B1 (en) Hardware task management system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190712

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200930

R150 Certificate of patent or registration of utility model

Ref document number: 6774147

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