skip to main content
article
Open Access

Dynamic software updating

Published:01 November 2005Publication History
Skip Abstract Section

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.

References

  1. Apache. 2001. The Apache Software Foundation. http://www.apache.org.]]Google ScholarGoogle Scholar
  2. Appel, A. 1994. Hot-sliding in ML. Unpublished manuscript. http://www.cs.princeton.edu/~appel/papers/hotslide.ps.]]Google ScholarGoogle Scholar
  3. Armstrong, J., Virding, R., Wikstrom, C., and Williams, M. 1996. Concurrent Programming in Erlang, Second ed. Prentice-Hall, Englewood Cliffs, N.J.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle Scholar
  6. Bloom, T. 1983. Dynamic Module Replacement in a Distributed Programming System. Ph.D. dissertation, Laboratory for Computer Science, The Massachussets Institute of Technology.]]Google ScholarGoogle Scholar
  7. Bloom, T. and Day, M. 1993. Reconfiguration and module replacement in Argus: Theory and practice. Softw. Eng. J. 8, 2 (Mar.), 102--108.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. Buck, B. and Hollingsworth, J. K. 2000. An API for runtime code patching. J. High Perf. Comput. Appl. 14, 4, 317--329.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle Scholar
  11. Duggan, D. 2001. Type-based hot swapping of running modules. In Proceedings of the International Conference on Functional Programming. 62--73.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle Scholar
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gupta, D. 1994. On-line software version change. Ph.D. dissertation, Department of Computer Science and Engineering, Indian Institute of Technology, Kanpur.]]Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. Hicks, M. 2001. Dynamic software updating. Ph.D. dissertation, Department of Computer and Information Science, University of Pennsylvania.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. Hofmeister, C. 1993. Dynamic reconfiguration. Ph.D. dissertation, Computer Science Department, University of Maryland, College Park, MD.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle Scholar
  26. Kramer, J. and Magee, J. 1990. The evolving philosophers problem: Dynamic change management. IEEE Trans. Softw. Eng. 16, 11, 1293--1306.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Lee, I. 1983. DYMOS: A dynamic modification system. Ph.D. thesis, Department of Computer Science, University of Wisconsin, Madison.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Magee, J., Kramer, J., and Sloman, M. 1989. Constructing distributed systems in Conic. IEEE Trans. Softw. Eng. 15, 6 (June), 663--675.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle Scholar
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle Scholar
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. Oehler, M. and Glenn, R. 1997. HMAC-MD5 IP authentication with replay prevention. Internet RFC 2085.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. Pescovitz, D. 2000. Monsters in a box. Wired 8, 12, 341--347.]]Google ScholarGoogle Scholar
  37. 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 ScholarGoogle Scholar
  38. Pratt, J. W. and Gibbons, J. D. 1981. Concepts of Nonparametric Theory. Springer-Verlag, New York.]]Google ScholarGoogle Scholar
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. Segal, M. E. and Frieder, O. 1993. On-the-fly program modification: Systems for dynamic updating. IEEE Softw. 10, 2, 53--65.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle Scholar
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. Tool Interface Standards Committee. 1995. Executable and Linking Format (ELF) specification.]]Google ScholarGoogle Scholar
  45. 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 ScholarGoogle Scholar
  46. Webstone. 2001. Mindcraft---WebStone benchmark information. http://www.mindcraft.com/webstone.]]Google ScholarGoogle Scholar

Index Terms

  1. Dynamic software updating

                    Recommendations

                    Reviews

                    Maulik A Dave

                    Many software applications must run continuously, this presents problems when these applications need to be updated or upgraded. This paper proposes a methodology for updating software, using dynamic patch technology. After a brief introduction, the authors' approach is discussed in the second section. The goals are flexibility, robustness, ease of use, and low overhead. Section 3 is devoted to a detailed conceptual description of dynamic patches. The term "dynamic patch" describes dynamic changes between two program modules. It consists of new code, a state transformer function, and a set of stubs. The fourth section contains implementation details. A patch is dynamically linked to the running program. The function calls and data of the running program are redirected to new function stubs and new data definitions. The prototype implementation targets typed assembly language (TAL). Section 5 discusses the automatic generation of patches. The effect of patches on program timing is discussed in the sixth section. The authors propose specifying these timings statically. The next two sections describe a case study done on a Web server, and a corresponding performance analysis. Before concluding, the previously set goals are discussed. This work attempts to choose the best alternatives in the methodology. Related approaches are compared throughout. A programmer new to the field of dynamic patches will be able to easily understand the paper. Online Computing Reviews Service

                    Access critical reviews of Computing literature here

                    Become a reviewer for Computing Reviews.

                    Comments

                    Login options

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

                    Sign in

                    Full Access

                    • Published in

                      cover image ACM Transactions on Programming Languages and Systems
                      ACM Transactions on Programming Languages and Systems  Volume 27, Issue 6
                      November 2005
                      347 pages
                      ISSN:0164-0925
                      EISSN:1558-4593
                      DOI:10.1145/1108970
                      Issue’s Table of Contents

                      Copyright © 2005 ACM

                      Permission to make digital or hard copies of all or part 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 components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 1 November 2005
                      Published in toplas Volume 27, Issue 6

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • article

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader