ABSTRACT
Many important applications must run continuously and without interruption, yet must be changed to fix bugs or upgrade functionality. No prior general-purpose methodology for dynamic updating achieves a practical balance between flexibility, robustness, low overhead, and ease of use.
We present a new approach for C-like languages that provides type-safe dynamic updating of native code in an extremely flexible manner (code, data, and types may be updated, at programmer-determined times) and permits the use of automated tools to aid the programmer in the updating process. Our system is based on dynamic patches that both contain the updated code and the code needed to transition from the old version to the new. A novel aspect of our patches is that they consist of verifiable native code (e.g. Proof-Carrying Code [17] or Typed Assembly Language [16]), which is native code accompanied by annotations that allow on-line verification of the code's safety. We discuss how patches are generated mostly automatically, how they are applied using dynamic-linking technology, and how code is compiled to make it updateable.
To concretely illustrate our system, we have implemented a dynamically-updateable web server, FlashEd. We discuss our experience building and maintaining FlashEd. Performance experiments show that for FlashEd, the overhead due to updating is typically less than 1%.
- 1.The apache software foundation. http://www.apache.org.]]Google Scholar
- 2.A. Appel. Hot-sliding in ML, December 1994. Unpublished manuscript.]]Google Scholar
- 3.J. Armstrong, R. Virding, C. Wikstrom, and M. Williams. Concurrent Programming in Erlang. Prentice Hall, second edition, 1996.]] Google ScholarDigital Library
- 4.T. Bloom. Dynamic Module Replacement in a Distributed Programming System. PhD thesis, Laboratory for Computer Science, The Massachussets Institute of Technology, March 1983.]]Google Scholar
- 5.B. Buck and J. K. Hollingsworth. An API for runtime code patching. Journal of High Performance Computing Applications, 14(4):317-329, 2000.]] Google ScholarDigital Library
- 6.O. Frieder and M. E. Segal. On dynamically updating a computer program: From concept to prototype. Journal of Systems and Software, 14(2):111-128, September 1991.]] Google ScholarDigital Library
- 7.S. Gilmore, D. Kirli, and C. Walton. Dynamic ML without Dynamic Types. Technical Report ECS-LFCS-97-378, Laboratory for the Foundations of Computer Science, The University of Edinburgh, December 1997.]]Google Scholar
- 8.D. Grossman and G. Morrisett. Scalable certification for Typed Assembly Language. In R. Harper, editor, Proceedings of the ACM SIGPLAN Workshop on Types in Compilation, volume 2071 of Lecture Notes in Computer Science. Springer-Verlag, October 2000.]] Google ScholarDigital Library
- 9.D. Gupta, P. Jalote, and G. Barua. A formal framework for on-line software version change. Transactions on Software Engineering, 22(2):120-131, February 1996.]] Google ScholarDigital Library
- 10.M. Hicks. Dynamic Software Updating. PhD thesis, Department of Computer and Information Science, University of Pennsylvania, August 2001.]] Google ScholarDigital Library
- 11.M. Hicks, S. Weirich, and K. Crary. Safe and flexible dynamic linking of native code. In R. Harper, editor, Proceedings of the ACM SIGPLAN Workshop on Types in Compilation, volume 2071 of Lecture Notes in Computer Science. Springer-Verlag, September 2000.]] Google ScholarDigital Library
- 12.G. Hjalmtysson and R. Gray. Dynamic C++ classes, a lightweight mechanism to update code in a running program. In Proceedings of the USENIX Annual Technical Conference, June 1998.]] Google ScholarDigital Library
- 13.I. Lee. DYMOS: A Dynamic Modification System. PhD thesis, Department of Computer Science, University of Wisconsin, Madison, April 1983.]] Google ScholarDigital Library
- 14.S. Malabarba, R. Pandey, J. Gragg, E. Barr, and J. F. Barnes. Runtime support for type-safe dynamic Java classes. In Proceedings of the Fourteenth European Conference on Object-Oriented Programming, June 2000.]] Google ScholarDigital Library
- 15.G. Morrisett, K. Crary, N. Glew, D. Grossman, R. Samuels, F. Smith, D. Walker, S. Weirich, and S. Zdancewic. TALx86: A realistic typed assembly language. In Second Workshop on Compiler Support for System Software, Atlanta, May 1999.]]Google Scholar
- 16.G. Morrisett, D. Walker, K. Crary, and N. Glew. From System F to typed assembly language. ACM Transactions on Programming Languages and Systems, 21(3):527-568, May 1999.]] Google ScholarDigital Library
- 17.G. Necula. Proof-carrying code. In Twenty-Fourth ACM Symposium on Principles of Programming Languages, pages 106-119, Paris, Jan. 1997.]] Google ScholarDigital Library
- 18.M. Oehler and R. Glenn. HMAC-MD5 IP Authentication with Replay Prevention. Internet RFC 2085, February 1997.]] Google ScholarDigital Library
- 19.V. S. Pai, P. Druschel, and W. Zwaenepoel. Flash: An efficient and portable webserver. In Proceedings of the USENIX Annual Technical Conference, pages 106-119, Monterey, 1999.]] Google ScholarDigital Library
- 20.D. Pescovitz. Monsters in a box. Wired, 8(12):341-347, 2000.]]Google Scholar
- 21.J. Peterson, P. Hudak, and G. S. Ling. Principled dynamic code improvement. Technical Report YALEU/DCS/RR-1135, Department of Computer Science, Yale University, July 1997.]]Google Scholar
- 22.Tool Interface Standards Committee. Executable and Linking Format (ELF) specification, May 1995.]]Google Scholar
- 23.Mindcraft-webstone benchmark information. http://www.mindcraft.com/webstone.]]Google Scholar
Index Terms
- Dynamic software updating
Recommendations
Dynamic software updating
Many important applications must run continuously and without interruption, yet must be changed to fix bugs or upgrade functionality. No prior general-purpose methodology for dynamic updating achieves a practical balance between flexibility, robustness, ...
Dynamic software updating
Many important applications must run continuously and without interruption, and yet also must be changed to fix bugs or upgrade functionality. No prior general-purpose methodology for dynamic updating achieves a practical balance between flexibility, ...
Practical dynamic software updating for C
Proceedings of the 2006 PLDI ConferenceSoftware updates typically require stopping and restarting an application, but many systems cannot afford to halt service, or would prefer not to. Dynamic software updating (DSU) addresses this difficulty by permitting programs to be updated while they ...
Comments