Toward Practical Dynamic Software Updating for C

297
Опубликовано 6 сентября 2016, 5:39
Software systems are imperfect, so software updates are a fact of life. While typical software updates require stopping and restarting the program in question, 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 run. DSU is appealing compared to other approaches for on-line upgrades because it is quite general and requires no redundant hardware. The challenge is in making DSU flexible, and yet safe and easy to use. In this paper, we describe a prototype DSU implementation for C programs that permits adding, deleting, and changing program definitions, including functions, global variables, and type declarations. We compile programs specially so that they can be dynamically patched, and generate most of a dynamic patch automatically. Our framework ensures that an update cannot be applied at a time that would violate type-safety. We report our experience with two open-source server programs: OpenSSH daemon, and Very Secure FTP daemon. The majority of updates were easy to generate, though more effort was required for signficant functional changes. Compiling for updateability had virtually no impact on server performance, but would be more significant for compute-bound programs.
автотехномузыкадетское