TW201329706A - Electronic device, hibernation method and computer program product - Google Patents

Electronic device, hibernation method and computer program product Download PDF

Info

Publication number
TW201329706A
TW201329706A TW101100414A TW101100414A TW201329706A TW 201329706 A TW201329706 A TW 201329706A TW 101100414 A TW101100414 A TW 101100414A TW 101100414 A TW101100414 A TW 101100414A TW 201329706 A TW201329706 A TW 201329706A
Authority
TW
Taiwan
Prior art keywords
random access
dynamic random
access memory
electronic device
data
Prior art date
Application number
TW101100414A
Other languages
Chinese (zh)
Inventor
Ching-Ho Tsai
Original Assignee
Acer Inc
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 Acer Inc filed Critical Acer Inc
Priority to TW101100414A priority Critical patent/TW201329706A/en
Publication of TW201329706A publication Critical patent/TW201329706A/en

Links

Landscapes

  • Power Sources (AREA)

Abstract

The present invention provides an electronic device comprising a non-volatile memory, a dynamic random access memory and a control unit. The dynamic random access memory comprises a standby area. The control unit loads a plurality of executed and cached program modules into the dynamic random access memory, and stores the executed and cached program modules which is not actively in use into the standby area. When the electronic device enters a hibernation mode, the control unit eliminates the data of the standby area of the dynamic random access memory to a predetermined degree, and stores the rest data of eliminated dynamic random access memory into the non-volatile memory.

Description

電子裝置、休眠方法以及電腦程式產品Electronic device, sleep method, and computer program product

本發明係關於一種休眠之方法,特別係關於一種能快速進入以及離開休眠模式之方法。The present invention relates to a method of dormancy, and more particularly to a method of quickly entering and leaving a sleep mode.

隨著電腦設備價格普及化,消費大眾所擁有的桌上型電腦以及攜帶型電腦設備數量逐漸增加。然而,因應能源節約之環保考量,以及讓攜帶型電腦的操作時間延長。因此,電腦設備將電源消耗與管理列為一項重要考量,例如提供待命與休眠(Hibernation)等模式以節約電源,讓使用者需要暫時離開電腦時,可選擇讓電腦進入待命或休眠模式來達到省電目的。當使用者重新喚醒電腦時,需耗時喚起電腦之功能並且將電腦回復之先前的狀態。With the popularization of computer equipment prices, the number of desktop computers and portable computer devices owned by the consumer has gradually increased. However, in response to environmental considerations for energy conservation, and to extend the operating time of portable computers. Therefore, computer equipment has listed power consumption and management as an important consideration, such as providing standby and hibernation modes to save power, so that when users need to temporarily leave the computer, they can choose to put the computer into standby or sleep mode. Power saving purposes. When the user wakes up the computer again, it takes time to evoke the function of the computer and return the computer to its previous state.

本發明提供一種電子裝置包括一非易失記憶體、一動態隨機存取記憶體以及一控制單元。動態隨機存取記憶體包括一待命區塊。控制單元用以將被執行以及預取之複數程式模組載入動態隨機存取記憶體,以及將動態隨機存取記憶體中沒有被使用之程式模組的資料以及程式碼儲存於待命區塊。其中,當電子裝置進入一休眠模式時,控制單元將待命區塊中之資料清除至一既定量,並且在清除待命區塊中之資料後,將清除後之動態隨機存取記憶體中之其餘資料儲存至非易失記憶體。The invention provides an electronic device comprising a non-volatile memory, a dynamic random access memory and a control unit. The DRAM includes a standby block. The control unit is configured to load the executed and prefetched plurality of program modules into the dynamic random access memory, and store the data and the code of the program module not used in the dynamic random access memory in the standby block. . Wherein, when the electronic device enters a sleep mode, the control unit clears the data in the standby block to a certain amount, and after clearing the data in the standby block, the remaining of the dynamic random access memory is cleared. Data is stored to non-volatile memory.

本發明另提供一種休眠方法,適用於一電子裝置包括接收一第一指令;根據第一指令,清除一動態隨機存取記憶體中之一待命區塊的記憶體容量至一既定量,其中待命區塊係用以儲存動態隨機存取記憶體中沒有被使用之程式模組的資料以及程式碼;清除動態隨機存取記憶體中之待命區塊的記憶體容量至既定量後,將清除後之動態隨機存取記憶體中之資料定義為一回復資料,並且儲存至一非易失記憶體;以及停止供應電源至動態隨機存取記憶體,並且致使電子裝置進入休眠模式。The present invention further provides a sleep method, which is applicable to an electronic device comprising: receiving a first instruction; and clearing, according to the first instruction, a memory capacity of a standby block in a dynamic random access memory to a predetermined amount, wherein the standby The block is used to store data and code of the program module that is not used in the dynamic random access memory; after clearing the memory capacity of the standby block in the dynamic random access memory to a certain amount, the block is cleared. The data in the DRAM is defined as a reply data and stored in a non-volatile memory; and the power supply is stopped to the DRAM and causes the electronic device to enter the sleep mode.

