間歇計算設備中快閃記憶體檢查點的精細選擇性撤消
Fine-Grained, Selective Undo for Flash-Storage Checkpoint in Intermittent Computing Devices
摘要
能源採集技術加深了不需要電池當能源的嵌入式應用。然而,因為不穩定的環境能源,在能源採集裝置上運算常常會經歷到頻繁的斷電。藉由配備非揮發性的、可以字節尋址的記憶體,在這類裝置上的運算會取決於目前的能源量,在暫停之後繼續。雖然非揮發性的工作記憶體讓這樣的間歇式計算實現,但因為昂貴的價格,使它並不適合用來儲存資料。這篇研究對準一種混合的記憶體架構,它是用鐵電隨機存取記憶體(FRAM)來當作工作記憶體,且用NOR型的快閃記憶體(NOR flash)來儲存資料以及程式碼。傳統以寫入時複製為基礎的檢查點技術會週期性的備份工作記憶體,然後在斷電之後回復系統狀態。然而,因為在快閃記憶體上的更動是持久的,僅僅回存工作記憶體的狀態會意外的產生應用程序和快閃記憶體之間狀態的不一致。此外,因為快閃記憶體的擦除單位很大,使得在快閃記憶體上,寫入時複製的成本會很高。由於這些問題,這篇研究介紹了一個精細的、以撤銷為基礎的快閃記憶體檢查點機制。
基本的想法是對最近在快閃記憶體上的改變動作保留一份歷史紀錄。當系統從一個斷電事件中恢復後,在最近一次檢查點之後的改變會被棄置,因此應用程序和快閃記憶體的狀態會是相容的。實驗結果顯示,藉由使用一個只有3KB 大的撤回日誌,我們的提出的方法減少了73.5% 的運行及恢復的時間成本。
基本的想法是對最近在快閃記憶體上的改變動作保留一份歷史紀錄。當系統從一個斷電事件中恢復後,在最近一次檢查點之後的改變會被棄置,因此應用程序和快閃記憶體的狀態會是相容的。實驗結果顯示,藉由使用一個只有3KB 大的撤回日誌,我們的提出的方法減少了73.5% 的運行及恢復的時間成本。
Energy-harvesting techniques enable deeply embedded applications without batteries as the energy source. However, computation on energy-harvesting devices will be experiencing frequent power outage due to the unstable environmental energy source. With non-volatile, byte addressable memory, computation on such devices suspends and resumes depending on the current level of energy. Although non-volatile working memory enables such intermittent computation, it is not suitable for data storage due to its relatively higher price. This study aims for a hybrid memory architecture consisting of FRAM as the working memory and NOR flash as the storage of data and code. Conventional copy-on-write-based checkpoint techniques periodically make a backup of the working memory and reverts the system stats upon power interruption. However, because changes made to flash memory are persistent, solely restoring the working-memory status unexpectedly create inconsistency between the application process contexts and the flash status. In addition, the overhead of copy-on-write on flash memory is high due to the large size of flash erasure. Motivated by these problems, this study introduces a fine-grained, undo-based checkpoint method for flash memory. The basic idea is to keep a history of the recent changes made to flash memory. When the system recovers from a power fail event, the changes after the latest checkpoint will be discarded so that the application contexts and flash status are compatible to each other. Experimental results show that our approach reduces the runtime and recovery overhead 73.5% by using only 3KB size of undo log.