TW201111966A - Method for fast turning on and off a machine - Google Patents

Method for fast turning on and off a machine Download PDF

Info

Publication number
TW201111966A
TW201111966A TW098131936A TW98131936A TW201111966A TW 201111966 A TW201111966 A TW 201111966A TW 098131936 A TW098131936 A TW 098131936A TW 98131936 A TW98131936 A TW 98131936A TW 201111966 A TW201111966 A TW 201111966A
Authority
TW
Taiwan
Prior art keywords
memory
storage
page
computer system
sleep
Prior art date
Application number
TW098131936A
Other languages
Chinese (zh)
Other versions
TWI399637B (en
Inventor
Xi-Wu Luo
Wei-Xuan Cai
Original Assignee
Nat Univ Chung Cheng
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 Nat Univ Chung Cheng filed Critical Nat Univ Chung Cheng
Priority to TW098131936A priority Critical patent/TWI399637B/en
Priority to KR1020100092274A priority patent/KR101392062B1/en
Publication of TW201111966A publication Critical patent/TW201111966A/en
Application granted granted Critical
Publication of TWI399637B publication Critical patent/TWI399637B/en

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/22Microcontrol or microprogram arrangements
    • G06F9/24Loading of the microprogram
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention discloses a method for fast turning on and off a machine, wherein the amount of memory transferred to the secondary memory device is reduced when the computer enters hibernation to further increase the speed of computer recovery from hibernation to full speed operation. The present invention can be applied to all sorts of computer systems, and can be used together with random access process technology in writing and loading data. Further, the present invention can prevent the computer data loss and reduce the level of damage due to abrupt power outage.

Description

201111966 六、發明說明: 【發明所屬之技術領域】 本發明係關於一種電腦系統開關機方法,特別是關於一種應用於 電腦系統在進入省電模式後,可以快速開關機的方法。 【先前技術】 一般電腦系統工作的狀態,除了正在執行作業系統與各種應用程 式的模式外’更包含了省電模式’電細系統進入休眠的目地一方面為 結省電能的消耗,另一方面為降低系統工作的雜訊。 φ 依據高等組態能源介面(Advanced Configumti^ & Pc)wei·201111966 VI. Description of the Invention: [Technical Field] The present invention relates to a computer system switching method, and more particularly to a method for quickly turning the machine on and off after the computer system enters the power saving mode. [Prior Art] The state of the general computer system works, except that the mode of the operating system and various applications is being executed, and the power saving mode is included. The purpose of the electric system is to sleep. On the other hand, the power consumption is saved. To reduce the noise of the system work. φ according to the advanced configuration energy interface (Advanced Configumti^ & Pc) wei·

Interface,ACPI)的設計分類,最常見的休眠將為兩種型態,一種為 Suspend To RAM (STR) ’稱為S3狀態,S3狀態為只對部份的揮發性 a己憶體持續供電’包括視訊§己憶體(FrameBuffer)與主記愧體(Main Memory ) 4 ’其餘部分一律斷電。S3狀態具有兩個優點,一為雪腦系 統回返到全速運作的時陳快;另-為安全性較佳,當朗 與操作屬於個人私密資料不希望回存至硬碟内時,即採用S3狀態。另 一種為spend To Disk (STD),稱為S4狀態,S4狀態是將工作^的資 料全部皆寫入到非揮發性記憶體内儲存,然後系統將全部斷電,S4的 φ 優點為其更為省電。 承上所述兩種休眠S3狀態與S4狀態,皆不盡完善,在進入兕狀 態後,仍需提供電力給電腦系、統中揮發性記憶體,以維持系統儲存的 狀痞;假設改採用S4狀態雖相較於S3狀態省電,但回返至電腦系統 全速運作的速度較則相對於S3狀態緩慢許多。 有鑑於此’本發明係在針對上述之缺失,改良以上所述的休眠, 提出-種快速開關機的方法,能夠於進入休眠時能減少目前記憶體使 用i,進而增進電腦系統重新啟動至全速運作的反應效率。 【發明内容】 〜 本發明之主要目的係在提供—種快速關機的方法,其係於電腦 201111966 系統進入休眠時大量縮減目前系統中使料記 憶體資料轉換存放至第二儲存裝置的 ΐ ’以減少主記 至全速工作的速度。 進而增進電腦系統恢復 其係可預防 電腦在提供一種快速開關機的方法, 電細糸統忍外喪失電力時資料的遺失與受損的程度。 本發明之再-目_在提供—種快稍職= 或載回皆採用隨機存取處理的技術,將大幅提升資料寫入 重新啟動彼此轉換時資料存取的速度。 旬二、、先進入休眠或 為達到上述之目的,本發明提出之快速開關機 腦系統進人休贿,舰分至少—記贿騎數個清⑽存 個非清白儲存頁,清白儲存頁係㈣放細存,非清數 休眠檔儲存於至少-第二儲存裝置之—切換/頁係寫入 當電腦系_統由切統二。 復至記舰’並且可從第二儲存裝置讀取倾,餘至記憶體眠= 將縮減記㈣轉換存放至第二儲存裝㈣㈣量,ς 啟動恢復公速i作的辭。 心κ统重新 ’當更容易瞭解本 底下藉由具體實施例配合所附的圖式詳加說明Interface, ACPI) design classification, the most common sleep will be two types, one is Suspend To RAM (STR) 'called S3 state, S3 state is only for some of the volatile a memory) Including the video § FrameBuffer and Main Memory 4 'the rest will be powered off. The S3 state has two advantages, one is when the snow-brain system returns to full-speed operation, and the other is better for security. When the lang and the operation are personal and private data do not want to be restored to the hard disk, the S3 is adopted. status. The other is the Send To Disk (STD), which is called the S4 state. The S4 state is to write all the data of the work to the non-volatile memory, and then the system will be powered off. The advantage of S4 is more. To save electricity. The two kinds of sleep S3 state and S4 state are not perfect. After entering the 兕 state, it is still necessary to provide power to the computer system and the volatility memory in the system to maintain the state of the system storage; Although the S4 state saves power compared to the S3 state, the speed of returning to the computer system at full speed is much slower than that of the S3 state. In view of the above, the present invention provides a method for quickly switching on and off according to the above-mentioned lack of the above-mentioned sleep, and can reduce the current memory usage i when entering sleep, thereby improving the computer system restart to full speed. The efficiency of the operation of the operation. SUMMARY OF THE INVENTION The main purpose of the present invention is to provide a method for quickly shutting down, which is to reduce the storage of the memory data in the current system to the second storage device when the system enters sleep. Reduce the speed at which the master works to full speed. In turn, the computer system can be restored. The system can prevent the computer from providing a quick turn-on and turn-off method, and the degree of loss and damage of the data when the power is lost. The re-examination of the present invention provides a technique for random access processing, which will greatly increase the speed of data access when restarting each other. In the second day, first enters dormancy or in order to achieve the above purpose, the fast-switching machine brain system proposed by the present invention enters a bribe, and the ship points at least - a few bribes to ride a few clear (10) to save a non-innocent storage page, innocent storage page (4) Putting the fine memory, the non-clearing dormant file is stored in at least the second storage device - the switching/page writing is performed when the computer system is unified. Return to the ship' and can read the tilt from the second storage device, and then to the memory sleep = convert the reduced record (4) to the second storage device (4) (four) amount, and start the recovery of the public speed i. The heart is re- _ when it is easier to understand the details by the specific examples with the attached drawings

發明之目的、技術内容、特點及其所達成之功效。 【實施方式】 本發明提種快賴_的綠,減少義线進人休 憶體裝置的使紐量’降低寫人第二儲存裝置龍量,以增進電腦系 統進入休眠·新啟驗復至全速轉的速度,底下聽以較佳實施 ,詳述本發明之技術特徵。如第-圖所示,—電腦系統1G係包含一計 鼻處理器(CPU)12、一主§己憶體(Main Memory)14與一第二儲存事置 (Secondary St〇mge)16。第二儲存裝置16係可為高速隨機存取 體裝置,如一快閃記憶體,主要用於儲存檔案系統(file system)18、 切換空間(swap-space)20 及休眠檔(hibernation fiie)22。 第二圖所示為本發明之快速開關機的方法流程圖,請同時參考 201111966 一圖之架構示意圖。首先,如步驟 (Operating System,OS)進入休目民模',將二:系統10之标作系統 憶體Μ為清白儲存頁與非清白=’,將由 區f記 ===主,體14,_清白儲==心 ^序了计异依據禮出之W儲存頁的數量配置主記憶體Μ,並於該 status)之非^儲存頁鑛存至休眠檔22,並存放於第二儲存裝置^ ^切換2G巾或前織18巾。其巾非清白儲存頁可依照位址排 序,以合併連續位址之非清白儲存頁成一單一寫入命令。之後,如步 驟S32,當電腦系統10重新啟動,電腦系統1〇從切換空間2〇與槽案 系統18讀取休眠槽22 ’回復儲存休眠檔至主記憶體14,恢復系統狀 態。最後’如步驟S34,電腦系統10將從第二儲存裝置16讀取資料 載回至主記憶體14。 當執行中止至為快閃記憶體之第二儲存裝置 16 (Suspend-to-f 1 ash)的速度主要取決於需要寫入到非揮發記憶體 (nonvolatile memory)的資料量的多寡。進入休眠之前換出 (Swapping-before-hibernating)利用操作操作系統(〇perating System ’ OS)中既有的記憶體管理技術,將大部分的記憶體頁(_〇^ page)直接捨棄而不做任何的寫入動作,因此可以加速中止(suspend) 的速度。回復(resume)的時候資料(data)將從三個地方取回,分別是 休眠檔(hibernation file)22、切換空間(swap-space)2〇及檔案系統 (file system)18,系統隸屬於核心(kernel)部分的主要資料(data) 及編碼(code) ’在重新開機時立刻取回’而剩餘的資料則使用需求頁 面調度(paging-on-demand)的方式取回使用者現階段所需的部分。由 於使用者所需要的資料量通常遠小於系統在中止前記憶體中的所有資 料量,因此可以加速回復(resume)的速度。 記憶體分頁(memory page)可分成三種,分別為自由分頁(free 201111966The purpose, technical content, characteristics and effects achieved by the invention. [Embodiment] The invention proposes to quickly lag the green color, reduce the amount of the right line into the memory device, and reduce the amount of the second storage device to improve the computer system to enter the dormancy and the new test to The speed of full speed rotation is better understood below, and the technical features of the present invention are detailed. As shown in the first figure, the computer system 1G includes a nasal processor (CPU) 12, a main memory 14 and a second storage device 16 (Secondary St〇mge) 16. The second storage device 16 can be a high speed random access device, such as a flash memory, and is mainly used to store a file system 18, a swap-space 20, and a hibernation fiie 22. The second figure shows the flow chart of the method of the fast switching machine of the present invention. Please refer to the schematic diagram of the structure of 201111966. First, if the Operating System (OS) enters the public mode, the second system: the system 10 is marked as a system memory and the non-innocence = ', will be recorded by the area f === main, body 14 , _ innocent storage == heart ^ sequence of the difference according to the number of W stored pages of the ritual configuration of the main memory Μ, and in the status of the non-storage page deposit to the dormant file 22, and stored in the second store Device ^ ^ Switch 2G towel or front weave 18 towel. The non-innocent storage page of the towel can be sorted according to the address, and the non-innocent storage page of the continuous address is combined into a single write command. Thereafter, as in step S32, when the computer system 10 is restarted, the computer system 1 reads the sleep slot 22' from the switching space 2 and the slot system 18 to restore the sleep stall to the main memory 14, and restores the system state. Finally, as in step S34, the computer system 10 loads the data from the second storage device 16 back to the main memory 14. The speed at which the execution of the second storage device 16 (Suspend-to-fash) to the flash memory is mainly determined by the amount of data that needs to be written to the nonvolatile memory. Swapping-before-hibernating uses the existing memory management technology in the operating system (OS) to discard most of the memory pages (_〇^ page) without doing it. Any write action can speed up the suspend. When replying, the data will be retrieved from three places: hibernation file 22, swap-space 2 and file system 18. The system belongs to the core. (kernel) part of the main data (data) and code (code) 'retrieve immediately after rebooting' and the remaining data is used in the paging-on-demand way to retrieve the user's current stage part. Since the amount of data required by the user is usually much smaller than the amount of data in the memory before the system is suspended, the speed of the resume can be accelerated. Memory page can be divided into three types, which are freely paged (free 201111966)

page)、匿名分頁(anonymous page)及指定分頁(named page)。自由分 頁(free page)是系統當下未使用到的記憶體,自由分頁(free page) 中的内容對系統而言毫無意義。匿名分頁(anonymous page)是程式在 執行時期動態分配的記憶體,這部分的記憶體主要包含了堆疊(stack) 和堆積(heap)二種。指定分頁(named page)則是播案在主記憶體14中 的副本。形式上它的行為類似於第二儲存裝置16的快取(cache)。指 定分頁(named page)主要包含了執行檔(executable file)、動態連結 庫(dynamic-linke library)在記憶體中的對應,或者程式使用記憶體 對應至檔案(memory-mapped-f i 1 e)將一個檔案映射到記憶體。 匿名分頁(anonymous page)及指定分頁(named page)都可能是清 白儲存頁(clean page)或非清白儲存頁(dirty page)。非清白匿名分 頁(dirty anonymous page)被換出(swap-out)時必須寫入到切換空間 (swap-space)20。而非清白指定分頁(dirty named page)則被換出 (swap-out)到檔案系統(fiie system) 18。當操作系統(⑹需要換出 (swap-out)—個清白儲存頁時’因為此分頁在第二儲存裝置16中必定 有-個内容完全-致_本’因此操作祕(⑹可以直接捨棄此分頁。 在系統開始執行SUSpend-t0_flash時,大部分的分頁不需要做任 何的寫回第二裝置16的動作,這是由敎部分的分頁都是清白儲 存頁。部分的分頁需要寫回到切換空Μ 2〇或者檔案系統18中。剩下 的分頁是非換出記憶體(_-swappable mem〇ry),這些分頁主要是 作系統(0S)的核心(kernel) ’或者程式為了效能的因素,將某些分頁 設定為非換出-卿pable)。賴綠鍾最後麵寫人到休眠楷 (hibernation file)22 。 重新開機時 梦殖籍ς'Η ^ 例行性硬體初始化動作及载入操作& ,真器(GS 1論〇後’錢會酬是否要從休嘛⑹伽相 態回復或執行-般的開機動作嗜眠槽(hibernati 1 料將首先載入到主記憶體14中,τ 一; 成基本的開機動作。隨後 ,、使用者的需要,從檔案系統18及切換^ 201111966 間20中將之前的系統狀態载回。若再次執行 pping-before-hibemating,由於部分非清白儲存頁在上—欠執行 swapping-before-hibernating時已經寫入切換空間2〇,因此這個= 頁就變成了清白赫頁,並且之後計算處理器咖)12不再對此八^ 作寫入的動作,故這個分頁不需要再次的寫人婦空間}因此在第 二次以後的swapping-before-hibernatinga行速度將更加快速。 以快閃記憶體(flash)做為第二儲存裝置16透過最佳化技術,可 在隨機存取(randan access)上有近似於連續存取(sequential咖⑹ 的表現。透過組合寫入(Write-combining)主要將記憶體頁在換出時 所產生的小的賴寫人(small random write),在實際寫人快閃記愫 體前先排列(queue)起來,首先針對這些要寫出分頁的實體位^ (Physical address)做排序,排序後便可知道這些要被寫出的分頁中 疋否存在著連續棚的寫出’之後便可以—個較大的寫人需要〜曲 request)取代數個較小的寫入。藉此提昇 swapping-before-hibernating 的速度。 少將換出分頁(swaPPable Pages)寫回第二儲存裝置16可經向操作 系統(0S)要求大量的記紐’為了避免操作祕(⑹於分配記憶體時 的最佳化動作影響到實際配置記憶體的數量。於每配置到一個分頁隨 即會在此分頁寫入一個位元組(byte)的資料,以強制〇s須立即配置 physical memory給該pr〇gram。藉此強迫操作系統(⑹將大部分的記 憶體換出。隨後執行一連串的釋放(free)動作,將之前向系統要求的 記憶體全數歸還給操作系統⑺幻。經過這二個步驟以後,操作系統(〇s) 中大部分的分頁都會變成自由分頁(free page),而自由分頁(free page)不而要寫回到休眠檔(hibernati〇n fiie)22。 此外’可直接在操作系統(〇S)的核心(kernel)中要求配置記憶 體,將透過核心程序(kernei functi〇n)立即配置所需的分頁,將不需 要額外的寫入以強制操作系統(0S)真實的配發記憶體。在配置完記憶 aa後立即執行釋放的動作,系統將產生大量的自由分頁(斤沈page)。 201111966 由於藉由核心、程序(kernel function)配置記.隨不需要額外的寫入 動作。因此可以事綺算換出分頁缝量,藉此推算出需要配置多少 記憶體。 另外’可直接操控操作系統(〇S)中的換出器(swapper)機制。以 Linux為例,在核心(kernel)中具有一記憶體管理程序,其係為 shrmk_all_memory程序,此程序將回收記憶體分頁,於呼叫其時傳 入欲回收的分頁數量,其能夠在不影響系統穩定、使用者使用程式的 情況下釋放出記憶體分頁。shrink—all_meinory程序的機制為在核心 (kernel)中有兩近來最少使用目錄(ieast-recently_used Hst,LRU 籲list)分別為活動目錄(active list)及閒置目錄(inactive Ust), 活動目錄(active list)包含了最近被存取過的分頁,閒置目錄 (inactive list)則為有段時間沒有被存取的分頁。 shrink_all_memory程序會先從閒置目錄(inactive list)開始回收’ 接著再回收活動目錄(active list)。利用shirink_all_memory程序, 可以在不影響到系統核心的運作'使用者的程式下’盡可能的換出。 在Linux之核心(kernel)中,第二儲存裝置16會被視為一般的 區塊輸入/輸出裝置(I/Odevice) ’而在我們將記憶體分頁換出到切換 空間20時’將呼叫submit_bio程序其所接受的參數包含了要寫入的 _ 區段數量(sector number)、讀取/寫入指令(r/w command)、記憶體位 址(memory address)、記憶體長度(memory length)等資訊。可以藉由 攔截submit_bio程序對即將被換出的分頁再進行處理。 上述之即將被換出的分頁係由shirink_al ljemory程序所決 定,決定的依據為此分頁的使用情況而非此分頁在主記憶體14中的實 體位址。我們將shirink_all_memory程序所產生的寫入需求先排列。 再依照此分頁的實體記憶體位址進行排序,並進行合併,以減少存取 輸入/輸出(I/O)的次數並增加此輸入/輸出(I/O)的需求大小(request size)。需求大小(request size)越大,將使得為快閃記憶體(flash) 之第二儲存裝置16的寫入效能越好。 201111966 當一個記憶體分頁被換出時,核心(kernel)需要紀錄此分頁在切換空 間20中所擺放的位置。使核心(kernel)能夠重新將此分頁從第二儲存 裝置20載入。由於組合寫入(write-combining)將重新改寫 shirink—all_memory 程序,當每次執行完 shirink_all_memory 程序 後’必須於確定了每個分頁寫入至切換空間20的位置後,再將資訊填 入到分頁表格(page table)中的換出分頁鑑別符(swapped__ 〇此仲 identifier) 〇 gPage), anonymous page (anonymous page) and designated page (named page). The free page is the memory that is not used by the system at the moment. The content in the free page is meaningless to the system. Anonymous page is the memory dynamically allocated by the program during the execution period. This part of the memory mainly includes stack and heap. The designated page is a copy of the broadcast in the main memory 14. Formally it behaves like a cache of the second storage device 16. The designated page mainly includes the executable file, the correspondence of the dynamic-linke library in the memory, or the program uses the memory corresponding to the file (memory-mapped-f i 1 e) Map a file to memory. Both an anonymous page and a named page may be a clean page or a dirty page. A non-invisible anonymous page must be written to the swap-space 20 when it is swapped out. The dirty named page is swapped out to the file system (fiie system) 18 . When the operating system ((6) needs to swap-out - innocent storage page 'because this page must have in the second storage device 16 - the content is completely - the _ the original" so the operation secret ((6) can directly discard this When the system starts executing SUSpend-t0_flash, most of the paging does not need to do any write back to the second device 16, which is because the partial pages are innocent to store the page. Part of the paging needs to be written back to the switch. Empty 2Μ or file system 18. The remaining pages are non-swappable memory (_-swappable mem〇ry), these pages are mainly used as the core of the system (0S) 'or program for performance reasons, Set some pagination to non-replacement-qing pable. Lai Qingzhong writes to hibernation file22 at the end. Re-boot when dreaming ς'Η ^ Routine hardware initialization action and loading Operation &, the real device (after the GS 1 ' ' 钱 钱 钱 钱 钱 钱 钱 ( ( ( ( 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 钱 钱 钱 钱 钱 钱 钱 钱 钱 钱 钱 钱 钱 钱τ a; into a basic boot action. Then, make The needs of the system, from the file system 18 and switch ^ 201111966 20 in the previous system state back. If pping-before-hibemating is executed again, because some non-innocent storage pages are on - under execution swapping-before-hibernating Write the switching space 2〇, so this = page becomes the innocence page, and then the processor processor 12 is no longer writing the action, so this page does not need to write the space again} Therefore, the swapping-before-hibernatinga line speed will be faster after the second time. The flash memory (flash) as the second storage device 16 can be optimized on the random access (randan access). Approximate to continuous access (sequential coffee (6) performance. Through write-combining, the memory page is mainly generated by the small random write generated by the memory page, in the actual write flash Before the carcass is queued, first sort the physical bits that are to be paged. After sorting, you can know whether there are continuous sheds in the pages to be written. Write 'after you can - a larger writer needs ~ song request) to replace several smaller writes. This improves the speed of swapping-before-hibernating. Majors swap out paging (swaPPable Pages) write back to the second The storage device 16 can request a large number of entries to the operating system (OS) to avoid the operational secrets ((6) the optimal operation when the memory is allocated affects the number of actual configuration memories. Each configuration to a page will then write a byte (byte) of data in this page to force 〇s to immediately configure physical memory to the pr〇gram. This forces the operating system ((6) to swap out most of the memory. Then perform a series of free actions, returning all the memory required by the system to the operating system (7). After these two steps, the operation Most of the paging in the system (〇s) becomes a free page, and the free page does not have to be written back to the hibernati〇n fiie 22. In addition, it can be directly in the operating system ( 〇S) The kernel (kernel) requires configuration memory, the required paging will be configured immediately through the kernel program (kernei functi〇n), no additional writes will be required to force the operating system (0S) true distribution memory The system performs a release action immediately after the memory aa is configured, and the system generates a large number of free pages. The 201111966 is configured by the kernel and the kernel function. No additional write actions are required. Therefore, you can calculate the amount of page breaks and calculate how much memory you need to configure. In addition, you can directly manipulate the swapper mechanism in the operating system (〇S). Take Linux as an example. There is a memory management program in the kernel, which is shrmk_all_memory program. This program will recycle the memory page, and the number of pages to be recycled will be transmitted when calling, which can affect the stability of the system and the user. In the case of the program, the memory page is released. The mechanism of the shrink-all_meinory program is that there are two recently used directories in the kernel (ieast-recently_used Hst, LRU list) are active list and idle directory. (inactive Ust), the active list contains the most recently accessed pages, and the inactive list is the pages that have not been accessed for a while. The shrink_all_memory program will first be from the inactive list. Start recycling 'and then recycle the active list. Use the shirink_all_memory program to swap out the program as much as possible without affecting the operation of the system core. In the kernel of Linux, second The storage device 16 will be treated as a general block input/output device (I/O device)' while we divide the memory When the page is swapped out to the switching space 20, the parameters accepted by the call submit_bio program include the number of sectors to be written (sector number), read/write command (r/w command), and memory address ( Memory address), memory length (memory length) and other information. The page to be swapped out can be processed by intercepting the submit_bio program. The above-mentioned paging that is to be swapped out is determined by the shirink_al ljemory program, and the decision is based on the use of the paging for this page rather than the physical address of the page in the main memory 14. We will first arrange the write requirements generated by the shirink_all_memory program. The physical memory addresses of this page are then sorted and merged to reduce the number of access/output (I/O) accesses and increase the input/output (I/O) request size. The larger the request size, the better the write performance of the second storage device 16 for flash memory. 201111966 When a memory page is swapped out, the kernel needs to record the position of this page in the switch space 20. The kernel is enabled to reload this page from the second storage device 20. Since the write-combining will rewrite the shirink_all_memory program, after each execution of the shirink_all_memory program, 'must determine the position of each page to be written to the switch space 20, then fill the information into the page. The page break discriminator in the table (swapped__ 〇 this identifier) 〇 g

r神所作之均 以上所述之實施例僅係為說明本發明之技術思想及特點,复 在使熟習此項技藝之人士能夠瞭解本發明之内容並據以實施,二的 以之限縣發明之專利細,較凡依本發騎揭示奸 *不能 等變化或修飾,仍應涵蓋在本發明之專利範圍内〇 " 【圖式簡單說明】 第一圖為本發明之架構示意圖。 第二圖為本發明之處理步驟流程圖。 【主要元件符號說明】 10電腦系統 12計算處理器 14主記憶體 • 16第二儲存裝置 W檔案系統 20切換空間 22休眠檔Rather, the embodiments described above are merely illustrative of the technical idea and features of the present invention, and those skilled in the art can understand the contents of the present invention and implement it according to the second invention. The patents are finer and more versatile and cannot be changed or modified according to the present invention. They should still be included in the scope of the patent of the present invention. The first figure is a schematic diagram of the structure of the present invention. The second figure is a flow chart of the processing steps of the present invention. [Main component symbol description] 10 computer system 12 calculation processor 14 main memory • 16 second storage device W file system 20 switching space 22 sleep file

Claims (1)

201111966 七、申請專利範圍: 卜-種快速顯機的方法,其係包括下列步驟: 於:ΐϊ入休眠,該電腦系統係區分至少-記憶體為複數個 二,ff複數個非清白儲存頁,且該清白儲存頁係換出放棄 儲存,該料白儲存頁係寫入休眠雛存於至少-第二儲存裝Ϊ 之一切換空間中或一擋案系統中;201111966 VII. Patent application scope: The method of quick-displaying machine includes the following steps: After entering sleep, the computer system distinguishes at least - the memory is plural, and ff is a plurality of non-innocent storage pages. And the innocent storage page is swapped out for abandonment storage, and the white storage page is written in the sleep storage space in at least one of the second storage devices or in a file system; 體 於該電腦系統重新啟動,該電腦系統由該切換空間與該槽案系統 取該休眠播,並將該休眠檔回復儲存至該記憶體;以及 該電腦系統從該第二儲存裝置讀取#料,並載人該f料至該記憶 2、如申請專利範圍第丨項所述之快速開關機的方法,其中在該電腦系 統進入休眠的步驟中’於該清白儲存頁係換出完成後,將釋放該記 憶體。 3、如申請專利細第2項所述之快韻_的方法,其巾在該電腦系 統進入休眠的步驟中,將以一核心程序配置該記憶體,控制該清白 儲存頁係換出,且於該清白儲存頁係換出完成後,控制釋放該記憔 體。 〜 4、 如申請專利範圍第3項所述之快速開關機的方法,其中該核心程序 可计异需換出之該清白儲存頁的數量’並依據該數量配置該記憶 體。 5、 如申請專利範圍第1項所述之快速開關機的方法,其中該第二儲存 裝置係可為一快閃記憶體。 6、 如申請專利範圍第1項所述之快速開關機的方法,其中該第二儲存 裝置係可為高速隨機存取之記憶體裝置。 7、 如申請專利範圍第1項所述之快速開關機的方法,其中其中在該電 腦系統進入休眠的步驟中’該電腦系統可以區做為區分該記憶體之 單位。 8、 如申請專利範圍第1項所述之快速開關機的方法,其中該第二儲存 201111966 裝置係具有與該清白儲存頁相一致的備份存放。 9、如申請專利範圍第1項所述之快速開關機的方法,其中在該電腦系 統進入休眠的步驟中,欲換出之該非清白儲存頁係將依位址排序, 且將位址連續之該非清白儲存頁合併成一單一寫入命令。Rebooting the computer system, the computer system takes the sleep broadcast by the switching space and the slot system, and restores the sleep file to the memory; and the computer system reads from the second storage device. And charging the material to the memory 2. The method of the fast switching machine according to the invention of claim 2, wherein in the step of the computer system entering the sleep state, after the whitening storage page is replaced Will release the memory. 3. The method according to claim 2, wherein in the step of the computer system entering a dormant state, the memory is configured by a core program, and the insulative storage page is controlled to be swapped out, and After the insufficiency of the insufficiency storage page is released, the control releases the recording body. The method of the fast switching machine according to claim 3, wherein the core program can count the number of the innocent storage pages that need to be swapped out and configure the memory according to the quantity. 5. The method of the fast switching machine of claim 1, wherein the second storage device is a flash memory. 6. The method of claim 1, wherein the second storage device is a high speed random access memory device. 7. The method of claim 1, wherein in the step of the computer system entering a hibernation, the computer system can be used as a unit for distinguishing the memory. 8. The method of claim 1, wherein the second storage 201111966 device has a backup storage consistent with the insufficient storage page. 9. The method of claim 1, wherein in the step of entering the sleep of the computer system, the non-innocent storage page to be swapped out is sorted according to the address, and the address is continuous. The non-innocent storage pages are merged into a single write command. 1111
TW098131936A 2009-09-22 2009-09-22 Fast switch machine method TWI399637B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW098131936A TWI399637B (en) 2009-09-22 2009-09-22 Fast switch machine method
KR1020100092274A KR101392062B1 (en) 2009-09-22 2010-09-20 Fast speed computer system power-on & power-off method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW098131936A TWI399637B (en) 2009-09-22 2009-09-22 Fast switch machine method

Publications (2)

Publication Number Publication Date
TW201111966A true TW201111966A (en) 2011-04-01
TWI399637B TWI399637B (en) 2013-06-21

Family

ID=43937686

Family Applications (1)

Application Number Title Priority Date Filing Date
TW098131936A TWI399637B (en) 2009-09-22 2009-09-22 Fast switch machine method

Country Status (2)

Country Link
KR (1) KR101392062B1 (en)
TW (1) TWI399637B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176813A (en) * 2011-12-21 2013-06-26 财团法人工业技术研究院 Method for dormancy mechanism and computer system thereof
US9069573B2 (en) 2012-09-19 2015-06-30 Industrial Technology Research Institute Method for generating reduced snapshot image for booting and computing apparatus
CN104750227A (en) * 2013-12-27 2015-07-01 财团法人工业技术研究院 Dormancy awakening method and electronic device
TWI490692B (en) * 2011-05-27 2015-07-01 Hon Hai Prec Ind Co Ltd Computer's state quick switch method and system
TWI646463B (en) * 2013-12-27 2019-01-01 財團法人工業技術研究院 Electronic apparatus and method for resuming from hibernation

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102011059B1 (en) * 2015-03-20 2019-08-16 한국전자통신연구원 Apparatus and Method for updating a snapshot image
CN114895969A (en) * 2022-05-25 2022-08-12 统信软件技术有限公司 Operating system sleeping method and device, computing equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003263366A (en) 2002-03-12 2003-09-19 Hitachi Ltd Swapping control method, its execution device and its processing program
US7017037B2 (en) * 2002-06-27 2006-03-21 Microsoft Corporation Apparatus and method to decrease boot time and hibernate awaken time of a computer system utilizing disk spin-up-time
TW591373B (en) * 2002-11-15 2004-06-11 Acer Inc Handheld device having sleep function and the operating method thereof
US20060053325A1 (en) * 2004-09-03 2006-03-09 Chary Ram V Storing system information in a low-latency persistent memory device upon transition to a lower-power state
JP4831418B2 (en) * 2006-12-28 2011-12-07 ソニー株式会社 Information processing apparatus and method, and program
TW200937177A (en) * 2008-02-29 2009-09-01 Hon Hai Prec Ind Co Ltd Method for switching work states of a computer

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI490692B (en) * 2011-05-27 2015-07-01 Hon Hai Prec Ind Co Ltd Computer's state quick switch method and system
CN103176813A (en) * 2011-12-21 2013-06-26 财团法人工业技术研究院 Method for dormancy mechanism and computer system thereof
US9069573B2 (en) 2012-09-19 2015-06-30 Industrial Technology Research Institute Method for generating reduced snapshot image for booting and computing apparatus
TWI514278B (en) * 2012-09-19 2015-12-21 Ind Tech Res Inst Method for generating a reduced snapshot image for booting, computing apparatus readable recording medium, and computing apparatus
CN104750227A (en) * 2013-12-27 2015-07-01 财团法人工业技术研究院 Dormancy awakening method and electronic device
US9594572B2 (en) 2013-12-27 2017-03-14 Industrial Technology Research Institute Electronic apparatus and method for resuming from hibernation
CN104750227B (en) * 2013-12-27 2017-10-13 财团法人工业技术研究院 Dormancy awakening method and electronic device
TWI610239B (en) * 2013-12-27 2018-01-01 財團法人工業技術研究院 Electronic apparatus and method for resuming from hibernation
TWI646463B (en) * 2013-12-27 2019-01-01 財團法人工業技術研究院 Electronic apparatus and method for resuming from hibernation

Also Published As

Publication number Publication date
TWI399637B (en) 2013-06-21
KR101392062B1 (en) 2014-05-07
KR20110033066A (en) 2011-03-30

Similar Documents

Publication Publication Date Title
JP4281421B2 (en) Information processing system, control method therefor, and computer program
US7093089B2 (en) Systems and methods for storing data on computer systems
Leventhal Flash storage memory
TWI528284B (en) Method for switching operating system and electronic apparatus using thereof
US8930732B2 (en) Fast speed computer system power-on and power-off method
TWI388983B (en) A method and system for facilitating fast wake-up of a flash memory system
TW201111966A (en) Method for fast turning on and off a machine
TW201942738A (en) Electronic device, computer system, and control method
US20100070747A1 (en) Managing cache data and metadata
EP1351146A1 (en) Power management system and method with recovery after power failure
WO2015135506A1 (en) Method for controlling memory device to achieve more power saving and related apparatus thereof
TW201017405A (en) Improved hybrid drive
US8868856B2 (en) Storage system with reduced energy consumption
CN100538641C (en) The method of operation calculation device
TW201011524A (en) Method and controller for power management
JP2014086052A (en) Information processing device and method therefor
TW200921385A (en) Storage system for improving efficiency in accessing flash memory and method for the same
CN103914325B (en) Shutdown and startup method and system of Linux system based on hybrid memory
JPH0944418A (en) Information-processing system and its control method
JP5166211B2 (en) Device using non-volatile memory as main memory
WO2019041903A1 (en) Nonvolatile memory based computing device and use method therefor
Lo et al. Swap-before-hibernate: a time efficient method to suspend an OS to a flash drive
CN113986540B (en) Method and device for regularly recycling linux cache
TWI352906B (en) Method, microprocessor system, medium, memory elem
CN100485617C (en) Computer system for rapidly activating system program