本發明亦揭露一種電腦程式產品,用以被一機器載入且進入一休眠模式之方法,該電腦程式產品包括一第一程式碼,當接收到一指令時,用以讀取一動態隨機存取記憶體中之一待命區塊的記憶體容量;一第二程式碼,用以要求機器之作業系統分配待命區塊的記憶體容量給第一程式碼;一第三程式碼,用以釋放或者清空機器之作業系統分配給待命區塊的記憶體容量;一第四程式碼,用以將釋放或者清空後之動態隨機存取記憶體的其餘資料載入一非易失記憶體;以及一第五程式碼,當動態隨機存取記憶體的其餘資料載入非易失記憶體後,停止提供電源至動態隨機存取記憶體以及致使機器進入休眠模式。The invention also discloses a computer program product for loading by a machine and entering a sleep mode, the computer program product comprising a first code, when receiving an instruction, for reading a dynamic random memory Taking a memory capacity of one of the standby blocks in the memory; a second code for requesting the operating system of the machine to allocate the memory capacity of the standby block to the first code; a third code for releasing Or clearing the memory capacity allocated by the operating system of the machine to the standby block; a fourth code for loading the remaining data of the released or emptied DRAM into a non-volatile memory; and The fifth code, when the remaining data of the DRAM is loaded into the non-volatile memory, stops supplying power to the DRAM and causes the machine to enter the sleep mode.

以下將詳細討論本發明各種實施例之裝置及使用方法。然而值得注意的是,本發明所提供之許多可行的發明概念可實施在各種特定範圍中。這些特定實施例僅用於舉例說明本發明之裝置及使用方法,但非用於限定本發明之範圍。The apparatus and method of use of various embodiments of the present invention are discussed in detail below. However, it is to be noted that many of the possible inventive concepts provided by the present invention can be implemented in various specific ranges. These specific examples are only intended to illustrate the apparatus and methods of use of the present invention, but are not intended to limit the scope of the invention.

在電腦系統(例如使用Microsoft Windows作業系統的電子裝置),其電源管理係可藉由進階組態與電源介面(Advanced Configuration and Power Interface,ACPI)所定義的待機狀態來減少電源的消耗,在進階組態與電源介面中定義了S0~S5共六種狀態:S0開機狀態係代表電腦系統工作狀態,在開機狀態中電腦之中央處理器CPU(s)執行指令,作業系統和應用程式亦可正常執行。另外,在開機狀態下,中央處理器CPU和硬碟、DVD驅動器等電腦裝置可以一再的進入和從低能源狀態回來;在S1省電狀態時,中央處理器CPU停止工作;在S2省電狀態時,中央處理器CPU關閉,不供電;S3待機狀態(Sleep),僅有記憶體供電,亦稱為掛載至記憶體(Suspend to RAM),在S3狀態係為一種低喚醒(Resume)時間(約5秒或更短)的待機狀態,電腦系統可以很快速地恢復到工作狀態(例如S0狀態);S4休眠狀態(Hibernate)亦可稱為掛載至磁碟(Suspend to Disk),且為一種低耗電量、長喚醒延遲時間(例如:約20秒或更長)的待機狀態。上述的S1~S4為不同程度的省電狀態或待機狀態,S5狀態則是關機狀態,在關機狀態S5下,電腦之軟體以及裝置處於關閉狀態,但有些部件仍然帶電,使電腦仍然可以被鍵盤、時鐘、modem(電話喚醒)、LAN(網路喚醒)還有USB裝置所喚醒。值得注意的是,本發明所述之開機狀態、待機狀態、省電狀態以及關機狀態不限定於ACPI所定義之Microsoft Windows的作業系統。舉例而言,在Linux作業系統或者Mac OS系統下各種電源管理程式所定義之將系統掛載至記憶體之狀態皆可視為本案之待機狀態(Sleep),而將系統掛載至硬碟之狀態皆可視為本案之休眠狀態(Hibernate)。值得注意的是,在本發明中待機狀態(Sleep)以及休眠狀態(Hibernate)統稱為休眠模式。In a computer system (such as an electronic device using the Microsoft Windows operating system), its power management system can reduce power consumption by using the standby state defined by the Advanced Configuration and Power Interface (ACPI). There are six states of S0~S5 defined in the advanced configuration and power interface: S0 power-on state represents the working state of the computer system. In the power-on state, the central processing unit CPU(s) of the computer executes commands, and the operating system and application program also Can be executed normally. In addition, in the power-on state, the central processing unit CPU and the hard disk, DVD drive and other computer devices can repeatedly enter and return from the low energy state; in the S1 power saving state, the central processing unit CPU stops working; in the S2 power saving state When the CPU of the central processing unit is turned off, no power is supplied; S3 standby state (Sleep), only memory power supply, also known as mounting to memory (Suspend to RAM), in the S3 state is a low wake time (Resume) time In the standby state (about 5 seconds or less), the computer system can be quickly restored to the working state (for example, the S0 state); the S4 sleep state (Hibernate) can also be called the Suspend to Disk, and It is a standby state with low power consumption and long wake-up delay time (for example, about 20 seconds or longer). The above S1~S4 are different power saving states or standby states, and the S5 state is the shutdown state. In the shutdown state S5, the software and the device of the computer are turned off, but some components are still charged, so that the computer can still be used by the keyboard. , clock, modem (phone wake up), LAN (Wake on LAN) and USB devices wake up. It should be noted that the power-on state, the standby state, the power-saving state, and the power-off state described in the present invention are not limited to the operating system of Microsoft Windows defined by ACPI. For example, the state in which the system is mounted to the memory defined by various power management programs in the Linux operating system or the Mac OS system can be regarded as the standby state (Sleep) of the case, and the system is mounted to the hard disk state. Can be seen as the sleep state of this case (Hibernate). It should be noted that in the present invention, the standby state (Sleep) and the sleep state (Hibernate) are collectively referred to as a sleep mode.

