Abstract
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, robustness, low overhead, ease of use, and low cost.We present an 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 contain both 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 or Typed Assembly Language), which is native code accompanied by annotations that allow online 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, and generalize to present observations about updateable software development. Performance experiments show that for FlashEd, the overhead due to updating is low: typically less than 1 percent.
- Apache. 2001. The Apache Software Foundation. http://www.apache.org.]]Google Scholar
- Appel, A. 1994. Hot-sliding in ML. Unpublished manuscript. http://www.cs.princeton.edu/~appel/papers/hotslide.ps.]]Google Scholar
- Armstrong, J., Virding, R., Wikstrom, C., and Williams, M. 1996. Concurrent Programming in Erlang, Second ed. Prentice-Hall, Englewood Cliffs, N.J.]] Google ScholarDigital Library
- Balasubramaniam, S. and Pierce, B. C. 1998. What is a file synchronizer? In Proceedings of the 4th Annual ACM/IEEE International Conference on Mobile Computing and Networking (MobiCom '98). Dallas, TX. ACM, New York (Oct.) 98--108. (Full version available as Indiana University CSCI technical report #507, April 1998.)]] Google ScholarDigital Library
- Bierman, G., Hicks, M., Sewell, P., and Stoyle, G. 2003. Formalizing dynamic software updating. In Proceedings of the 2nd International Workshop on Unanticipated Software Evolution. Warsaw, Poland (April).]]Google Scholar
- Bloom, T. 1983. Dynamic Module Replacement in a Distributed Programming System. Ph.D. dissertation, Laboratory for Computer Science, The Massachussets Institute of Technology.]]Google Scholar
- Bloom, T. and Day, M. 1993. Reconfiguration and module replacement in Argus: Theory and practice. Softw. Eng. J. 8, 2 (Mar.), 102--108.]]Google ScholarDigital Library
- Boyapati, C., Liskov, B., Shrira, L., Moh, C.-H., and Richman, S. 2003. Lazy modular upgrades in persistent object stores. In Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. Anaheim, CA. (Oct.). ACM, New York. 403--417.]] Google ScholarDigital Library
- Buck, B. and Hollingsworth, J. K. 2000. An API for runtime code patching. J. High Perf. Comput. Appl. 14, 4, 317--329.]] Google ScholarDigital Library
- Dmitriev, M. 2001. Towards flexible and safe technology for runtime evolution of Java language applications. In Proceedings of the Workshop on Engineering Complex Object-Oriented Systems for Evolution. Portland, OR. (Oct.). 14--18.]]Google Scholar
- Duggan, D. 2001. Type-based hot swapping of running modules. In Proceedings of the International Conference on Functional Programming. 62--73.]] Google ScholarDigital Library
- Frieder, O. and Segal, M. E. 1991. On dynamically updating a computer program: From concept to prototype. J. Syst. Softw. 14, 2 (Sept.), 111--128.]] Google ScholarDigital Library
- Gamsa, B., Krieger, O., Appavoo, J., and Stumm, M. 1999. Tornado: Maximizing locality and concurrency in a shared memory multiprocessor operating system. In Proceedings of the 3rd Symposium on Operating Systems Design and Implementation. New Orleans, LA. (Feb.). 87--100.]] Google ScholarDigital Library
- Garlan, D., Krueger, C. W., and Staudt, B. J. 1986. A structural approach to the maintenance of structure-oriented environments. In Proceedings of the SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments. (Palo Alto, CA). ACM, New York, 160--170.]] Google ScholarDigital Library
- Gilmore, S., Kirli, D., and Walton, C. 1997. Dynamic ML without Dynamic Types. Tech. Rep. ECS-LFCS-97-378, Laboratory for the Foundations of Computer Science, The University of Edinburgh. December.]]Google Scholar
- Grossman, D. and Morrisett, G. 2000. Scalable certification for Typed Assembly Language. In Proceedings of the ACM SIGPLAN Workshop on Types in Compilation. Montreal, Canada. R. Harper, Ed. Lecture Notes in Computer Science, vol. 2071. Springer-Verlag, New York. 117--146.]] Google ScholarDigital Library
- Gupta, D. 1994. On-line software version change. Ph.D. dissertation, Department of Computer Science and Engineering, Indian Institute of Technology, Kanpur.]]Google Scholar
- Gupta, D. and Jalote, P. 1993. On-line software version change using state transfer between processes. Softw.---Pract. Exp. 23, 9 (Sept.), 949--964.]] Google ScholarDigital Library
- Gupta, D., Jalote, P., and Barua, G. 1996. A formal framework for online software version change. Trans. Softw. Eng. 22, 2 (Feb.), 120--131.]] Google ScholarDigital Library
- Hicks, M. 2001. Dynamic software updating. Ph.D. dissertation, Department of Computer and Information Science, University of Pennsylvania.]] Google ScholarDigital Library
- Hicks, M., Moore, J. T., and Nettles, S. 2001. Dynamic software updating. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. Snowbird, UT. ACM, New York, 13--23.]] Google ScholarDigital Library
- Hicks, M., Weirich, S., and Crary, K. 2000. Safe and flexible dynamic linking of native code. In Proceedings of the ACM SIGPLAN Workshop on Types in Compilation. Montreal, Canada. R. Harper, Ed. Lecture Notes in Computer Science, vol. 2071. Springer-Verlag, New York. 147--176.]] Google ScholarDigital Library
- Hjálmtýsson, G. and Gray, R. 1998. Dynamic C++ classes, a lightweight mechanism to update code in a running program. In Proceedings of the USENIX Annual Technical Conference. New Orelands, LA. 65--76.]] Google ScholarDigital Library
- Hofmeister, C. 1993. Dynamic reconfiguration. Ph.D. dissertation, Computer Science Department, University of Maryland, College Park, MD.]] Google ScholarDigital Library
- Java 2002. The Java HotSpot virtual machine, v1.4.1, d2. Available at http://java.sun.com/products/hotspot/docs/whitepaper/Java_Hotspot_v1.4.%1/JHS_141_WP_d2a.pdf.]]Google Scholar
- Kramer, J. and Magee, J. 1990. The evolving philosophers problem: Dynamic change management. IEEE Trans. Softw. Eng. 16, 11, 1293--1306.]] Google ScholarDigital Library
- Lee, I. 1983. DYMOS: A dynamic modification system. Ph.D. thesis, Department of Computer Science, University of Wisconsin, Madison.]] Google ScholarDigital Library
- Magee, J., Kramer, J., and Sloman, M. 1989. Constructing distributed systems in Conic. IEEE Trans. Softw. Eng. 15, 6 (June), 663--675.]] Google ScholarDigital Library
- Malabarba, S., Pandey, R., Gragg, J., Barr, E., and Barnes, J. F. 2000. Runtime support for type-safe dynamic Java classes. In Proceedings of the 14th European Conference on Object-Oriented Programming. Sophia Antipolis, France. In Lecture Notes in Computer Science, vol. 1850.]] Google ScholarDigital Library
- Morrisett, G., Crary, K., Glew, N., Grossman, D., Samuels, R., Smith, F., Walker, D., Weirich, S., and Zdancewic, S. 1999a. TALx86: A realistic typed assembly language. In Proceedings of the 2nd Workshop on Compiler Support for System Software. Atlanta, GA. 25--35.]]Google Scholar
- Morrisett, G., Walker, D., Crary, K., and Glew, N. 1999b. From System F to typed assembly language. ACM Trans. Prog. Lang. Syst. 21, 3 (May), 527--568.]] Google ScholarDigital Library
- Mosberger, D. and Jin, T. 1998. HTTPERF: A tool for measuring web server performance. In Proceedings of the 1st Workshop on Internet Server Performance. Madison, WI. ACM, New York, 59--67.]]Google Scholar
- Necula, G. 1997. Proof-carrying code. In Proceedings of the 24th ACM Symposium on Principles of Programming Languages. Paris, France. ACM, New York, 106--119.]] Google ScholarDigital Library
- Oehler, M. and Glenn, R. 1997. HMAC-MD5 IP authentication with replay prevention. Internet RFC 2085.]] Google ScholarDigital Library
- Pai, V. S., Druschel, P., and Zwaenepoel, W. 1999. Flash: An efficient and portable webserver. In Proceedings of the USENIX Annual Technical Conference (Monterey, CA). 106--119.]] Google ScholarDigital Library
- Pescovitz, D. 2000. Monsters in a box. Wired 8, 12, 341--347.]]Google Scholar
- Peterson, J., Hudak, P., and Ling, G. S. 1997. Principled dynamic code improvement. Tech. Rep. YALEU/DCS/RR-1135, Department of Computer Science, Yale University. July.]]Google Scholar
- Pratt, J. W. and Gibbons, J. D. 1981. Concepts of Nonparametric Theory. Springer-Verlag, New York.]]Google Scholar
- Ramkumar, B. and Strumpen, V. 1997. Portable checkpointing for heterogenous architectures. In Proceedings of the Symposium on Fault-Tolerant Computing. Seattle, WA. 58--67.]] Google ScholarDigital Library
- Segal, M. E. and Frieder, O. 1993. On-the-fly program modification: Systems for dynamic updating. IEEE Softw. 10, 2, 53--65.]] Google ScholarDigital Library
- Sewell, P. 2001. Modules, abstract types, and distributed versioning. In Proceedings of the 28th ACM Symposium on Principles of Programming Languages (London, England). ACM, New York. 236--247.]] Google ScholarDigital Library
- Soules, C., Appavoo, J., Hui, K., Wisniewski, R. W., Silva, D. D., Ganger, G. R., Krieger, O., Stumm, M., Auslander, M., Ostrowski, M., Rosenburg, B., and Xenidis, J. 2003. System support for online reconfiguration. In Proceedings of the USENIX. San Antonio, TX. 141--154.]]Google Scholar
- Tennenhouse, D. L., Smith, J. M., Sincoskie, W. D., Wetherall, D. J., and Minden, G. J. 1997. A survey of active network research. IEEE Commun. Mag. 35, 1 (Jan.), 80--86.]]Google ScholarDigital Library
- Tool Interface Standards Committee. 1995. Executable and Linking Format (ELF) specification.]]Google Scholar
- Tridgell, A. and Mackerras, P. 1996. The rsync algorithm. Tech. Rep. TR-CS-96-05, Canberra 0200 ACT, Australia. http://samba.anu.edu.au/rsync/.]]Google Scholar
- Webstone. 2001. Mindcraft---WebStone benchmark information. http://www.mindcraft.com/webstone.]]Google Scholar
Index Terms
- Dynamic software updating
Recommendations
Dynamic software updates: a VM-centric approach
PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and ImplementationSoftware evolves to fix bugs and add features. Stopping and restarting programs to apply changes is inconvenient and often costly. Dynamic software updating (DSU) addresses this problem by updating programs while they execute, but existing DSU systems ...
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, ...
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