This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Dynamic Software Updating Using a Relaxed Consistency Model
September/October 2011 (vol. 37 no. 5)
pp. 679-694
Haibo Chen, Fudan University, Shanghai
Jie Yu, University of Michigan, Ann Arbor
Chengqun Hang, Microsoft (China) Ltd., Shanghai
Binyu Zang, Fudan University, Shanghai
Pen-Chung Yew, University of Minnesota at Twin Cities, Minneapolis
Software is inevitably subject to changes. There are patches and upgrades that close vulnerabilities, fix bugs, and evolve software with new features. Unfortunately, most traditional dynamic software updating approaches suffer some level of limitations; few of them can update multithreaded applications when involving data structure changes, while some of them lose binary compatibility or incur nonnegligible performance overhead. This paper presents POLUS, a software maintenance tool capable of iteratively evolving running unmodified multithreaded software into newer versions, yet with very low performance overhead. The main idea in POLUS is a relaxed consistency model that permits the concurrent activity of the old and new code. POLUS borrows the idea of cache-coherence protocol in computer architecture and uses a ”bidirectional write-through” synchronization protocol to ensure system consistency. To demonstrate the applicability of POLUS, we report our experience in using POLUS to dynamically update three prevalent server applications: vsftpd, sshd, and Apache HTTP server. Performance measurements show that POLUS incurs negligible runtime overhead on the three applications—a less than 1 percent performance degradation (but 5 percent for one case). The time to apply an update is also minimal.