第1圖係本發明所揭露之一種電子裝置100的方塊圖,其中電子裝置100適用於本發明所揭露之休眠方法。如第1圖中所示,電子裝置100包括控制單元120、動態隨機存取記憶體130(Random-access memory,RAM)、非易失記憶體140以及唯讀記憶體150,其中控制單元120可包括一嵌入式控制器、一晶片組以及一單一中央處理器(central-processing unit,CPU)或者是關連於平行運算環境(parallel processing environment)之複數平行中央處理器(未圖示),而唯讀記憶體150係電性耦接至嵌入式控制器。除此之外,熟習此技藝人士也可將電子裝置100實施於其他系統樣態(configuration)上,例如,手持式設備(hand-held devices)、多處理器系統、以微處理器為基礎或可程式化之消費性電子產品(microprocessor-based or programmable consumer electronics)、網路電腦、迷你電腦、平板電腦、筆記型電腦、大型主機以及類似之設備。1 is a block diagram of an electronic device 100 disclosed in the present invention, wherein the electronic device 100 is suitable for the sleep method disclosed in the present invention. As shown in FIG. 1 , the electronic device 100 includes a control unit 120 , a random access memory (RAM), a non-volatile memory 140, and a read-only memory 150. The control unit 120 can be Including an embedded controller, a chipset, and a single central processing unit (CPU) or a plurality of parallel central processing units (not shown) associated with a parallel processing environment. The read memory 150 is electrically coupled to the embedded controller. In addition, those skilled in the art can also implement the electronic device 100 on other system configurations, such as hand-held devices, multi-processor systems, microprocessor-based or Microprocessor-based or programmable consumer electronics, network computers, minicomputers, tablets, notebooks, mainframes, and the like.

在電子裝置100開機時,控制單元120中之嵌入式控制器讀取唯讀記憶體150中的BIOS程式碼,以在開機以及作業系統切換時,提供電子裝置100充足的訊息,其中唯讀記憶體150中之BIOS程式碼為控制整個開機流程的核心機制。動態隨機存取記憶體130用以載入各式各樣的程式與資料以供控制單元120直接執行與運用。值得注意的是,本發明之動態隨機存取記憶體130包括一待命區塊160,用以存取沒有被使用之程式模組的資料以及程式碼。非易失記憶體140可包含快閃記憶體(flash ROM)、可抹除可編程唯讀記憶體、電子式可抹除可編程唯讀記憶體、暫存器、硬碟、及/或在所知之技術中以任何其他型式存在之電腦可讀取儲存媒介,用以儲存可供控制單元120執行之程式模組。值得注意的是,非易失記憶體140亦可用以儲存BIOS之程式碼,並且執行上述唯讀記憶體150之功能。一般而言,程式模組包含常序(routines)、程式(program)、物件(object)、元件(component)或網路服務(Web Service)等,用以執行點對點通訊系統之即時訊息轉換(instant message switch)功能。When the electronic device 100 is powered on, the embedded controller in the control unit 120 reads the BIOS code in the read-only memory 150 to provide sufficient information of the electronic device 100 when the booting and the operating system switch, wherein the read-only memory The BIOS code in the body 150 is the core mechanism for controlling the entire boot process. The DRAM 130 is used to load a variety of programs and data for direct execution and operation by the control unit 120. It should be noted that the dynamic random access memory 130 of the present invention includes a standby block 160 for accessing data and code of a program module that is not used. The non-volatile memory 140 can include a flash ROM, an erasable programmable read-only memory, an electronic erasable programmable read-only memory, a scratchpad, a hard disk, and/or A computer readable storage medium of any other type known in the art for storing a program module executable by control unit 120. It should be noted that the non-volatile memory 140 can also be used to store the BIOS code and perform the functions of the read-only memory 150 described above. Generally, a program module includes a routine, a program, an object, a component, or a web service to perform an instant message conversion of a peer-to-peer communication system (instant). Message switch) function.

