JP2010097427A - Processing apparatus, processing method and computer program - Google Patents

Processing apparatus, processing method and computer program Download PDF

Info

Publication number
JP2010097427A
JP2010097427A JP2008267804A JP2008267804A JP2010097427A JP 2010097427 A JP2010097427 A JP 2010097427A JP 2008267804 A JP2008267804 A JP 2008267804A JP 2008267804 A JP2008267804 A JP 2008267804A JP 2010097427 A JP2010097427 A JP 2010097427A
Authority
JP
Japan
Prior art keywords
task
state
priority
application
wake
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008267804A
Other languages
Japanese (ja)
Inventor
Tetsuya Taguchi
哲也 田口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to JP2008267804A priority Critical patent/JP2010097427A/en
Publication of JP2010097427A publication Critical patent/JP2010097427A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a processing apparatus, a processing method and a computer program, wherein a mode can be suitably and efficiently shifted to a wake-up mode or a sleep mode and power consumption can be effectively reduced. <P>SOLUTION: In the processing apparatus, corresponding application tasks A, B are executed in the wake-up mode and application tasks A', B' for executing corresponding or identical processing are executed in the sleep mode. The task priority of the application tasks A, B to be started in the wake-up mode is higher than the priority of a mode management task and the task priority of the application tasks A', B' to be started in the sleep mode is lower than the priority of the mode management task. In the wake-up mode, the priority of the mode management task is lowest, and in the sleep mode, the priority of the mode management task is highest. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、コンピュータ装置の省電力化技術に関し、特に、コンピュータ装置のスリープ状態とウェイクアップ状態との間の切り替えを適切且つ効率的に行ない、消費電力を有効に低減させることができる処理装置、処理方法及びコンピュータプログラムに関する。   The present invention relates to a power saving technique for a computer device, and in particular, a processing device capable of appropriately and efficiently switching between a sleep state and a wake-up state of the computer device and effectively reducing power consumption, The present invention relates to a processing method and a computer program.

昨今では、機器の省電力化が進められている。そのため、クロック周波数の変更、又は電源電圧の低下が可能に設定されており、特に処理を行なわない間はクロック周波数を低下又は電源電圧を低下させるなどのスリープ状態への移行が可能なコンピュータ装置が普及している。   In recent years, power saving of devices has been promoted. Therefore, there is a computer device that is set to be capable of changing the clock frequency or lowering the power supply voltage, and capable of shifting to the sleep state such as lowering the clock frequency or lowering the power supply voltage while not performing processing. It is popular.

コンピュータ装置をスリープ状態へ移行させる、又はスリープ状態から、クロック周波数若しくは電源電圧が高められて所定の処理を行なうウェイクアップ状態へ移行させるための制御には種々の方法が行なわれている。   Various methods are used for control to shift the computer device to the sleep state, or to shift from the sleep state to the wake-up state in which the clock frequency or the power supply voltage is increased to perform predetermined processing.

例えば、一又は複数の処理が関連付けられて一つのタスクとして実行され、複数のタスクが同時的に実行されるように構成されているコンピュータ装置で、複数のタスク全体を管理するシステムタスク又はアイドル中の処理を行なうアイドルタスクによって動作状態の移行が管理される場合がある。   For example, a computer device configured to execute one task or a plurality of processes in association with each other and execute a plurality of tasks at the same time. The transition of the operating state may be managed by an idle task that performs the above process.

システムタスクは、全タスクを管理するために優先度が最も高く設定されている。システムタスクによって状態の移行を管理する場合、ウェイクアップ状態へ移行させる際には、例えば割り込みなどのウェイクアップ要因でシステムタスク自身が起動し、起動したシステムタスクが全アプリケーションプログラムに対応するアプリケーションタスクを実行させる。またこの場合、スリープ状態へ移行させる際には、例えばシステムタスクは周期的に起動し、各アプリケーションプログラムタスクの実行状態を判定していずれのタスクも実行されていないと判断できる場合にスリープ状態へ移行させるなどのように構成される。   The system task has the highest priority in order to manage all tasks. When managing state transitions by system tasks, when transitioning to a wake-up state, for example, the system task itself is activated by a wake-up factor such as an interrupt, and the activated system task selects application tasks corresponding to all application programs. Let it run. Also, in this case, when shifting to the sleep state, for example, the system task is periodically started, and when it can be determined that no task is being executed by determining the execution state of each application program task, the sleep state is entered. It is configured as a transition.

アイドルタスクは、常時的に起動している一方で優先度が最も低く設定されており、各アプリケーションタスクが実行されていない間に処理を実行する。アイドルタスクによって状態の移行を管理する場合、ウェイクアップ状態へ移行させる際には、例えばアイドルタスクはウェイクアップ要因を検知し、各アプリケーションタスクを起動させる。このとき、必要に応じて、即ちウェイクアップ要因の内容に応じてアプリケーションタスクを起動させる構成も考えられる。またスリープ状態へ移行させる際には、アイドルタスクは、全アプリケーションタスクがスリープ状態への移行が可能な状態となったことを検知した場合にスリープ状態へ移行させる。   The idle task is always activated and has the lowest priority, and executes processing while each application task is not being executed. When state transition is managed by an idle task, when transitioning to a wake-up state, for example, the idle task detects a wake-up factor and activates each application task. At this time, a configuration in which an application task is activated as necessary, that is, according to the content of the wake-up factor is also conceivable. Further, when shifting to the sleep state, the idle task shifts to the sleep state when it is detected that all application tasks are in a state where the transition to the sleep state is possible.

図9は、アイドルタスクによって状態の移行を管理する場合の各タスクのタイムチャートである。図9は、横軸に時間の経過を示し、縦軸には各タスクにおける処理の実行開始/停止を、優先度が高い順に上から示している。図9に示す例では、アプリケーションタスクX、アプリケーションタスクY及びアイドルタスクが実行されるが、アプリケーションタスクXが最も優先度が高い。図8に示すように、t1の時点でアプリケーションタスクYのウェイクアップ要因が発生し、アイドルタスクによって検知されると、アイドルタスクによってアプリケーションタスクYの起動要求処理がなされ、アプリケーションタスクYにおける処理が実行される。次にt2の時点でアプリケーションタスクXのウェイクアップ要因が発生したとしても、アイドルタスクは処理を実行中のアプリケーションタスクYよりも優先度が低いために、アプリケーションタスクYによる処理が終了してタスクが停止するまでアプリケーションタスクXの起動要求処理を実行することができず、待機させられる。そして、t3の時点でアプリケーションタスクYによる処理が終了して初めてアイドルタスクはアプリケーションタスクXの起動要求処理を実行することができ、t4の時点でアプリケーションタスクXが起動される。   FIG. 9 is a time chart of each task when state transition is managed by an idle task. In FIG. 9, the horizontal axis indicates the passage of time, and the vertical axis indicates the execution start / stop of processing in each task from the top in descending order of priority. In the example shown in FIG. 9, the application task X, the application task Y, and the idle task are executed, but the application task X has the highest priority. As shown in FIG. 8, when a wake-up factor of the application task Y occurs at time t1 and is detected by the idle task, the activation request process of the application task Y is performed by the idle task, and the process in the application task Y is executed. Is done. Next, even if a wake-up factor of the application task X occurs at time t2, the idle task has a lower priority than the application task Y that is executing the process, so the process by the application task Y ends and the task is Until it is stopped, the activation request process of the application task X cannot be executed, and it is put on standby. The idle task can execute the activation request process for the application task X only after the process by the application task Y is completed at the time t3, and the application task X is activated at the time t4.

図9に示すようにアイドルタスクによって状態の移行が管理される場合、アイドルタスクがアプリケーションタスクXのウェイクアップ要因を検知したときに対応するアプリケーションタスクXを起動させようにも、他のアプリケーションタスクYが実行されているときにはアイドルタスクの優先度が最も低く設定されているためにアプリケーションタスクXの起動処理が待機させられる。そのため、ウェイクアップ要因の発生時点t2と対応するアプリケーションタスクXの起動の時点t4との間の時間差が大きくなる。   When the state transition is managed by the idle task as shown in FIG. 9, when the idle task detects the wake-up factor of the application task X, the corresponding application task X can be started up. Is executed, the priority of the idle task is set to be the lowest, so that the activation process of the application task X is made to wait. Therefore, the time difference between the occurrence time t2 of the wakeup factor and the activation time t4 of the corresponding application task X becomes large.

そこで、ウェイクアップ状態からスリープ状態へ、又はスリープ状態からウェイクアップ状態への状態の移行の際に、無駄な動作を可及的に減少させ、消費電力を更に低減させることができる技術が特許文献1及び2に開示されている。詳細には、複数のアプリケーションタスクが夫々スリープ状態への移行可否を通知するようにしてあり、スリープ状態とウェイクアップ状態との間の移行を管理するタスクである状態管理タスク(システムタスク)が、各アプリケーションタスクから通知を受けて各アプリケーションタスクの実行状態を判定して状態の移行を管理する。そしてこの場合、状態管理タスクは各アプリケーションタスクの実行状態を判定するために、タスクの優先度が各アプリケーションタスクの優先度よりも高く設定されている。
特開2008−107914号公報 特開2008−102830号公報
Therefore, a technology that can reduce wasteful operations as much as possible and further reduce power consumption when shifting from a wake-up state to a sleep state or from a sleep state to a wake-up state. 1 and 2. Specifically, a plurality of application tasks each notify whether or not to enter the sleep state, and a state management task (system task) that is a task for managing the transition between the sleep state and the wake-up state, The state transition is managed by receiving the notification from each application task and determining the execution state of each application task. In this case, in order for the state management task to determine the execution state of each application task, the priority of the task is set higher than the priority of each application task.
JP 2008-107914 A JP 2008-102830 A

特許文献1及び2に開示されている技術により、各アプリケーションタスクよりも優先度が高い状態管理タスク(システムタスク)が、各アプリケーションタスクからの通知を受けて効率的にスリープ状態へ移行させること、及び、ウェイクアップ要因に応じて選択的にアプリケーションタスクを起動させてウェイクアップ状態へ移行させることができる。状態管理タスクの優先度が各アプリケーションタスクの優先度よりも高く設定されているために、他のアプリケーションタスクが処理を実行中であっても、ウェイクアップ要因を検知した後、迅速にアプリケーション起動させることができる。   According to the techniques disclosed in Patent Documents 1 and 2, a state management task (system task) having a higher priority than each application task receives a notification from each application task and efficiently shifts to a sleep state. In addition, an application task can be selectively activated according to a wake-up factor to shift to a wake-up state. Since the priority of the state management task is set higher than the priority of each application task, even if another application task is executing processing, the application is started immediately after detecting the wake-up factor. be able to.

しかしながら、優先度が各アプリケーションタスクの優先度よりも高く設定された状態管理タスクが状態の移行を管理するようにしてあるために、逆に、状態の移行処理と実際の各アプリケーションタスクにおける実行状態との間で不整合が生じる場合がある。図10は、優先度が高い状態管理タスクが状態の移行を管理する場合の各タスクのタイムチャートである。図10は、図9同様に横軸に時間の経過を示し、縦軸には各タスクにおける処理の実行開始/停止を、優先度が高い順に上から示している。図10に示す例では、アプリケーションタスクZ、アプリケーションタスクW及び状態管理タスクが実行されるが、状態管理タスクが最も優先度が高い。状態管理タスクは定期的に起動して各アプリケーションタスクZ、Wのスリープ状態へ移行可否を判断する。図10に示すように、t21の時点でアプリケーションタスクWがスリープ状態へ移行可となり、t22の時点でアプリケーションタスクZがスリープ状態へ移行可となったが、t23の時点でアプリケーションタスクWにて処理が続行されるためにスリープ状態へ移行不可とする処理を開始した場合を考える。この場合、アプリケーションタスクZのスリープ状態へ移行不可とする処理が完了する前のt24の時点で、状態管理タスクが起動する周期が到来したときには、状態管理タスクの優先度がアプリケーションタスクWの優先度よりも高いためにアプリケーションタスクWによる処理は後回しにされ、移行不可とする処理を完了することができないまま、いずれもスリープ状態へ移行可であると判断した状態管理タスクによって装置がスリープ状態へ移行される。   However, since the state management task whose priority is set higher than the priority of each application task manages the state transition, conversely, the state transition process and the actual execution state in each application task May be inconsistent with each other. FIG. 10 is a time chart of each task when a state management task having a high priority manages state transition. In FIG. 10, the horizontal axis indicates the passage of time as in FIG. 9, and the vertical axis indicates the execution start / stop of processing in each task from the top in descending order of priority. In the example illustrated in FIG. 10, the application task Z, the application task W, and the state management task are executed, but the state management task has the highest priority. The state management task is periodically started to determine whether the application tasks Z and W can shift to the sleep state. As shown in FIG. 10, the application task W can enter the sleep state at time t21, and the application task Z can enter the sleep state at time t22, but is processed by the application task W at time t23. Let us consider a case where a process for making a transition to the sleep state impossible is started because the process continues. In this case, when the period for starting the state management task arrives at time t24 before the process of making the application task Z unable to enter the sleep state is completed, the priority of the state management task is the priority of the application task W. Since the process is postponed by the application task W, the device shifts to the sleep state by the state management task that determines that both can shift to the sleep state without completing the process that cannot be shifted. Is done.

このように、アプリケーションタスクZ、Wがスリープ状態への移行可を通知し、状態管理タスクがスリープ状態への移行処理を行なうに際し、一のアプリケーションタスクWがスリープ状態へ移行不可とする処理を実行しようとしても、優先度の高い状態管理タスクが移行処理を続行し、前記一のアプリケーションタスクWの処理は後にされる。これにより、各アプリケーションタスクWではスリープ状態への移行不可であるにも拘わらず、装置としてスリープ状態へ移行しようとするなどの不整合が起こり得る。   In this way, when the application tasks Z and W notify that the transition to the sleep state is possible, and the state management task performs the transition process to the sleep state, the processing that makes one application task W unable to transition to the sleep state is executed. Even if an attempt is made, the state management task having a high priority continues the migration process, and the process of the one application task W is performed later. Thereby, although each application task W cannot shift to the sleep state, inconsistency such as trying to shift to the sleep state as a device may occur.

本発明は斯かる事情に鑑みてなされたものであり、ウェイクアップ状態からスリープ状態へ、又はスリープ状態からウェイクアップ状態へのいずれの際にも、適切且つ効率的に状態を移行させることを可能とし、消費電力を有効に低減させることができる処理装置、処理方法及びコンピュータプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and it is possible to appropriately and efficiently shift the state from any of the wake-up state to the sleep state or from the sleep state to the wake-up state. It is an object of the present invention to provide a processing device, a processing method, and a computer program capable of effectively reducing power consumption.

第1発明に係る処理装置は、複数の処理を実行する実行手段と、自身の動作を休止する休止状態へ移行させる手段とを備え、前記実行手段は、前記複数の処理夫々に予め設定された優先度に従って各処理を実行するようにしてある処理装置において、前記実行手段は、休止状態及び非休止状態の切り替えを行なう切替処理と、該切替処理よりも優先度が高い第1処理と、該第1処理と対応する処理であって前記切替処理よりも優先度が低い第2処理とを実行するようにしてあり、自身が休止状態であるか否かを判断する手段を備え、休止状態であると判断した場合に第2処理を実行し、非休止状態であると判断した場合に第1処理を実行するようにしてあることを特徴とする。   The processing apparatus according to the first aspect of the present invention comprises execution means for executing a plurality of processes, and means for shifting to a sleep state in which its operation is paused, wherein the execution means is preset for each of the plurality of processes. In the processing apparatus configured to execute each process according to the priority, the execution means includes a switching process for switching between a dormant state and a non-sleep state, a first process having a higher priority than the switching process, A second process corresponding to the first process and having a lower priority than the switching process, and includes means for determining whether or not the second process is in a dormant state. The second process is executed when it is determined that there is an image, and the first process is executed when it is determined that there is a non-pause state.

第2発明に係る処理装置は、第1処理及び第2処理は、同一の処理であることを特徴とする。   The processing apparatus according to the second invention is characterized in that the first process and the second process are the same process.

第3発明に係る処理装置は、前記実行手段は更に、第1処理及び第2処理のいずれかを選択して起動する前記第1処理よりも優先度が高い起動処理を実行するようにしてあることを特徴とする。   In the processing apparatus according to a third aspect of the invention, the execution means further executes a startup process having a higher priority than the first process that is started by selecting either the first process or the second process. It is characterized by that.

第4発明に係る処理方法は、複数の処理を夫々に予め設定された優先度に従って実行するようにしてあり、自身の動作を休止する休止状態へ移行させることが可能に構成してある処理装置における処理方法において、前記処理装置は、前記処理として、自身の休止状態及び非休止状態の切り替えを行なう切替処理と、該切替処理よりも優先度が高い第1処理と、該第1処理と対応する処理であって前記切替処理よりも優先度が低い第2処理とを夫々優先度に従って実行するようにしてあり、自身が休止状態であるか否かを判断し、休止状態であると判断した場合に第2処理を実行し、非休止状態であると判断した場合に第1処理を実行することを特徴とする。   The processing method according to the fourth aspect of the present invention is configured to execute a plurality of processes in accordance with preset priorities, and to shift to a sleep state in which its own operation is suspended. In the processing method, the processing apparatus corresponds to the switching process for switching between its dormant state and non-sleep state, the first process having a higher priority than the switching process, and the first process as the process. The second process having a lower priority than the switching process is executed according to the priority, and it is determined whether or not it is in a dormant state and is determined to be in a dormant state. In this case, the second process is executed, and the first process is executed when it is determined that the state is the non-pause state.

第5発明に係るコンピュータプログラムは、コンピュータに、複数の処理を夫々に予め設定された優先度に従って実行させ、自身の動作を休止する休止状態へ移行させるコンピュータプログラムにおいて、コンピュータに、前記処理として、自身の休止状態及び非休止状態の切り替えを行なう切替処理と、該切替処理よりも優先度が高い第1処理と、該第1処理と対応する処理であって前記切替処理よりも優先度が低い第2処理と自身の休止状態及び非休止状態の切り替えを行なう切替処理とを優先度に従って実行させるステップと、自身が休止状態であるか否かを判断するステップとを含み、休止状態であると判断した場合に第2処理を実行させ、非休止状態であると判断した場合に第1処理を実行させることを特徴とする。   According to a fifth aspect of the present invention, there is provided a computer program for causing a computer to execute a plurality of processes in accordance with a preset priority and shifting to a sleep state in which its operation is suspended. A switching process for switching between its dormant state and a non-sleep state, a first process having a higher priority than the switching process, and a process corresponding to the first process and having a lower priority than the switching process Including a step of executing the second process and a switching process for switching between the dormant state and the non-pause state according to priority, and a step of determining whether or not the dormant state is the dormant state. The second process is executed when it is determined, and the first process is executed when it is determined that it is in a non-pause state.

第1発明、第4発明及び第5発明では、装置自身の動作が休止される休止状態と非休止状態との切替処理に対し、任意の第1処理の優先度が高く、第1処理に対応する第2処理の優先度が低く設定される。休止状態では切替処理よりも優先度が低い第2処理が実行されるので、切替処理が他の処理よりも優先される。一方、非休止状態では、切替処理よりも優先度が高い第1処理が選択されるので、切替処理は他の処理よりも後回しとなる。これにより、休止状態から非休止状態への切り替え要因が発生したときに、非休止状態への切り替えが他の処理よりも優先されるので迅速に行なわれる。また、非休止状態から休止状態への切り替えの際には、休止状態への切り替えが他の処理も後回しとなるので、非休止状態へ戻る処理が行われる場合に妨げとならない。   In the first invention, the fourth invention, and the fifth invention, the priority of the arbitrary first process is high and corresponds to the first process with respect to the switching process between the sleep state where the operation of the apparatus itself is paused and the non-sleep state. The priority of the second process to be set is set low. Since the second process having a lower priority than the switching process is executed in the dormant state, the switching process has priority over other processes. On the other hand, in the non-pause state, the first process having a higher priority than the switching process is selected, so that the switching process is delayed after the other processes. As a result, when a factor for switching from the dormant state to the non-pause state occurs, the switch to the non-pause state is prioritized over other processes, so that the process is quickly performed. In addition, when switching from the non-pause state to the hibernation state, switching to the hibernation state is postponed by other processes, so that there is no hindrance when the process of returning to the non-pause state is performed.

なお、第1処理、第2処理などの各処理は、処理を一又は複数含むタスクであってもよい。この場合、一又は複数の処理を一つのタスクとし、タスク単位で予め優先度が設定され、各タスクが優先度に従って実行される。この場合も、第1のタスク、切替処理を含むタスク、第2のタスクの順に優先度が高く設定されており、休止状態では切替処理を含むタスクよりも優先度が高い第2のタスクが実行され、非休止状態では切替処理を含むタスクよりも優先度が低い第1のタスクが実行される。これにより、非休止状態への切り替えが他の処理よりも優先されるので迅速に行なわれ、非休止状態から休止状態への切り替えが他の処理も後回しとなるので、非休止状態へ戻る処理が行われる場合に妨げとならない。   Each process such as the first process and the second process may be a task including one or a plurality of processes. In this case, one or a plurality of processes are set as one task, a priority is set in advance for each task, and each task is executed according to the priority. Also in this case, the priority is set in the order of the first task, the task including the switching process, and the second task, and the second task having a higher priority than the task including the switching process is executed in the sleep state. In the non-sleep state, the first task having a lower priority than the task including the switching process is executed. As a result, switching to the non-pause state is prioritized over other processes, so that the process is quickly performed, and switching from the non-pause state to the hibernation state is also postponed by other processes. It will not interfere with what is done.

第2発明では、第1発明にて休止状態時に実行される第2処理、非休止状態時に実行される第1処理は同一の処理である。同一の処理であって、優先度が切替処理よりも高い処理と低い処理とを実行可能とすることにより、休止状態時及び非休止状態時のいずれでも適切、且つ迅速な状態の切り替えが行なわれる。   In the second invention, the second process executed in the hibernation state and the first process executed in the non-sleep state in the first invention are the same process. By making it possible to execute the same process with a higher priority and a lower process than the switching process, the state can be switched appropriately and promptly in both the hibernation state and the non-hibernation state. .

第3発明では、第1発明または第2発明において、第1処理又は第2処理のいずれかを選択して起動する起動処理が、他の処理よりも優先度が高い。これにより、休止状態から非休止状態への切り替え処理が迅速に行なわれた場合に、他に優先して第1処理の実行が迅速に開始される。また同様に、非休止状態から休止状態への切り替え処理が他の処理を妨げずに適切に行われた場合も、第2処理の実行が迅速に開始され、効率的となる。   In the third invention, in the first invention or the second invention, the activation process that is activated by selecting either the first process or the second process has a higher priority than the other processes. Thereby, when the switching process from the dormant state to the non-pause state is performed quickly, the execution of the first process is quickly started with priority over others. Similarly, when the switching process from the non-sleep state to the sleep state is appropriately performed without interfering with other processes, the execution of the second process is quickly started and becomes efficient.

本発明による場合、休止状態(スリープ状態)では休止状態から非休止状態(ウェイクアップ状態)への切り替えが優先されて迅速に行われると共に、非休止状態では、非休止状態から休止状態への切り替えが他の処理の妨げになることが回避されるので、状態の移行を適切に、且つ効率化とすることを可能とし、消費電力を有効に低減させることができる。   According to the present invention, in the hibernation state (sleep state), switching from the hibernation state to the non-hibernation state (wake-up state) is prioritized and performed quickly, and in the non-hibernation state, switching from the non-hibernation state to the hibernation state is performed. Therefore, it is possible to make the state transition appropriately and efficient and to effectively reduce the power consumption.

以下、本発明をその実施の形態を示す図面に基づいて具体的に説明する。   Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof.

なお、以下に示す実施の形態では、本発明に係る処理装置をマイクロコンピュータ(以下、マイコンという)に適用した場合を例に説明する。更に詳細には、以下の実施の形態では車両に搭載されて種々の制御を行なうECU(Electronic Control Unit)のマイコンにおける処理に適用した例を示す。   In the embodiment described below, a case where the processing apparatus according to the present invention is applied to a microcomputer (hereinafter referred to as a microcomputer) will be described as an example. More specifically, in the following embodiment, an example applied to processing in a microcomputer of an ECU (Electronic Control Unit) that is mounted on a vehicle and performs various controls will be described.

(実施の形態1)
図1は、実施の形態1におけるマイコンの構成を示すブロック図である。マイコン1は、CPU10、RAM(Random Access Memory)11、ROM(Read Only Memory)12、及びI/O(Input/Output)部13を含んで構成される。
(Embodiment 1)
FIG. 1 is a block diagram showing the configuration of the microcomputer according to the first embodiment. The microcomputer 1 includes a CPU 10, a RAM (Random Access Memory) 11, a ROM (Read Only Memory) 12, and an I / O (Input / Output) unit 13.

CPU10は、ROM12に記憶されている各プログラムを読み出して実行することにより、マイコン1を特定の処理を行なうハードウェアとして動作させる。具体的には、CPU10は、ROM12に記憶されている制御プログラム1P及びアプリケーションプログラム121を読み出して実行することにより、RAM11と協働してI/O部13を介して接続される外部機器の制御を行なう。例えば、実施の形態1におけるマイコン1が搭載されるECUがボディ系のECUである場合、ヘッドライト、又はルームライト等が接続されており、マイコン1の制御によってライトのオン/オフが切り替えられる。   The CPU 10 reads and executes each program stored in the ROM 12 to cause the microcomputer 1 to operate as hardware that performs a specific process. Specifically, the CPU 10 reads and executes the control program 1P and the application program 121 stored in the ROM 12, thereby controlling the external device connected via the I / O unit 13 in cooperation with the RAM 11. To do. For example, when the ECU on which the microcomputer 1 according to the first embodiment is mounted is a body-type ECU, a headlight, a room light, or the like is connected, and the light is turned on / off under the control of the microcomputer 1.

RAM11は、SRAM(Static Random Access Memory)又はDRAM(Dynamic Random Access Memory)等のデータの書き換えが可能で且つ高速にアクセスすることが可能なメモリを利用する。RAM11には、CPU10にて実行される各種プログラムが読み出されて記憶されると共に、CPU10による演算処理の過程で発生するデータが一時的に記憶される。   The RAM 11 uses a memory that can rewrite data such as SRAM (Static Random Access Memory) or DRAM (Dynamic Random Access Memory) and that can be accessed at high speed. In the RAM 11, various programs executed by the CPU 10 are read and stored, and data generated in the course of arithmetic processing by the CPU 10 is temporarily stored.

ROM12は、フラッシュメモリ、マスクROM、EPROM(Erasable Programmable ROM)、又はEEPROM(Electrically Erasable Programmable ROM)等の読み出し時にデータが失われないメモリを利用する。ROM12には、CPU10が読み出して実行する制御プログラム1Pが記憶されている。また、ROM12にはECUの制御機能を実現する種々のアプリケーションプログラム121,121,…が記憶されている。また、ROM12にはCPU10が参照するタスクテーブル122が記憶されている。タスクテーブル122の詳細については後述にて説明する。   The ROM 12 uses a memory such as a flash memory, a mask ROM, an EPROM (Erasable Programmable ROM), or an EEPROM (Electrically Erasable Programmable ROM) that does not lose data. The ROM 12 stores a control program 1P that the CPU 10 reads and executes. Further, the ROM 12 stores various application programs 121, 121,... That realize the control function of the ECU. The ROM 12 stores a task table 122 that is referred to by the CPU 10. Details of the task table 122 will be described later.

I/O部13は、外部からの信号入力を受け付けると共に、外部への信号出力を実現する複数の端子を含むインタフェースである。A/D変換、D/A変換機能を有している構成としてもよい。例えば、I/O部13には、マイコン1の制御に用いられるデータを取得する測定器、センサ等が接続される。CPU10は、I/O部13により取得されるデータを用いて制御が可能である。また、I/O部13にはネットワークコントローラが接続され、CPU10はネットワークを介して送受信されるデータを取得することが可能であってもよい。I/O部13にはマイコン1による制御対象である各種負荷、又はアクチュエータが接続されており、マイコン1はI/O部13により制御信号を制御対象へ出力する。   The I / O unit 13 is an interface that includes a plurality of terminals that receive a signal input from the outside and realize a signal output to the outside. It is good also as a structure which has A / D conversion and a D / A conversion function. For example, the I / O unit 13 is connected to a measuring instrument, a sensor, or the like that acquires data used for controlling the microcomputer 1. The CPU 10 can be controlled using data acquired by the I / O unit 13. Further, a network controller may be connected to the I / O unit 13 so that the CPU 10 can acquire data transmitted / received via a network. Various loads or actuators to be controlled by the microcomputer 1 are connected to the I / O unit 13, and the microcomputer 1 outputs a control signal to the control target by the I / O unit 13.

また、マイコン1は図示しないクロックからのクロック信号に同期して処理を行なうように構成されているが、特段処理を実行しなくてもよい場合にはクロックの周波数を低減することが可能に構成されている。又は、図示しない電源回路にて供給電圧を下げることが可能に構成されていてもよい。マイコン1は、クロックの周波数の低減又は供給電圧の低下させる処理を行なうことによって、消費電力が通常時よりも少ないスリープ状態へ移行することが可能に構成されている。例えば、実施の形態1におけるマイコン1が搭載されるECUがボディ系のECUである場合、イグニッションスイッチがオフであって車両が停止している間も、イグニッションスイッチがオフにされた直後はルームランプを点灯させる処理、ドアが開けられた際にルームランプを点灯させる処理などが必要となるから、ECUのマイコンは完全に電力が供給されない状態にあるわけではなくスリープ状態にある。   In addition, the microcomputer 1 is configured to perform processing in synchronization with a clock signal from a clock (not shown). However, when it is not necessary to perform special processing, the frequency of the clock can be reduced. Has been. Alternatively, the supply voltage may be reduced by a power supply circuit (not shown). The microcomputer 1 is configured to be able to shift to a sleep state in which power consumption is lower than normal by performing a process of reducing a clock frequency or a supply voltage. For example, when the ECU in which the microcomputer 1 according to the first embodiment is mounted is a body-type ECU, the room lamp is immediately after the ignition switch is turned off even while the ignition switch is off and the vehicle is stopped. Therefore, the ECU microcomputer is not in a state where power is not supplied completely, but is in a sleep state.

上述のように構成されるマイコン1にて、制御プログラム1Pに基づき実行されるソフトウェア的処理について説明する。図2は、実施の形態1におけるマイコン1によって実行されるソフトウェア構成を模式的に示す説明図である。図2中の各矩形は、CPU10が制御プログラム1Pを読み出すことによって実行される処理単位(タスク)を示す。   A software process executed by the microcomputer 1 configured as described above based on the control program 1P will be described. FIG. 2 is an explanatory diagram schematically showing a software configuration executed by the microcomputer 1 in the first embodiment. Each rectangle in FIG. 2 indicates a processing unit (task) executed by the CPU 10 reading the control program 1P.

マイコン1のCPU10は、ROM12から制御プログラム1Pを読み出して実行することにより、システムタスク101、状態管理タスク102を実行させ、更に、ROM12からアプリケーションプログラム121,121,…を読み出して実行することにより、各アプリケーションタスクA20,B30,…を実行させる。アプリケーションタスクA20,B30は夫々、詳細な処理、機能毎に分割されるアプリケーションモジュールA−1〜A−N(201,…,20n),アプリケーションモジュールB−1〜B−N(301,…,30n)を実行するように設計されている。   The CPU 10 of the microcomputer 1 reads and executes the control program 1P from the ROM 12 to execute the system task 101 and the state management task 102, and further reads and executes the application programs 121, 121,. Each application task A20, B30,... Is executed. The application tasks A20 and B30 are divided into detailed processing and functions, respectively, application modules A-1 to A-N (201,..., 20n), application modules B-1 to B-N (301,..., 30n). ) Is designed to perform.

実施の形態1におけるマイコン1が制御プログラム1Pを読み出して実行することにより、各アプリケーションタスクA20,B30,…と夫々同一のアプリケーションモジュールA−1〜A−N(201,…,20n),アプリケーションモジュールB−1〜B−N(301,…,30n)を実行するアプリケーションタスクA´21,B´31が実行可能である。アプリケーションタスクA20とアプリケーションタスクA´21とは、後述するように設定される優先度が異なるだけで、同一の処理を実行するタスクである。なお、アプリケーションタスクA20とアプリケーションタスクA´21とは、完全に同一の処理を実行するように構成されていなくともよい。後述するように、アプリケーションタスクA´21はスリープ状態時に起動されるので、一部の処理が省略されているなど、スリープ状態時用に一部異なって構成されていてもよい。同様に、アプリケーションタスクB30とアプリケーションタスクB´31とは同一、又は対応する処理を実行するタスクである。   When the microcomputer 1 according to the first embodiment reads and executes the control program 1P, the same application modules A-1 to A-N (201,..., 20n) and application modules as the application tasks A20, B30,. Application tasks A′21 and B′31 that execute B-1 to BN (301,..., 30n) can be executed. The application task A20 and the application task A'21 are tasks that execute the same processing except that the priorities set are different as described later. Note that the application task A20 and the application task A′21 may not be configured to execute completely the same processing. As will be described later, since the application task A′21 is activated in the sleep state, a part of the processing may be omitted, for example, some processes may be omitted. Similarly, the application task B30 and the application task B′31 are tasks that execute the same or corresponding processing.

システムタスク101は、各アプリケーションタスクA20,B30,…,A´21,B´31,…を選択して起動し、マイコン1全体の処理を制御する。詳細にはシステムタスク101は、マイコン1がスリープ状態であるか否か、即ちスリープ状態であるか非スリープ状態(ウェイクアップ状態)であるかを判断し、非スリープ状態である場合には図2中実線にて示すようにアプリケーションタスクA20,B30,…を選択して起動し、スリープ状態である場合には図2中破線にて示すようにアプリケーションタスクA´21,B´31,…を選択して起動する。   The system task 101 selects and starts each application task A20, B30,..., A′21, B′31,. Specifically, the system task 101 determines whether or not the microcomputer 1 is in a sleep state, that is, whether it is in a sleep state or a non-sleep state (wake-up state). As shown by the solid line, the application tasks A20, B30,... Are selected and activated. When in the sleep state, the application tasks A'21, B'31,. And start.

状態管理タスク102は、各アプリケーションタスクA20,B30,…,A´21,B´31,…の実行状態を判定する処理、及び各実行状態に基づくマイコン1全体におけるスリープ状態とウェイクアップ状態との間での移行切り替えを行なう。   The state management task 102 determines the execution state of each application task A20, B30,..., A′21, B′31,... And the sleep state and wakeup state in the entire microcomputer 1 based on each execution state. Switch between them.

なお、システムタスク101、状態管理タスク102、各アプリケーションタスクA20,B30,…,A´21,B´31,…などの各タスクには、ROM12に記憶されているタスクテーブル122にて優先度が予め設定されている。図3は、実施の形態1におけるROM12に記憶されるタスクテーブル122の内容例を示す説明図である。図3の説明図に示す内容例では、各タスクを識別するための名称に対し、タスク優先度が対応付けられている。図3の内容例では、タスク優先度は数字が大きいほど優先度が高いことを示している。   Each task such as the system task 101, the state management task 102, each application task A20, B30,..., A'21, B'31, ... has a priority in the task table 122 stored in the ROM 12. It is set in advance. FIG. 3 is an explanatory diagram showing an example of the contents of the task table 122 stored in the ROM 12 in the first embodiment. In the content example shown in the explanatory diagram of FIG. 3, a task priority is associated with a name for identifying each task. In the content example of FIG. 3, the task priority indicates that the higher the number, the higher the priority.

図3に示すように、同一の処理を行なうように設計されているアプリケーションタスクA20,B30,…とアプリケーションタスクA´21,B´31,…とでは、非スリープ状態時に起動されるアプリケーションタスクA20,B30,…の優先度がより高く設定されている。更に、各タスクの実行状態を判定してマイコン1全体におけるスリープ状態とウェイクアップ状態との間での移行切り替えを行なう状態管理タスク102の優先度は、非スリープ状態時に起動されるアプリケーションタスクA20,B30,…の優先度よりも低く、スリープ状態時に起動されるアプリケーションタスクA´21,B´31,…の優先度よりも高くなるように設定されている。   As shown in FIG. 3, application tasks A20, B30,... Designed to perform the same processing and application tasks A′21, B′31,. , B30,... Are set higher in priority. Further, the priority of the state management task 102 that determines the execution state of each task and switches the transition between the sleep state and the wake-up state in the entire microcomputer 1 is the application task A20 that is activated in the non-sleep state. Are set to be lower than the priority of B30,... And higher than the priorities of application tasks A'21, B'31,.

また、図3に示す内容例では、システムタスク101の優先度は最も高く設定されており、他のタスクに優先してアプリケーションタスクA20,B30,…,A´21,B´31,…の起動処理が行なわれるようにしてある。   Further, in the content example shown in FIG. 3, the priority of the system task 101 is set highest, and the application tasks A20, B30,..., A′21, B′31,. Processing is performed.

CPU10は、各タスクにおける処理を優先度に従って実行する。つまり、優先度がより高いタスクは、他のタスクにおける処理中であっても割り込みをかけて処理を実行するようにしてある。図3に示すように優先度が設定され、スリープ状態であるか否かによって実行されるアプリケーションタスクA20,B31,…,A´21,B´31,…が選択されることにより、非スリープ状態時には各アプリケーションタスクA20,B30,…よりも状態管理タスク102の優先度が最も低くなり、スリープ状態時には各アプリケーションタスクA´21,B´31,…よりも状態管理タスク102の優先度が高くなる。   CPU10 performs the process in each task according to a priority. In other words, a task with a higher priority is executed by executing an interrupt even when processing is being performed in another task. As shown in FIG. 3, priority is set, and application tasks A20, B31,..., A′21, B′31,. Sometimes the state management task 102 has the lowest priority than each application task A20, B30,..., And the state management task 102 has a higher priority than each application task A'21, B'31,. .

システムタスク101は、I/O部13を介して取得される情報、具体的には測定器、センサ、又は外部スイッチの情報に応じて各アプリケーションタスクA20,B30,…,A´21,B´31,…を起動させる。いずれのアプリケーションタスクA20,B30,…,A´21,B´31,…を起動するかは、CPU10がシステムタスク101として動作することにより、I/O部13を介して取得される情報に対応して選択する。特に、マイコン1の状態をスリープ状態からウェイクアップ状態へ移行させる要因となるウェイクアップ要因が検知された場合には、状態管理タスク102は状態を移行させると共にシステムタスク101に通知して対応するアプリケーションタスクA20,B30,…,A´21,B´31,…のいずれかを起動させる。ウェイクアップ要因は、ROM12にテーブルとして記憶されており、CPU10によって参照可能であってもよいし、制御プログラム1Pに組み込まれていてもよい。   The system task 101 is based on information acquired via the I / O unit 13, specifically, information on measuring instruments, sensors, or external switches, and each application task A20, B30,..., A′21, B ′. 31, ... are activated. Which application task A20, B30,..., A′21, B′31,... Is activated corresponds to information acquired through the I / O unit 13 by the CPU 10 operating as the system task 101. To select. In particular, when a wake-up factor that causes the state of the microcomputer 1 to shift from the sleep state to the wake-up state is detected, the state management task 102 shifts the state and notifies the system task 101 to correspond to the application. Any one of the tasks A20, B30,..., A′21, B′31,. The wake-up factor is stored as a table in the ROM 12, and may be referred to by the CPU 10, or may be incorporated in the control program 1P.

