Efficient Checkpoint under Unstable Power Supplies on NVM Based Devices.
Jialin Liu,Edwin H.-M. Sha,Qingfeng Zhuge,Rui Xu,Yuhong Song
DOI: https://doi.org/10.1109/hpcc-dss-smartcity-dependsys57074.2022.00278
2022-01-01
Abstract:In smart cities, many embedded devices' power supply lacks stability, e.g., solar panel, since they are used outdoors. In these systems, power failures can cause data lost if the data is kept on volatile media like DRAM. Thus, using a backup mechanism to record the program status is necessary for the program going forward. Non-volatile memory (NVM) provides systems with a convenient method to persist the programs' status. However, NVM is notorious for poor write endurance. In this paper, we propose an automatic checkpoint mechanism that can reduce NVM write wear. Firstly, the checkpoint trigger code is instrumented into every basic block to achieve automatic runtime checkpoint activation. Then, when the program triggers checkpoint, the checkpoint procedure incrementally updates program state's backup to reduce redundant NVM writes. In this step, we select what to back up by determining the activated stack frame. Also, our mechanism has two backup copies to avoid power loss corrupting the backup content by interrupting the checkpoint procedure. Finally, we design an update log queue to fine-grained update of global data so that the NVM write can be reduced. Experiments show that our mechanism can effectively reduce total NVM write overhead with acceptable execution overhead.