1312111 五、發明說明α) 【發明所屬之技術領域】 本發明係有關於系& & 法及其裝置。 、糸統管理,且特別有關於一種休眠方 【先前技術】 絲盥$】:m系統中’使用者在對於裝置,如電腦系 Z , ^ §機的時候可以選擇以休眠(Hibernate) 此^ ’作業系統會將目前動態記憶體 ^ ^ ^ ^ 成為一個與記憶體容量大小相同 安、e制d d_ 置下·人開機%,作業系統便會將此檔1312111 V. INSTRUCTION DESCRIPTION α) [Technical Field to Which the Invention Is Ascribed] The present invention relates to a system &&& method and apparatus therefor. Management, and especially related to a kind of dormant side [previous technology] silk 盥 $]: m system 'users can choose to sleep (Hibernate) for devices such as computer system Z, ^ § ^ 'The operating system will make the current dynamic memory ^ ^ ^ ^ the same as the memory capacity, the e system d d_ set the person to boot %, the operating system will use this file
.案複製到記憶體中,传煜尬^ b L ^Λ Α 便侍使用者上次開機時的工作晝面能 夠快速的回復並進行顯示。 在,眠的應用中,由於新一代的電腦系統除了 一般的 電細功此之外,亦已經導入家電的觀念,即電腦系統中可 以結合音樂(CD/MP3)與影音光碟(VCD/DVD)播放、電視 (JV)與觀看相片(PHOTO)等功能。因此,電腦系、统可以設 冲為電腦模式與多媒體模式’當使用者欲將電腦系統操作 為一般之電腦功能時,則選擇進入電腦模式,而當使用者 欲將電腦系統操作為多媒體播放時,則選擇進入多媒體模 式。因此,休眠方式被應用來達到快速進入多媒體模式的 ¥機制之一。 然而,由於當系統從休眠狀態下進行回復時,讀取硬 碟中之檔案係非常耗時的’因此,使用者往往必須花費時 間進行等待,從而造成使用者的不便。 【發明内容】The case is copied into the memory, and the 煜尬^ b L ^Λ Α will promptly respond to the user's work at the last boot and display it. In the application of sleep, in addition to the general electrical work, the new generation of computer systems has also introduced the concept of home appliances, that is, computer systems can combine music (CD/MP3) and audio and video (VCD/DVD). Play, TV (JV) and photo viewing (PHOTO). Therefore, the computer system and system can be set to computer mode and multimedia mode. When the user wants to operate the computer system as a general computer function, he or she chooses to enter the computer mode, and when the user wants to operate the computer system as multimedia playback. , then choose to enter the multimedia mode. Therefore, the sleep mode is applied to achieve one of the ¥ mechanisms for quickly entering the multimedia mode. However, since the file in the hard disk is very time consuming when the system replies from the sleep state, the user often has to wait for time, causing inconvenience to the user. [Summary of the Invention]
0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd 第 5 頁 1312111 五、發明說明(2) 置,從目的為提供-種休眠方法及其裝 直 攸而增加系統回復的效率。 依據本發明一實施例之休眠方法,適肖y歩¥ . 理後之記憶體產生一休眠4置:; 己憶=接著,依據整 縮,並儲存至儲存裝置。 之後,將休眠檔案進行壓 磁碟重新整理記憶體係將 區塊進行結合。裝置係依據結合二數個資料 案。 俊之貪枓區塊產生休眠檔 儲存裝置係事先設定( (compression-enabled)磁 為—壓縮致能 裝置時,同時自動被裝置之’二什休眠標案儲存至儲存 當裝置接收一回復指示時乍壓縮。 之休眠檔案,將壓縮後之休 子裝置中讀取壓縮後 檔案回存至記憶體。 檔案進行解壓縮,並將休眠 依據本發明實施例之裳置 勺扭 置、與-處理單元。當接收一休;憶體、-儲存裝 重新整理(Defrag)記憶體,依據整^ =時,處理單元磁碟 •眠檔案,且將休眠檔案進行壓縮 J記憶體產生一休 處理單元磁碟重新整理圮^存至儲存裝置。 2資料區塊進行結合。處理ί元传::憶體中破碎之複 塊產生休眠檔案。 糸依據結合後之資料區 儲存裝置係事先設定為一 製置之一 休眠檔案儲存至儲存裝置時,休二得處理單元將 作 田录目動被 0814- A40417TW(N1);PNAI-CS- 0160-1 v;YIANHOU.ptd 第6頁 五、發明說明(3) 業系統進行壓縮 一當處理單元接收〜回 _ =ί ί t眠檔案,將墨縮^ ίI時’由儲存裝置中讀取壓 备案回存至記憶體。 眠檔案進行解壓縮,並將 本發明上述方法可 中。舍-U Λ透過兹斗、τπ: 田程式碼被機器栽入 式馬方式收錄於實體媒體 發明之裝置。 執行時,機器變成用以實行本 為使本發明之上述目 下文特舉實施例,並配人如、特徵和優點能更明顯易懂, 【實施方式】 〇斤附圖示,進行詳細說明如下。 第1圖為一示意圖係 — 構。 ‘”、不依據本發明實施例之裝置架 依據本發明實施例之裝 一儲存裝置120、與—严置100至^、包括一記憶體11〇、 是電腦系統、與手持式""裝早元130。其中,裝置1〇〇可以 與個人數位助理(PDA)1等/,如行動電話、智慧型手機、 系統記憶體,用以儲存所等有於記坡憶體110可以係裝置100之 或應用程式本身或其裝置10°上運作之系統程式 硬碟,或非揮發性記。儲存裝置120可以是-# Φ Hu 體,如快閃記憶體(Flash Memory) ί所$ 1未除程式化唯讀記憶體(EEPR0M),用以儲存休眠 胜、,之相關資料。處理單元】3〇係用以進行本發明中 置進行休眠與回復之相關操作,其細節將於後進行說 f。值得注意的是,裝置100中可以設置一觸發模組(圖中 顯不),如裝置1〇〇上之按鍵或是裝置1〇〇上之軟體程0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd Page 5 1312111 V. INSTRUCTIONS (2) Set, from the purpose of providing a kind of dormancy method and its straightening to increase the efficiency of system recovery . According to an embodiment of the present invention, the sleep method is adapted to generate a sleep 4:; recall = then, according to the reduction, and stored to the storage device. After that, the dormant file is compressed to reorganize the memory system to combine the blocks. The device is based on a combination of two data items. When the ghre block generates a dormant file storage device, the (compression-enabled) magnetic compression device is automatically set by the device to the storage device when the device receives a reply indication. The compressed file is compressed, and the compressed file is read back into the memory by the compressed device. The file is decompressed, and the dormant is twisted and the processing unit according to the embodiment of the present invention. When receiving a break; memory, - Defrag memory, according to the whole ^ =, the processing unit disk sleep file, and the sleep file is compressed J memory to generate a rest processing unit disk rearrangement圮^Save to the storage device. 2 Data block is combined. Processing ί元传:: The broken block in the memory body produces a dormant file. 糸According to the combined data area storage device is set as a system one sleep file When storing to the storage device, the Hugh Erde processing unit will record the field record 0814-A40417TW(N1); PNAI-CS-0160-1 v; YIANHOU.ptd page 6 V. Invention description (3) The system performs compression. When the processing unit receives the ~~_ίίί sleep file, the ink is compressed by the storage device and is read back to the memory. The sleep file is decompressed, and the present invention is In the method, the device can be incorporated into the device of the physical media invention by the machine-incorporated code. When executed, the machine becomes used to implement the present invention. The embodiments will be more clearly understood, and the features and advantages will be more apparent. [Embodiment] The following is a detailed description of the drawings. Fig. 1 is a schematic diagram of a structure. The device rack of the embodiment is equipped with a storage device 120 according to an embodiment of the present invention, and is provided with a memory device, a computer system, and a handheld device. The device 1 can be connected to a personal digital assistant (PDA) 1 or the like, such as a mobile phone, a smart phone, or a system memory, for storing the device 100 or the application itself or Its device is 10° The operating system program hard disk, or non-volatile memory. The storage device 120 can be -# Φ Hu body, such as flash memory (Flash Memory) ί $1 unprogrammed read-only memory (EEPR0M), with In order to store the sleep, the relevant data. The processing unit is used to perform the operations related to the dormancy and the reply in the present invention, and the details thereof will be described later. f. It is noted that the device 100 can be set. A trigger module (not shown in the figure), such as the button on the device 1 or the soft body on the device 1
1312111 五、發明說明(4) 式,用以相應一休眠指示而產生休眠訊號,從而致使裝置 1 0 0進入休眠狀態。此外,裝置1 〇 〇中亦可設置一回復模組 (圖中未顯示)’用以相應一回復指示而產生回復訊號,從 而致使裝置1 0 0由休眠狀悉中進行系統回復。 第2圖為一流程圖係顯示依據本發明實施例之休眠方 法。 首先,如步驟S2 1 0,判斷是否接收到一休眠指示。若 否(步驟S21 0的否),則繼續步驟δ2ΐ 〇的判斷。若接收到休 眠指示(步驟S210的是),則如步驟§22〇,磁碟重新整理 ^ D e f r a g)記憶體。其中’磁碟重新整理記憶體係將記憶體 中破碎之資料區塊進行結合。值得注意的是,裝置更可以 判斷整理後記憶體中包含這些資料區塊之尺寸,若尺寸小 於一既定臨限值時,則停止磁碟重新整理記憶體。第3圖 為一示意圖係顯示磁碟重新整理前之記憶體例子。如圖所 示’記憶體1 10中包含4個分別相應不同應用或系統程式之 破碎之資料區塊Di、D2、D3、糾4。丨中,#料區塊D1、 D2、D3、與D4係分散於記憶體11〇中的不同位置。經過磁 碟重新整理之後’破碎之資料區塊將被結合為大致連接在 一起之區塊,如第4圖所示。 ’接著’如步驟S230,依據整理後記憶體中結合後之資 料區塊產生一休眠檔案。之後,如步 ° ,、 進行壓縮,並儲存至儲存裝置。值得注i將休眠植案 係事先設定(pre se t)為一壓縮致能'心、疋,儲存裝置 (c —-enabled)磁碟’使^休眠檔案儲存至儲存 ΙΗϋ1312111 V. The invention (4) is used to generate a sleep signal corresponding to a sleep indication, thereby causing the device 100 to enter a sleep state. In addition, a reply module (not shown) may be disposed in the device 1 to generate a reply signal corresponding to a reply indication, thereby causing the device 100 to perform a system reply from the sleep state. Figure 2 is a flow chart showing a sleep method in accordance with an embodiment of the present invention. First, as step S2 1 0, it is determined whether a sleep indication is received. If not (NO in step S21 0), the determination of step δ2 ΐ 继续 is continued. If the sleep indication is received (YES in step S210), the disk is rearranged as follows in step §22. Among them, the disk rearrangement memory system combines the broken data blocks in the memory. It is worth noting that the device can further determine the size of the data blocks included in the memory after finishing. If the size is smaller than a predetermined threshold, the disk is stopped to rearrange the memory. Figure 3 is a diagram showing an example of a memory before the disk is rearranged. As shown in the figure, the memory 1 10 contains four broken data blocks Di, D2, D3, and Correction 4 respectively corresponding to different applications or system programs. In the middle, the #blocks D1, D2, D3, and D4 are dispersed in different positions in the memory 11〇. After the disk is rearranged, the broken data blocks will be combined into blocks that are roughly connected together, as shown in Figure 4. Then, in step S230, a dormant file is generated based on the combined data blocks in the sorted memory. After that, as in step °, compress and store to the storage device. It is worth noting that the dormant planting system is pre-set as a compression enable 'heart, 疋, storage device (c--enabled) disk' to save the dormant file to storage ΙΗϋ
Μ 0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd 第8頁 1312111Μ 0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd Page 8 1312111
裳置f ’同時自動被裝置之作業系統進行壓縮。 ^ 第5圖為一流程圖係顯示依據本發明實施例之系統 復方法。 》 斷。若接收到回 由儲存裝置中讀 縮後之休眠標案 回存至記憶體, 態。 於記憶體經過磁 小’因此可以改 其部份 光碟片 儲存媒 時,此 裝置也 纜、光 被機器 與本發 結合處 置。 ’然其 脫離本 ’可以以 、硬碟、 體,其 機器變成 可以以程 纖、或是 ’如電腦 明之裝 理器提供 首先,如步驟S5 1 0,判斷是否接收到 ,(步驟S51 〇的否),則繼續步驟S51 〇的判 復,不(步驟S51〇的是),則如步驟S52〇, 取廢縮後之休眠檔案。如步驟35 3〇,將壓 進行解壓縮,並如步驟s 5 4 〇,將休眠檔案 使知裝置回復至進入休眠狀態前之系統狀 ► 透過本發明之休眠方法及其裝置,由 ,f新整理ϋ使得休眠權案的尺寸變 。裝置由休眠狀態回復系統時的效率。 本發明之方法與系統,或特定型態或 程式碼的型態包含於實體媒體,如軟碟、 $是任何其他機器可讀取(如電腦可讀取) 中,當程式碼被機器’如電腦载入且執行 用以參與本發明之裝置。本發明之方法盘 式碼型㈣過-些傳送媒體1電線或雷 任何傳輸型態進行傳送,其中,告 = 接收、載入且執行時,此機考 ™ 斋變成用以泉 置。當在一般用途處理器實作時,程式碼 一操作類似於應用特定邏輯電路之獨特^ 雖然本發明已以較佳實施例揭露如; 限定本發明’任何熟悉此項技藝者,在不 並非用以 發明之精The skirt f ’ is automatically compressed by the operating system of the device. ^ Figure 5 is a flow chart showing a system complex method in accordance with an embodiment of the present invention. 》 Broken. If the sleep standard read back from the storage device is received back to the memory state. When the memory is magnetically small, it is possible to change some of the optical disc storage medium, and the device is also used in conjunction with the present invention. 'Rather, it can be used, hard disk, body, its machine can be provided by the process fiber, or 'computer-like processor. First, as step S5 1 0, judge whether it is received, (step S51 〇 Otherwise, the continuation of the step S51 判 is continued, and if not (step S51 YES), then in step S52 〇, the collapsed sleep file is taken. In step 35 3, the pressure is decompressed, and as in step s 5 4 〇, the sleep file is made to return to the system state before entering the sleep state ► Through the sleep method and device of the present invention, f new Finishing ϋ causes the size of the dormant right to change. The efficiency of the device when it returns to the system from the sleep state. The method and system of the present invention, or the type of specific type or code, is contained in a physical medium such as a floppy disk, which is readable by any other machine (e.g., computer readable), when the code is "as readable by the machine" The computer loads and executes the means for participating in the present invention. The method of the present invention has a disc pattern (4) over some of the transport medium 1 wires or lightning. Any transmission type is transmitted, wherein, when receiving, loading and executing, the machine test is turned into a spring. The code-one operation is similar to the application-specific logic circuit when implemented in a general-purpose processor. Although the present invention has been disclosed in the preferred embodiments, the invention is not limited to the use of the present invention. Invented
1312111 五、發明說明(6) 神和範圍内,當可做些許更動與潤飾,因此本發明之保護 範圍當視後附之申請專利範圍所界定者為準。1312111 V. INSTRUCTIONS (6) Within the scope of God's Worth, the scope of protection of the invention is defined by the scope of the appended patent application.
0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd 第 1〇 頁 1312111 圖式簡單說明 【圖示簡單說明】 第1圖為一示意圖係顯示依據本發明實施例之裝置架 構。 第2圖為一流程圖係顯示依據本發明實施例之休眠方 法。 第3圖為一示意圖係顯示磁碟重新整理前之記憶體。 第4圖為一示意圖係顯示磁碟重新整理後之記憶體。 第5圖為一流程圖係顯示依據本發明實施例之系統回 復方法。 【主要元件符號說明】 100〜裝置; 11 0〜記憶體; 1 2 0〜儲存裝置; ' 1 3 0〜處理單元; S210、S220、S2 3 0、S2 40 〜操作步驟;0814-A40417TWF(Nl); PNAI-CS-0160-TWXX; YIANHOU.ptd Page 1 1312111 BRIEF DESCRIPTION OF THE DRAWINGS [Brief Description] FIG. 1 is a schematic view showing a device architecture in accordance with an embodiment of the present invention. Figure 2 is a flow chart showing a sleep method in accordance with an embodiment of the present invention. Figure 3 is a schematic diagram showing the memory before the disk is rearranged. Figure 4 is a schematic diagram showing the memory after the disk is rearranged. Figure 5 is a flow chart showing a system recovery method in accordance with an embodiment of the present invention. [Main component symbol description] 100~ device; 11 0~ memory; 1 2 0~ storage device; '1 3 0~ processing unit; S210, S220, S2 3 0, S2 40~ operation steps;
Dl、D2、D3、D4〜資料區塊; S510、S520、S530、S540〜操作步驟。D1, D2, D3, D4~ data block; S510, S520, S530, S540~ operation steps.
0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd 第 11 頁0814-A40417TWF(Nl);PNAI-CS-0160-TWXX;YIANHOU.ptd Page 11