错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

An Adaptive Real-Time Garbage Collection Method Based on File Write Prediction

  • Jingjing Jiang,
  • Mengfei Yang,
  • Lei Qiao,
  • Tingyu Wang,
  • Zhi Ma,
  • Shaofeng Li,
  • Shenghui Zhu

摘要

Garbage collection is a significant way to ensure free space for the flash file system. In real-time embedded systems, the system response time is significant for tasks. Motivated by the need to optimize the system response time and the garbage collection overhead in the embedded flash file system, we propose an adaptive trigger garbage collection based on write periodicity prediction (called PWAgc) to efficiently optimize the worst-case response time and average response time. We also propose an optimal block partition selection method to reduce valid page copy overhead and victim block selection time. We implement our method based on yaffs2 and compare PWAgc with several classical real-time garbage collection methods based on benchmark traces. The results show that for the worst write response time, PWAgc can reduce 35 \(\%\) –70 \(\%\) by the hybrid method, 7 \(\%\) –56 \(\%\) by the on-demand partial method, and 25.47 \(\%\) –72 \(\%\) by the on-demand concentrate method in three workloads. The average response time of PWAgc is similar to other methods. The average page copy and block erase count per write are similar. We also conducted experiments using a real-world application, and the results showed that PWAgc can reduce 14.95 \(\%\) –31.4 \(\%\) for file write worst response time, improve 1.32 \(\%\) –5.36 \(\%\) for write bandwidth, reduce 5.87 \(\%\) –8.5 \(\%\) for average page copy count and reduce 1.59 \(\%\) –2.1 \(\%\) for average block erase count compared with the other three methods. Our method can be used in some real-time embedded systems that have periodic and regular file write operations.