Department of Computer Science and Technology

Technical reports

Interpretational overhead in system software

Boris Feigin

April 2011, 116 pages

This technical report is based on a dissertation submitted September 2010 by the author for the degree of Doctor of Philosophy to the University of Cambridge, Homerton College.

DOI: 10.48456/tr-797

Abstract

Interpreting a program carries a runtime penalty: the interpretational overhead. Traditionally, a compiler removes interpretational overhead by sacrificing inessential details of program execution. However, a broad class of system software is based on non-standard interpretation of machine code or a higher-level language. For example, virtual machine monitors emulate privileged instructions; program instrumentation is used to build dynamic call graphs by intercepting function calls and returns; and dynamic software updating technology allows program code to be altered at runtime. Many of these frameworks are performance-sensitive and several efficiency requirements—both formal and informal—have been put forward over the last four decades. Largely independently, the concept of interpretational overhead received much attention in the partial evaluation (“program specialization”) literature. This dissertation contributes a unifying understanding of efficiency and interpretational overhead in system software.

Starting from the observation that a virtual machine monitor is a self-interpreter for machine code, our first contribution is to reconcile the definition of efficient virtualization due to Popek and Goldberg with Jones optimality, a measure of the strength of program specializers. We also present a rational reconstruction of hardware virtualization support (“trap-and-emulate”) from context-threaded interpretation, a technique for implementing fast interpreters due to Berndl et al.

As a form of augmented execution, virtualization shares many similarities with program instrumentation. Although several low-overhead instrumentation frameworks are available on today’s hardware, there has been no formal understanding of what it means for instrumentation to be efficient. Our second contribution is a definition of efficiency for program instrumentation in the spirit of Popek and Goldberg’s work. Instrumentation also incurs an implicit overhead because instrumentation code needs access to intermediate execution states and this is antagonistic to optimization. The third contribution is to use partial equivalence relations (PERs) to express the dependence of instrumentation on execution state, enabling an instrumentation/optimization trade-off. Since program instrumentation, applied at runtime, constitutes a kind of dynamic software update, we can similarly restrict allowable future updates to be consistent with existing optimizations. Finally, treating “old” and “new” code in a dynamically-updatable program as being written in different languages permits a semantic explanation of a safety rule that was originally introduced as a syntactic check.

Full text

PDF (1.2 MB)

BibTeX record

@TechReport{UCAM-CL-TR-797,
  author =	 {Feigin, Boris},
  title = 	 {{Interpretational overhead in system software}},
  year = 	 2011,
  month = 	 apr,
  url = 	 {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-797.pdf},
  institution =  {University of Cambridge, Computer Laboratory},
  doi = 	 {10.48456/tr-797},
  number = 	 {UCAM-CL-TR-797}
}