A Program Code Compression Method with Very Fast Decoding for Mobile Devices

휴대장치를 위한 고속복원의 프로그램 코드 압축기법

  • 김용관 (아주대학교 정보통신대학원 컴퓨터공학과) ;
  • 위영철 (아주대학교 정보 및 컴퓨터공학부)
  • Received : 2010.08.17
  • Accepted : 2010.09.11
  • Published : 2010.11.15

Abstract

Most mobile devices use a NAND flash memory as their secondary memory. A compressed code of the firmware is stored in the NAND flash memory of mobile devices in order to reduce the size and the loading time of the firmware from the NAND flash memory to a main memory. In order to use a demand paging properly, a compressed code should be decompressed very quickly. The thesis introduces a new dictionary based compression algorithm for the fast decompression. The introduced compression algorithm uses a different method with the current LZ method by storing the "exclusive or" value of the two instructions when the instruction for compression is not equal to the referenced instruction. Therefore, the thesis introduces a new compression format that minimizes the bit operation in order to improve the speed of decompression. The experimental results show that the decoding time is reduced up to 5 times and the compression ratio is improved up to 4% compared to the zlib. Moreover, the proposed compression method with the fast decoding time leads to 10-20% speed up of booting time compared to the booting time of the uncompressed method.

대부분의 휴대기기는 보조 기억장치로 NAND flash 메모리를 사용하고 있다. 또한, firmware의 크기를 줄이고 NAND flash로부터 주기억장치로 로딩하는 시간을 줄이기 위해서 압축된 코드를 NAND flash에 저장한다. 특히, 압축된 코드는 매우 빠르게 해제가 되어야 demand paging 이 적용 가능하게 된다. 본 논문에서는 이를 위하여 새로운 사전식 압축 알고리즘을 제안한다. 이 압축방식은 기존의 LZ형식과는 다르게 현재 압축하고자 하는 명령어(instruction)가 참조된 명령어와 같지 않을 경우, 프로그램 코드의 명령어의 특성을 이용하여 두 명령어의 배타 논리합(exclusive or) 값을 저장하는 방식이다. 또한, 압축 해제 속도를 빠르게 하기 위해서, 비트 단위의 연산을 최소화한 압축형식을 제공한다. 실험결과 zlib과 비교해서 최대 5배의 압축해제 속도와 4%의 압축률 향상이 있었으며, 이와 같이 매우 빠른 압축해제 속도에 따라 부팅 (booting) 시간이 10~20% 단축되었다.

Keywords

References

  1. A. Wolfe and A. Chanin, "Executing compressed programs on an embedded RISC architecture," Proc. 25th Ann. International Symposium on Micro architecture, pp.81-91, December 1992.
  2. S. Seong and P. Mishra, "Bitmask-based code compression for embedded systems," IEEE Trans. CAD, vol.27, no.4, pp.673-685, 2008. https://doi.org/10.1109/TCAD.2008.917563
  3. H. Lekatsas, J. Henkel, and W. Wolf, "Code Compression for Low Power Embedded System Design," Proc. ACM/IEEE Design Automation Conference, Los Angeles, CA, June 2000.
  4. X. Xu, S. Jones, C. Clarke, "ARM/THUMB code compression for embedded systems," 15th International Conference on Microelectronics (ICM 2003), 9-11 December 2003, Cairo, Egypt.
  5. N. Aslam, M. J. Milward, A. T. Erdogan, and T.Arslan, "Code Compression and Decompression for Coarse-Grain Reconfigurable Architectures," IEEE Trans. Very Large Scale Integration (VLSI) Systems, vol.16, no.12, December 2008.
  6. M. Kozuch and A. Wolfe, "Compression of embedded system programs," Proc. Int. Conf. on Computer Design, 1994.
  7. E.-h. Yang and J. C. Kieffer, "On the redundancy of the fixed database Lempel-Ziv algorithm for mixing sources," IEEE Trans. Inform. Theory, vol.43, pp.1101-1111, July 1997. https://doi.org/10.1109/18.605570
  8. J. N. Larsson, and A. Moffat, "Offline dictionary based compression," Proc. Data Compression Conference '99, pp.296-305, 1999.
  9. C. Nevill-Manning and I. Witten, "Compression and Explanation using Hierarchical Grammars," the Computer Journal, vol.40, no.2/3, pp.103-116, 1997. https://doi.org/10.1093/comjnl/40.2_and_3.103
  10. H.E. Yang and C. J. Keiffer, "Efficient universal lossless data compression algorithm on a greedy sequential grammar transform," IEEE Trans. Inf. Theory, vol.46, no.3, pp.755-777, 2000. https://doi.org/10.1109/18.841161
  11. A. J. Storer J, and G. T. Szymanski, "Data Compression via Textual Substitution," JACM vol.29, no.4, pp.928-951, 1982. https://doi.org/10.1145/322344.322346
  12. C. Park, J.-U. Kang, S.-Y. Park and J.-S. Kim, "Energy-aware demand paging on NAND flashbased embedded storages," in Proceedings of the 2004 International Symposium on Low Power Electronics and Design (ISLPED'04), pp.338-343, Newport, USA, August 2004.
  13. Hirschberg, D.S., "'Algorithms for the Longest Common Subsequence Problem," Journal of ACM, vol.24, no.4, pp.664-675, 1977. https://doi.org/10.1145/322033.322044