JP2005018662A - Power management system - Google Patents

Power management system Download PDF

Info

Publication number
JP2005018662A
JP2005018662A JP2003186021A JP2003186021A JP2005018662A JP 2005018662 A JP2005018662 A JP 2005018662A JP 2003186021 A JP2003186021 A JP 2003186021A JP 2003186021 A JP2003186021 A JP 2003186021A JP 2005018662 A JP2005018662 A JP 2005018662A
Authority
JP
Japan
Prior art keywords
idle
cpu
power
state
state transition
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.)
Withdrawn
Application number
JP2003186021A
Other languages
Japanese (ja)
Inventor
Tomoshi Ueno
智志 上野
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.)
NEC Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP2003186021A priority Critical patent/JP2005018662A/en
Publication of JP2005018662A publication Critical patent/JP2005018662A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To accurately judge the idle/busy state of a system even in a multi-task environment. <P>SOLUTION: A power management system capable of accurately judging the idle/busy state of the system even in the multi-task environment and driving the system in a power saving mode in the idle state of the system or driving the system in a high-speed mode in the busy state of the system is provided with a means for performing the state transition of the system to the high-speed mode by an interruption requiring operation of the high-speed mode, a means for informing of the idle state of the system in an OS and a means for judging the idle state of the system from the generation frequency of interfaces for informing of the idle state in a BIOS per unit time and performing state transition to the power saving mode. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、パワーマネジメント(消費電力低減)システムに関し、特にコンピュータ装置のパワーマネジメントシステムに関する。
【0002】
【従来の技術】
従来のパワーマネジメントシステムの一例が、特開平4−311230号公報に記載されている(以下「従来技術1」という。)。図8に示すように、この従来のパワーマネジメントシステム(CPUアイドル検出装置)は、CPUがメモリから読み出した命令が、アイドル用命令か、動作用命令かを判断する手段と、アイドル用命令の発生頻度を計測する手段とから構成されている。
【0003】
アイドル用命令、動作用命令の判断は、例えばアプリケーションは、キー入力検出を行うときは、BIOSに対して、「INT16」の命令を出す。アプリケーションは、直接ハードウェアを操作できないため、BIOSにキー入力の有無を通知してもらい、キー入力があったときは、そのキーで入力されたデータを、また、キー入力が無いときは、キー入力がないことを、BIOSから知らせてもらう。この様な場合、「INT16」がアイドル用命令になる。一方、入出力装置のうち、例えば、フレキシブルディスクへのアクセス時は、CPUは読み取り動作を行うために仕事を行う。このように、CPUが仕事を行う必要のある命令が動作用命令となる。
【0004】
この様な構成を有する従来のパワーマネジメントシステムは次のように動作する。
【0005】
すなわち、アイドル用命令の発生頻度が高い場合はシステムがアイドル状態と判断しCPU動作クロックを下げることで、消費電力を低減させる。また、動作用命令が実行されるとシステムはアイドル状態ではなくなったと判断し、CPU動作クロックを上げる。
【0006】
また、従来のパワーマネジメントの一例(以下「従来技術2」という。)が、
著者 Intel Corporation and Microsoft Corporation
題名 Advanced Power Management(ATP) BIOS interface Specification
発行年月日 February 1996
説明ページ 34,35
に記載されている。
【0007】
パーソナルコンピュータにおける、パワーマネジメントのデファクトスタンダードであるAdvanced Power Management(以後「APM」という。)では、CPUを停止して良い場合にBIOSに発行するCPU_Idleのインタフェースが定められている。BIOSはCPU_Idleを受けるとCPUにHALT命令、CPUを停止することで省電力制御する。CPUの復帰は割り込みで行う。
【0008】
なお、APMではCPU_Busyが規定されているが、マルチタスクOSでは、このインタフェースはサポートされておらず、使用できない。
【0009】
【特許文献1】
特開平4−311230号公報
【0010】
【発明が解決しようとする課題】
しかし、第1の問題点は、これらはマルチタスクOSに対応していないという問題があった。
【0011】
従来技術1では、プログラムのアイドル状態にあるときに発生する命令を、ハードウェアの仕組みにより検出しているが、マルチタスクOSでは、あるプログラムがアイドル状態になっていても、他のプログラムが動作している場合があり、正しい判断ができないためである。さらに、マルチタスクOSのアイドル状態時は、大抵JMP命令、またはLOOP命令が実行されているが、これらの命令は、アイドル時以外でも頻繁に利用されるため、これを検出してもアイドルの判断には使用することができない。
【0012】
従来技術2では、CPU_IdleインタフェースによってCPUを停止させるが、マルチタスクOSでは、タスク(プログラム)が動作中でも、別のタスクを動作させるために一瞬アイドル状態になり、CPU_Idleインタフェースが発生する。従って、マルチタスクOS環境では、CPU_Idleインタフェースが発生したからと言って、システムがアイドル状態になったとは限らない。
【0013】
また、CPU_IdleインタフェースでCPUを停止させ、割り込みで復帰させることで、前述の一瞬のアイドルに対応する方法もある。例えば、一般的なDOS/Vパーソナルコンピュータ(以下「PC」と言う。)では、最短のわりこみは55ミリ秒おきに発生するインターバルタイマーがある。従って、CPU_IdleインタフェースでCPU停止しても、最大でも55ミリ秒後には、インターバルタイマーの割り込みで復帰することができるので、もし、別のタスクが動作中であっても、すぐに動き出すことができる。しかし、この方法では、全てのタスクがアイドル中でCPUは動作する必要が無くても、55ミリ秒ごとにCPUが復帰し、次にCPU_Idleインタフェースを発行してCPU停止の処理が行われるまでの間、CPUが動作をし、無駄な殿呂消費をしてしまう。
【0014】
第2の問題点は、従来技術1では、ハードウェアに特別な仕組みが必要であることである。
【0015】
つまり、CPUが実行する命令を検出しはんだんするしくみがひつようだからである。
【0016】
第3の問題点は、従来技術1では、ハードウェアだけで制御しているため、例えば周辺デバイスの省電力制御に制約があることである。
【0017】
つまり、周辺デバイスの中には、電源供給を止めた後、復帰するときにソフトウェアによる初期化処理が必要なデバイスがあり、ハードウェアだけで制御する従来技術1では、これらのデバイスの初期化処理ができないからである。
【0018】
そこで、本発明は上記問題に鑑み、(1)マルチタスクOSでも利用できる、(2)ハードウェアに、CPUが実行する命令を検出し判断する特別な仕組みを必要としない、(3)レジューム時にソフトウェアによる初期化処理が必要なデバイスにも対抗可能、(4)アプリケーションプログラムに特別な作り込みを必要としない、との条件でもシステムのアイドル状態を的確に判断して、消費電力を低減できるパワーマネジメントシステムを提供することを目的とする。
【0019】
【課題を解決するための手段】
本発明の第1のパワーマネジメントシステムは、マルチタスクを管理するOS層で、アイドルを検出する手段と、それを電力制御する部分(BIOS等)に通知する手段と、アイドルの発生頻度を計測するための、一定時間を計るタイマーとカウントを備え、アイドルの発生頻度が高ければ、システムはアイドル状態にあると判断し、省電力モードへ状態遷移するよう動作する。
【0020】
また、高速モードへの状態遷移には、システムの動作開始に関わる割り込み、例えば、キーボードや、マウス等の割り込みを検出する手段を備え、その割り込みによって、高速モードへ状態遷移するよう動作する。
【0021】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して詳細に説明する。
【0022】
図1を参照すると、本発明の第1の実施の形態のコンピュータは、ハードウェア構成としては、プログラム制御によりクロックダウン等の省電力制御が可能なCPU111と、同じくプログラム制御により、電源OFF等の省電力制御が可能な周辺デバイス113〜116から構成され、ソフトウェアは、状態遷移を制御するBIOS110と、マルチタスキングを制御するOS109と、各デバイスを制御するデバイスドライバ105〜108と、ユーザが望む処理を実行するアプリケーションプログラム101〜104とから構成されている。
【0023】
次に、図1及び図2の状態遷移図、図3〜図5のフローチャートを参照して本実施の形態の全体の動作について詳細に説明する。
【0024】
まず、図1におけるOS109はマルチタスクOSで、複数存在するアプリケーションプログラム101〜104やデバイスドライバ105〜108を管理している。アプリケーションプログラムや、デバイスドライバが一切動作していないときは、OSは、優先順位の最も低いIdle処理で待ち続ける。図5に示すように、OSのIdle処理では、BIOSのCPU_Idle処理をcall(図1の122)し続ける。
【0025】
ここで、例えば、キーボード(図1の114)を押下してアプリケーションプログラムを起動しようとすると、まずキーボードを制御するデバイスドライバ(図1の106)が割り込み起動され(実際にはBIOS経由)、OSを経由して、関連したアプリケーションが起動される。何らかのタスクが起動すると、優先順位の最も低いIdle処理は動作しなくなる。
【0026】
この時の動作は、図2では、203である。キーボード(図1の114)を押下することによる割り込みによって、BIOSはCPUに対しては、クロックアップ等の高速化要求を出す(図1の124)。またOSに対しては、高速化の状態遷移を通知する(図1の123)。OSは、省電力に関連するデバイスを管理するタスク(主にデバイスドライバ)に高速化の状態遷移を通知する(図1の121)。高速化の状態遷移の通知を受けたデバイスドライバは、デバイスに対して高速化のための適切な処理を行う。
【0027】
一方、全てのタスクが終了すると、最も優先順位の低いIdleタスクが動き出し、CPU_Idleをcallし続ける。
【0028】
BIOSは、CPU_Idleを短時間に多数受けた場合にシステムをIdleと判断し、省電力モードへ状態遷移させる。この時の動作は図2の204である。省電力化の状態遷移が発生すると、BIOSはCPUに対しては、クロックダウン等の省電力化要求を出す(図1の124)。またOSに対しては省電力化の状態遷移を通知する(図1の123)。OSは、省電力に関係するデバイスを管理するタスク(主にデバイスドライバ)に省電力化の状態遷移を通知する(図1の121)。省電力化の状態遷移の通知を受けたデバイスドライバは、デバイスに対して省電力のための適切な処置を行う。
【0029】
BIOSがIdleを判断する仕組みを具体的に説明すると、CPU_IdleをcallされたBIOSでは、図3の動作を行う。すなわち、CPU_Idleを受けた回数を数え(図3の301)、その回数が、基準値を上回っていればシステムはIdle状態と判断し省電力モードへ状態遷移させ(図2の204)、Idleカウンタをクリアする。基準値を上回っていなければ、何もしない(高速モードにとどまる)。
【0030】
なお、OSによっては、数十ミリ秒単位のI/Oウェイト等によって、Idle処理が動くものもある。こういった場合のIdleを積算してしまうことを防ぐため、図4に示すように、BIOSは、一定時間毎にIdleカウンタをクリアする。これによって、図3の処理と合わせ、単位時間あたりのIdle回数を出すことができる。
【0031】
上記説明した処理により、単位時間あたりのIdle数を測定することができ、システムに応じて(CPU性能などにより左右されるので)基準値を定めることで図2に示すような状態遷移が可能になる。
【0032】
また、複数のタスクが動作中から、あるタスクが終了をOSに通知しても(図1の120)、他に動作中のタスクがあれば、優先順位の最も低いIdle処理は動作しない(OSによって、動作することはあっても、動作し続けることはない → CPU_Idleがcallされ続けることはない)。
【0033】
従って、どれか一つでもタスクが動作中は、CPU_Idleが連続発生することはないので、省電力モードへ状態遷移することはなく、本方式がマルチタスクOSにも対応可能であることが判る。
【0034】
さらに、ソフトウェアで状態遷移を管理しているので、ソフトウェアによるデバイスの初期化など、状態遷移時にソフトウェアで必要な処理も行える。
【0035】
上記説明した動きについて、階層的断面から説明した図6を参照しながらIdleを判断する仕組みについて補正説明する。
【0036】
まず、どのタスクも動作していないとき(図6の601)は、CPU_Idleが多発している。キーボード等の押下による割り込み(図6の602)で、CPUを高速モードに状態遷移させる。同時にタスク1が開始される。タスク1が動作を始めると、Idle処理に回ってこなくなるため、CPU_Idleインタフェースは殆ど発生しない。タスク1がタスク2を起動すると、OSは状況に応じて、タスク1とタスク2を切り換え、それぞれが動作できるように制御する。タスク1の処理が終了(図6の603)しても、タスク2が動作している間は、Idle処理が殆ど行われることはないため、CPU_Idleインタフェースは殆ど発生しない。BIOSは、タイマの割り込みでCPU_Idleのカウンタをクリアすることで、単位時間あたりのCPU_Idleインタフェースの発生頻度を監視している。タスク2も終了(図6の604)し、動作しているタスクが無くなると、CPU_Idleインタフェースが多発し、BIOSはシステムがBusyと判断し、CPUを省電力化する。
【0037】
次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。
【0038】
これは、第1の実施の形態における、BIOSの動作の変形である。
【0039】
すなわち、構成は図1と同じ、状態遷移も図2と同じ、OSの動作も図5と同じで、BIOSの動作(図3,図4)に違いがある。第1の実施の形態では、CPU_Idle処理において行っていたIdleカウンタの比較判断と、状態遷移の処理を、タイマ割り込み処理において行うようにする(図7,図8)。
【0040】
CPU_Idle処理(図7)ではIdleカウンタのカウントアップだけを行う。タイマ割り込み処理(図8)において、Idleカウンタの比較を行い、基準値を超えていれば省電力モードへ状態遷移を行う。さらに、状態遷移の有無にかかわらずこの後でIdleカウンタのクリア(初期化)を行う。
【0041】
上記説明した処理により、第1の実施の形態と同様に、単位時間あたりのIdle数を測定することができ、システムに応じて(CPU性能などにより左右されるので)基準値を定めることで図2に示すような状態遷移が可能になり、第1の実施の形態と同様の効果を得ることができる。
【0042】
次に、第3の実施の形態について図9を参照して詳細に説明する。
【0043】
これは、システムのIdle/Busyの判断(図9の901−902間の状態遷移の判断)は、本発明の第1の実施の形態、または、本発明の第2の実施の形態のフローチャートを用い、図2の状態遷移を更に発展させたものである。
【0044】
高速モード(図9の901)では、全てのデバイスがON状態で、消費電力も最も多い。省電力モード(図9の902)は、CPUは省電力モードで動作し、システムBusy中しか使用されることがなく、復帰に時間のかからない一部のデバイスがOFFされる。スタンバイモード(図9の903)では、CPUのクロックは停止され、CRT等、更に多くのデバイスの電源がOFFされる。サスペンドモード(図9の904)では、メモリを保持する電力等、サスペンド状態を保てる必要最小限の電力以外は全てOFFされる。
【0045】
当然、消費電力の関係は、「高速モード>省電力モード>スタンバイモード>サスペンドモード」のようになる。
【0046】
次に状態遷移の様子を説明する。
【0047】
高速モード(図9の901)から省電力モード(図9の902)への状態遷移には本発明の第1の実施の形態、または、本発明の第2の実施の形態を用いることで実現する。
【0048】
BIOS(図1の110)は、省電力モードへ遷移したところでスタンバイ用のタイマを設定する。このスタンバイ用タイマが作動中に動作開始に関わる割り込みが発生して高速モードへ状態遷移すれば、このスタンバイ用のタイマはクリアする。スタンバイ用のタイマがクリアされること無くタイムアウトすれば、BIOSはシステムを、スタンバイモード(図9の903)へ状態遷移させる。スタンバイモードに遷移すると、BIOSは、サスペンド用のタイマをセットする。このサスペンド用タイマが作動中にキーボード、マウス等の割り込みが発生して省電力モードへ状態遷移すれば、このサスペンド用のタイマはクリアする。サスペンド用のタイマがクリアされることなくタイムアウトすれば、BIOSはシステムを、サスペンドモード(図9の904)へ状態遷移させる。
【0049】
上記説明したように、本発明の第1の実施の形態、または、本発明の第2の実施の形態に、タイマによる状態遷移を組み合わせることで、より効率的なパワーマネジメントシステムを構築することができる。
【0050】
【発明の効果】
以上説明したように本発明によれば、システムのIdle発生を、単位時間あたりで測定するため、システムのアイドル状態を的確に判断して、消費電力を低減できる、パワーマネジメントシステムを提供できる。
【0051】
また、マルチタスクOSのIdle処理を検出するため、マルチタスクOSでも利用することができる。
【0052】
また、ソフトウェアでシステムのアイドルの通知を受けカウントするため、ハードウェアに、CPUが実行する命令を検出し判断する特別な仕組みを必要としなくなる。
【0053】
また、パワーマネジメントをソフトウェアで制御しておき、各デバイスドライバに状態遷移を通知することで、ソフトウェアによるデバイスの初期処理が可能なため、レジューム時にソフトウェアによる初期化処理が必要なデバイスにも対応可能となる。
【0054】
また、パワーマネジメントの制御を、デバイスドライバを含むOSとBIOSだけで行っているため、アプリケーションプログラムに特別な作り込みを必要としなくなる、という効果がある。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態の構成を示すブロック図である。
【図2】第1の実施の形態の状態遷移を示す状態遷移図である。
【図3】第1の実施の形態の動作を示す流れ図である。
【図4】第1の実施の形態の動作を示す流れ図である。
【図5】第1の実施の形態の動作を示す流れ図である。
【図6】第1の実施の形態の動作を示す図である。
【図7】第2の実施の形態に動作を示す流れ図である。
【図8】第2の実施の形態の動作を示す流れ図である。
【図9】第3の実施の形態の状態遷移を示す状態遷移図である。
【符号の説明】
101〜104 アプリケーションプログラム
105〜108 デバイスドライバ
109 OS
110 BIOS
111 CPU
112 リアルタイムコントローラ
113 CRT
114 キーボード
115〜116 周辺デバイス
120 タスクからの終了やWaitの通知
121 OSから各タスクへの状態遷移の通知インタフェース
122 CPU_Idleインタフェース
123 BIOS→OSへの状態遷移の通知インタフェース
124 BIOS→CPUへの状態遷移の指示
201 高速モード(処理能力は高いが消費電力も多い)
202 省電力モード(消費電力は少ないが、処理能力も低い)
203 高速モードへの状態遷移
204 省電力モードへの状態遷移
301 CPU_Idleのカウントアップ処理
302 CPU_Idleのカウンタの比較処理
303 省電力モードへの状態遷移処理
304 CPU_Idleのカウンタクリア処理
901 高速モード(処理能力は高いが消費電力も多い)
902 省電力モード(消費電力は少ないが、処理能力も低い)
903 スタンバイモード(CRT等、主なデバイスはOFF。しかし、サスペンドモードに比べ復帰は早い)
904 サスペンドモード(サスペンド状態を保持できる最小限の電力(メモリ保持用の電力等)を除いて全てのデバイスの電源OFF。復帰にも少し時間がかかる)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a power management (power consumption reduction) system, and more particularly to a power management system for a computer apparatus.
[0002]
[Prior art]
An example of a conventional power management system is described in Japanese Patent Laid-Open No. 4-311230 (hereinafter referred to as “Prior Art 1”). As shown in FIG. 8, this conventional power management system (CPU idle detection device) includes means for determining whether an instruction read from the memory by the CPU is an idle instruction or an operation instruction, and generation of an idle instruction. And means for measuring the frequency.
[0003]
For example, when an application detects key input, the application issues an “INT16” command to the BIOS. Since the application cannot directly operate the hardware, the BIOS is notified of the presence or absence of key input. When there is a key input, the data input by the key is used. When there is no key input, the key is input. Ask the BIOS that there is no input. In such a case, “INT16” becomes an idle command. On the other hand, among the input / output devices, for example, when accessing the flexible disk, the CPU performs work to perform a reading operation. In this way, an instruction that the CPU needs to perform work becomes an operation instruction.
[0004]
The conventional power management system having such a configuration operates as follows.
[0005]
That is, when the frequency of generation of idle instructions is high, the system determines that the system is in an idle state and lowers the CPU operating clock, thereby reducing power consumption. When the operation instruction is executed, it is determined that the system is no longer in the idle state, and the CPU operation clock is increased.
[0006]
In addition, an example of conventional power management (hereinafter referred to as “Prior Art 2”)
Author Intel Corporation and Microsoft Corporation
Title Advanced Power Management (ATP) BIOS interface Specification
Publication date February 1996
Explanation page 34, 35
It is described in.
[0007]
In Advanced Power Management (hereinafter referred to as “APM”), which is the de facto standard for power management in personal computers, an interface of CPU_Idle to be issued to the BIOS when the CPU can be stopped is defined. When the BIOS receives the CPU_Idle, the BIOS controls the power saving by stopping the CPU with a HALT command. The CPU is restored by interruption.
[0008]
Note that CPU_Busy is defined in APM, but this interface is not supported and cannot be used in a multitasking OS.
[0009]
[Patent Document 1]
Japanese Patent Laid-Open No. 4-311230
[Problems to be solved by the invention]
However, the first problem is that these are not compatible with the multitasking OS.
[0011]
In the prior art 1, an instruction generated when the program is in an idle state is detected by a hardware mechanism. However, in a multitask OS, even if a certain program is in an idle state, another program operates. This is because the correct judgment cannot be made. Further, when the multitasking OS is in an idle state, a JMP instruction or a LOOP instruction is usually executed. However, these instructions are frequently used even when not in an idle state. Can not be used.
[0012]
In the prior art 2, the CPU is stopped by the CPU_Idle interface. However, in the multitask OS, even when the task (program) is operating, the CPU enters the idle state for a moment to operate another task, and the CPU_Idle interface is generated. Therefore, in the multitasking OS environment, just because the CPU_Idle interface is generated does not necessarily mean that the system is in the idle state.
[0013]
There is also a method for dealing with the above-mentioned momentary idle by stopping the CPU with the CPU_Idle interface and returning it with an interrupt. For example, in a general DOS / V personal computer (hereinafter referred to as “PC”), there is an interval timer in which the shortest occurrence occurs every 55 milliseconds. Therefore, even if the CPU is stopped by the CPU_Idle interface, it can be restored by interruption of the interval timer after 55 milliseconds at the maximum, so that even if another task is operating, it can start immediately. . However, with this method, even if all tasks are idle and the CPU does not need to operate, the CPU returns every 55 milliseconds, and then the CPU_Idle interface is issued until the CPU is stopped. During this time, the CPU operates and consumes a wasteful amount of money.
[0014]
The second problem is that the conventional technique 1 requires a special mechanism for hardware.
[0015]
In other words, this is because the mechanism for detecting and soldering instructions executed by the CPU is likely.
[0016]
The third problem is that, in the prior art 1, since control is performed only by hardware, for example, there is a restriction on power saving control of peripheral devices.
[0017]
That is, among peripheral devices, there is a device that requires initialization processing by software when power supply is stopped and then restored, and in the prior art 1 controlled only by hardware, initialization processing of these devices is performed. It is because it is not possible.
[0018]
Therefore, in view of the above problems, the present invention (1) can be used even in a multitasking OS, (2) hardware does not require a special mechanism for detecting and judging instructions executed by the CPU, and (3) during resume Power that can reduce power consumption by accurately judging the idle state of the system even under the condition that (4) application programs do not require special preparation, even with devices that require software initialization processing. The purpose is to provide a management system.
[0019]
[Means for Solving the Problems]
The first power management system of the present invention is an OS layer that manages multitasks, and measures an idle generation means, a means for notifying a part that controls power (such as BIOS), and an idle occurrence frequency. If the frequency of occurrence of idle is high, the system determines that the system is in an idle state and operates to make a state transition to the power saving mode.
[0020]
The state transition to the high-speed mode includes means for detecting an interrupt related to the start of system operation, for example, an interrupt such as a keyboard or a mouse, and operates to make a state transition to the high-speed mode by the interrupt.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[0022]
Referring to FIG. 1, the computer according to the first embodiment of the present invention has a hardware configuration such as a CPU 111 capable of power saving control such as clock-down by program control, and a power-off or the like by program control. The software consists of peripheral devices 113 to 116 capable of power saving control. The software includes a BIOS 110 that controls state transition, an OS 109 that controls multitasking, device drivers 105 to 108 that control each device, and a user desires It consists of application programs 101 to 104 that execute processing.
[0023]
Next, the overall operation of the present embodiment will be described in detail with reference to the state transition diagrams of FIGS. 1 and 2 and the flowcharts of FIGS.
[0024]
First, the OS 109 in FIG. 1 is a multitasking OS, and manages a plurality of existing application programs 101 to 104 and device drivers 105 to 108. When no application program or device driver is operating, the OS continues to wait in the idle process with the lowest priority. As shown in FIG. 5, in the idle processing of the OS, the BIOS CPU_Idle processing is continuously called (122 in FIG. 1).
[0025]
Here, for example, when an application program is started by pressing a keyboard (114 in FIG. 1), first, a device driver (106 in FIG. 1) that controls the keyboard is interrupted (actually via BIOS), and the OS The related application is started via. When any task is activated, the idle process with the lowest priority does not operate.
[0026]
The operation at this time is 203 in FIG. The BIOS issues a request for speeding up such as clock-up to the CPU by an interrupt caused by pressing the keyboard (114 in FIG. 1) (124 in FIG. 1). Further, the OS is notified of the state transition of high speed (123 in FIG. 1). The OS notifies a task (mainly a device driver) that manages devices related to power saving of the state transition of high speed (121 in FIG. 1). The device driver that has received the notification of the state transition of the speedup performs an appropriate process for speeding up the device.
[0027]
On the other hand, when all the tasks are completed, the Idle task with the lowest priority starts to move and continues to call CPU_Idle.
[0028]
When the BIOS receives a large number of CPU_Idles in a short time, the BIOS determines that the system is Idle and makes a state transition to the power saving mode. The operation at this time is 204 in FIG. When the power saving state transition occurs, the BIOS issues a power saving request such as clock down to the CPU (124 in FIG. 1). In addition, the OS is notified of the power saving state transition (123 in FIG. 1). The OS notifies the task (mainly the device driver) that manages devices related to power saving of the power saving state transition (121 in FIG. 1). The device driver that has received the power saving state transition notification performs appropriate measures for power saving on the device.
[0029]
The mechanism by which the BIOS determines Idle will be described in detail. The BIOS in which CPU_Idle is called performs the operation shown in FIG. That is, the number of times of receiving CPU_Idle is counted (301 in FIG. 3), and if the number exceeds the reference value, the system determines that it is in the Idle state and makes a transition to the power saving mode (204 in FIG. 2). To clear. If it does not exceed the reference value, do nothing (stay in high-speed mode).
[0030]
Depending on the OS, the idle processing may be moved by an I / O wait in units of several tens of milliseconds. In order to prevent the accumulation of Idle in such a case, the BIOS clears the Idle counter at regular intervals as shown in FIG. Thus, in combination with the processing of FIG. 3, the number of idles per unit time can be obtained.
[0031]
With the above-described processing, the number of idles per unit time can be measured, and the state transition as shown in FIG. 2 can be performed by setting a reference value according to the system (because it depends on the CPU performance and the like). Become.
[0032]
Also, even if a task is notified to the OS when a plurality of tasks are operating (120 in FIG. 1), the idle process with the lowest priority will not operate if there are other operating tasks (OS Will continue to work, but will not continue → CPU_Idle will not continue to be called).
[0033]
Therefore, it can be seen that the CPU_Idle does not continuously occur while any one of the tasks is operating, so that the state does not transit to the power saving mode, and the present system can be applied to the multitasking OS.
[0034]
Furthermore, since the state transition is managed by software, processing necessary for the software at the time of state transition such as device initialization by software can be performed.
[0035]
Regarding the movement described above, a mechanism for determining Idle will be described with reference to FIG. 6 described from a hierarchical section.
[0036]
First, when no task is operating (601 in FIG. 6), CPU_Idle occurs frequently. The CPU changes state to the high-speed mode by interruption (602 in FIG. 6) by pressing the keyboard or the like. At the same time, task 1 is started. When task 1 starts operating, it will not go to idle processing, so the CPU_Idle interface hardly occurs. When task 1 starts task 2, the OS switches between task 1 and task 2 according to the situation, and controls so that each can operate. Even when the processing of task 1 is completed (603 in FIG. 6), while the task 2 is operating, the idle processing is hardly performed, so the CPU_Idle interface hardly occurs. The BIOS monitors the frequency of occurrence of the CPU_Idle interface per unit time by clearing the CPU_Idle counter by a timer interrupt. When the task 2 is also finished (604 in FIG. 6) and there are no tasks in operation, the CPU_Idle interface occurs frequently, and the BIOS determines that the system is busy and saves power to the CPU.
[0037]
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.
[0038]
This is a modification of the operation of the BIOS in the first embodiment.
[0039]
That is, the configuration is the same as in FIG. 1, the state transition is the same as in FIG. 2, the OS operation is the same as in FIG. 5, and the BIOS operation (FIGS. 3 and 4) is different. In the first embodiment, the Idle counter comparison determination and the state transition process, which have been performed in the CPU_Idle process, are performed in the timer interrupt process (FIGS. 7 and 8).
[0040]
In the CPU_Idle process (FIG. 7), only the Idle counter is counted up. In the timer interrupt process (FIG. 8), the Idle counter is compared. If the reference value is exceeded, the state transition is made to the power saving mode. Further, the idle counter is cleared (initialized) after this regardless of the state transition.
[0041]
As described in the first embodiment, the number of idles per unit time can be measured by the above-described processing, and the reference value is determined according to the system (because it depends on the CPU performance and the like). State transition as shown in FIG. 2 becomes possible, and the same effect as that of the first embodiment can be obtained.
[0042]
Next, a third embodiment will be described in detail with reference to FIG.
[0043]
This is because the Idle / Busy determination of the system (determination of state transition between 901 and 902 in FIG. 9) is performed according to the flowchart of the first embodiment of the present invention or the second embodiment of the present invention. It is a further development of the state transition of FIG.
[0044]
In the high-speed mode (901 in FIG. 9), all devices are in the ON state and the power consumption is the largest. In the power saving mode (902 in FIG. 9), the CPU operates in the power saving mode and is used only during the system busy, and some devices that do not take time to recover are turned off. In the standby mode (903 in FIG. 9), the CPU clock is stopped, and the power of more devices such as the CRT is turned off. In the suspend mode (904 in FIG. 9), power other than the necessary minimum power that can maintain the suspend state, such as the power to hold the memory, is turned off.
[0045]
Naturally, the relationship of power consumption is “high speed mode> power saving mode> standby mode> suspend mode”.
[0046]
Next, the state transition will be described.
[0047]
The state transition from the high speed mode (901 in FIG. 9) to the power saving mode (902 in FIG. 9) is realized by using the first embodiment of the present invention or the second embodiment of the present invention. To do.
[0048]
The BIOS (110 in FIG. 1) sets a standby timer when transitioning to the power saving mode. If an interrupt related to the start of operation occurs while the standby timer is operating and the state transitions to the high-speed mode, the standby timer is cleared. If the time-out occurs without the standby timer being cleared, the BIOS causes the system to transition to the standby mode (903 in FIG. 9). When transitioning to the standby mode, the BIOS sets a suspend timer. If an interrupt from the keyboard, mouse, or the like is generated while the suspend timer is operating and the state transitions to the power saving mode, the suspend timer is cleared. If the suspend timer times out without being cleared, the BIOS causes the system to transition to the suspend mode (904 in FIG. 9).
[0049]
As described above, it is possible to construct a more efficient power management system by combining the state transition by the timer with the first embodiment of the present invention or the second embodiment of the present invention. it can.
[0050]
【The invention's effect】
As described above, according to the present invention, since the occurrence of idle in the system is measured per unit time, it is possible to provide a power management system that can accurately determine the idle state of the system and reduce power consumption.
[0051]
Further, since the idle process of the multitask OS is detected, the multitask OS can also be used.
[0052]
In addition, since the system idle notification is counted by software, the hardware does not require a special mechanism for detecting and judging the instruction executed by the CPU.
[0053]
In addition, the power management is controlled by software, and the status transition is notified to each device driver, so the device can be initialized by software, so it can be used for devices that require software initialization during resume. It becomes.
[0054]
Further, since the power management is controlled only by the OS and the BIOS including the device driver, there is an effect that it is not necessary to specially make the application program.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a first exemplary embodiment of the present invention.
FIG. 2 is a state transition diagram showing a state transition of the first embodiment.
FIG. 3 is a flowchart showing the operation of the first exemplary embodiment.
FIG. 4 is a flowchart showing the operation of the first exemplary embodiment.
FIG. 5 is a flowchart showing the operation of the first exemplary embodiment.
FIG. 6 is a diagram illustrating an operation of the first embodiment.
FIG. 7 is a flowchart showing an operation according to the second embodiment.
FIG. 8 is a flowchart showing the operation of the second exemplary embodiment.
FIG. 9 is a state transition diagram showing state transition of the third embodiment.
[Explanation of symbols]
101-104 Application program 105-108 Device driver 109 OS
110 BIOS
111 CPU
112 Real-time controller 113 CRT
114 Keyboard 115 to 116 Peripheral device 120 Termination from task and Wait notification 121 Notification interface for state transition from OS to each task 122 CPU_Idle interface 123 Notification interface for state transition from BIOS to OS 124 Status transition from BIOS to CPU Instruction 201 High-speed mode (high processing power but high power consumption)
202 Power saving mode (low power consumption but low processing capacity)
203 State transition to high speed mode 204 State transition to power saving mode 301 CPU_Idle count-up process 302 CPU_Idle counter comparison process 303 State transition process to power saving mode 304 CPU_Idle counter clear process 901 High speed mode High but power consumption)
902 Power saving mode (low power consumption but low processing capacity)
903 Standby mode (CRT and other major devices are OFF, but recovery is faster than in suspend mode)
904 Suspend mode (except for the minimum power that can hold the suspend state (memory retention power, etc.), all devices are powered off.

Claims (4)

マルチタスクのシステムにおいて、全てのプログラムが休止状態(CPU_Idle)であることを知る手段と、CPU_Idleの発生割合を計測する手段と、マルチタスクシステムであっても、CPU_Idleの発生頻度から各プログラムの処理終了を認識する手段と、プログラムが動作していないときは、表示装置等、周辺デバイスへの電源供給を停止し、またはCPUクロックを停止若しくは低下させる手段を有することを特徴とするパワーマネジメントシステム。In a multitasking system, a means for knowing that all programs are in a dormant state (CPU_Idle), a means for measuring the occurrence rate of CPU_Idle, and even in a multitasking system, the processing of each program is determined from the occurrence frequency of CPU_Idle. A power management system comprising means for recognizing termination and means for stopping power supply to a peripheral device such as a display device or stopping or lowering a CPU clock when the program is not operating. 高速処理が必要なプロセスに関連する割り込みを判断する手段と、この割り込みによって前記CPUクロックを停止若しくは低下させたデバイス等を復帰させる手段を有することを特徴とする請求項1に記載のパワーマネジメントシステム。2. The power management system according to claim 1, further comprising means for determining an interrupt related to a process requiring high-speed processing, and a means for returning a device or the like whose CPU clock has been stopped or lowered by the interrupt. . 状態遷移発生時に電力制御を行うべき周辺デバイスのデバイスドライバへ状態遷移が発生したことを通知する手段を有し、ソフトウェアによる初期化処理が必要な周辺デバイスであっても電力制御ができることを特徴とする請求項1または2に記載のパワーマネジメントシステム。It has a means to notify the device driver of the peripheral device that should perform power control when the state transition occurs, and can control power even for a peripheral device that requires software initialization processing. The power management system according to claim 1 or 2. OS及びBIOSだけで、電力制御する手段を有し、アプリケーションプログラムに特別な作り込みを必要としないことを特徴とする請求項1〜3の何れか1に記載のパワーマネジメントシステム。The power management system according to any one of claims 1 to 3, wherein means for controlling power is provided only by an OS and a BIOS, and no special preparation is required for an application program.
JP2003186021A 2003-06-30 2003-06-30 Power management system Withdrawn JP2005018662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003186021A JP2005018662A (en) 2003-06-30 2003-06-30 Power management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003186021A JP2005018662A (en) 2003-06-30 2003-06-30 Power management system

Publications (1)

Publication Number Publication Date
JP2005018662A true JP2005018662A (en) 2005-01-20

Family

ID=34185267

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003186021A Withdrawn JP2005018662A (en) 2003-06-30 2003-06-30 Power management system

Country Status (1)

Country Link
JP (1) JP2005018662A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010009581A (en) * 2008-03-31 2010-01-14 Intel Corp Power management for platform based on latency guidance
US9880608B2 (en) 2014-09-02 2018-01-30 Samsung Electronics Co., Ltd. Application processor for adjusting clock signal using hardware power management unit and devices including the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010009581A (en) * 2008-03-31 2010-01-14 Intel Corp Power management for platform based on latency guidance
US8176341B2 (en) 2008-03-31 2012-05-08 Intel Corporation Platform power management based on latency guidance
US8631257B2 (en) 2008-03-31 2014-01-14 Intel Corporation Platform power management based on latency guidance
US9880608B2 (en) 2014-09-02 2018-01-30 Samsung Electronics Co., Ltd. Application processor for adjusting clock signal using hardware power management unit and devices including the same

Similar Documents

Publication Publication Date Title
JP3406594B2 (en) Computer power management system
KR100229575B1 (en) Information processing system
US7334138B2 (en) Windows-driven power management for peripheral devices in a computer system
US6105142A (en) Intelligent power management interface for computer system hardware
US7596709B2 (en) CPU power management based on utilization with lowest performance mode at the mid-utilization range
US5586332A (en) Power management for low power processors through the use of auto clock-throttling
EP1099167B1 (en) Method and apparatus for power mode transition in a multi-thread processor
US6829713B2 (en) CPU power management based on utilization with lowest performance mode at the mid-utilization range
KR100471056B1 (en) Computer system and Control method of Waiting mode for Computer system
EP0426410B1 (en) Real-time power conservation for portable computers
JP3058986B2 (en) Computer system power saving controller
EP1677175B1 (en) Dynamic power management in system on chips (SOC)
US20020124197A1 (en) Method to associate and respond to a requirement for high performance operation of a notebook computer
JPH096465A (en) Information processor and its control method
JPH09237463A (en) Hard disk control method and information processing device
JPH086681A (en) Power saving control system
JPH0850523A (en) Method and equipment for management of power consumption in computer system
US8281171B2 (en) Adjustment of power-saving strategy depending on working state of CPU
JPH11202988A (en) System power consumption control method
JP3789792B2 (en) Portable computer system and control method thereof
JP2001273057A (en) Power management in data processing system based on situation in processor usage
US20040103345A1 (en) Method, apparatus and system for ensuring reliable power down of a personal computer
US6851065B2 (en) System and method for executing resume tasks during a suspend routine
JPH0997128A (en) Information-processing system
JP2005018662A (en) Power management system

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050331

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050414

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060905