図4は、実施の形態1におけるウェイクアップ要因の内容例を示す説明図である。図4に示すように、要因1、要因2、…に対し、起動させるアプリケーションタスクA20(A´21),B30(B´31),…が対応付けられている。ウェイクアップ要因が発生した場合には、状態管理タスク102によって検知され、システムタスク101に通知されるとする。   FIG. 4 is an explanatory diagram showing an example of the contents of a wake-up factor in the first embodiment. As shown in FIG. 4, factor 1, factor 2,... Are associated with application tasks A20 (A′21), B30 (B′31),. When a wake-up factor occurs, it is detected by the state management task 102 and notified to the system task 101.

図4に示す内容例の場合、システムタスク101は、要因1が発生したとき、例えばスリープ状態へ移行後100ミリ秒が経過したときには、アプリケーションタスクA20(A´21)は起動させずに、アプリケーションタスクB30(B´31)を起動させる。特に、スリープ状態である場合にはシステムタスク101は、アプリケーションタスクB´31を起動させる。なお、スリープ状態時に要因1が発生して状態管理タスク102がこれを検知したとしても、状態管理タスク102によりウェイクアップ状態へは移行されない。要因1が発生した場合には、アプリケーションタスクA20(A´21)は起動されず、以後にアプリケーションタスクA20(A´21)を起動させるウェイクアップ要因が発生した場合に迅速にこれを検知してするため、状態管理タスク102の優先度が高く保たれている必要がある。一方、システムタスク101は、要因2が発生したとき、例えばイグニッションスイッチがオンとなったときには、全てのアプリケーションタスクA20,B30,…を起動させる。要因2が発生したときには状態管理タスク102は、全てのアプリケーションタスクA20,B30,…を起動させる要因であるので、ウェイクアップ状態へ移行させる。   In the case of the content example shown in FIG. 4, when the factor 1 occurs, for example, when 100 milliseconds elapses after shifting to the sleep state, the application task A20 (A'21) is not activated and the application task A20 (A'21) is activated. Task B30 (B'31) is activated. In particular, in the sleep state, the system task 101 activates the application task B′31. Even if the factor 1 occurs in the sleep state and the state management task 102 detects this, the state management task 102 does not shift to the wake-up state. When factor 1 occurs, application task A20 (A'21) is not activated, and when a wake-up factor that activates application task A20 (A'21) occurs thereafter, this is quickly detected. Therefore, the priority of the state management task 102 needs to be kept high. On the other hand, when the factor 2 occurs, for example, when the ignition switch is turned on, the system task 101 activates all application tasks A20, B30,. When the factor 2 occurs, the state management task 102 is a factor that activates all the application tasks A20, B30,.

このように構成されるマイコン1のCPU10がシステムタスク101及び状態管理タスク102として、状態の切り替え処理及び各タスクの起動処理を行なう手順についてフローチャートを参照して説明する。   A procedure in which the CPU 10 of the microcomputer 1 configured as described above performs the state switching process and the activation process of each task as the system task 101 and the state management task 102 will be described with reference to flowcharts.

図5は、実施の形態1におけるマイコン1のCPU10による状態の切り替え処理及び各タスクの起動処理の手順の一例を示すフローチャートである。CPU10は、ROM12に記憶されている制御プログラム1PをRAM11に読み出して実行することにより、以下に示す処理を実行する。なお、以下に示す処理手順は、マイコン1が搭載されるECUにバッテリーなどの電源供給装置から電力が供給され、マイコン1自体がリセットされた時点で開始される。そして、マイコン1が再度リセットされるか、又は電源供給装置からの電力の供給が完全に停止されるまで続行される。リセット時は、全アプリケーションタスクA20,B30,…が起動されてウェイクアップ状態となる。   FIG. 5 is a flowchart illustrating an example of a procedure of state switching processing and task activation processing by the CPU 10 of the microcomputer 1 according to the first embodiment. The CPU 10 executes the processing shown below by reading the control program 1P stored in the ROM 12 into the RAM 11 and executing it. The processing procedure shown below starts when power is supplied from a power supply device such as a battery to the ECU on which the microcomputer 1 is mounted, and the microcomputer 1 itself is reset. The process continues until the microcomputer 1 is reset again or the supply of power from the power supply device is completely stopped. When resetting, all application tasks A20, B30,... Are activated to enter a wake-up state.

CPU10はウェイクアップ状態時に、状態管理タスク102としての動作により、ウェイクアップ状態で実行されている全アプリケーションタスクA20,B30,…がスリープ移行可であることを通知したか否かを判断する(ステップS1)。CPU10は、全アプリケーションタスクA20,B30,…がスリープ移行可であることを通知してはいないと判断した場合(S1:NO)、処理をステップS1へ戻し、ウェイクアップ状態における処理を続行させる。   In the wake-up state, the CPU 10 determines whether or not all application tasks A20, B30,... Executed in the wake-up state have been notified by the operation as the state management task 102 that sleep transition is possible (step). S1). CPU 10 determines that all application tasks A20, B30,... Have not been notified that sleep transition is possible (S1: NO), returns the process to step S1, and continues the process in the wake-up state.

CPU10は、全アプリケーションタスクA20,B30,…がスリープ移行可であることを通知したと判断した場合(S1:YES)、マイコン1の動作状態をスリープ状態へ移行させる(ステップS2)。具体的には、CPU10は、図示しないクロックへクロック周波数を下げるように変更指示を与えるか、又は図示しない電源回路へ電圧値を低減させるべく指示を与えるなどの処理を行なう。   When it is determined that all application tasks A20, B30,... Have been notified that the sleep can be shifted (S1: YES), the CPU 10 shifts the operation state of the microcomputer 1 to the sleep state (step S2). Specifically, the CPU 10 performs processing such as giving a change instruction to a clock (not shown) so as to lower the clock frequency, or giving an instruction to a power supply circuit (not shown) to reduce the voltage value.

CPU10はスリープ状態へ移行後、状態管理タスク102としての動作によりウェイクアップ要因を検知したか否かを判断する(ステップS3)。CPU10は、ウェイクアップ要因を検知していないと判断した場合(S3:NO)、処理をステップS3へ戻してウェイクアップ要因を検知したと判断するまで待機する。CPU10はステップS3にてウェイクアップ要因を検知していないと判断した場合(S3:NO)、例えば10ミリ秒などの一定期間待機してから、状態管理タスク102として自身を起動させてステップS3へ処理を戻すようにしてもよい。システムタスク101としても定期的に、ステップS3のウェイクアップ要因が発生しているか否かの判断処理を行なうようにしてもよい。   After shifting to the sleep state, the CPU 10 determines whether or not a wake-up factor has been detected by the operation as the state management task 102 (step S3). When determining that the wake-up factor is not detected (S3: NO), the CPU 10 returns the process to step S3 and waits until it is determined that the wake-up factor is detected. If the CPU 10 determines in step S3 that no wake-up factor has been detected (S3: NO), it waits for a certain period of time, for example, 10 milliseconds, and then activates itself as the state management task 102 and proceeds to step S3. You may make it return processing. The system task 101 may periodically determine whether or not a wake-up factor has occurred in step S3.

CPU10は、状態管理タスク102としての動作によりステップS3にてウェイクアップ要因を検知したと判断した場合(S3:YES)、検知したウェイクアップ要因に応じてウェイクアップ状態へ移行するか否かを判断する(ステップS4)。CPU10は、例えばステップS3にて検知したと判断したウェイクアップ要因が図4に示す要因1である場合には、ウェイクアップ状態へ移行しないと判断し、図4に示す要因2である場合には、ウェイクアップ状態へ移行すると判断する。   If the CPU 10 determines that the wake-up factor is detected in step S3 by the operation as the state management task 102 (S3: YES), the CPU 10 determines whether or not to shift to the wake-up state according to the detected wake-up factor. (Step S4). For example, when the wake-up factor determined to have been detected in step S3 is the factor 1 shown in FIG. 4, the CPU 10 determines that the wake-up state is not entered, and in the case of the factor 2 shown in FIG. , It is determined to shift to the wake-up state.

CPU10は、ステップS3にてウェイクアップ要因を検知したが、そのウェイクアップ要因によってステップS4にてウェイクアップ状態へ移行しないと判断した場合(S4:NO)、スリープ状態のままとし、システムタスク101の動作により、スリープ状態時において対応するアプリケーションタスクA´21,B´31,…の内のいずれかを選択して起動し(ステップS5)、処理をステップS3へ戻す。このとき依然としてマイコン1の動作状態はスリープ状態である。   If the CPU 10 detects the wake-up factor in step S3 but determines that the wake-up factor does not shift to the wake-up state in step S4 (S4: NO), the CPU 10 remains in the sleep state, and the system task 101 By operation, one of the corresponding application tasks A′21, B′31,... In the sleep state is selected and activated (step S5), and the process returns to step S3. At this time, the operation state of the microcomputer 1 is still the sleep state.

CPU10は、ステップS3にてウェイクアップ要因を検知し、そのウェイクアップ要因によってステップS4にてウェイクアップ状態へ移行すると判断した場合(S4:YES)、ウェイクアップ状態へ移行する(ステップS6)。具体的には、CPU10は、図示しないクロックへクロック周波数を上げるように変更指示を与えるか、又は図示しない電源回路へ電圧値を上昇させるべく指示を与えるなどの処理を行なう。そしてCPU10は、システムタスク101の動作により、ウェイクアップ状態時において対応するアプリケーションタスクA20,B30,…の内のいずれかを選択して起動し(ステップS7)、ウェイクアップ状態へ移行したので処理をステップS1へ戻して処理を継続する。   If the CPU 10 detects the wake-up factor in step S3 and determines that the wake-up state is entered in step S4 based on the wake-up factor (S4: YES), the CPU 10 transits to the wake-up state (step S6). Specifically, the CPU 10 performs processing such as giving a change instruction to a clock (not shown) so as to increase the clock frequency, or giving an instruction to increase the voltage value to a power supply circuit (not shown). Then, the CPU 10 selects and starts one of the corresponding application tasks A20, B30,... In the wake-up state by the operation of the system task 101 (step S7), and shifts to the wake-up state. It returns to step S1 and continues processing.

