Ubiquitous Computing and Communication Journal
Demand Prepaging for Flash Memory Using Static Program Analysis
Dong-Yun Shin, Youngho Lee, Sung-Soo Lim
Kookmin University, Koreaelsdy@kookmin.ac.kr,firstname.lastname@example.org,email@example.com
This paper proposes prepaging scheme using static program analysis to improvethe predictability of execution behaviors of applications in embedded systemsequipped with flash memory. We built a static program analyzer and the RTOS-based reference platform equipped with flash memory implementing the demandprepaging scheme proposed in this paper. Evaluation results show that theproposed prepaging scheme shows competitive execution times and improvedmemory consumption and prepaging hit ratio results compared to sequentialprepaging.
Demand Prepaging, Flash memory, Static Program Analysis, PageFault Ratio.
As the applications of embedded systems arebeing diversified, the memory requirements andperformance demands are being increasedsignificantly. Therefore, the demand paging, whichhas been used for general purpose systems as amandatory method to make memory usage efficient,starts to be used in embedded systems equipped withflash memory. One big drawback of using demandpaging is in performance predictability: since thepage fault event has history sensitive nature in virtualmemory system, predicting exactly the hit/miss of every page access from the page table is not possible.Such drawback prevents the demand paging frombeing used in embedded real-time systems with firmor hard timing requirements.One possible solution of improving demandpaging performance would be prefetching the pagesthat are to be accessed in future and eliminating mostof the page faults of future page accesses. Oneextreme solution of the prefetching would beshadowing which fetches all the pages of targetapplication before run-time. However, shadowingwould consume significant memory and causetremendous startup time of every application. If wewould like to avoid the impractical overhead of shadowing, we could prefetch small amount of pagesbefore those pages are actually accessed makingprefetching of pages distributed over the wholeexecution period. This effectively divides a wholeprogram execution into two different phases:prefetching and running phases. By separating theprefetching stage and running stage of theapplications, the predictability of executionperformance of each program could be improvedsince we could predict the execution time of theprogram as the actual execution time excluding mostof the page fault handling time. Figure 1 shows theseparation of prepaging phase and task executionphase.
Figure 1: Demand paging and prepaging
Prefetching useful pages before the actualaccesses of the pages requires identification of theuseful pages that are expected to be fetched at run-time. This necessitates the analysis of useful pageaccess sequences statically. This paper proposes aprepaging technique analyzing the page accesssequence using a static program analysis method andapplying the static analysis results to prefetching thepages that are analyzed as the potentially accessedpages at run-time. The proposed static programanalysis technique transforms target applications intocontrol flow graphs and extracts corresponding page