back




DynAMOS is a live updating system for operating system kernels. It's the first updating system that synchronizes updates of non-quiescent kernel subsystems: parts of the kernel that never stop running.

Updates are applied on the fly: no kernel reboot is required. Other than having basic support for loadable modules (to load DynAMOS), a kernel doesn't need to have been specially designed to be updateable.

Kernel updates are written by hand and use the kernel source code as input to get compiled. The compiled binary is modified before loading the update to let DynAMOS take over code execution at key points. This happens automatically with a command-line tool that loads and applies the updates.

Live updates of code are applied with a new mechanism called adaptive function cloning. [1] This is a dynamic binary instrumentation mechanism that (a) overwrites live code to jump to a different location in memory, and (b) switches execution dynamically and adaptively among multiple versions of functions, possibly concurrently running.

This turns out to be a necessary ability. To transform their data safely, some updates depend on synchronization of multiple versions of the same function.

Speaking of data updates, DynAMOS also updates compact datatype definitions. When a new field is added, a shadow data structure containing the new field enlarges the datatype.

There's no guarantee of semantic safety though. And since updates are written by hand this can lead to many bugs. But it's also exciting! Not much software is as fun to change as a live OS. There's a distinct kind of pleasure in changing software in ways you're not supposed to.

If they don't damage the kernel, updates can be safely reversed. DynaMOS can reverse a live update with the guarantee the update is not used by the stack or program counter of any process.

Updates applied successfully with DynAMOS include:

    Extending the Linux 2.2 kernel process scheduler to support unobtrusive, fine-grain cycle stealing offered by the Linger-Longer system.

    Introducing adaptive memory paging for efficient gang-scheduling in a Linux 2.4 cluster.

    Adaptively updating the Linux pipefs implementation during large data transfers.

    Introducing kernel-assisted process checkpointing offered by EPCKPT in Linux 2.4.

    Applying security fixes provided by the Openwall project.

    Injecting performance monitoring functionality in kernel functions.

    Updating DynAMOS itself.


The software is available here and there is a user manual [HTML single] [HTML multiple] [PDF]. There is also a paper:

    Dynamic and Adaptive Updates of Non-Quiescent Subsystems in Commodity Operating System Kernels. Kristis Makris, Kyung Dong Ryu, EuroSys 2007, March 2007. [PDF] [BibTex] [presentation slides]








Notes:

[1]  Looking at this ten years later, adaptive function cloning is a live code walker only on function call and only in binary. The more general solution is a code walker that works both statically and live, on source code, and on all language operators.