図5のフローチャートに示した処理は上述したように、マイコン1が再度リセットされるか、又は電源供給装置からの電力の供給が完全に停止されるまで続行される。   As described above, the process shown in the flowchart of FIG. 5 is continued until the microcomputer 1 is reset again or the supply of power from the power supply device is completely stopped.

図5のフローチャートに示した処理を行なうことにより、スリープ状態時は状態管理タスク102の優先度が他のアプリケーションタスクA´21,B´31,…よりも高くなり、ウェイクアップ要因を検知した場合のシステムタスク101によるアプリケーションタスクの起動処理は迅速に行なわれる。一方、ウェイクアップ状態時は、状態管理タスク102の優先度は他のアプリケーションタスクA20,B30,…よりも低くなり、各アプリケーションタスクA20,B30,…がいずれも完全にスリープ移行可の状態とならない限り、スリープ状態への移行処理は行なわれない。   When the process shown in the flowchart of FIG. 5 is performed, the priority of the state management task 102 becomes higher than that of the other application tasks A′21, B′31,. The application task activation process by the system task 101 is quickly performed. On the other hand, in the wake-up state, the priority of the state management task 102 is lower than the other application tasks A20, B30,..., And none of the application tasks A20, B30,. As long as the transition to the sleep state is not performed.

次に、図5のフローチャートに示したようにCPU10が、状態管理タスク102及びシステムタスク101としての動作により、状態の移行の切り替えを行ない、状態に応じて優先度が異なるタスクを選択して起動する処理を具体例を挙げて説明する。図6は、実施の形態1におけるマイコン1のCPU10によって実行される各タスクの処理を示すタイムチャートである。横軸に時間の経過を示し、縦軸には各タスクにおける処理の実行開始/停止を、優先度が高い順に上から示している。なお説明図の下部には時間の経過に応じて移行されるマイコン1の動作状態を示す。   Next, as shown in the flowchart of FIG. 5, the CPU 10 switches the state transition by the operation as the state management task 102 and the system task 101, and selects and starts a task having a different priority according to the state. The processing will be described with a specific example. FIG. 6 is a time chart showing processing of each task executed by CPU 10 of microcomputer 1 in the first embodiment. The horizontal axis shows the passage of time, and the vertical axis shows the execution start / stop of processing in each task from the top in descending order of priority. The lower part of the explanatory diagram shows the operating state of the microcomputer 1 that is shifted over time.

図6に示す例では、ウェイクアップ状態時にアプリケーションタスクA20,B30が実行されており、いずれのタスクからもスリープ状態へ移行可を示す「SleepOK」が通知されている。状態管理タスク102は定期的に各アプリケーションにおける実行状態を判断し、t1の時点の周期で、アプリケーションタスクA20,B30のいずれからも「SleepOK」の通知がされていることを検知し、動作状態をスリープ状態へ移行させる。   In the example shown in FIG. 6, the application tasks A20 and B30 are executed in the wake-up state, and “SleepOK” indicating that the transition to the sleep state is possible is notified from any task. The state management task 102 periodically determines the execution state of each application, detects that “SleepOK” is notified from either of the application tasks A20 and B30 at the period of time t1, and determines the operation state. Enter sleep mode.

その後、スリープ状態中の時点t2で要因1であるウェイクアップ要因が発生した場合、状態管理タスク102は当該ウェイクアップ要因を検知する。状態管理タスク102からは、システムタスク101へ要因1に対応するアプリケーションタスクの起動要求が通知される。システムタスク101は要因1に対応するアプリケーションタスクであって、スリープ状態時に選択すべきものとしてアプリケーションタスクB´31を選択して起動させ、処理を実行させる(図4参照)。なお、要因1ではウェイクアップ状態へ移行しないと判断されるから、スリープ状態のまま維持される。   Thereafter, when a wake-up factor as factor 1 occurs at time t2 in the sleep state, the state management task 102 detects the wake-up factor. The state management task 102 notifies the system task 101 of an application task activation request corresponding to factor 1. The system task 101 is an application task corresponding to the factor 1, and selects and activates the application task B′31 to be selected in the sleep state, and executes the process (see FIG. 4). Since it is determined that the factor 1 does not shift to the wake-up state, the sleep state is maintained.

アプリケーションタスクB´31における処理の実行中の時点t3に、要因2であるウェイクアップ要因が発生した場合、状態管理タスク102は当該ウェイクアップ要因を検知する。このとき、スリープ状態であるから状態管理タスク102の優先度が、アプリケーションタスクB´31の優先度よりも高い(図3参照)。したがって、アプリケーションタスクB´31における処理の実行中であっても、処理が中断されてウェイクアップ要因の発生に対し、状態管理タスク102によって迅速に検知がなされる。状態管理タスク102は、ウェイクアップ要因として要因2を検知したから、ウェイクアップ状態へ移行させると共に、システムタスク101へ要因2に対応するアプリケーションタスクの起動要求が通知される。システムタスク101は、要因2に対応するアプリケーションタスクであって、ウェイクアップ状態時に選択すべきものとしてアプリケーションタスクA20及びアプリケーションタスクB30を選択して起動させ、処理を実行させる(図4参照)。なおこのとき、アプリケーションタスクB30における処理は、アプリケーションタスクB´31にて処理を実行中であるために回避される。そしてアプリケーションタスクB´31と要因2によるアプリケーションタスクA20とでは、アプリケーションタスクA20の優先度が高いので、優先してアプリケーションタスクA20における処理が実行される。アプリケーションタスクA20における処理が終了した時点t4にて、アプリケーションタスクB´31の処理が以後、継続して実行される。   If a wake-up factor as factor 2 occurs at time t3 during execution of the process in application task B′31, state management task 102 detects the wake-up factor. At this time, since it is in the sleep state, the priority of the state management task 102 is higher than the priority of the application task B′31 (see FIG. 3). Therefore, even when the process in the application task B′31 is being executed, the process is interrupted and the state management task 102 quickly detects the occurrence of the wake-up factor. Since the state management task 102 detects the factor 2 as the wake-up factor, the state management task 102 shifts to the wake-up state and notifies the system task 101 of the activation request for the application task corresponding to the factor 2. The system task 101 is an application task corresponding to the factor 2, and selects and activates the application task A20 and the application task B30 to be selected in the wake-up state, and executes processing (see FIG. 4). At this time, the process in the application task B30 is avoided because the process is being executed in the application task B′31. In the application task B′31 and the application task A20 due to the factor 2, since the priority of the application task A20 is high, the processing in the application task A20 is executed with priority. At the time point t4 when the process in the application task A20 ends, the process of the application task B′31 is subsequently executed.

このように、実施の形態1におけるマイコン1では、状態管理タスク102の優先度が、スリープ状態時に実行される各アプリケーションタスクA´21,B´31,…の優先度よりも高く設定されているために、ウェイクアップ要因が発生したときに、他のアプリケーションタスクA´21,B´31,…が処理を実行中であっても、迅速に対応するアプリケーションタスクを起動させることができる。一方、ウェイクアップ時は、状態管理タスク102の優先度が、ウェイクアップ状態時に実行される各アプリケーションタスクA20,B30,…の優先度よりも低く設定されているために、全アプリケーションタスクA20,B30,…にてスリープ状態への移行が可となって移行処理が開始されたとしても、もしスリープ状態への移行が不可となる処理が状態管理タスク102によって行われようとするときには移行処理は中断される。このようにして、迅速に状態移行を行なうことができると共に、不整合が生じないようにする適切且つ効率的な状態移行をさせることを可能となる。したがって、消費電力を低減させるスリープ状態へ有効に移行でき、消費電力を有効に低減させることができる。   As described above, in the microcomputer 1 according to the first embodiment, the priority of the state management task 102 is set higher than the priorities of the application tasks A′21, B′31,. Therefore, even when another application task A′21, B′31,... Is executing a process when a wake-up factor occurs, the corresponding application task can be activated quickly. On the other hand, at the time of wakeup, since the priority of the state management task 102 is set lower than the priority of each application task A20, B30,... Executed in the wakeup state, all the application tasks A20, B30 are set. Even if the transition to the sleep state is enabled at,... And the transition process is started, the transition process is interrupted when the state management task 102 tries to perform a process that disables the transition to the sleep state. Is done. In this way, it is possible to make a state transition quickly and to make an appropriate and efficient state transition to prevent inconsistency. Therefore, it is possible to effectively shift to a sleep state in which power consumption is reduced, and power consumption can be effectively reduced.

なお、実施の形態1では、マイコン1はアプリケーションタスクA20,B30,…と、アプリケーションタスクA´21,B´31,…とを夫々実行することが可能に構成した。つまり、同一の処理を実行させるタスクの優先度を、スリープ状態時と非スリープ時で状態管理タスク102に対し上下させるために、静的に用意されてある別々のタスクを実行する構成とした。OS(Operating System)が動作する構成とし、OSにより動的に優先度を変えるしくみも考えられるが、OSを介在させずに、予め異なる優先度が静的に設定された各アプリケーションタスクA20,B30,…,A´21,B´31,…を実行する構成とすることにより、ソフトウェア構造を単純化し、処理を軽量化することができる利点を有する。   In the first embodiment, the microcomputer 1 is configured to be able to execute application tasks A20, B30,... And application tasks A′21, B′31,. In other words, in order to increase or decrease the priority of the task for executing the same processing with respect to the state management task 102 in the sleep state and in the non-sleep state, the configuration is such that separate statically prepared tasks are executed. Although a structure in which an OS (Operating System) is operated and a priority is dynamically changed depending on the OS is conceivable, each of the application tasks A20 and B30 in which different priorities are statically set in advance without using the OS. ,..., A′21, B′31,... Have the advantages of simplifying the software structure and reducing the processing weight.