控制單元120中之晶片組係電性耦接於各元件之間,用以傳送電子裝置100中的各元件之控制訊號。在一實施例中,晶片組可為南北橋合一的晶片或是南橋晶片。此外,晶片組更可包括記憶體控制器(未標示,例如是動態隨機存取記憶體控制器(DRAM Controller)),用以動態隨機存取記憶體130。另外,控制單元120更用以將儲存於非易失記憶體140中被執行以及預取之程式模組載入動態隨機存取記憶體130中執行,並且將動態隨機存取記憶體中130沒有被使用之程式模組的資料以及程式碼儲存於待命區塊160中。The chip group in the control unit 120 is electrically coupled between the components for transmitting control signals of the components in the electronic device 100. In one embodiment, the wafer set can be a North-South bridge integrated wafer or a South Bridge wafer. In addition, the chipset may further include a memory controller (not labeled, such as a DRAM controller) for dynamically random access memory 130. In addition, the control unit 120 is further configured to load the program module executed and prefetched in the non-volatile memory 140 into the dynamic random access memory 130, and the dynamic random access memory 130 is not included. The data and code of the used program module are stored in the standby block 160.

當電子裝置100進入休眠模式,例如進階組態與電源介面(Advanced Configuration and Power Interface,ACPI)所定義之S3或者S4狀態時,控制單元120根據進入休眠模式之指令,將待命區塊160中之資料清除至一既定量或者全部清除,並且在清除待命區塊160中之資料後,將動態隨機存取記憶體130中之其餘資料定義為一回復資料,並且儲存至非易失記憶體140。其中上述既定量係以減少待命區塊160中之無效的預取資料為原則,以減少當電子裝置100進入休眠模式時需備分的資料,即自休眠模式回復至正常運作時需重新載入之資料,可由設計者自行制定,本發明在此不加以限制。值得注意的是,在本發明中,控制單元120係用以清除待命區塊160中電子裝置100之系統的快取資料(cache memory),其中快取資料可隨時從檔案系統中讀回。When the electronic device 100 enters a sleep mode, such as an S3 or S4 state defined by an Advanced Configuration and Power Interface (ACPI), the control unit 120 will enter the standby block 160 according to an instruction to enter the sleep mode. The data is cleared to a certain amount or all cleared, and after the data in the standby block 160 is cleared, the remaining data in the DRAM 130 is defined as a reply data and stored in the non-volatile memory 140. . The foregoing quantitative system is based on the principle of reducing the invalid prefetch data in the standby block 160, so as to reduce the data that needs to be reserved when the electronic device 100 enters the sleep mode, that is, the data needs to be reloaded when returning from the sleep mode to the normal operation. The information may be formulated by the designer, and the invention is not limited herein. It should be noted that, in the present invention, the control unit 120 is configured to clear the cache memory of the system of the electronic device 100 in the standby block 160, wherein the cache data can be read back from the file system at any time.

另外,本發明之休眠模式係將電子裝置100之部分元件,例如動態隨機存取記憶體130、非易失記憶體140以及顯示器(未圖示)處於停止運轉的狀態,以便電子裝置100減少電源之耗用,當使用者重新喚醒電子裝置100時,即快速地脫離休眠模式,且顯示器畫面則完全還原為離開時的畫面。另一方面,當電子裝置100進入休眠模式時,則會將動態隨機記憶體130中的工作狀態儲存在非易失記憶體140後再關閉電子裝置100。因此,當使用者重新啟動電子裝置100時,先前儲存在非易失記憶體140的資料會重新載入到非易失記憶體140,因此先前電子裝置100關閉時所有使用中的程式及文件均重新還原於顯示器畫面上,亦即還原至進入休眠模式前的狀態。In addition, the sleep mode of the present invention places some components of the electronic device 100, such as the dynamic random access memory 130, the nonvolatile memory 140, and the display (not shown) in a stopped state, so that the electronic device 100 reduces the power. When the user wakes up the electronic device 100 again, the user quickly exits the sleep mode, and the display screen is completely restored to the screen when leaving. On the other hand, when the electronic device 100 enters the sleep mode, the operating state in the dynamic random memory 130 is stored in the non-volatile memory 140 and then the electronic device 100 is turned off. Therefore, when the user restarts the electronic device 100, the data previously stored in the non-volatile memory 140 is reloaded into the non-volatile memory 140, so that all the programs and files in use when the previous electronic device 100 is turned off are Restore to the monitor screen, that is, restore to the state before entering sleep mode.

