JP2020091540A - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP2020091540A
JP2020091540A JP2018226709A JP2018226709A JP2020091540A JP 2020091540 A JP2020091540 A JP 2020091540A JP 2018226709 A JP2018226709 A JP 2018226709A JP 2018226709 A JP2018226709 A JP 2018226709A JP 2020091540 A JP2020091540 A JP 2020091540A
Authority
JP
Japan
Prior art keywords
task
priority
frequency
execution
unit
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.)
Granted
Application number
JP2018226709A
Other languages
Japanese (ja)
Other versions
JP7263746B2 (en
Inventor
翔太 金生
Shota Kanao
翔太 金生
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2018226709A priority Critical patent/JP7263746B2/en
Publication of JP2020091540A publication Critical patent/JP2020091540A/en
Application granted granted Critical
Publication of JP7263746B2 publication Critical patent/JP7263746B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

To provide an information processing device capable of preventing degrading of accuracy of execution result even when task priority is made higher.SOLUTION: An information processing device 1 includes a task execution unit 10, a queueing unit 121, a frequency determination unit 122, a priority changing unit 123, and a sequence order maintaining unit 124. The queueing unit 121 determines an execution schedule order of the task in the execution unit 10 on the basis of the priority of each task. The frequency determination unit 122 determines a frequency lowered task in which the execution frequency has lowered. The priority changing unit 123 makes higher the priority of the frequency lowered task. The sequence order maintaining unit 124 makes higher the priority of a related task whose execution result is referred to by the frequency lowered task so that the execution schedule order of the frequency lowered task is maintained.SELECTED DRAWING: Figure 1

Description

本開示は、複数のタスクの実行順を優先度に従って管理する情報処理装置に関する。 The present disclosure relates to an information processing device that manages an execution order of a plurality of tasks according to a priority.

特許文献1には、複数のタスクの実行順を制御する情報処理装置が開示されている。特許文献1の情報処理装置では、実行待ちしているタスクは、各タスクに設定された優先度に従う実行順で実行される。情報処理装置は、処理抜け頻度が処理抜け許容率以上となったタスクについて、優先度を高める。 Patent Document 1 discloses an information processing apparatus that controls the execution order of a plurality of tasks. In the information processing apparatus of Patent Document 1, the tasks waiting for execution are executed in the execution order according to the priority set for each task. The information processing apparatus raises the priority of a task whose processing omission frequency is equal to or higher than the processing omission allowable rate.

特開2013−88937号公報JP, 2013-88937, A

しかし、制御されるタスクには、関連タスクの実行結果に基づいて実行されるため、関連タスクの後での実行が望ましいタスクが含まれうる。こうしたタスクは、優先度を高められた場合、実行順の変化に伴い関連タスク以前に実行されうる。故に、優先度を高められたタスクの実行結果において、関連タスクの実行結果が反映されず、精度の低下が生じえた。 However, the controlled task may include a task that should be executed after the related task because it is executed based on the execution result of the related task. When the priority of these tasks is increased, the tasks may be executed before the related tasks as the execution order changes. Therefore, in the execution result of the task with the increased priority, the execution result of the related task is not reflected, and the accuracy may decrease.

本開示は、タスクの優先度を高める場合においても、実行結果の精度低下を抑制可能な情報処理装置の提供を目的とする。 An object of the present disclosure is to provide an information processing apparatus capable of suppressing a decrease in accuracy of execution results even when increasing the priority of tasks.

上記目的は独立請求項に記載の特徴の組み合わせにより達成され、また、下位請求項は、本開示の更なる有利な具体例を規定する。特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。 The above objective is achieved by a combination of the features recited in independent claims, and the subclaims define further advantageous embodiments of the present disclosure. The reference numerals in parentheses in the claims indicate the correspondence with the specific means described in the embodiments described below as one aspect, and do not limit the technical scope of the present disclosure. ..

上記目的を達成するための本開示の情報処理装置は、タスクを順に実行する実行部(10)と、実行部による実行を待つ複数のタスクの実行予定順を、各タスクに設定された優先度に基づいて決定する順序決定部(121)と、各タスクについて、実行頻度の低下した頻度低下タスクであるか否かを判断する頻度判断部(122)と、頻度低下タスクの優先度を高める優先度変更部(123)と、頻度低下タスクが、関連づけられた関連タスクの実行結果に基づいて実行されるタスクである場合に、関連タスクの優先度を、頻度低下タスクに対する実行予定順を維持するように高める順序維持部(124)と、を備える。 An information processing apparatus according to an embodiment of the present disclosure for achieving the above-described object includes an execution unit (10) that sequentially executes tasks, and a scheduled execution order of a plurality of tasks waiting for execution by the execution units, with priorities set for each task. Based on the order determination unit (121), a frequency determination unit (122) for determining whether each task is a frequency-reduced task with a reduced execution frequency, and a priority for increasing the priority of the frequency-reduced task. When the frequency changing unit (123) and the frequency-reduced task are tasks that are executed based on the execution results of the related tasks associated with each other, the priority of the related task is maintained in the scheduled execution order for the frequency-reduced task. And an order maintaining unit (124).

以上の構成によれば、順序維持部は、頻度低下タスクの関連タスクを、頻度低下タスクに対する実行予定順を維持するように優先度を高める。この結果、頻度低下タスクは、優先度変更部により優先度を高められる場合においても、関連タスク以前となることなく実行される。故に、優先度の変更に伴い実行予定順が変化する場合においても、関連タスクの実行結果を反映してタスクを実行しうる。従って、タスクの優先度を高める場合においても、実行結果の精度低下が抑制される。 According to the above configuration, the order maintaining unit increases the priority of the related task of the frequency-reduced task so as to maintain the scheduled execution order for the frequency-reduced task. As a result, the frequency-reduced task is executed before the related task even when the priority is increased by the priority changing unit. Therefore, even when the execution schedule order changes with the change in priority, the task can be executed by reflecting the execution result of the related task. Therefore, even when the priority of the task is increased, the accuracy reduction of the execution result is suppressed.

情報処理装置の構成を示す図である。It is a figure which shows the structure of an information processing apparatus. タスク割当管理部における処理を示すフローチャートである。It is a flowchart which shows the process in a task allocation management part. レディキューおよびキュー管理部の状態変化の例を示す図である。It is a figure which shows the example of a state change of a ready queue and a queue management part. 実行部に対するタスクの割り当て順の例を示す図である。It is a figure which shows the example of the allocation order of the task with respect to an execution part.

図1に示す本開示の実施形態による情報処理装置1は、例えば車両において、エンジンの燃料噴射や点火時期を制御するエンジンECUとして用いられる電子制御装置である。情報処理装置1は、ソフトウェアを非一時的に記録した非遷移的かつ実体的な記憶媒体としてのメモリ、ソフトウェアを実行するプロセッサ、および入出力インターフェースなどを備えたマイクロコンピュータである。メモリには、リアルタイムオペレーティングシステム(以下、RTOS:Real-time operating system)のプログラムと、RTOS上で動作し、エンジンECUとしての機能を提供するアプリケーションプログラムとが格納されている。 The information processing device 1 according to the embodiment of the present disclosure illustrated in FIG. 1 is an electronic control device used as an engine ECU that controls fuel injection and ignition timing of an engine in a vehicle, for example. The information processing device 1 is a microcomputer including a memory as a non-transitional and substantial storage medium in which software is recorded non-temporarily, a processor that executes software, an input/output interface, and the like. The memory stores a program of a real-time operating system (hereinafter, RTOS) and an application program that operates on the RTOS and provides a function as an engine ECU.

情報処理装置1は、アプリケーションプログラムによる機能を実現するための種々の処理を、RTOSにより実行される複数のタスクとして動作させる。タスクは、RTOSにより規定されたひと纏まりの実行単位である。情報処理装置1は、各タスクの実行状態および実行順を管理し、各タスクを逐次的に実行する。情報処理装置1で実行されるタスクには、エンジンの各気筒に対する点火制御、クランク角の取得、空燃比の取得、アクセル開度の取得、燃料噴射量の算出、スロットルバルブの開度制御などに区分された処理が個別に設定されている。情報処理装置1は、各タスクの実行順を、各タスクに設定された優先度等に基づいて管理する。情報処理装置1は、プロセッサでRTOSのプログラムを実行することにより、実行部10、割り込みコントローラ20、およびタスク割当管理部100としての機能を発揮する。 The information processing device 1 causes various processes for realizing the functions of the application program to operate as a plurality of tasks executed by the RTOS. A task is a set of execution units defined by RTOS. The information processing device 1 manages the execution state and execution order of each task, and sequentially executes each task. The tasks executed by the information processing device 1 include ignition control for each cylinder of the engine, acquisition of crank angle, acquisition of air-fuel ratio, acquisition of accelerator opening, calculation of fuel injection amount, opening control of throttle valve, etc. Separated processing is set individually. The information processing apparatus 1 manages the execution order of each task based on the priority set for each task. The information processing device 1 exhibits the functions of the execution unit 10, the interrupt controller 20, and the task allocation management unit 100 by executing the RTOS program on the processor.

実行部10は、プロセッサのうち各タスクを順に実行するために割り当てられた領域である。実行部10は、各タスクに係る算術演算や論理演算などを行う演算回路や、各タスクに係るデータなどを一時的に格納するためのレジスタなどを含んでいる。実行部10は、タスクの割り当て条件が成立すると、タスク割当管理部100にタスクの割り当てを要求する。タスクの割り当て条件は、例えば実行中のタスクの実行開始から所定時間の経過や、実行中のタスクに係る一サイクルの演算の終了などである。実行部10は、タスク割当管理部100により新たなタスクの割り当てを受けると、実行中であったタスクがあればそのタスクに係る演算の進行状況やデータなどを退避させ、割り当てられたタスクの実行を開始する。実行部10は、割り当てられた順に従って実行中のタスクを切り替えることにより、各タスクを見かけ上で並列して逐次的に実行する。 The execution unit 10 is an area of the processor allocated to sequentially execute each task. The execution unit 10 includes an arithmetic circuit that performs arithmetic operations and logical operations related to each task, a register that temporarily stores data related to each task, and the like. When the task allocation condition is satisfied, the execution unit 10 requests the task allocation management unit 100 to allocate the task. The task allocation condition is, for example, a lapse of a predetermined time from the start of execution of the task being executed, the end of one-cycle calculation of the task being executed, or the like. When the execution unit 10 receives a new task allocation by the task allocation management unit 100, if there is a task that is being executed, the execution unit 10 saves the progress status and data of the operation related to that task, and executes the allocated task. To start. The execution unit 10 apparently parallelly and sequentially executes the tasks by switching the tasks being executed according to the assigned order.

割り込みコントローラ20は、各タスクの割り込み発生条件が成立しているか否かに基づいて、各タスクの割り込み要求を出力するモジュールである。各タスクの割り込み条件には、例えば情報処理装置1への入力信号の立ち上がりや所定時間の経過、データの転送完了などが個別に設定されている。割り込みコントローラ20は、割り込み条件の成立したタスクについての割り込み要求を、タスク割当管理部100に出力する。 The interrupt controller 20 is a module that outputs an interrupt request for each task based on whether the interrupt generation condition for each task is satisfied. For example, rising of an input signal to the information processing device 1, elapse of a predetermined time, completion of data transfer, and the like are individually set as interrupt conditions of each task. The interrupt controller 20 outputs an interrupt request for a task for which an interrupt condition is satisfied to the task allocation management unit 100.

タスク割当管理部100は、例えばプロセッサのうち、実行部10に割り当てられるタスクを管理するために割り当てられた領域である。タスク割当管理部100は、割り込みコントローラ20から各タスクについての割り込み要求を受け、各タスクに設定された優先度および割り込み要求を受けたタイミングに従って各タスクを実行部10で実行されるタスクとして割り当てる。タスク割当管理部100は、状態管理部110およびタスク制御部120としての機能を有する。 The task allocation management unit 100 is, for example, an area of the processor allocated to manage tasks allocated to the execution unit 10. The task allocation management unit 100 receives an interrupt request for each task from the interrupt controller 20, and allocates each task as a task to be executed by the execution unit 10 according to the priority set for each task and the timing at which the interrupt request is received. The task assignment management unit 100 has functions as a state management unit 110 and a task control unit 120.

状態管理部110は、各タスクの実行状態を管理するための記憶領域である。状態管理部110は、レディキュー111、キュー管理部112、関連タスクテーブル113を含んでいる。 The status management unit 110 is a storage area for managing the execution status of each task. The state management unit 110 includes a ready queue 111, a queue management unit 112, and a related task table 113.

レディキュー111は、各タスクの割り込み要求を格納する領域である。各タスクの割り込み要求は、タスクに設定された優先度の一致する割り込み要求ごとに、割り込み要求を受けた順に従ってレディキュー111に格納される。格納された各タスクの割り込み要求は、実行部10からタスクの割り当て要求を受けるたびに一つ取り出される。取り出された割り込み要求に対応するタスクが、実行部10で次に実行されるタスクとして割り当てられる。従って、レディキュー111内の各割り込み要求の配列が、その時点における実行順の予定を示した「実行予定順」に相当する。 The ready queue 111 is an area for storing the interrupt request of each task. The interrupt request of each task is stored in the ready queue 111 according to the order in which the interrupt request is received, for each interrupt request having the same priority set in the task. One of the stored interrupt requests for each task is taken out each time a task allocation request is received from the execution unit 10. The task corresponding to the fetched interrupt request is assigned as the task to be executed next by the execution unit 10. Therefore, the array of each interrupt request in the ready queue 111 corresponds to the “execution scheduled order” indicating the schedule of the execution order at that time.

割り込み要求されたタスクの取り出しは、格納されている割り込み要求の中で、最も優先度の高いタスクの割り込み要求から順に行われる。本実施形態では、優先度として設定された数値が小さいほど、高い優先度であるとして扱う。最も優先度の高い割り込み要求が複数格納されている場合は、先に格納された割り込み要求のタスクから順に割り当てられる。従って実行予定順は、例えば格納された割り込み要求のいずれかよりも優先度の高い割り込み要求を新たに格納された場合など、実際に割り当てられるまでに変動しうる。 The task for which an interrupt request has been issued is taken out in order from the interrupt request of the task with the highest priority among the stored interrupt requests. In the present embodiment, the smaller the numerical value set as the priority, the higher the priority. When a plurality of interrupt requests having the highest priority are stored, the tasks of the interrupt request stored first are assigned in order. Therefore, the order of execution schedules may change until the interrupt request is actually allocated, for example, when an interrupt request having a higher priority than any of the stored interrupt requests is newly stored.

キュー管理部112は、レディキュー111に対する割り込み要求の格納を管理するためのデータを格納する領域である。キュー管理部112には、キューイング数、あらかじめ設定された優先度、および変更閾値が、タスク割当管理部100で管理されるタスクごとに格納されている。キューイング数は、各タスクについてのレディキュー111に現在格納されている割り込み要求の数である。キューイング数は、実行を待っている各タスクの割り込み要求の数であり、「実行待ち数」に相当する。 The queue management unit 112 is an area for storing data for managing storage of interrupt requests for the ready queue 111. The queue management unit 112 stores a queuing number, a preset priority, and a change threshold for each task managed by the task allocation management unit 100. The queuing number is the number of interrupt requests currently stored in the ready queue 111 for each task. The queuing number is the number of interrupt requests of each task waiting for execution, and corresponds to the "execution waiting number".

優先度は、レディキュー111内で割り込み要求をソートするために、各タスクにあらかじめ設定されたパラメータである。優先度は、割り込み要求発生から割り当てまでの時間が短いことが好ましいタスクほど高く設定される。本実施形態の優先度は、0から4までの5段階が設定されている。各タスクには、通常優先度および一時優先度の二つまで優先度が設定可能となっている。通常優先度は、レディキュー111への格納にあたって参照される優先度である。一時優先度は、レディキュー111に格納された状態のタスクの実行予定順を変更する場合に、実行予定順を変更するタスクの割り込み要求に一時的に適用される優先度である。一時優先度は、通常優先度よりも高い優先度に設定されている。 The priority is a parameter preset for each task in order to sort the interrupt requests in the ready queue 111. The priority is set to be higher for a task in which it is preferable that the time from the generation of an interrupt request to the allocation is shorter. Five levels from 0 to 4 are set as the priorities of the present embodiment. Up to two priorities, a normal priority and a temporary priority, can be set for each task. The normal priority is a priority referred to when storing in the ready queue 111. The temporary priority is a priority temporarily applied to an interrupt request of a task whose execution schedule order is changed when the execution schedule order of tasks stored in the ready queue 111 is changed. The temporary priority is set to a higher priority than the normal priority.

変更閾値は、各タスクの割り込み要求に一時優先度を適用することにより、実行予定順を変更する条件としてあらかじめ設定されたパラメータである。実行予定順の変更は、いずれかのタスクが、実行頻度の低下した頻度低下タスクとなった場合に実施される。ただし、実行頻度が低下しているとは、各タスクに設定された許容される実行頻度範囲を下回っている状態を示す。本実施形態の変更閾値は、各タスクのキューイング数の閾値として設定されている。変更閾値は、想定される割り込み要求の発生頻度と、許容される実行頻度の下限とに基づいて設定される。例えば、割り込み要求の発生頻度が高いほど大きく、実行頻度の下限が高いほど小さい値に設定される。 The change threshold is a parameter set in advance as a condition for changing the scheduled execution order by applying the temporary priority to the interrupt request of each task. The execution schedule order is changed when any of the tasks becomes a frequency-reduced task with a reduced execution frequency. However, the decrease in the execution frequency indicates a state where the execution frequency is below the allowable execution frequency range set for each task. The change threshold value of this embodiment is set as a threshold value of the queuing number of each task. The change threshold is set based on the expected frequency of interrupt requests and the lower limit of the allowable execution frequency. For example, it is set to a larger value as the occurrence frequency of interrupt requests is higher, and is set to a smaller value as the lower limit of execution frequency is higher.

本実施形態では、キュー管理部112には、タスクA、タスクB、およびタスクCの三つのタスクについてキューイング管理のためのデータが格納されている。タスクAは、現在のクランク角に基づいて、燃料噴射量を算出するタスクである。タスクAには、通常優先度として4が設定され、一時優先度として1が設定されている。またタスクAには、変更閾値として3が設定されている。 In this embodiment, the queue management unit 112 stores data for queuing management for three tasks, task A, task B, and task C. Task A is a task of calculating the fuel injection amount based on the current crank angle. The task A has a normal priority of 4 and a temporary priority of 1. Further, in the task A, 3 is set as the change threshold.

タスクBは、クランク角を取得するタスクである。タスクBで取得された最新のクランク角に基づいて、タスクAが実行される。故にタスクBには、タスクAの直前に実行されるように、通常優先度としてタスクAの通常優先度より一段階高い3が設定されている。またタスクBには、一時優先度として0が設定され、変更閾値として4が設定されている。タスクAおよびタスクBの一時優先度の段階の差は、通常優先度の差と一致するように設定されている。すなわち、タスクAの一時優先度である1に対して、タスクBの一時優先度である0が一段階高く設定されている。タスクBの割り込み要求は、ノイズ抑制等のため、タスクAの割り込み要求よりも高い頻度で発生する。 Task B is a task for acquiring the crank angle. Task A is executed based on the latest crank angle acquired in task B. Therefore, the task B is set to have a normal priority of 3 which is one step higher than the normal priority of the task A so that it is executed immediately before the task A. Further, in the task B, 0 is set as the temporary priority and 4 is set as the change threshold. The difference between the temporary priority levels of task A and task B is set to match the difference between the normal priorities. That is, the temporary priority of task A is set to be one step higher than the temporary priority of task A to be 0. The interrupt request of the task B occurs more frequently than the interrupt request of the task A because of noise suppression and the like.

タスクCは、各気筒に対する点火処理を行うタスクである。タスクCには、通常優先度として2が設定されている。タスクCは、他のいずれのタスクよりも通常優先度が高く設定されており、実行頻度の低下を生じない。従って、タスクCには、一時優先度および変更閾値が設定されていない。またタスクAおよびタスクBの一時優先度は、いずれのタスクに設定された通常優先度よりも高く設定されている。 Task C is a task of performing ignition processing for each cylinder. The task C has a normal priority of 2. The task C has a higher normal priority than any other task, and thus the execution frequency does not decrease. Therefore, the task C is not set with the temporary priority and the change threshold. The temporary priorities of the tasks A and B are set higher than the normal priorities set for any of the tasks.

関連タスクテーブル113は、各タスクと、当該タスクにあらかじめ関連付けられた関連タスクとの関係を格納する領域である。関連タスクは、あるタスクに対する一時優先度の適用により実行予定順が変更される場合に、連動して優先度を変更されるタスクである。関連タスクとして設定されるタスクは、例えばそのタスクの実行結果に基づいて他のタスクが実行されるタスクである。具体的には、所定のタスクの実行にあたって他のタスクの実行結果として得られたデータを参照する場合に、データを参照される側のタスクが、データを参照する側のタスクに対する関連タスクとしてあらかじめ設定されている。 The related task table 113 is an area for storing a relationship between each task and a related task associated with the task in advance. A related task is a task whose priority is changed in conjunction when the execution schedule order is changed by applying a temporary priority to a certain task. The task set as the related task is, for example, a task in which another task is executed based on the execution result of the task. Specifically, when referring to the data obtained as the execution result of another task in executing a predetermined task, the task of the side that refers to the data is previously set as a related task to the task of the side that refers to the data. It is set.

例えば本実施形態においては、燃料噴射量を算出するタスクAに対して、算出に当たって参照するクランク角を取得するタスクBが関連タスクとして設定されている。タスクAは、関連タスクであるタスクBによる最新のクランク角に基づいて燃料噴射量を算出する。なお、本実施形態において関連タスクとして設定されているタスクには、上述した関係以外のタスクも含まれている。例えば本実施形態においては、タスクBに対して、タスクAが関連タスクとして設定されている。すなわち、データを参照する側のタスクについても、データを参照される側のタスクに対する関連タスクとして設定されている。関連タスクテーブル113は、キュー管理部112とは別に、テーブル形式で各タスクと関連タスクとの関係を格納している。 For example, in the present embodiment, the task A for calculating the fuel injection amount is set as the related task to the task B for acquiring the crank angle to be referred to in the calculation. Task A calculates the fuel injection amount based on the latest crank angle by task B, which is a related task. The tasks set as the related tasks in the present embodiment include tasks other than the above-mentioned relationships. For example, in this embodiment, task A is set as a related task with respect to task B. That is, the task that refers to the data is also set as a related task to the task that refers to the data. The related task table 113 stores the relationship between each task and related tasks in a table format separately from the queue management unit 112.

タスク制御部120は、状態管理部110に格納された各データに基づいて、割り込み要求の受付および実行部10へのタスクの割り当てを制御する制御回路である。タスク制御部120は、キューイング部121、頻度判断部122、優先度変更部123、順序維持部124としての機能を発揮する。 The task control unit 120 is a control circuit that controls the acceptance of an interrupt request and the assignment of a task to the execution unit 10 based on each data stored in the state management unit 110. The task control unit 120 functions as a queuing unit 121, a frequency determination unit 122, a priority changing unit 123, and an order maintaining unit 124.

キューイング部121は、割り込みコントローラ20から出力された割り込み要求を受信した場合に、受信した割り込み要求をレディキュー111に格納する。キューイング部121は、割り込み要求を受信したタスクの通常優先度をキュー管理部112から読み出す。キューイング部121は、レディキュー111のうち、通常優先度に対応した範囲の最後尾に割り込み要求を格納する。すなわちキューイング部121は、実行予定順を、各タスクに設定された優先度のうち通常優先度に基づいて決定する「順序決定部」に相当する。キューイング部121は、割り込み要求を格納したタスクについて、キュー管理部112に格納されているキューイング数を格納完了時点の値に更新する。またキューイング部121は、レディキュー111から割り込み要求が取り出されて実行部10に割り当てられた場合にも、キューイング数を更新する。 When receiving the interrupt request output from the interrupt controller 20, the queuing unit 121 stores the received interrupt request in the ready queue 111. The queuing unit 121 reads the normal priority of the task that received the interrupt request from the queue management unit 112. The queuing unit 121 stores the interrupt request at the end of the range corresponding to the normal priority in the ready queue 111. That is, the queuing unit 121 corresponds to an “order determining unit” that determines the scheduled execution order based on the normal priority among the priorities set for each task. The queuing unit 121 updates the queuing number stored in the queue management unit 112 to the value at the time of storage completion for the task storing the interrupt request. The queuing unit 121 also updates the queuing number when the interrupt request is taken out from the ready queue 111 and assigned to the execution unit 10.

頻度判断部122は、各タスクについて、実行頻度の低下した頻度低下タスクであるか否かを判断する。本実施形態の頻度判断部122では、各タスクについてキュー管理部112に格納されたキューイング数、および変更閾値に基づいて頻度低下タスクであると判断する。頻度判断部122は、例えばキューイング部121がいずれかのタスクについて割り込み要求の格納およびキューイング数の更新を実施した場合に、タスクの更新後のキューイング数、および変更閾値を読みだす。頻度判断部122は、キューイング数が変更閾値以上である場合、割り込み要求を格納したタスクが頻度低下タスクとなっていると判断する。 The frequency determination unit 122 determines whether or not each task is a frequency-reduced task whose execution frequency has been reduced. The frequency determination unit 122 of the present embodiment determines that each task is a frequency-reduced task based on the queuing number stored in the queue management unit 112 and the change threshold. For example, when the queuing unit 121 stores an interrupt request and updates the queuing number for any task, the frequency determining unit 122 reads the queuing number after the task update and the change threshold. When the queuing number is equal to or larger than the change threshold, the frequency determination unit 122 determines that the task storing the interrupt request is the frequency-reduced task.

優先度変更部123は、頻度判断部122により頻度低下タスクと判断されたタスクの優先度を高める。優先度変更部123は、レディキュー111に格納された頻度低下タスクの優先度を、通常優先度よりも高い一時優先度に変更させる。優先度変更部123は、優先度の変更にあたり、頻度低下タスクのキューイング数を減少させる。例えば優先度変更部123は、キューイング数を1まで減少させる。具体的には、優先度変更部123は、通常優先度に従って格納されていた頻度低下タスクの割り込み要求をレディキュー111から全て削除し、一時優先度に従う割り込み要求を1つのみレディキュー111に改めて格納する。優先度変更部123は、一時優先度に従う割り込み要求を格納すると、キューイング数を更新して1とする。 The priority changing unit 123 increases the priority of the task determined by the frequency determining unit 122 to be a frequency-reduced task. The priority changing unit 123 changes the priority of the frequency-reduced task stored in the ready queue 111 to a temporary priority higher than the normal priority. The priority changing unit 123 reduces the queuing number of the frequency-reduced task when changing the priority. For example, the priority changing unit 123 reduces the queuing number to 1. Specifically, the priority changing unit 123 deletes all the interrupt requests of the frequency-reduced task stored according to the normal priority from the ready queue 111, and rewrites only one interrupt request according to the temporary priority to the ready queue 111. Store. When storing the interrupt request according to the temporary priority, the priority changing unit 123 updates the queuing number to be 1.

順序維持部124は、頻度低下タスクに関連付けられた関連タスクについて、頻度低下タスクに対する実行予定順を維持するように優先度を高める。すなわち、頻度低下タスクの優先度を高める前における実行予定順の前後関係が、頻度低下タスクの優先度を高めた後においても維持されるように優先度を変更する。順序維持部124は、いずれかのタスクが頻度判断部122により頻度低下タスクであると判断されると、そのタスクの関連タスクを関連タスクテーブル113から読み出す。また順序維持部124は、関連タスクテーブル113から読み出した関連タスクについて、一時優先度をキュー管理部112から読み出す。順序維持部124は、関連タスクの優先度を、通常優先度よりも高い優先度である一時優先度に変更させる。 The order maintaining unit 124 raises the priority of the related task associated with the frequency-reduced task so as to maintain the scheduled execution order for the frequency-reduced task. That is, the priority is changed so that the context of the order of execution schedule before increasing the priority of the frequency-reduced task is maintained even after increasing the priority of the frequency-reduced task. When the frequency determining unit 122 determines that any of the tasks is a frequency-reduced task, the order maintaining unit 124 reads the related task of the task from the related task table 113. The order maintaining unit 124 also reads the temporary priority from the queue managing unit 112 for the related task read from the related task table 113. The order maintaining unit 124 changes the priority of the related task to a temporary priority that is higher than the normal priority.

タスクAおよびタスクBに設定された一時優先度の差は、通常優先度の段階の差と一致するように設定されている。従って、タスクAおよびタスクBの一方が頻度低下タスクとなった場合、他方である関連タスクの優先度は、頻度低下タスクに対する関連タスクの相対的な実行予定順を維持されるように変更される。また、タスクAおよびタスクBの一時優先度は、いずれのタスクの通常優先度よりも高く、かつ優先度の差が一段階となるように設定されている。この結果、タスクAおよびタスクBの一方が頻度低下タスクとなった場合、他方である関連タスクは、頻度低下タスクと連続して実行されるように優先度を変更される。順序維持部124は、関連タスクの優先度の変更にあたり、関連タスクのキューイング数を減少させる。例えば順序維持部124は、関連タスクのキューイング数を1まで減少させる。 The difference between the temporary priorities set for the task A and the task B is set so as to match the difference between the normal priority stages. Therefore, when one of the task A and the task B becomes a frequency-reduced task, the priority of the other related task is changed so that the relative scheduled execution order of the related task with respect to the frequency-reduced task is maintained. .. Further, the temporary priorities of the tasks A and B are set higher than the normal priorities of any of the tasks, and the difference between the priorities is set to one step. As a result, when one of the task A and the task B becomes a frequency-reduced task, the priority of the other related task is changed so as to be executed continuously with the frequency-reduced task. The order maintaining unit 124 reduces the queuing number of related tasks when changing the priority of the related tasks. For example, the order maintaining unit 124 reduces the queuing number of related tasks to 1.

[タスク制御部120の作動]
タスク制御部120の作動例を説明する。タスク制御部120は、割り込みコントローラ20から割り込み要求を受けた場合に、図2のフローチャートに示す処理をS1から順に実行する。
[Operation of task control unit 120]
An operation example of the task control unit 120 will be described. When the task control unit 120 receives an interrupt request from the interrupt controller 20, the task control unit 120 sequentially executes the processes shown in the flowchart of FIG. 2 from S1.

S1では、割り込み要求を受けたタスクについて通常優先度を取得し、取得した通常優先度に従ってタスクの割り込み要求をレディキュー111に格納する。S2では、S1で割り込み要求を格納したタスクのキューイング数を更新する。 In S1, the normal priority is acquired for the task that received the interrupt request, and the interrupt request of the task is stored in the ready queue 111 according to the acquired normal priority. In S2, the queuing number of the task storing the interrupt request in S1 is updated.

S3では、S2でキューイング数を更新したタスクが、頻度低下タスクであるか否かを判断する。すなわち、更新したタスクのキューイング数が変更閾値以上となっているか否かを判断する。変更閾値以上となっている場合には頻度低下タスクであるとしてS4に進み、変更閾値未満である場合は頻度低下タスクでないとして図2に示す処理を終了する。 In S3, it is determined whether or not the task whose queuing number has been updated in S2 is a reduced frequency task. That is, it is determined whether or not the queuing number of the updated task is equal to or larger than the change threshold. If it is equal to or greater than the change threshold, the process proceeds to S4 as a frequency lowering task, and if it is less than the change threshold, the process shown in FIG.

S4では、S3で頻度低下タスクであると判断されたタスクについて、関連タスクテーブル113に関連タスクが設定されているか否かを判断する。関連タスクが設定されている場合はS5に進み、設定されていない場合にはS7に進む。 In S4, it is determined whether or not a related task is set in the related task table 113 for the task that is determined to be the frequency-reduced task in S3. If the related task is set, the process proceeds to S5, and if it is not set, the process proceeds to S7.

S5では、通常優先度に従ってキューイングされた関連タスクの割り込み要求を削減し、一つの割り込み要求のみレディキュー111に残す。 In S5, the interrupt requests of the related tasks queued according to the normal priority are reduced, and only one interrupt request is left in the ready queue 111.

S6では、関連タスクとして設定されたタスクの一時優先度を取得し、レディキュー111内に残された関連タスクに係る割り込み要求の優先度を、通常優先度から一時優先度に変更させる。優先度の変更に従って、関連タスクに係る割り込み要求の位置が移動し、実行予定順が更新される。 In S6, the temporary priority of the task set as the related task is acquired, and the priority of the interrupt request related to the related task remaining in the ready queue 111 is changed from the normal priority to the temporary priority. The position of the interrupt request related to the related task is moved according to the change of the priority, and the scheduled execution order is updated.

S7では、通常優先度に従ってキューイングされた頻度低下タスクの割り込み要求を削減し、一つの割り込み要求のみレディキュー111に残す。 In S7, the interrupt requests of the frequency-reduced tasks queued according to the normal priority are reduced, and only one interrupt request is left in the ready queue 111.

S8では、頻度低下タスクの一時優先度を取得し、レディキュー111内に残された頻度低下タスクに係る割り込み要求の優先度を、通常優先度から一時優先度に変更する。優先度の変更に従って頻度低下タスクに係る割り込み要求の位置が移動し、実行予定順が更新される。 In S8, the temporary priority of the frequency-reduced task is acquired, and the priority of the interrupt request related to the frequency-reduced task remaining in the ready queue 111 is changed from the normal priority to the temporary priority. The position of the interrupt request relating to the frequency-reduced task is moved according to the change of the priority, and the scheduled execution order is updated.

図2に示したタスク制御部120の作動に伴う、レディキュー111およびキュー管理部112の状態変化の例を説明する。図3には、タスクAのキューイング数が2となっていたレディキュー111に対して、タスクAの割り込み要求が更に格納される場合の挙動を示している。図2に示したS1およびS2により、レディキュー111内の優先度4の範囲の最後尾に、タスクAの割り込み要求が更に格納され、キュー管理部112に格納されたタスクAのキューイング数が2から3に更新される。この結果、S3でタスクAが頻度低下タスクであると判断され、またS4でタスクBが頻度低下タスクの関連タスクであると判断される。 An example of the state change of the ready queue 111 and the queue management unit 112 due to the operation of the task control unit 120 illustrated in FIG. 2 will be described. FIG. 3 shows the behavior when the interrupt request of the task A is further stored in the ready queue 111 in which the queuing number of the task A is 2. By S1 and S2 shown in FIG. 2, the interrupt request of task A is further stored at the end of the range of priority 4 in the ready queue 111, and the queuing number of task A stored in the queue management unit 112 is Updated from 2 to 3. As a result, task A is determined to be a frequency-reduced task in S3, and task B is determined to be a related task of the frequency-reduced task in S4.

S5およびS6により、レディキュー111内の優先度3の範囲に格納されたタスクBの割り込み要求のうち、一つのみが優先度0の範囲に移動され、残りは全て削除される。また、タスクBのキューイング数は1に更新される。S7およびS8により、レディキュー111内の優先度4の範囲に格納されたタスクAの割り込み要求のうち、一つのみが優先度1の範囲に移動され、残りは全て削除される。また、タスクAのキューイング数は1に更新される。 Through S5 and S6, among the interrupt requests of task B stored in the range of priority 3 in the ready queue 111, only one is moved to the range of priority 0 and the rest are deleted. Further, the queuing number of task B is updated to 1. Through S7 and S8, only one of the interrupt requests of task A stored in the range of priority 4 in the ready queue 111 is moved to the range of priority 1, and the rest are deleted. Further, the queuing number of task A is updated to 1.

タスク制御部120の作動に伴う実行部10において実行されるタスクの時間変化の例を図4に沿って説明する。図4は、例えば車両の高速走行などにより、通常優先度の高いタスクCの割り込み要求頻度が高まった状態において、実行部10で実行されるタスクの切替わりを示す。通常優先度の高いタスクCの割り込み要求が増加することにより、通常優先度の最も低いタスクAは割り込み要求を受けているにも拘らず実行されない状態となっている。 An example of the change over time of the task executed by the execution unit 10 due to the operation of the task control unit 120 will be described with reference to FIG. FIG. 4 shows switching of tasks executed by the execution unit 10 when the interrupt request frequency of the task C having a high priority is increased due to, for example, high-speed running of the vehicle. Due to the increase in the interrupt requests of the task C having the high normal priority, the task A having the lowest normal priority is in the state of not being executed although the interrupt request is received.

時刻t1に、タスクAの割り込み要求を受けてタスクAのキューイング数が3となったとする。この結果、タスクAが頻度低下タスクと判断され、またタスクBが頻度低下タスクに対する関連タスクであると判断される。タスクAおよびタスクBは一時優先度に従ってレディキュー111内の位置を変更される。時刻t2に実行部10に対するタスクの割り当てが発生し、一時優先度として優先度0となっているタスクBが割り当てられる。時刻t3にタスクCの割り込み要求が発生しているが、タスクCの通常優先度は、タスクAの一時優先度である優先度1より低い優先度2である。従って、時刻t4に再び実行部10に対するタスクの割り当てが発生すると、タスクAは、タスクBの直後にタスクCより優先して割り当てられる。 It is assumed that the queuing number of the task A becomes 3 at the time t1 in response to the interrupt request of the task A. As a result, it is determined that task A is a frequency-reduced task and task B is a related task to the frequency-reduced task. The positions of task A and task B in the ready queue 111 are changed according to the temporary priority. At time t2, the task is allocated to the execution unit 10, and the task B having the temporary priority of 0 is allocated. Although the interrupt request of the task C is generated at the time t3, the normal priority of the task C is the priority 2 which is lower than the priority 1 which is the temporary priority of the task A. Therefore, when the task allocation to the execution unit 10 occurs again at the time t4, the task A is allocated immediately after the task B and is prioritized over the task C.

[実施形態のまとめ]
以上、説明した実施形態によれば、順序維持部124は、頻度低下タスクの関連タスクを、頻度低下タスクに対する実行予定順を維持するように優先度を高める。この結果、頻度低下タスクは、優先度変更部123により優先度を高められる場合においても、関連タスク以前の実行となることなく実行される。故に、優先度の変更に伴い実行予定順が変化する場合においても、関連タスクの実行結果を反映してタスクを実行しうる。従って、頻度低下タスクの優先度を高める場合においても、実行結果の精度低下が抑制される。
[Summary of Embodiments]
As described above, according to the embodiment described above, the order maintaining unit 124 increases the priority of the related task of the frequency-reduced task so as to maintain the scheduled execution order for the frequency-reduced task. As a result, the frequency-reduced task is executed without being executed before the related task even when the priority is changed by the priority changing unit 123. Therefore, even when the execution schedule order changes with the change in priority, the task can be executed by reflecting the execution result of the related task. Therefore, even when the priority of the frequency-reduced task is increased, the reduction in the accuracy of the execution result is suppressed.

加えて本実施形態では、頻度判断部122は、キューイング数が変更閾値以上となったタスクを頻度低下タスクと判断する。こうした判断によれば、個々のタスクに対してタイマや抜け率の算出部などを新たに設けることなく、実行頻度の低下を判断可能となる。従って、実行頻度の判断に係るコストを抑制可能となる。 In addition, in the present embodiment, the frequency determination unit 122 determines a task whose queuing number is equal to or greater than the change threshold as a frequency-reduced task. According to such a determination, it is possible to determine the decrease in the execution frequency without newly providing a timer or a missing rate calculating unit for each task. Therefore, it is possible to suppress the cost for determining the execution frequency.

また本実施形態では、優先度変更部123は、頻度低下タスクの優先度を高めた場合に頻度低下タスクの実行待ち数を減少させる。実行待ち数の減少により、頻度低下タスクの実行待ち数が再び変更閾値以上となるまでの時間が延長される。故に、頻度低下タスクと判断されることに伴う優先度変更部123による優先度の変更の発生が抑制される。従って、頻度低下タスクよりも優先度の高いタスクの実行頻度低下が抑制される。 Further, in the present embodiment, the priority changing unit 123 reduces the number of execution waits of the frequency-reduced task when the priority of the frequency-reduced task is increased. Due to the decrease in the number of waiting executions, the time until the number of waiting executions of the frequency-reduced task becomes equal to or higher than the change threshold again. Therefore, it is possible to prevent the priority changing unit 123 from changing the priority due to the determination that the task is a frequency-reduced task. Therefore, it is possible to suppress a decrease in the execution frequency of a task having a higher priority than the frequency-reduced task.

さらに本実施形態では、優先度変更部123は、頻度低下タスクの優先度を、各タスクに設定された通常優先度よりも高い優先度に変更する。故に、頻度判断部122により頻度低下タスクが発生していると判断されてから、関係タスク以外のタスクの割り当てを待つことなく実行部10に割り当てられる。この結果、頻度低下タスクは、頻度低下タスクと判断されてから実行までの期間を短縮される。 Further, in this embodiment, the priority changing unit 123 changes the priority of the frequency-reduced task to a higher priority than the normal priority set for each task. Therefore, after the frequency determination unit 122 determines that a frequency-reduced task has occurred, the frequency determination task 122 assigns the task to the execution unit 10 without waiting for assignment of tasks other than the related tasks. As a result, the frequency-reduced task is shortened in the period from the determination of the frequency-reduced task to the execution.

また本実施形態では、順序維持部124は、頻度低下タスクの実行予定順を関連タスクの直後とするように関連タスクの優先度を高める。故に、頻度低下タスクは、関連タスクの割り当てから、他のタスクの割り当てを待つことなく実行部10に割り当てられる。この結果、頻度低下タスクは、より新しい関連タスクの実行結果に基づいて実行されうる。従って、頻度低下タスクの実行結果の精度をより向上しうる。 Further, in the present embodiment, the order maintaining unit 124 increases the priority of the related task so that the scheduled execution order of the frequency-reduced task is immediately after the related task. Therefore, the frequency-reduced task is assigned to the execution unit 10 from the assignment of the related task without waiting for the assignment of another task. As a result, the frequency-reduced task can be executed based on the execution result of the newer related task. Therefore, the accuracy of the execution result of the frequency-reduced task can be further improved.

<他の実施形態>
以上、本開示の実施形態を説明したが、本開示は上述の実施形態に限定されるものではなく、次の変形例も本開示の技術的範囲に含まれ、さらに、下記以外にも要旨を逸脱しない範囲内で種々変更して実施できる。なお、以下の説明において、それまでに使用した符号と同一番号の符号を有する要素は、特に言及する場合を除き、それ以前の実施形態における同一符号の要素と同一である。また、構成の一部のみを説明している場合、構成の他の部分については先に説明した実施形態を適用できる。
<Other Embodiments>
Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments, and the following modifications are also included in the technical scope of the present disclosure. Various modifications can be made without departing from the scope. In the following description, elements having the same reference numerals as those used up to now are the same as the elements having the same reference numerals in the previous embodiments, unless otherwise specified. Further, when only a part of the configuration is described, the above-described embodiments can be applied to other parts of the configuration.

上述の実施形態においては、頻度判断部122は、キューイング数に基づいて頻度低下タスクであるか否かを判断していた。しかし、各タスクの処理抜け率や待ち時間などを用いて判断する構成でもよい。またこの場合には、優先度を変更する場合においてキューイング数を削減しなくてもよい。 In the above-described embodiment, the frequency determination unit 122 determines whether or not the frequency reduction task is based on the queuing number. However, the configuration may be such that the processing omission rate or waiting time of each task is used for the determination. Further, in this case, it is not necessary to reduce the queuing number when changing the priority.

上述の実施形態においては、頻度低下タスクおよび関連タスクの一時優先度は、どのタスクの通常優先度よりも高く、かつ異なる優先度に設定されていた。しかし、頻度低下タスクの関連タスクに対する実行予定順が維持可能であれば、設定される一時優先度はこれに限られない。例えば、同じ一時優先度を設定し、通常優先度の差による元の実行予定順に従う順序で移動先の優先度に格納する構成でもよい。またこの場合、一時優先度がいずれかのタスクの通常優先度と一致していてもよい。 In the above-described embodiment, the temporary priority of the frequency-reduced task and the related task is set higher than the normal priority of any task and set to different priorities. However, the temporary priority to be set is not limited to this as long as the execution schedule order of the related task of the frequency-reduced task can be maintained. For example, the same temporary priority may be set, and the priorities of the movement destinations may be stored in the order according to the original execution schedule order based on the difference in the normal priorities. Further, in this case, the temporary priority may match the normal priority of any task.

上述の実施形態においては、タスク割当管理部100の管理するタスクとして三つのタスクが設定され、あるタスクに対して、関連タスクとして一つのタスクのみが設定されていた。しかし、タスクの数は三つ以上あってもよく、またその場合にはあるタスクに対して複数のタスクが関連タスクとして設定されていてもよい。例えば、タスク割当管理部100の管理するタスクとして、空燃比を取得するタスクやアクセル開度を取得するタスク、スロットル開度を算出するタスクなどが更に設定されていてもよい。 In the above-described embodiment, three tasks are set as tasks managed by the task assignment management unit 100, and only one task is set as a related task for a certain task. However, the number of tasks may be three or more, and in that case, a plurality of tasks may be set as related tasks for a certain task. For example, as the tasks managed by the task allocation management unit 100, a task for acquiring the air-fuel ratio, a task for acquiring the accelerator opening, a task for calculating the throttle opening, and the like may be further set.

また燃料噴射量を算出するタスクに対する関連タスクとして、クランク角を取得するタスクに加えて、空燃比を取得するタスクが設定されていてもよい。複数の関連タスクが設定されている場合には、順序維持部124は、各関連タスクの間の実行予定順についても関係を維持するように、各関連タスクの優先度を変更すればよい。こうした構成によれば、一つのタスクに対して複数の関連タスクが設定されている構成においても、設計時に想定された実行順を維持して優先度を高めることが可能となる。また、関連タスクには、頻度低下タスクと実行予定順が連続していないタスクが含まれていてもよい。 As a related task to the task of calculating the fuel injection amount, a task of acquiring the air-fuel ratio may be set in addition to the task of acquiring the crank angle. When a plurality of related tasks are set, the order maintaining unit 124 may change the priority of each related task so as to maintain the relationship between the execution schedule orders of the related tasks. With such a configuration, even in a configuration in which a plurality of related tasks are set for one task, it is possible to maintain the execution order assumed at the time of designing and increase the priority. Further, the related task may include a frequency-reduced task and a task whose execution schedule order is not continuous.

上述の実施形態においては、所定のタスクに対して、そのタスクの実行結果を参照するタスクも関連タスクとして設定されていた。しかし、こうしたタスクが関連タスクに設定されていなくてもよい。 In the above-described embodiment, for a predetermined task, a task that refers to the execution result of the task is also set as the related task. However, such a task does not have to be set as a related task.

上述の実施形態においては、順序維持部124は、頻度低下タスクに関連タスクが設定されている場合には、必ず関連タスクの優先度も変更していた。しかし、関連タスクの優先度を変更せず、頻度低下タスクの優先度のみを変更する場合があってもよい。例えば、関連タスクのキューイング数が十分小さい場合には、関連タスクは十分な実行頻度で周期的に実行されている可能性が高い。故に、関連タスクの優先度を変更することなく関連タスクの実行結果を参照して頻度低下タスクが実行可能であるとみなせる。従って順序維持部124は、関連タスクのキューイング数が所定の維持閾値未満である場合には、関連タスクの優先度を通常優先度のまま維持し、頻度低下タスクのみ優先度を変更する構成とすることもできる。こうした構成によれば、関連タスクよりも優先度の高いタスクの実行頻度低下を抑制して、頻度低下タスクの実行頻度を維持しうる。 In the above-described embodiment, the order maintaining unit 124 always changes the priority of the related task when the related task is set as the frequency-reduced task. However, it may be possible to change only the priority of the frequency-reduced task without changing the priority of the related task. For example, when the queuing number of related tasks is sufficiently small, it is highly possible that the related tasks are periodically executed with a sufficient execution frequency. Therefore, it can be considered that the frequency-reduced task can be executed by referring to the execution result of the related task without changing the priority of the related task. Therefore, when the queuing number of the related tasks is less than the predetermined maintenance threshold, the order maintaining unit 124 maintains the priority of the related tasks at the normal priority and changes the priority of only the frequency-reduced tasks. You can also do it. With such a configuration, it is possible to suppress a decrease in the execution frequency of the task having a higher priority than the related task and maintain the execution frequency of the frequency-reduced task.

上述の実施形態においては、情報処理装置1はエンジンECUとして用いられる電子制御装置であった。しかし、情報処理装置1の用途はこれに限られず、メモリに格納されるアプリケーションソフトウェアを適宜変更し、他の用途に利用可能である。 In the above-described embodiment, the information processing device 1 is an electronic control device used as an engine ECU. However, the application of the information processing device 1 is not limited to this, and the application software stored in the memory can be appropriately changed and used for other purposes.

上述の実施形態においては、タスク割当管理部100による実行部10に対する割り当ては、所定時間の経過またはサイクルの終了時に実行されるとしていた。しかし、優先度に基づいた割り当て方法であれば、割り当ての判断タイミングなどはこれに限られず適宜変更可能である。一例として、所定の周期ごとに実行中のタスクよりも優先度の高いタスクがレディキュー111に格納されているか否かを判断し、優先度の高いタスクが格納されていればそのタスクに切り替える方法が採用可能である。こうした切替えが実施された場合には、実行中であったタスクは一連のサイクルの処理の進行状況などを退避させるとともに、レディキュー111の先頭に割り込み要求を格納される。 In the above-described embodiment, the task allocation management unit 100 allocates the execution unit 10 when a predetermined time elapses or the cycle ends. However, as long as the allocation method is based on the priority, the determination timing of allocation is not limited to this, and can be changed appropriately. As an example, a method of determining whether or not a task having a higher priority than the task being executed is stored in the ready queue 111 every predetermined period, and switching to the task if the high priority task is stored Can be adopted. When such switching is performed, the task being executed saves the progress status of the processing of a series of cycles and stores an interrupt request at the head of the ready queue 111.

1 情報処理装置、 10 実行部、 121 キューイング部(順序決定部)、 122 頻度判断部、 123 優先度変更部、 124 順序維持部 1 Information Processing Device, 10 Execution Unit, 121 Queuing Unit (Order Determining Unit), 122 Frequency Judgment Unit, 123 Priority Change Unit, 124 Order Maintenance Unit

Claims (6)

タスクを順に実行する実行部(10)と、
前記実行部による実行を待つ複数の前記タスクの実行予定順を、各前記タスクに設定された優先度に基づいて決定する順序決定部(121)と、
各前記タスクについて、実行頻度の低下した頻度低下タスクであるか否かを判断する頻度判断部(122)と、
前記頻度低下タスクの優先度を高める優先度変更部(123)と、
前記頻度低下タスクが、関連づけられた関連タスクの実行結果に基づいて実行される前記タスクである場合に、前記関連タスクの優先度を、前記頻度低下タスクに対する実行予定順を維持するように高める順序維持部(124)と、を備える情報処理装置。
An execution unit (10) for sequentially executing tasks,
An order determination unit (121) that determines the scheduled execution order of the plurality of tasks waiting for execution by the execution unit, based on the priority set for each task;
A frequency determination unit (122) that determines whether or not each of the tasks is a frequency-reduced task with a reduced execution frequency;
A priority change unit (123) for increasing the priority of the frequency-reduced task,
An order in which, when the frequency-reduced task is the task that is executed based on the execution result of the associated related task, the priority of the related task is increased to maintain the scheduled execution order for the frequency-reduced task. An information processing apparatus comprising: a maintenance unit (124).
前記頻度判断部は、実行待ち数が変更閾値以上となった前記タスクを、前記頻度低下タスクと判断する請求項1に記載の情報処理装置。 The information processing apparatus according to claim 1, wherein the frequency determination unit determines that the task, the number of waiting for execution of which is equal to or greater than a change threshold, is the frequency-reduced task. 前記優先度変更部は、前記頻度低下タスクの優先度を高めた場合に、前記頻度低下タスクの実行待ち数を減少させる請求項2に記載の情報処理装置。 The information processing apparatus according to claim 2, wherein when the priority of the frequency-reduced task is increased, the priority changing unit reduces the number of execution waits of the frequency-reduced task. 前記優先度変更部は、前記頻度低下タスクの優先度を、各前記タスクに設定されたいずれの優先度のよりも高い優先度に変更する請求項1〜3のいずれか1項に記載の情報処理装置。 The information according to any one of claims 1 to 3, wherein the priority changing unit changes the priority of the frequency-reduced task to a higher priority than any of the priorities set for the respective tasks. Processing equipment. 前記順序維持部は、前記関連タスクと前記頻度低下タスクとが連続して実行されるように前記関連タスクの優先度を高める請求項1〜4のいずれか1項に記載の情報処理装置。 The information processing apparatus according to claim 1, wherein the order maintaining unit increases the priority of the related task so that the related task and the frequency-reduced task are continuously executed. 前記順序維持部は、前記頻度低下タスクに対して複数の前記関連タスクが関連付けられている場合、各前記関連タスクの間の実行予定順を維持するように優先度を高める請求項1〜5のいずれか1項に記載の情報処理装置。 The said order maintenance part raises a priority so that the execution schedule order between each said related task may be maintained, when several said related tasks are linked|related with the said frequency fall task. The information processing apparatus according to any one of items.
JP2018226709A 2018-12-03 2018-12-03 Information processing equipment Active JP7263746B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018226709A JP7263746B2 (en) 2018-12-03 2018-12-03 Information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018226709A JP7263746B2 (en) 2018-12-03 2018-12-03 Information processing equipment

Publications (2)

Publication Number Publication Date
JP2020091540A true JP2020091540A (en) 2020-06-11
JP7263746B2 JP7263746B2 (en) 2023-04-25

Family

ID=71012824

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018226709A Active JP7263746B2 (en) 2018-12-03 2018-12-03 Information processing equipment

Country Status (1)

Country Link
JP (1) JP7263746B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688053A (en) * 2021-09-01 2021-11-23 北京计算机技术及应用研究所 Queuing use method and system for cloud testing tool

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6057441A (en) * 1983-09-08 1985-04-03 Fujitsu Ltd Cue control system
JPH01144131A (en) * 1987-11-30 1989-06-06 Nec Corp Preference control system for execution of transaction
JP2000215068A (en) * 1999-01-21 2000-08-04 Matsushita Electric Ind Co Ltd Multitask scheduling device
JP2009294712A (en) * 2008-06-02 2009-12-17 Panasonic Corp Priority controller and priority control method
JP2013088937A (en) * 2011-10-14 2013-05-13 Toyota Motor Corp Information processing device
JP2016206817A (en) * 2015-04-20 2016-12-08 株式会社デンソー Electronic controller
CN106776395A (en) * 2017-01-22 2017-05-31 中国人民解放军国防科学技术大学 A kind of method for scheduling task and device of shared cluster

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6057441A (en) * 1983-09-08 1985-04-03 Fujitsu Ltd Cue control system
JPH01144131A (en) * 1987-11-30 1989-06-06 Nec Corp Preference control system for execution of transaction
JP2000215068A (en) * 1999-01-21 2000-08-04 Matsushita Electric Ind Co Ltd Multitask scheduling device
JP2009294712A (en) * 2008-06-02 2009-12-17 Panasonic Corp Priority controller and priority control method
US20110072435A1 (en) * 2008-06-02 2011-03-24 Panasonic Corporation Priority control apparatus and priority control method
JP2013088937A (en) * 2011-10-14 2013-05-13 Toyota Motor Corp Information processing device
JP2016206817A (en) * 2015-04-20 2016-12-08 株式会社デンソー Electronic controller
CN106776395A (en) * 2017-01-22 2017-05-31 中国人民解放军国防科学技术大学 A kind of method for scheduling task and device of shared cluster

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688053A (en) * 2021-09-01 2021-11-23 北京计算机技术及应用研究所 Queuing use method and system for cloud testing tool

Also Published As

Publication number Publication date
JP7263746B2 (en) 2023-04-25

Similar Documents

Publication Publication Date Title
US9959313B2 (en) Database management system and method capable of dynamically issuing inputs/outputs and executing operations in parallel
US7302686B2 (en) Task management system
JP5675840B2 (en) Query management
US8924981B1 (en) Calculating priority indicators for requests in a queue
JPH10502751A (en) How to control a technical process or process
JP4241462B2 (en) Control unit and microcomputer
US8954969B2 (en) File system object node management
JPH0816410A (en) Unit and method for schedule control
JP2020091540A (en) Information processing device
JP4206653B2 (en) Task scheduling system and method, program
US8555285B2 (en) Executing a general-purpose operating system as a task under the control of a real-time operating system
US20050066093A1 (en) Real-time processor system and control method
CN112659119A (en) Control method and device of mechanical arm, electronic equipment and storage medium
CN113032119A (en) Task scheduling method and device, storage medium and electronic equipment
JP2007280253A (en) Information processor and information processing method
JP6365367B2 (en) Electronic control unit
KR100981017B1 (en) Method for re-defining priority and managing ready queue in system having static task define function and system for executing the method
JP2020135214A (en) Task management apparatus
JPS62284437A (en) Task control system
JP2014225137A (en) Task scheduler, microprocessor, and task scheduling method
JP6729430B2 (en) Electronic control unit
US11449502B1 (en) Calculating a throttle limit for requests in a database system
JP5283675B2 (en) Database management system and method
JP2001022601A (en) Job execution control method and parallel computer system
KR102184136B1 (en) Method and apparatus for determining the period of resource supply model in a hierarchical scheduling system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211013

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220818

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221202

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230327

R151 Written notification of patent or utility model registration

Ref document number: 7263746

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151