(実施の形態2)
実施の形態1のマイコン1では、ウェイクアップ状態時に実行されるアプリケーションタスクA20,B30,…のいずれにも対応して、スリープ状態時にはアプリケーションタスクA´21,B´31,…が実行される構成であった。しかしながら、スリープ状態時に全てのアプリケーションタスクA20,B30,…に対応する処理が実行されることは必ずしも必要ではない。実施の形態2では、一部のアプリケーションタスクB30のみに対して、スリープ状態用のアプリケーションタスクB´31が起動可能に構成される。
(Embodiment 2)
In the microcomputer 1 of the first embodiment, the application tasks A′21, B′31,... Are executed in the sleep state in correspondence with any of the application tasks A20, B30,. Met. However, it is not always necessary to execute processing corresponding to all application tasks A20, B30,. In the second embodiment, a sleep state application task B′31 is configured to be activated only for a part of the application tasks B30.

実施の形態2におけるマイコン1の構成は、ソフトウェア構成の一部及びROM12に記憶されるタスクテーブル122の内容が一部異なる以外は同様である。したがって、実施の形態1と共通する構成には同一の符号を付し、詳細な説明を省略する。   The configuration of the microcomputer 1 in the second embodiment is the same except that a part of the software configuration and the contents of the task table 122 stored in the ROM 12 are partially different. Therefore, the same code | symbol is attached | subjected to the structure which is common in Embodiment 1, and detailed description is abbreviate | omitted.

図7は、実施の形態2におけるソフトウェア構成を模式的に示す説明図である。図7中の各矩形は、CPU10が制御プログラム1Pを読み出すことによって実行される処理単位(タスク)を示す。実施の形態2においても、マイコン1のCPU10ににより、システムタスク101、状態管理タスク102が実行され、更にアプリケーションタスクA20,B30,…が実行される。アプリケーションタスクA20,B30は夫々、詳細な処理、機能毎に分割されるアプリケーションモジュールA−1〜A−N(201,…,20n),アプリケーションモジュールB−1〜B−N(301,…,30n)を実行するように設計されている。   FIG. 7 is an explanatory diagram schematically showing a software configuration in the second embodiment. Each rectangle in FIG. 7 indicates a processing unit (task) executed by the CPU 10 reading the control program 1P. Also in the second embodiment, the system task 101 and the state management task 102 are executed by the CPU 10 of the microcomputer 1, and the application tasks A20, B30,. The application tasks A20 and B30 are divided into detailed processing and functions, respectively, application modules A-1 to A-N (201,..., 20n), application modules B-1 to B-N (301,..., 30n). ) Is designed to perform.

実施の形態2では、CPU10はアプリケーションタスクB30と夫々同一のアプリケーションモジュールB−1〜B−N(301,…,30n)を実行するアプリケーションタスクB´31のみが実行可能である。アプリケーションタスクB30とアプリケーションタスクB´31とは同一、又は対応する処理を実行するタスクである。アプリケーションタスクA20に対応するアプリケーションタスクA´21は存在しない。スリープ状態時にアプリケーションタスクA20に対応する処理が実行されることがないように構成されているからである。   In the second embodiment, the CPU 10 can execute only the application task B′31 that executes the same application modules B-1 to BN (301,..., 30n) as the application task B30. The application task B30 and the application task B′31 are tasks that execute the same or corresponding processing. There is no application task A′21 corresponding to the application task A20. This is because the processing corresponding to the application task A20 is not executed in the sleep state.

実施の形態2におけるシステムタスク101は、ウェイクアップ状態時には必要に応じてアプリケーションタスクA20,B30,…を選択して起動し、マイコン1全体の処理を制御する。そして、システムタスク101は、スリープ状態時には、図7中の破線にて示すようにアプリケーションタスクB´31を選択して起動する場合がある。   The system task 101 according to the second embodiment selects and starts application tasks A20, B30,... As necessary in the wake-up state, and controls the processing of the entire microcomputer 1. In the sleep state, the system task 101 may select and start the application task B′31 as indicated by a broken line in FIG.

図8は、実施の形態2におけるタスクテーブル122の内容例を示す説明図である。図8の説明図に示す内容例では、各タスクを識別するための名称に対し、タスク優先度が対応付けられている。タスク優先度は数字が大きいほど優先度が高いことを示している。   FIG. 8 is an explanatory diagram showing an example of the contents of the task table 122 in the second embodiment. In the content example shown in the explanatory diagram of FIG. 8, the task priority is associated with the name for identifying each task. The task priority indicates that the higher the number, the higher the priority.

図8に示すように、非スリープ状態時に起動されるアプリケーションB30と同一の処理を行なうように設計されているアプリケーションタスクB´31の優先度が最も低く設定されており、次に状態管理タスク102の優先度が低い。次いで、非スリープ状態時に起動されるアプリケーションタスクA20,B30の優先度が、状態管理タスク102の優先度よりも高く設定されており、アプリケーションタスクA20の優先度がより高い。そして、システムタスク101の優先度が最も高く設定されており、他のタスクに優先してアプリケーションタスクA20,B30,…,B´31,…の起動処理が行なわれるようにしてある。   As shown in FIG. 8, the priority of the application task B′31 designed to perform the same processing as that of the application B30 activated in the non-sleep state is set to the lowest, and the state management task 102 is next set. Has a low priority. Next, the priority of the application tasks A20 and B30 activated in the non-sleep state is set higher than the priority of the state management task 102, and the priority of the application task A20 is higher. The priority of the system task 101 is set to be the highest, and the activation processing of the application tasks A20, B30,..., B′31,.

このように、実施の形態2におけるマイコン1でも、状態管理タスク102の優先度が、スリープ状態時に起動される可能性のあるアプリケーションタスクB´31の優先度よりも高く設定されているために、ウェイクアップ要因が発生したときに、アプリケーションタスクB´31,…が処理を実行中であっても、迅速に対応する他のアプリケーションタスクを起動させることができる。一方、ウェイクアップ時は、状態管理タスク102の優先度が、ウェイクアップ状態時に実行される各アプリケーションタスクA20,B30,…の優先度よりも低く設定されているために、全アプリケーションタスクA20,B30,…にてスリープ状態への移行が可となって移行処理が開始されたとしても、もしスリープ状態への移行が不可となる処理が状態管理タスク102によって行われようとするときには移行処理は中断される。このようにして、迅速に状態移行を行なうことができると共に、不整合が生じないようにする適切且つ効率的な状態移行をさせることが可能となる。したがって、消費電力を低減させるスリープ状態へ有効に移行でき、消費電力を有効に低減させることができる。   Thus, even in the microcomputer 1 according to the second embodiment, the priority of the state management task 102 is set higher than the priority of the application task B′31 that may be activated in the sleep state. When the wake-up factor occurs, even if the application task B′31,... Is executing the process, it is possible to quickly start another application task that corresponds. On the other hand, at the time of wakeup, since the priority of the state management task 102 is set lower than the priority of each application task A20, B30,... Executed in the wakeup state, all application tasks A20, B30 are set. Even if the transition to the sleep state is enabled at,... And the transition process is started, the transition process is interrupted when the state management task 102 tries to perform a process that disables the transition to the sleep state. Is done. In this way, it is possible to perform a state transition quickly, and it is possible to perform an appropriate and efficient state transition that prevents inconsistencies. Therefore, it is possible to effectively shift to a sleep state in which power consumption is reduced, and power consumption can be effectively reduced.

また、実施の形態2では、アプリケーションタスクA20に対応する処理は、スリープ状態時には起動されないように構成されているため、アプリケーションタスクA´21はタスクテーブル122に含まれていない。ウェイクアップ要因によっては、全アプリケーションタスクA20,B30,…が起動されず、スリープ状態のまま一部のアプリケーションタスクの処理が行なわれるのみである場合がある。このような場合、実施の形態2のように予めソフトウェア構成、及び優先度の設定が、スリープ状態時に一部のアプリケーションタスクが起動するようになされることで、より構成が単純化され、処理を効率的とすることが可能となる。   In the second embodiment, the process corresponding to the application task A20 is configured not to be activated in the sleep state, and therefore the application task A′21 is not included in the task table 122. Depending on the wake-up factor, all application tasks A20, B30,... May not be activated and only some application tasks may be processed in the sleep state. In such a case, as in the second embodiment, the software configuration and priority settings are set in advance so that some application tasks are activated in the sleep state, thereby further simplifying the configuration and processing. It becomes possible to be efficient.

なお、上述のように開示された実施の形態1及び2はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   It should be understood that the first and second embodiments disclosed as described above are examples in all respects and are not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the meanings described above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

実施の形態1におけるマイコンの構成を示すブロック図である。2 is a block diagram illustrating a configuration of a microcomputer according to Embodiment 1. FIG. 実施の形態1におけるマイコンによって実行されるソフトウェア構成を模式的に示す説明図である。4 is an explanatory diagram schematically showing a software configuration executed by the microcomputer according to Embodiment 1. FIG. 実施の形態1におけるROMに記憶されるタスクテーブルの内容例を示す説明図である。4 is an explanatory diagram illustrating an example of the contents of a task table stored in a ROM according to Embodiment 1. FIG. 実施の形態1におけるウェイクアップ要因の内容例を示す説明図である。6 is an explanatory diagram illustrating an example of contents of a wake-up factor according to Embodiment 1. FIG. 実施の形態1におけるマイコンのCPUによる状態の切り替え処理及び各タスクの起動処理の手順の一例を示すフローチャートである。6 is a flowchart illustrating an example of a procedure of a state switching process and a task activation process performed by the CPU of the microcomputer according to the first embodiment. 実施の形態1におけるマイコンのCPUによって実行される各タスクの処理を示すタイムチャートである。3 is a time chart illustrating processing of each task executed by the CPU of the microcomputer according to the first embodiment. 実施の形態2におけるソフトウェア構成を模式的に示す説明図である。FIG. 6 is an explanatory diagram schematically showing a software configuration in a second embodiment. 実施の形態2におけるタスクテーブルの内容例を示す説明図である。10 is an explanatory diagram illustrating an example of the contents of a task table in Embodiment 2. FIG. アイドルタスクによって状態の移行を管理する場合の各タスクのタイムチャートである。It is a time chart of each task in the case of managing a state transition by an idle task. 優先度が高い状態管理タスクが状態の移行を管理する場合の各タスクのタイムチャートである。It is a time chart of each task when a state management task with a high priority manages state transition.