第2圖係表示依據本發明實施例之休眠方法之流程圖。流程開始於步驟S200。Figure 2 is a flow chart showing a sleep method in accordance with an embodiment of the present invention. The flow begins in step S200.

在步驟S200中,電子裝置100接收一第一指令,觸發電子裝置100進入休眠模式之指令,其中上述第一指令係電子裝置100滿足一既定條件所致能之控制訊號,舉例而言,既定條件可為電子裝置100閒至超過一既定時間。接著流程進行至步驟S202。In step S200, the electronic device 100 receives a first command to trigger the electronic device 100 to enter a sleep mode, wherein the first command is a control signal that the electronic device 100 meets a predetermined condition, for example, a predetermined condition. The electronic device 100 can be idle for more than a predetermined time. The flow then proceeds to step S202.

在步驟S202中,控制單元120根據第一指令,清除動態隨機存取記憶體130中之待命區塊160的記憶體容量至一既定量,其中待命區塊160係用以儲存動態隨機存取記憶體130中沒有被使用之程式模組的資料以及程式碼。舉例而言,控制單元120可要求作業系統分配動態隨機存取記憶體130中之記憶體容量至一程式軟體,此時作業系統會將動態隨機存取記憶體130中儲存於待命區塊160沒有被使用之程式模組的資料以及程式碼所佔用之記憶體容量分配給此程式軟體。直至待命區塊160的記憶體容量分配給此程式軟體之記憶體容量至一既定量後,作業系統停止分配動態隨機存取記憶體130之記憶體容量給此程式軟體,而此程式軟體釋出作業系統分配之動態隨機存取記憶體130的記憶體容量,由此達到清除待命區塊160之記憶體容量的功效。值得注意的是,在本發明之另一實施例中,動態隨機存取記憶體130係將待命區塊160中之資料全部清除。另外,動態隨機存取記憶體130係用以存取被執行以及預取之複數程式模組,並且將動態隨機存取記憶體130中沒有被使用之程式模組的資料以及程式碼儲存於待命區塊160中。接著流程進行至步驟S204。In step S202, the control unit 120 clears the memory capacity of the standby block 160 in the dynamic random access memory 130 to a predetermined amount according to the first instruction, wherein the standby block 160 is used to store the dynamic random access memory. There is no data and code of the program module used in the body 130. For example, the control unit 120 may require the operating system to allocate the memory capacity in the DRAM 130 to a program software. At this time, the operating system stores the DRAM 130 in the standby block 160. The data of the program module used and the memory capacity occupied by the code are assigned to the program software. After the memory capacity of the standby block 160 is allocated to the memory capacity of the program software to a certain amount, the operating system stops allocating the memory capacity of the dynamic random access memory 130 to the program software, and the program software is released. The memory capacity of the dynamic random access memory 130 allocated by the operating system, thereby achieving the effect of clearing the memory capacity of the standby block 160. It should be noted that in another embodiment of the present invention, the dynamic random access memory 130 clears all the data in the standby block 160. In addition, the DRAM 130 is configured to access the executed and prefetched complex program modules, and store the data and code of the program modules that are not used in the DRAM memory 130 on standby. In block 160. The flow then proceeds to step S204.

在步驟S204中,控制單元120清除動態隨機存取記憶體130中之待命區塊160的記憶體容量至既定量後,控制單元120將動態隨機存取記憶體130中之其餘資料定義為一回復資料,並且儲存至非易失記憶體140。接著流程進行至步驟S206。In step S204, after the control unit 120 clears the memory capacity of the standby block 160 in the dynamic random access memory 130 to a predetermined amount, the control unit 120 defines the remaining data in the dynamic random access memory 130 as a reply. The data is stored and stored in the non-volatile memory 140. The flow then proceeds to step S206.

