CN105718269B - A kind of sleep state control method and device - Google Patents

A kind of sleep state control method and device Download PDF

Info

Publication number
CN105718269B
CN105718269B CN201610044827.1A CN201610044827A CN105718269B CN 105718269 B CN105718269 B CN 105718269B CN 201610044827 A CN201610044827 A CN 201610044827A CN 105718269 B CN105718269 B CN 105718269B
Authority
CN
China
Prior art keywords
operating system
control
processor
sleep state
power supply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610044827.1A
Other languages
Chinese (zh)
Other versions
CN105718269A (en
Inventor
黄谆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Analog Microelectronics (shanghai) Co Ltd
Original Assignee
Analog Microelectronics (shanghai) Co 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 Analog Microelectronics (shanghai) Co Ltd filed Critical Analog Microelectronics (shanghai) Co Ltd
Priority to CN201610044827.1A priority Critical patent/CN105718269B/en
Publication of CN105718269A publication Critical patent/CN105718269A/en
Application granted granted Critical
Publication of CN105718269B publication Critical patent/CN105718269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The present invention provides a kind of sleep state control method and device.This method comprises: determining operating system application sleep;Operating system sleep state to be placed is determined according to the attribute information of the operating system and the hardware environment for running the operating system;The sleep state control runs the processor of the operating system and the power supply state of memory, to control the operating system into corresponding sleep state.

Description

A kind of sleep state control method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of sleep state control method and device.
Background technique
When carrying out low power dissipation design, several states, more the sleep state power consumption of depth usually are set by sleep state It is lower, but delay when wake-up is bigger.
In the prior art, the sleep state power supply state that sleep state control device can only be defaulted according to operating system, And the operating system is controlled into corresponding sleep state, it cannot flexibly control operating system and enter other sleep states.
In practical applications, in some cases, delay when operating system enters wake-up after deep sleep and enter shallow Delay difference when waking up after degree sleep can be ignored, and for the design consideration to low-power consumption, operating system enters depth and sleeps Sleeping is optimal selection.But if the sleep state of operating system default is either shallow sleep, by the above-mentioned prior art it is found that sleeping Dormancy behavior control device can only control the operating system and enter either shallow sleep, higher so as to cause power consumption when operating system sleep.
Therefore, how flexibly to control operating system and enter different sleep state urgent need to resolve.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of sleep state control method and device, this method and device can spirits Control operating system living enters different sleep states.
In a first aspect, the embodiment of the present invention provides a kind of sleep state control method, which comprises
Determine that operating system application is slept;
The operation system is determined according to the attribute information of the operating system and the hardware environment for running the operating system It unites sleep state to be placed;
The processor of the operating system and the power supply state of memory are run according to sleep state control, to control Operating system is stated into corresponding sleep state.
Preferably, the power supply shape of the processor and memory that the operating system is run according to sleep state control State is specifically included with controlling the operating system into corresponding sleep state: when the sleep state is deep sleep, Control power supply stops powering to the processor, or control power supply stops in the part into the processor and the memory Power supply is deposited, enters deep sleep to control the operating system.
Preferably, in the power supply of the processor and memory for running the operating system according to sleep state control State, to control the operating system into before corresponding sleep state, the method also includes: by working as the processor Preceding state is stored in the partial memory that power supply is kept in the memory.
Preferably, after the control operating system enters corresponding sleep state, the method also includes: When monitoring the corresponding wake events of the operating system, control power supply is powered to the processor and memory;From the holding The processor state is obtained in the partial memory of power supply, and the processor is restored according to the processor state.
Preferably, the power supply shape of the processor and memory that the operating system is run according to sleep state control State is specifically included with controlling the operating system into corresponding sleep state: when the sleep state is either shallow sleep, Control power supply keeps powering to the processor and memory, enters either shallow sleep state to control the operating system.
In second aspect, the embodiment of the present invention provides a kind of sleep state control device, and described device includes:
First determination unit, for determining that operating system application is slept;
Second determination unit, for according to the attribute information of the operating system and the hardware loop of the operation operating system Border determines operating system sleep state to be placed;
Control unit, the power supply of processor and memory for running the operating system according to sleep state control State, to control the operating system into corresponding sleep state.
Preferably, described control unit is specifically used for: when the sleep state be deep sleep when, control power supply stop to The processor power supply, or control power supply stop the power supply of the partial memory into the processor and the memory, with control The operating system enters deep sleep.
Preferably, described device further include: storage unit is run for being controlled in control unit according to the sleep state The processor of the operating system and the power supply state of memory, with control the operating system into corresponding sleep state it Before, the current state of the processor is stored in the partial memory that power supply is kept in the memory.
Preferably, described control unit is also used to: when monitoring the corresponding wake events of the operating system, control electricity Source powers to the processor and memory;It keeps obtaining the processor state in the partial memory powered from described, and according to The processor state restores the processor.
Preferably, described control unit is specifically used for: when the sleep state be either shallow sleep when, control power supply keep to The processor and memory power supply, enter either shallow sleep state to control the operating system.
It, can be according to the attribute of operating system by utilizing sleep state control method and device provided in an embodiment of the present invention Information and the hardware environment for running the operating system determine operating system sleep state to be placed;According to determining sleep shape State control runs the processor of the operating system and the power supply state of memory, enters corresponding sleep shape to control the operating system State, so that reaching flexibly control operating system enters different dormant effects.
In addition, the sleep state control method be for operating system it is transparent, operating system, which is not known, to be also not required to It is to be understood that is entered is another sleep state other than default sleep state, therefore do not need to carry out any repair to operating system Change, so that operating system is entered other dormant methods compared to existing modification operating system, it is simple and easy, will not leader tape go out Other problems.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of sleep state control method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of sleep state control device provided in an embodiment of the present invention;
Fig. 3 is the structural schematic diagram of another sleep state control device provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
As shown in Figure 1, it is a kind of flow diagram of sleep state control method provided in an embodiment of the present invention.The party Method is applied to sleep state control device, and the equipment where the sleep state control device runs operating system, and the equipment packet Include processor and memory etc..This method comprises:
S101 determines that operating system application is slept.
Specifically, when the time that the operating system is not used by being more than preset time threshold, it can be to sleep state control Device processed sends sleep application instruction.Sleep state control device, can when receiving the sleep application instruction that operating system is sent To determine that the operating system application enters sleep.
Alternatively, controlling the specified of register when the time that the operating system is not used by being more than preset time threshold Whether position position, the specific bit apply entering sleep for identification operation system.Sleep state control device in read register, If it was found that the specific bit set, can determine that the operating system application enters sleep.
S102 determines the operating system according to the attribute information of the operating system and the hardware environment for running the operating system Sleep state to be placed.
After sleep state control device receives sleep application instruction, the operating system for sending sleep application instruction is determined Attribute information and run the hardware environment of the operating system.Wherein, which may include but is not limited only to: operation system System type, operating system version, corresponding default sleep state of operating system etc..The hardware environment may include but not only limit In: working condition, clock frequency of system of peripheral hardware hardware etc..
Sleep state control device based on determining operating system attribute information and run the hardware loop of the operating system Border determines operating system sleep state to be placed.Wherein, sleep state includes at least: deep sleep and either shallow sleep State.
As for sleep state corresponding with attribute information and hardware environment, can be configured in advance according to different demands, this Invention is not intended to be limited in any this.
For example, when peripheral hardware hardware is completely in idle state, corresponding deep sleep;When system clock frequency is higher, Corresponding either shallow sleep.
It should be noted that multiple grades can also be arranged in sleep state, different attribute information and hardware can be preset State corresponds to different grades of sleep state, and the present invention is not intended to be limited in any this.
S103 controls the power supply state of the processor and memory that run the operating system, according to the sleep state with control The operating system enters corresponding sleep state.
Sleep state control device determines the power supply strategy of control processor and memory according to determining sleep state, according to The power supply policy control runs the processor of the operating system and the power supply state of memory.
Different sleep states corresponds to different control strategies, power supply strategy corresponding with sleep state, can be according to difference Demand is configured in advance, and the present invention is not intended to be limited in any this.
For example, preset deep sleep corresponding power supply strategy to stop powering to processor, or stop to Partial memory power supply in processor and memory, wherein the partial memory refers to the unappropriated part of the operating system.It sets in advance The corresponding power supply strategy of either shallow sleep state is set to keep powering to the processor and memory.Based on this, when sleep state is When deep sleep, control power supply stops powering to processor, or control power supply stops in the part into processor and memory Power supply is deposited, enters deep sleep to control operating system.When sleep state is that either shallow is slept, control power supply is kept to place Device and memory power supply are managed, enters either shallow sleep state to control operating system.
In one example, before step S103, this method further include:
When sleep state is deep sleep, control power supply stops powering to processor, or control power supply stops to place The partial memory power supply in device and memory is managed, to control before operating system enters deep sleep, by the current of processor State is stored in the partial memory that power supply is kept in memory.In this way, stopping to after processor power supply, the state of processor can be with It is saved, to call when waking up, wakes up the response time to reduce.
Correspondingly, after operating system enters deep sleep, this method further include:
When monitoring the corresponding wake events of operating system, control power supply is powered to processor and memory, from keeping supplying Processor state is obtained in the partial memory of electricity, and processor is restored according to processor state.
In addition, after operating system enters either shallow sleep state, if monitoring the corresponding wake events of operating system, Subsequent operation is same as the prior art, and details are not described herein.
By utilizing sleep state control method provided in an embodiment of the present invention, can according to the attribute information of operating system and The hardware environment for running the operating system determines operating system sleep state to be placed;It is controlled according to determining sleep state The processor of the operating system and the power supply state of memory are run, enters corresponding sleep state to control the operating system, from And reaches flexibly control operating system and enter different dormant effects.
In addition, the sleep state control method be for operating system it is transparent, operating system, which is not known, to be also not required to It is to be understood that is entered is another sleep state other than default sleep state, therefore do not need to carry out any repair to operating system Change, so that operating system is entered other dormant methods compared to existing modification operating system, it is simple and easy, will not leader tape go out Other problems.
As shown in Fig. 2, it is a kind of sleep state control device provided in an embodiment of the present invention.The device is applied to operation The equipment of operating system.
The sleep state control device includes:
First determination unit 210, for determining that operating system application is slept.
Specifically, when the time that the operating system is not used by being more than preset time threshold, it can be to sleep state control Device processed sends sleep application instruction.Sleep state control device is when receiving the sleep application instruction that operating system is sent, and the One determination unit 210 can determine that the operating system application enters sleep.
Alternatively, controlling the specified of register when the time that the operating system is not used by being more than preset time threshold Whether position position, the specific bit apply entering sleep for identification operation system.Sleep state control device in read register, If it was found that the specific bit set, the first determination unit 210 can determine that the operating system application enters sleep.
Second determination unit 220, for true according to the attribute information of operating system and the hardware environment of operation operating system Determine operating system sleep state to be placed.
Wherein, which may include but is not limited only to: OS Type, operating system version, operating system Corresponding default sleep state etc..The hardware environment may include but be not limited only to: the working condition of peripheral hardware hardware, system when Clock frequency etc..
Determination unit 220 based on determining operating system attribute information and run the operating system hardware environment determine Operating system sleep state to be placed.Wherein, sleep state includes at least: deep sleep and either shallow sleep state.
As for sleep state corresponding with attribute information and hardware environment, can be configured in advance according to different demands, this Invention is not intended to be limited in any this.
For example, when peripheral hardware hardware is completely in idle state, corresponding deep sleep;When system clock frequency is higher, Corresponding either shallow sleep.
It should be noted that multiple grades can also be arranged in sleep state, different attribute information and hardware can be preset State corresponds to different grades of sleep state, and the present invention is not intended to be limited in any this.
Control unit 230, for controlling the processor of operation operating system and the power supply state of memory according to sleep state, To control operating system into corresponding sleep state.
Control unit 230 determines the power supply strategy of control processor and memory according to determining sleep state, according to the confession Electric policy control runs the processor of the operating system and the power supply state of memory.
Different sleep states corresponds to different control strategies, power supply strategy corresponding with sleep state, can be according to difference Demand is configured in advance, and the present invention is not intended to be limited in any this.
For example, preset deep sleep corresponding power supply strategy to stop powering to processor, or stop to Partial memory power supply in processor and memory, wherein the partial memory refers to the unappropriated part of the operating system.It sets in advance The corresponding power supply strategy of either shallow sleep state is set to keep powering to the processor and memory.Based on this, when sleep state is When deep sleep, control unit 230 controls power supply and stops powering to processor, or control power supply stops to processor and memory In partial memory power supply, enter deep sleep to control operating system.When sleep state is that either shallow is slept, control is single Member 230 controls power supply and keeps powering to processor and memory, enters either shallow sleep state to control operating system.
Further, as shown in figure 3, the device further include:
Storage unit 240, for controlling power supply in control unit 230 and stopping to place when sleep state is deep sleep Device power supply is managed, or control power supply stops the power supply of the partial memory into processor and memory, enters depth to control operating system It spends before sleep state, the current state of processor is stored in the partial memory for keeping power supply in memory.In this way, stop to After processor power supply, the state of processor can be saved, and to call when waking up, wake up the response time to reduce.
Correspondingly, control unit 230 is also used to after operating system enters deep sleep: monitoring to operate When the corresponding wake events of system, control power supply is powered to processor and memory, acquisition place from the partial memory for keeping power supply Device state is managed, and processor is restored according to processor state.
By utilizing sleep state control device provided in an embodiment of the present invention, can according to the attribute information of operating system and The hardware environment for running the operating system determines operating system sleep state to be placed;It is controlled according to determining sleep state The processor of the operating system and the power supply state of memory are run, enters corresponding sleep state to control the operating system, from And reaches flexibly control operating system and enter different dormant effects.
In addition, the sleep state control device be for operating system it is transparent, operating system, which is not known, to be also not required to It is to be understood that is entered is another sleep state other than default sleep state, therefore do not need to carry out any repair to operating system Change, so that operating system is entered other dormant methods compared to existing modification operating system, it is simple and easy, will not leader tape go out Other problems.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention Protection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include Within protection scope of the present invention.

Claims (8)

1. a kind of sleep state control method, which is characterized in that the described method includes:
Determine that operating system application is slept;
Determine that the operating system waits for according to the attribute information of the operating system and the hardware environment for running the operating system The sleep state of setting;
The processor of the operating system and the power supply state of memory are run according to sleep state control, to control the behaviour Make system into corresponding sleep state;
Wherein, the power supply state of the processor and memory that the operating system is run according to sleep state control, with The operating system is controlled into corresponding sleep state, is specifically included:
When the sleep state is deep sleep, control power supply stops powering to the processor, or control power supply stops Partial memory power supply into the processor and the memory, enters deep sleep to control the operating system;Its Described in partial memory in memory be the unappropriated partial memory of the operating system.
2. the method according to claim 1, wherein running the behaviour according to sleep state control described Make the processor of system and the power supply state of memory, it is described to control the operating system into before corresponding sleep state Method further include:
The current state of the processor is stored in the partial memory that power supply is kept in the memory.
3. according to the method described in claim 2, it is characterized in that, entering corresponding sleep in the control operating system After state, the method also includes:
When monitoring the corresponding wake events of the operating system, control power supply is powered to the processor and memory;
The processor state is obtained from the partial memory for keeping power supply, and according to processor state recovery Processor.
4. method according to claim 1 to 3, which is characterized in that described to control operation institute according to the sleep state The processor of operating system and the power supply state of memory are stated, to control the operating system into corresponding sleep state, specifically Include:
When the sleep state is that either shallow is slept, control power supply keeps powering to the processor and memory, described in control Operating system enters either shallow sleep state.
5. a kind of sleep state control device, which is characterized in that described device includes:
First determination unit, for determining that operating system application is slept;
Second determination unit, for true according to the attribute information of the operating system and the hardware environment of the operation operating system Fixed operating system sleep state to be placed;
Control unit, for running the processor of the operating system and the power supply shape of memory according to sleep state control State, to control the operating system into corresponding sleep state;
Described control unit is specifically used for: when the sleep state is deep sleep, control power supply stops to the processor Power supply, or control power supply stop the power supply of the partial memory into the processor and the memory, to control the operation system System enters deep sleep;Wherein the partial memory in the memory is the unappropriated partial memory of the operating system.
6. device according to claim 5, which is characterized in that described device further include:
Storage unit, for running the processor and memory of the operating system according to sleep state control in control unit Power supply state the current state of the processor is deposited with controlling the operating system into before corresponding sleep state It is stored in the partial memory that power supply is kept in the memory.
7. device according to claim 6, which is characterized in that described control unit is also used to:
When monitoring the corresponding wake events of the operating system, control power supply is powered to the processor and memory;
The processor state is obtained from the partial memory for keeping power supply, and according to processor state recovery Processor.
8. according to any device of claim 5-7, which is characterized in that described control unit is specifically used for:
When the sleep state is that either shallow is slept, control power supply keeps powering to the processor and memory, described in control Operating system enters either shallow sleep state.
CN201610044827.1A 2016-01-22 2016-01-22 A kind of sleep state control method and device Active CN105718269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610044827.1A CN105718269B (en) 2016-01-22 2016-01-22 A kind of sleep state control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610044827.1A CN105718269B (en) 2016-01-22 2016-01-22 A kind of sleep state control method and device

Publications (2)

Publication Number Publication Date
CN105718269A CN105718269A (en) 2016-06-29
CN105718269B true CN105718269B (en) 2019-08-30

Family

ID=56153812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610044827.1A Active CN105718269B (en) 2016-01-22 2016-01-22 A kind of sleep state control method and device

Country Status (1)

Country Link
CN (1) CN105718269B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111445000B (en) * 2020-03-30 2023-06-27 捷德(中国)科技有限公司 Fingerprint card and processing method based on fingerprint card

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753924A (en) * 2008-11-28 2010-06-23 康佳集团股份有限公司 Standby control method for television
CN102360244A (en) * 2011-09-28 2012-02-22 深圳市卓怡恒通电脑科技有限公司 Standby method for lengthening standby time of computer
CN103294164A (en) * 2012-03-01 2013-09-11 佳能株式会社 Information processing apparatus and control method thereof
TW201401039A (en) * 2012-06-29 2014-01-01 Hon Hai Prec Ind Co Ltd Time sequence circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753924A (en) * 2008-11-28 2010-06-23 康佳集团股份有限公司 Standby control method for television
CN102360244A (en) * 2011-09-28 2012-02-22 深圳市卓怡恒通电脑科技有限公司 Standby method for lengthening standby time of computer
CN103294164A (en) * 2012-03-01 2013-09-11 佳能株式会社 Information processing apparatus and control method thereof
TW201401039A (en) * 2012-06-29 2014-01-01 Hon Hai Prec Ind Co Ltd Time sequence circuit

Also Published As

Publication number Publication date
CN105718269A (en) 2016-06-29

Similar Documents

Publication Publication Date Title
US11582121B2 (en) Method and apparatus for a power-efficient framework to maintain data synchronization of a mobile personal computer to simulate a connected scenario
CN110430504B (en) Charging control method, charging control device, charging box and computer readable storage medium
US9239605B1 (en) Computing device power state transitions
US9483103B2 (en) Process state of a computing machine
EP1616240A4 (en) System for low power operation of wireless lan interfaces
GB2458805A (en) Generating a power management policy for components of a system based on data from other components
CN104714620A (en) Method and device for adjusting wakeup frequency of intelligent terminal
WO2017101362A1 (en) Method and system for managing and controlling power consumption of intelligent terminal
US20070223300A1 (en) Portable electronic apparatus with a power saving function and method
TW201310226A (en) Processor core with higher performance burst operation with lower power dissipation sustained workload mode
CN101403945A (en) Storage system and its energy-saving method
WO2021233219A1 (en) Automatic wake-up and diagnosis method for battery management system, battery management system, and vehicle
CN100561405C (en) Method for managing power supply under the computer system electricity-saving state
JP5915733B2 (en) Information processing apparatus, information processing method, and program
CN112684877A (en) Intelligent screen, low-power-consumption system thereof and low-power-consumption control method
CN101977272A (en) Electric quantity protection method for mobile phone adopting Android operating system
CN105718269B (en) A kind of sleep state control method and device
KR20140026308A (en) Apparatus and method for managing power in multi-core system
CN112486311B (en) Low-power consumption control method and system of embedded system and storage medium
CN103150191A (en) Terminal equipment
CN102193616A (en) Method for controlling power supply of electronic device for improving battery life
CN101383179B (en) Storage system and power supplying method for the storage system
US20060026297A1 (en) Computer system with multiple data access channels and control method thereof
CN112888050B (en) Equipment energy saving method and device and computer storage medium
TWI451239B (en) Control method applied to computer system in hybrid sleep mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant