Portable Software Update: A Framework for Dynamic Software Updates in C-Language Programs
Date
Author
Institution
Degree Level
Degree
Department
Supervisor / Co-Supervisor and Their Department(s)
Citation for Previous Publication
Link to Related Item
Abstract
A Dynamic Software Update (DSU) system enables an operator to modify a program without interrupting the execution of the program. Programs written in certain programming language, in particular programs written in C, are difficult to modify while they are executing. This thesis presents Portable Software Update (PSU), a new framework for the creation of C-language DSU programs. PSU offers a simple program interface to build DSU versions of existing programs. Once a program is built using PSU, updates can be applied using background threads that do have negligible impact on the execution of the program. PSU supports multi-threaded and recursive programs without the use of safe-points or thread blocking. PSU uses function indirection to redirect DSU functions calls to the newest version of the function code. DSU functions in a PSU program execute to completion with new calls to DSU functions always executing the newest version. This simple mechanism allows PSU to load updates rapidly. PSU borrows automatic memory management techniques from garbage collection systems to unload obsolete version of DSU functions after they are no longer in use. PSU is the first DSU system for C-language programs which is able to unload older versions of code. This use of resources enables many patches to be applied to a long-running application. The overhead of the DSU-enabling features is evaluated using a series of custom synthetic micro benchmarks and of a DSU-enabled version of the MySQL database storage engine. The MySQL storage engine maintains 95% of the performance of the non-DSU version while allowing the entire storage engine to be updated while the database continues executing. The process of modifying the storage engine to enable DSU is simple and straightforward.