在步驟S206中,電子裝置100停止供應電源至動態隨機存取記憶體130,並且致使電子裝置100進入休眠模式,例如進階組態與電源介面(Advanced Configuration and Power Interface,ACPI)所定義之S3或者S4狀態。接著流程進行至步驟S208。In step S206, the electronic device 100 stops supplying power to the dynamic random access memory 130, and causes the electronic device 100 to enter a sleep mode, such as S3 defined by the Advanced Configuration and Power Interface (ACPI). Or the S4 state. The flow then proceeds to step S208.

在步驟S208中,電子裝置100接收一第二指令,其中電子裝置100滿足一既定條件時產生上述第二指令,舉例而言電子裝置100之週邊裝置被致能後,產生觸發電子裝置100由休眠模式回復正常運作之指令。接著流程進行至步驟S210。In step S208, the electronic device 100 receives a second command, wherein the second device is generated when the electronic device 100 meets a predetermined condition. For example, after the peripheral device of the electronic device 100 is enabled, the triggering electronic device 100 is generated by the sleep device. The mode returns to normal operation instructions. The flow then proceeds to step S210.

在步驟S210中,根據上述第二指令,控制單元120將進入休眠模式前儲存於非易失記憶體140中之回復資料載入動態隨機存取記憶體130。接著流程進行至步驟S212。In step S210, according to the second instruction, the control unit 120 loads the reply data stored in the non-volatile memory 140 before entering the sleep mode into the dynamic random access memory 130. The flow then proceeds to step S212.

在步驟S212中,將電子裝置100由休眠模式中喚醒,並且根據動態隨機存取記憶體130中之資料,將電子裝置100回復至休眠前之狀態。流程結束於步驟S212。In step S212, the electronic device 100 is woken up by the sleep mode, and the electronic device 100 is returned to the state before the sleep according to the data in the dynamic random access memory 130. The flow ends in step S212.

本發明的不同實施例已於本文敘述,但本領域具有通常知識者應能瞭解這些實施例僅作為範例,而非限定於此。本領域具有通常知識者可在不脫離本發明之精神的情況下,對形式與細節上做不同的變化。舉例而言,軟體程式碼可致能本發明實施例所述的裝置與方法之功能、組建(fabrication)、塑造(modeling)、模擬、描述(description)、以及/或測試,亦可透過一般程式語言(C、C++)、硬體描述語言(Hardware Description Languages,HDL)(包括Verilog HDL、VHDL等等)、或其他可利用的程式語言或者程式碼來完成。此軟體程式碼可配置在任何已知的電腦可使用媒介,例如磁帶、半導體、磁碟,或是光碟(例如CD-ROM、DVD-ROM等等)、網際網路、有線、無線、或其他通訊媒介的傳輸方式之中。此外,本發明所述之裝置與方法透過硬體與軟體的結合來實現。因此,本發明不應侷限於所揭露之實施例,而是依後附之申請專利範圍與等效實施所界定。特別是,本發明可實施在使用於一般用途電腦中的處理器裝置內。最後,本發明雖以較佳實施例揭露如上,然其並非用以限定本發明的範圍,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可做些許的更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Various embodiments of the invention have been described herein, but those skilled in the art should understand that these embodiments are only by way of example and not limitation. Variations in form and detail may be made by those skilled in the art without departing from the spirit of the invention. For example, the software code can enable the functions, fabrication, modeling, simulation, description, and/or testing of the apparatus and method described in the embodiments of the present invention, and can also be through a general program. Language (C, C++), Hardware Description Languages (HDL) (including Verilog HDL, VHDL, etc.), or other available programming languages or code. This software code can be configured on any known computer usable medium such as tape, semiconductor, disk, or optical disc (eg CD-ROM, DVD-ROM, etc.), internet, wired, wireless, or other Among the transmission methods of communication media. Furthermore, the apparatus and method of the present invention are implemented by a combination of a hardware and a soft body. Therefore, the invention should not be limited to the disclosed embodiments, but is defined by the scope of the appended claims. In particular, the present invention can be implemented in a processor device for use in a general purpose computer. In the following, the present invention is not limited to the scope of the present invention, and any one of ordinary skill in the art can make a slight difference without departing from the spirit and scope of the present invention. The scope of protection of the present invention is defined by the scope of the appended claims.

100...電子裝置100. . . Electronic device

120...控制單元120. . . control unit

130...動態隨機存取記憶體130. . . Dynamic random access memory

140...非易失記憶體140. . . Nonvolatile memory

150...唯讀記憶體150. . . Read only memory

160...待命區塊160. . . Standby block

第1圖為本發明所揭露之電子裝置的方塊圖。FIG. 1 is a block diagram of an electronic device disclosed in the present invention.

第2圖為本發明的一種休眠方法的流程圖。Figure 2 is a flow chart of a sleep method of the present invention.

100...電子裝置100. . . Electronic device