[1] I. Neamtiu, J. Foster, and M. Hicks, "Understanding Source Code Evolution Using Abstract Syntax Tree Matching," ACM SIGSOFT Software Eng. Notes, vol. 30, no. 4, pp. 1-5, 2005.
[2] Microsoft Corp. "Windows Update and Automatic Updates," http:/windowsupdate.microsoft.com/, 2007.
[3] D.E. Lowell, Y. Saito, and E.J. Samberg, "Devirtualizable Virtual Machines Enabling General, Single-Node, Online Maintenance," ACM SIGOPS Operating Systems Rev., vol. 38, no. 5, pp. 211-223, 2004.
[4] D.A. Patterson, A. Brown, P. Broadwell, G. Candea, M. Chen, J. Cutler, P. Enriquez, A. Fox, E. Kiciman, M. Merzbacher, D. Oppenheimer, N. Sastry, W. Tetzlaff, J. Traupman, and N. Treuhaft, "Recovery-Oriented Computing (ROC): Motivation, Definition, Techniques, and Case Studies," Technical Report UCB//CSD-02-1175, Univ. of California, Mar. 2002.
[5] O. Frieder and M.E. Segal, "On Dynamically Updating a Computer Program: From Concept to Prototype," J. System Software, vol. 14, no. 2, pp. 111-128, 1991.
[6] M. Hicks and S. Nettles, "Dynamic Software Updating," ACM Trans. Programming Languages and Systems, vol. 27, no. 6, pp. 1049-1096, 2005.
[7] M. Barber, "Increased Server Availability and Flexibility through Failover Capability," Proc. 11th USENIX Conf. System Administration, pp. 89-98, 1997.
[8] D. Pescovitz, "Monsters in a Box," Wired, vol. 8, no. 12, pp. 341-347, 2000.
[9] G. Altekar, I. Bagrak, P. Burstein, and A. Schultz, "Opus: Online Patches and Updates for Security," Proc. USENIX Security, pp. 287-302, 2005.
[10] I. Neamtiu, M. Hicks, G. Stoyle, and M. Oriol, "Practical Dynamic Software Updating for C," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 72-83, June 2006.
[11] J. Arnold and F. Kaashoek, "Ksplice: Automatic Rebootless Kernel Updates," Proc. EuroSys, 2009.
[12] H. Chen, J. Yu, R. Chen, B. Zang, and P.-C. Yew, "Polus: A Powerful Live Updating System," Proc. Int'l Conf. Software Eng., pp. 271-281, 2007.
[13] B. Demsky and M. Rinard, "Goal-Directed Reasoning for Specification-Based Data Structure Repair," IEEE Trans. Software Eng., vol. 32, no. 12, pp. 931-951, Dec. 2006.
[14] D. Duggan, "Type-Based Hot Swapping of Running Modules," Proc. Sixth ACM SIGPLAN Int'l Conf. Functional Programming, pp. 62-73, 2001.
[15] G. Stoyle, M. Hicks, G. Bierman, P. Sewell, and I. Neamtiu, "Mutatis Mutandis: Safe and Flexible Dynamic Software Updating," ACM Trans. Programming Languages and Systems, vol. 29, no. 4, 2007.
[16] I. Neamtiu, M. Hicks, J.S. Foster, and P. Pratikakis, "Contextual Effects for Version-Consistent Dynamic Software Updating and Safe Concurrent Programming," Proc. ACM Conf. Principles of Programming Languages, pp. 37-49, 2008.
[17] G.C. Necula, S. McPeak, S.P. Rahul, and W. Weimer, "Cil: Intermediate Language and Tools for Analysis and Transformation of C Programs," Proc. Int'l Conf. Compiler Construction, pp. 213-228, 2002.
[18] M.A. Linton, "The Evolution of Dbx," Proc. Usenix Summer, pp. 211-220, 1990.
[19] I. Neamtiu and M. Hicks, "Safe and Timely Dynamic Updates for Multi-Threaded Programs," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, June 2009.
[20] B. Buck and J.K. Hollingsworth, "An API for Runtime Code Patching," J. High Performance Computing Application, vol. 14, no. 4, pp. 317-329, 2000.
[21] M.E. Segal and O. Frieder, "Dynamic Program Updating: A Software Maintenance Technique for Minimizing Software Downtime," J. Software Maintenance, vol. 1, no. 1, pp. 59-79, 1989.
[22] M. Segal and O. Frieder, "On-the-Fly Program Modification: Systems for Dynamic Updating," IEEE Software, vol. 10, no. 2, pp. 53-65, Mar. 1993.
[23] I. Lee, "Dymos: A Dynamic Modification System," PhD dissertation, The Univ. of Wisconsin, 1983.
[24] R.P. Cook, "∗MOD a Language for Distributed Programming," IEEE Trans. Software Eng., vol. 6, no. 6, pp. 563-571, Nov. 1980.
[25] 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 Univ. of Edinburgh, Dec. 1997.
[26] G. Hjálmtýsson and R. Gray, "Dynamic C++ Classes: A Lightweight Mechanism to Update Code in a Running Program," Proc. USENIX Ann. Technical Conf., pp. 65-76, 1998.
[27] S. Malabarba, R. Pandey, J. Gragg, E. Barr, and J.F. Barnes, "Runtime Support for Type-Safe Dynamic Java Classes," Proc. 14th European Conf. Object-Oriented Programming, pp. 337-361, 2000.
[28] A. Orso, A. Rao, and M. Harrold, "A Technique for Dynamic Updating of Java Software," Proc. IEEE Int'l Conf. Software Maintenance, 2002.
[29] J. Stanek, S. Kothari, T. Nguyen, and C. Cruz-Neira, "Online Software Maintenance for Mission-Critical Systems," Proc. 22nd IEEE Int'l Conf. Software Maintenance, pp. 93-103, 2006.
[30] S. Subramanian, M. Hicks, and K.S. McKinley, "Dynamic Software Updates: A VM-Centric Approach," Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, 2009.
[31] R.S. Fabry, "How to Design a System in which Modules Can Be Changed on the Fly," Proc. Second Int'l Conf. Software Eng., pp. 470-476, 1976.
[32] C. Boyapati, B. Liskov, L. Shrira, C.-H. Moh, and S. Richman, "Lazy Modular Upgrades in Persistent Object Stores," Proc. Object-Oriented Programming, Systems, Languages, and Applications, pp. 403-417, Oct. 2003.
[33] A. Gregersen and B. Jorgensen, "Module Reload through Dynamic Update: The Case of NetBeans," Proc. 12th European Conf. Software Maintenance and Reeng., pp. 23-32, 2008.
[34] J. Kramer and J. Magee, "The Evolving Philosophers Problem: Dynamic Change Management," IEEE Trans. Software Eng., vol. 16, no. 11, pp. 1293-1306, Nov. 1990.
[35] Y. Vandewoude, P. Ebraert, Y. Berbers, and T. D'Hondt, "Tranquillity: A Low Disruptive Alternative to Quiescence for Ensuring Safe Dynamic Updates," IEEE Trans. Software Eng., vol. 33, no. 12, pp. 856-868, Dec. 2007.
[36] P. Oreizy, N. Medvidovic, and R. Taylor, "Architecture-Based Runtime Software Evolution," Proc. Int'l Conf. Software Eng., pp. 177-187, 1998.
[37] D. Gupta, P. Jalote, and G. Barua, "A Formal Framework for On-Line Software Version Change," IEEE Trans. Software Eng., vol. 22, no. 2, pp. 120-131, Feb. 1996.
[38] D. Gupta, "On-Line Software Version Change," PhD dissertation, Indian Inst. of Technology Kanpur, Nov. 1994.
[39] C.A.N. Soules, J. Appavoo, K. Hui, R.W. Wisniewski, D.D. Silva, G.R. Ganger, O. Krieger, M. Stumm, M.A. Auslander, M. Ostrowski, B.S. Rosenburg, and J. Xenidis, "System Support for Online Reconfiguration," Proc. USENIX Ann. Technical Conf., pp. 141-154, 2003.
[40] A. Baumann, G. Heiser, J. Appavoo, D.D. Silva, O. Krieger, R.W. Wisniewski, and J. Kerr, "Providing Dynamic Update in an Operating System," Proc. USENIX Ann. Technical Conf., pp. 279-291, Apr. 2005.
[41] A. Baumann, J. Appavoo, R.W. Wisniewski, D. Da Silva, O. Krieger, and G. Heiser, "Reboots are for Hardware: Challenges and Solutions to Updating an Operating System on the Fly," Proc. USENIX Ann. Technical Conf., 2007.
[42] H. Chen, R. Chen, F. Zhang, B. Zang, and P.-C. Yew, "Live Updating Operating Systems Using Virtualization," Proc. Second Int'l Conf. Virtual Execution Environments, pp. 35-44, 2006.

Index Terms:
Maintainability, reliability, runtime environments.
Citation:
Haibo Chen, Jie Yu, Chengqun Hang, Binyu Zang, Pen-Chung Yew, "Dynamic Software Updating Using a Relaxed Consistency Model," IEEE Transactions on Software Engineering, vol. 37, no. 5, pp. 679-694, Sept.-Oct. 2011, doi:10.1109/TSE.2010.79
Usage of this product signifies your acceptance of the Terms of Use.