DOI QR코드

DOI QR Code

Design and Implementation of Kernel Binder Cache for Accelerating Android IPC

안드로이드 IPC 가속화를 위한 커널 바인더 캐쉬의 설계 및 구현

  • 연제성 (충북대학교 소프트웨어학과) ;
  • 고건 (서울대학교 컴퓨터공학과) ;
  • 이은지 (충북대학교 소프트웨어학과)
  • Received : 2016.07.01
  • Accepted : 2016.10.07
  • Published : 2016.10.31

Abstract

In Android platform, as applications invoke various service functions through IPC (Inter-Process Communication), IPC performance is critical to the responsiveness in Android. However, Android offers long IPC latency of hundreds of micro-seconds due to complicated software stacks between the kernel Binder and the user-level process Context Manager. This separation provides modularity and flexibility, but degrades the responsiveness of services owing to additional context switching and inefficient request handling. In this paper, we anatomize Android IPC mechanisms and observe that 55% of IPC latency comes from the communication overhead between Binder and Context Manager. Based on this observation, this paper proposes a kernel Binder cache that retains a popular subset of service function mappings, thereby reducing the requests transferred to the user-level daemon. The proposed Binder cache is implemented in Android 5.0 and experimental results with various benchmarks show that the proposed cache architecture improves performance by 52.9% on average.

현재 안드로이드는 유저 레벨의 데몬들을 통하여 시스템에 필요한 기능을 서비스 함수로 지원하고 IPC를 사용해 호출되도록 한다. 그런데 서비스 함수를 관리하는 작업이 빈번하게 사용되는 Critical Path 임에도 불구하고, 유저 레벨 프로세스가 수행하도록 되어 있다. 이러한 분리된 구조는 모듈성과 유연성의 관점에서 효율적이지만 복잡한 소프트웨어 스택 및 컨텍스트 스위치 오버헤드 등으로 서비스 응답 시간이 상당히 저하된다. 본 논문에서는 안드로이드 IPC 매커니즘의 병목점이 되는 부분을 분석하고 개선함으로써 이러한 문제를 해결한다. 우리는 IPC 지연 시간 중 55%가 커널과 컨텍스트 매니저 사이의 커뮤니케이션 오버헤드인 것을 발견하고, 서비스 함수 중 자주 접근되는 것들에 대한 정보는 커널 내에 캐쉬 형태로 유지하는 기법을 제안한다. 제안된 IPC 캐쉬는 안드로이드 5.0에 구현되었으며, 다양한 모바일 벤치마크를 통해 성능평가를 수행한 결과 52.9%의 성능이 향상되었다.

Keywords

References

  1. J. Kim, H. Bahn, "Analysis of Users' Gestures by Application in Smartphone Touch Interfaces," The Journal of The Institute of Internet, Broadcasting and Communication(JIIBC), Vol. 15, No. 2, pp. 9-14, 2015 https://doi.org/10.7236/JIIBC.2015.15.2.9
  2. http://elinux.org/Android_Binder
  3. J. Liedtke, "Improving IPC by Kernel Design," Proceedings of the 14th ACM Symposium on Operating Systems Principles (SOSP), 1993.
  4. D. Wentzlaff and A. Agarwal, "Factored operating systems (fos): the case for a scalable operating system for multicores," ACM SIGOPS Operating Systems Review, Vol. 43, No. 2, pp. 76-85, 2009. https://doi.org/10.1145/1531793.1531805
  5. K. Elphinstone and G. Heiser, "From L3 to seL4 - what have we learnt in 20 years of L4 microkernels?" Proceedings of the 24th ACM Symposium on Operating Systems Principles (SOSP), 2013.
  6. A. Baumann, P. Barham, Pierre-Evariste, T. Harris, R. Isaacs, S. Peter, T. Roscoe, A. Schupbach, and A. Singhania, "The multikernel: a new OS architecture for scalable multicore systems," Proceedings of the 22nd ACM Symposium on Operating Systems Principles (SOSP). 2011.
  7. H. S. Choi, H. C. Yun, "Context Switching and IPC Performance Comparison between uClinux and Linux on the ARM9 based Processor," SAMSUNG Tech. Conf., 2005.
  8. E. Chin, A. P. Felt, K. Greenwood, and D. Wagner, "Analyzing inter-application communication in Android," Proceedings of the 9th ACM International Conference on Mobile Systems, Applications, and Services (MobiSys), 2011.
  9. M. Ongtang, S. McLaughlin, W. Enck, and P. McDaniel, "Semantically Rich Application-Centric Security in Android," Proceedings of the 2009 Annual Computer Security Applications Conference, 2009.
  10. C. Yoon, D. Kim, W. Jung, C. Kang, and H. Cha, "AppScope: application energy metering framework for android smartphones using kernel activity monitoring," Proceedings of the USENIX Annual Technical Conference (ATC), 2012.
  11. W. Enck, D. Octeau, P. McDaniel, S. Chaudhuri, "A study of android application security," Proceedings of the 20th USENIX Conference on Security, 2011.
  12. http://developer.android.com/tools/help/monkey.html