120...控制單元120. . . control unit

130...動態隨機存取記憶體130. . . Dynamic random access memory

140...非易失記憶體140. . . Nonvolatile memory

150...唯讀記憶體150. . . Read only memory

160...待命區塊160. . . Standby block

Claims (10)

一種電子裝置,包括:一非易失記憶體;一動態隨機存取記憶體,包括一待命區塊;一控制單元,用以將被執行以及預取之複數程式模組載入上述動態隨機存取記憶體,以及將上述動態隨機存取記憶體中沒有被使用之上述程式模組的資料以及程式碼儲存於上述待命區塊;其中當上述電子裝置進入一休眠模式時,上述控制單元將上述待命區塊中之資料清除至一既定量,並且在清除上述待命區塊中之資料後,將清除後之上述動態隨機存取記憶體中之其餘資料儲存至上述非易失記憶體。An electronic device comprising: a non-volatile memory; a dynamic random access memory comprising a standby block; and a control unit for loading the executed and prefetched plurality of program modules into the dynamic random access memory And storing the data and the code of the program module not used in the dynamic random access memory in the standby block; wherein when the electronic device enters a sleep mode, the control unit The data in the standby block is cleared to a predetermined amount, and after the data in the standby block is cleared, the remaining data in the cleared dynamic random access memory is stored in the nonvolatile memory. 如申請專利範圍第1項所述之電子裝置,其中當上述電子裝置進入上述休眠模式時,上述控制單元係將上述待命區塊中資料全部清除。The electronic device of claim 1, wherein when the electronic device enters the sleep mode, the control unit clears all the data in the standby block. 如申請專利範圍第1項所述之電子裝置,其中上述非易失記憶體用以儲存上述程式模組,並且上述控制單元係將儲存於上述非易失記憶體中之程式模組載入上述動態隨機存取記憶體中執行。The electronic device of claim 1, wherein the non-volatile memory is used to store the program module, and the control unit loads the program module stored in the non-volatile memory into the above Executed in DRAM. 如申請專利範圍第1項所述之電子裝置,其中上述休眠模式為進階組態與電源介面(Advanced Configuration and Power Interface,ACPI)所定義之S3或者S4狀態。The electronic device of claim 1, wherein the sleep mode is an S3 or S4 state defined by an Advanced Configuration and Power Interface (ACPI). 一種休眠方法,適用於一電子裝置,包括:接收一第一指令;根據上述第一指令,清除一動態隨機存取記憶體中之一待命區塊的記憶體容量至一既定量,其中上述待命區塊係用以儲存上述動態隨機存取記憶體中沒有被使用之程式模組的資料以及程式碼;清除上述動態隨機存取記憶體中之上述待命區塊的記憶體容量至上述既定量後,將清除後之上述動態隨機存取記憶體中之資料定義為一回復資料,並且儲存至一非易失記憶體;以及停止供應電源至上述動態隨機存取記憶體,並且致使上述電子裝置進入休眠模式。A sleep method, applicable to an electronic device, comprising: receiving a first instruction; and clearing, according to the first instruction, a memory capacity of a standby block in a dynamic random access memory to a predetermined amount, wherein the standby The block is configured to store data and a program code of the program module not used in the dynamic random access memory; and clear the memory capacity of the standby block in the dynamic random access memory to the above quantized Deleting the data in the above-mentioned dynamic random access memory as a reply data, and storing the data in a non-volatile memory; and stopping the supply of power to the dynamic random access memory, and causing the electronic device to enter Sleep mode. 如申請專利範圍第5項所述之休眠方法,其中上述動態隨機存取記憶體係用以存取被執行以及預取之複數程式模組,並且將上述動態隨機存取記憶體中沒有被使用之上述程式模組的資料以及程式碼儲存於上述待命區塊中。The dormant method of claim 5, wherein the dynamic random access memory system is configured to access a plurality of program modules that are executed and prefetched, and the dynamic random access memory is not used. The data and code of the above program module are stored in the above-mentioned standby block. 如申請專利範圍第5項所述之休眠方法,其中上述清除上述動態隨機存取記憶體係將上述待命區塊中資料全部清除。The dormancy method of claim 5, wherein the clearing the dynamic random access memory system clears all the data in the standby block. 如申請專利範圍第5項所述之休眠方法,更包括:接收一第二指令;根據上述第二指令,將儲存於上述非易失記憶體中之回復資料載入上述動態隨機存取記憶體;以及將上述電子裝置由上述休眠模式中喚醒,並且根據上述動態隨機存取記憶體中之回復資料,將上述電子裝置回復至休眠前之狀態。The sleep method of claim 5, further comprising: receiving a second instruction; loading the reply data stored in the non-volatile memory into the dynamic random access memory according to the second instruction And waking up the electronic device from the sleep mode, and returning the electronic device to a state before the sleep according to the reply data in the dynamic random access memory. 如申請專利範圍第5項所述之休眠方法,其中上述休眠模式為進階組態與電源介面(Advanced Configuration and Power Interface,ACPI)所定義之S3或者S4狀態。The sleep method of claim 5, wherein the sleep mode is an S3 or S4 state defined by an Advanced Configuration and Power Interface (ACPI). 一種電腦程式產品,用以被一機器載入且進入一休眠模式之方法,該電腦程式產品包括:一第一程式碼,當接收到一指令時,用以讀取一動態隨機存取記憶體中之一待命區塊的記憶體容量;一第二程式碼,用以要求上述機器之作業系統分配上述待命區塊的記憶體容量給上述第一程式碼;一第三程式碼,用以釋放或者清空上述機器之作業系統分配給上述待命區塊的記憶體容量;一第四程式碼,用以將釋放或者清空後之上述動態隨機存取記憶體的其餘資料載入一非易失記憶體;以及一第五程式碼,當上述動態隨機存取記憶體的其餘資料載入上述非易失記憶體後,停止提供電源至上述動態隨機存取記憶體以及致使上述機器進入上述休眠模式。A computer program product for loading by a machine and entering a sleep mode, the computer program product comprising: a first code, when receiving an instruction, for reading a dynamic random access memory a memory capacity of one of the standby blocks; a second code for requesting the operating system of the machine to allocate the memory capacity of the standby block to the first code; a third code for releasing Or clearing the memory capacity allocated by the operating system of the above machine to the standby block; a fourth code for loading the remaining data of the dynamic random access memory after being released or emptied into a non-volatile memory And a fifth code, when the remaining data of the dynamic random access memory is loaded into the nonvolatile memory, stopping supplying power to the dynamic random access memory and causing the device to enter the sleep mode.
TW101100414A 2012-01-05 2012-01-05 Electronic device, hibernation method and computer program product TW201329706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101100414A TW201329706A (en) 2012-01-05 2012-01-05 Electronic device, hibernation method and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101100414A TW201329706A (en) 2012-01-05 2012-01-05 Electronic device, hibernation method and computer program product

