skip to main content
10.1145/2517349.2522718acmconferencesArticle/Chapter ViewAbstractPublication PagessospConference Proceedingsconference-collections
research-article
Open Access

Fast dynamic binary translation for the kernel

Published:03 November 2013Publication History

ABSTRACT

Dynamic binary translation (DBT) is a powerful technique with several important applications. System-level binary translators have been used for implementing a Virtual Machine Monitor [2] and for instrumentation in the OS kernel [10]. In current designs, the performance overhead of binary translation on kernel-intensive workloads is high. e.g., over 10x slowdowns were reported on the syscall nanobenchmark in [2], 2-5x slowdowns were reported on lmbench microbenchmarks in [10]. These overheads are primarily due to the extra work required to correctly handle kernel mechanisms like interrupts, exceptions, and physical CPU concurrency.

We present a kernel-level binary translation mechanism which exhibits near-native performance even on applications with large kernel activity. Our translator relaxes transparency requirements and aggressively takes advantage of kernel invariants to eliminate sources of slowdown. We have implemented our translator as a loadable module in unmodified Linux, and present performance and scalability experiments on multiprocessor hardware. Although our implementation is Linux specific, our mechanisms are quite general; we only take advantage of typical kernel design patterns, not Linux-specific features. For example, our translator performs 3x faster than previous kernel-level DBT implementations while running the Apache web server.

Skip Supplemental Material Section

Supplemental Material

d1-07-sorav-bansal.mp4

mp4

1.1 GB

References

  1. BTKernel: Fast Dynamic Binary Translation for the Kernel. https://github.com/piyus/btkernel, as on September 15, 2013.Google ScholarGoogle Scholar
  2. K. Adams and O. Agesen. A comparison of software and hardware techniques for x86 virtualization. In ASPLOS '06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. O. Agesen, A. Garthwaite, J. Sheldon, and P. Subrahmanyam. The evolution of an x86 virtual machine monitor. SIGOPS Oper. Syst. Rev., 44(4), Dec. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: a transparent dynamic optimization system. ACM SIGPLAN Notices, 35(5):1--12, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. N. Bershad, D. D. Redell, and J. R. Ellis. Fast mutual exclusion for uniprocessors. In ASPLOS '92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Bruening. Efficient, Transparent and Comprehensive Runtime Code Manipulation. PhD thesis, MIT, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Bruening, Q. Zhao, and S. Amarasinghe. Transparent dynamic instrumentation. In VEE '12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Bugnion. Binary translator with precise exception synchronization mechanism. US Patent 7516453, filed June 2000.Google ScholarGoogle Scholar
  9. P. P. Bungale and C.-K. Luk. PinOS: a programmable framework for whole-system dynamic instrumentation. In VEE '07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Feiner, A. D. Brown, and A. Goel. Comprehensive kernel instrumentation via dynamic binary translation. In ASPLOS '12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. B. Ford and R. Cox. Vx32: lightweight user-level sand-boxing on the x86. In USENIX ATC'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. V. Kiriansky, D. Bruening, and S. Amarasinghe. Secure execution via program shepherding. In USENIX Security '02. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood. Pin: building customized program analysis tools with dynamic instrumentation. In PLDI '05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Nagarakatte, S. Burckhardt, M. M. Martin, and M. Musuvathi. Multicore acceleration of priority-based schedulers for concurrency bug detection. In PLDI '12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. SIGPLAN Not., 42(6):89--100, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Olszewski, K. Mierle, A. Czajkowski, and A. D. Brown. Jit instrumentation: a novel approach to dynamically instrument operating systems. In EuroSys '07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Song et. al. Bitblaze: A new approach to computer security via binary analysis. In ICISS '08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: characterization and methodological considerations. In ISCA '95. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Q. Zhao, D. Koh, S. Raza, D. Bruening, W.-F. Wong, and S. Amarasinghe. Dynamic cache contention detection in multi-threaded applications. In VEE '11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Q. Zhao, R. Rabbah, S. Amarasinghe, L. Rudolph, and W.-F. Wong. How to do a million watchpoints: efficient debugging using dynamic instrumentation. In CC'08/ETAPS'08. Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Conferences
    SOSP '13: Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles
    November 2013
    498 pages
    ISBN:9781450323888
    DOI:10.1145/2517349

    Copyright © 2013 Owner/Author

    Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 3 November 2013

    Check for updates

    Qualifiers

    • research-article

    Acceptance Rates

    Overall Acceptance Rate131of716submissions,18%

    Upcoming Conference

    SOSP '24

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader