摘要
在系统不重启的情况下对操作系统进行缺陷修复对于保障服务器系统的性能、安全和可用性等方面具有重要意义。因传统操作系统并未针对在线更新进行实现,现有在线更新技术不能较好地处理被更新代码正处于"使用中"状态的问题,导致在有些场景下无法进行在线更新。本文针对这一问题,设计了一种用于传统操作系统的代码使用计数动态监测技术,通过将原始函数二进制码替换为与其对等的计数副本,以及修改相关线程的内核栈上返回地址,实现对于被更新代码执行情况的监测,从而发现可进行在线更新的时机。最后,本文基于开源的动态升级软件ksplice验证了上述工作的有效性。
For high availability systems, it is desirable to fix the discovered operating system security holes and other bugs, and do performance improvement without rebooting. However, as commodity op erating syslems are usually implemented without keeping the hot update issue in mind, when the code to be updated is frequently used by the kernel, hot update may fail due to finding no safe point, even if there do exist occasions that the code are not in use. In this article, a code reference monitoring mecha- nism is introduced to solve this problem. In order to safely add reference counting to the functions which are to be updated, each function is replaced by its counting counterpart. For the threads that are using these functions, their stacks are adjusted to make the function replacement safe, and to make these threads callback the code reference maintenance routine as soon as they leave these functions. Finally, experiments are conducted on Ksplice, an open source Linux hot updating software, to verify the effec tiveness of study.
出处
《计算机工程与科学》
CSCD
北大核心
2012年第5期78-83,共6页
Computer Engineering & Science
基金
国家863计划资助项目(2008AA01Z138
2009AA01Z101)
关键词
在线更新
动态升级
传统操作系统
可用性
hot update
dynamic software update
commodity operating system
availability