符号の説明Explanation of symbols

1 マイコン
10 CPU
12 ROM
1P 制御プログラム(コンピュータプログラム)
101 システムタスク(起動処理)
102 状態管理タスク(切替処理)
20,30,… アプリケーションタスクA,B,…(第1処理)
21,31,… アプリケーションタスクA´,B´,…(第2処理)
1 Microcomputer 10 CPU
12 ROM
1P control program (computer program)
101 System task (startup process)
102 State management task (switching process)
20, 30, ... Application tasks A, B, ... (first processing)
21, 31, ... Application tasks A ', B', ... (second processing)

Claims (5)

複数の処理を実行する実行手段と、自身の動作を休止する休止状態へ移行させる手段とを備え、前記実行手段は、前記複数の処理夫々に予め設定された優先度に従って各処理を実行するようにしてある処理装置において、
前記実行手段は、
休止状態及び非休止状態の切り替えを行なう切替処理と、
該切替処理よりも優先度が高い第1処理と、
該第1処理と対応する処理であって前記切替処理よりも優先度が低い第2処理と
を実行するようにしてあり、
自身が休止状態であるか否かを判断する手段を備え、
休止状態であると判断した場合に第2処理を実行し、非休止状態であると判断した場合に第1処理を実行するようにしてあること
を特徴とする処理装置。
An execution unit that executes a plurality of processes; and a unit that shifts to a dormant state that pauses its own operation. The execution unit executes each process according to a priority set in advance for each of the plurality of processes. In a certain processing device,
The execution means includes
A switching process for switching between a sleep state and a non-sleep state;
A first process having a higher priority than the switching process;
A second process corresponding to the first process and having a lower priority than the switching process.
Means for determining whether or not it is in a dormant state;
A processing apparatus, characterized in that the second process is executed when it is determined that it is in a dormant state, and the first process is executed when it is determined that it is in a non-pause state.
第1処理及び第2処理は、同一の処理であること
を特徴とする請求項1に記載の処理装置。
The processing apparatus according to claim 1, wherein the first process and the second process are the same process.
前記実行手段は更に、第1処理及び第2処理のいずれかを選択して起動する前記第1処理よりも優先度が高い起動処理を実行するようにしてあること
を特徴とする請求項1又は2に記載の処理装置。
The execution unit is further configured to execute a startup process having a higher priority than the first process to be started by selecting one of the first process and the second process. 2. The processing apparatus according to 2.
複数の処理を夫々に予め設定された優先度に従って実行するようにしてあり、自身の動作を休止する休止状態へ移行させることが可能に構成してある処理装置における処理方法において、
前記処理装置は、
前記処理として、
自身の休止状態及び非休止状態の切り替えを行なう切替処理と、
該切替処理よりも優先度が高い第1処理と、
該第1処理と対応する処理であって前記切替処理よりも優先度が低い第2処理と
を夫々優先度に従って実行するようにしてあり、
自身が休止状態であるか否かを判断し、
休止状態であると判断した場合に第2処理を実行し、
非休止状態であると判断した場合に第1処理を実行する
ことを特徴とする処理方法。
In the processing method in the processing apparatus configured to perform a plurality of processes according to a preset priority, and configured to be able to shift to a sleep state in which its own operation is suspended,
The processor is
As the processing,
A switching process for switching between its hibernation state and non-hibernation state;
A first process having a higher priority than the switching process;
A second process corresponding to the first process and having a lower priority than the switching process is executed according to the priority.
Determine if they are in hibernation,
If it is determined that it is in a dormant state, the second process is executed,
A processing method, comprising: executing a first process when it is determined that a non-sleep state is set.
コンピュータに、複数の処理を夫々に予め設定された優先度に従って実行させ、自身の動作を休止する休止状態へ移行させるコンピュータプログラムにおいて、
コンピュータに、
前記処理として、
自身の休止状態及び非休止状態の切り替えを行なう切替処理と、
該切替処理よりも優先度が高い第1処理と、
該第1処理と対応する処理であって前記切替処理よりも優先度が低い第2処理と
自身の休止状態及び非休止状態の切り替えを行なう切替処理と
を優先度に従って実行させるステップと、
自身が休止状態であるか否かを判断するステップと
を含み、
休止状態であると判断した場合に第2処理を実行させ、
非休止状態であると判断した場合に第1処理を実行させること
を特徴とするコンピュータプログラム。
In a computer program for causing a computer to execute a plurality of processes according to a preset priority, and to shift to a sleep state in which its operation is suspended,
On the computer,
As the processing,
A switching process for switching between its hibernation state and non-hibernation state;
A first process having a higher priority than the switching process;
Executing a second process corresponding to the first process and having a lower priority than the switching process, and a switching process for switching between the sleep state and the non-sleep state according to the priority,
Determining whether it is in a dormant state, and
If it is determined that the computer is in a dormant state, the second process is executed,
A computer program for causing a first process to be executed when it is determined that the device is in a non-sleep state.
JP2008267804A 2008-10-16 2008-10-16 Processing apparatus, processing method and computer program Pending JP2010097427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008267804A JP2010097427A (en) 2008-10-16 2008-10-16 Processing apparatus, processing method and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008267804A JP2010097427A (en) 2008-10-16 2008-10-16 Processing apparatus, processing method and computer program

Publications (1)

Publication Number Publication Date
JP2010097427A true JP2010097427A (en) 2010-04-30

Family

ID=42259060

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008267804A Pending JP2010097427A (en) 2008-10-16 2008-10-16 Processing apparatus, processing method and computer program

Country Status (1)

Country Link
JP (1) JP2010097427A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140067072A (en) * 2011-09-30 2014-06-03 인텔 코포레이션 Priority based application event control (paec) to reduce power consumption
JP2016194871A (en) * 2015-04-01 2016-11-17 株式会社デンソー Electronic control device
US10007323B2 (en) 2012-12-26 2018-06-26 Intel Corporation Platform power consumption reduction via power state switching
WO2019024931A1 (en) * 2017-08-04 2019-02-07 中兴通讯股份有限公司 Power-saving processing method and apparatus, terminal device and computer-readable storage medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140067072A (en) * 2011-09-30 2014-06-03 인텔 코포레이션 Priority based application event control (paec) to reduce power consumption
JP2015507771A (en) * 2011-09-30 2015-03-12 インテル コーポレイション Application event control (PAEC) based on priority to reduce power consumption
KR101597167B1 (en) * 2011-09-30 2016-02-24 인텔 코포레이션 Priority based application event control (paec) to reduce power consumption
US9383803B2 (en) 2011-09-30 2016-07-05 Intel Corporation Priority based application event control (PAEC) to reduce power consumption
US10254818B2 (en) 2011-09-30 2019-04-09 Intel Corporation Priority based application event control (PAEC) to reduce power consumption
US11112853B2 (en) 2011-09-30 2021-09-07 Intel Corporation Priority based application event control (PAEC) to reduce power consumption
US10007323B2 (en) 2012-12-26 2018-06-26 Intel Corporation Platform power consumption reduction via power state switching
US10564705B2 (en) 2012-12-26 2020-02-18 Intel Corporation Platform power consumption reduction via power state switching
US11422615B2 (en) 2012-12-26 2022-08-23 Intel Corporation Platform power consumption reduction via power state switching
US11768533B2 (en) 2012-12-26 2023-09-26 Tahoe Research, Ltd. Platform power consumption reduction via power state switching
JP2016194871A (en) * 2015-04-01 2016-11-17 株式会社デンソー Electronic control device
WO2019024931A1 (en) * 2017-08-04 2019-02-07 中兴通讯股份有限公司 Power-saving processing method and apparatus, terminal device and computer-readable storage medium

Similar Documents

Publication Publication Date Title
JP6219121B2 (en) Electronic device and control method thereof
US20230143143A1 (en) Information processing apparatus, control method therefor, and storage medium
JP5939890B2 (en) Information processing apparatus, information processing apparatus control method, and program
US9513853B2 (en) Data processing apparatus capable of controlling power supply, control method therefor, and storage medium
JP2011098561A (en) Controller for image processor
WO2011033626A1 (en) Computer system
JP2006229509A (en) Information equipment and device restarting method
JP2012155534A (en) Electronic device, and method and program of the same
JP2010097427A (en) Processing apparatus, processing method and computer program
JP4665697B2 (en) Information processing apparatus, image forming apparatus, and power saving state transition method
JP2011221708A (en) Information processing devise and control method for information processing devise
JP2006004339A (en) Semiconductor integrated circuit
JP2011013775A (en) Information-processing device, method for controlling information-processing device, and program
JP2009223687A (en) Information processing system and control method thereof
JP5783348B2 (en) Control device, control program, and image forming apparatus
JP2005275771A (en) Power saving management device
JP2008114571A (en) Controller and data processor
JP2002082743A (en) Electronic equipment and storage medium stored with electronic equipment control program
JP2011013836A (en) Memory arrangement management device and microprocessor
JP5346964B2 (en) Electronic equipment and system management program
JP5277262B2 (en) Electronic equipment and system management program
JP2010102567A (en) Periodical task execution device, periodical task execution method, and program
JP2011079176A (en) Controller for image processor
JP2008046811A (en) Power saving control method and image forming device
JP2004086556A (en) Microcontroller