Publications (1)

Publication Number Publication Date
TW201329706A true TW201329706A (en) 2013-07-16

Family

ID=49225737

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101100414A TW201329706A (en) 2012-01-05 2012-01-05 Electronic device, hibernation method and computer program product

Country Status (1)

Country Link
TW (1) TW201329706A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI548983B (en) * 2015-02-10 2016-09-11 宏碁股份有限公司 Storage apapratus, electronic apparatus and data accessing method thereof
TWI549058B (en) * 2014-09-19 2016-09-11 宏碁股份有限公司 Electronic device and method for operating system waking up thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI549058B (en) * 2014-09-19 2016-09-11 宏碁股份有限公司 Electronic device and method for operating system waking up thereof
US9672048B2 (en) 2014-09-19 2017-06-06 Acer Incorporated Electronic device and method for waking up operating system thereof
TWI548983B (en) * 2015-02-10 2016-09-11 宏碁股份有限公司 Storage apapratus, electronic apparatus and data accessing method thereof

Similar Documents

Publication Publication Date Title
US10664039B2 (en) Power efficient processor architecture
TWI386791B (en) Transitioning a computing platform to a low power system state
US9015396B2 (en) Reducing latency in a peripheral component interconnect express link
TWI477945B (en) Method for controlling a turbo mode frequency of a processor, and processor capable of controlling a turbo mode frequency thereof
CN103282854B (en) System and method for power management
US9619015B2 (en) Implementing a power off state in a computing device
US10990153B2 (en) Application processor and system on chip
EP2972826B1 (en) Multi-core binary translation task processing
US10860085B2 (en) Modified sleep state graphics processing system
CN103218031A (en) Electronic device and sleep method
TW201329706A (en) Electronic device, hibernation method and computer program product
US20140136748A1 (en) System and method for performance optimization in usb operations
Xi et al. Understanding the critical path in power state transition latencies
US8370669B2 (en) Memory device having a memory sleep logic and methods therefor
TW201541354A (en) Electronic device and operating system switching method thereof
Jang et al. A lightweight pseudo cpu hotplug mechanism for mobile devices
JP6409218B2 (en) Power efficient processor architecture
CN105224399A (en) The method of electronic installation and switching operating system thereof
TW201504799A (en) Electronic device and hibernation method thereof
JP2017021811A (en) Power efficient processor architecture
JP2016212907A (en) Excellent power efficient processor architecture