[go: up one dir, main page]

CN104111848A - Multi-thread software dynamic upgrading method based on asynchronous check points - Google Patents

Multi-thread software dynamic upgrading method based on asynchronous check points Download PDF

Info

Publication number
CN104111848A
CN104111848A CN201410305827.3A CN201410305827A CN104111848A CN 104111848 A CN104111848 A CN 104111848A CN 201410305827 A CN201410305827 A CN 201410305827A CN 104111848 A CN104111848 A CN 104111848A
Authority
CN
China
Prior art keywords
thread
software
dynamic update
mapping table
upgraded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410305827.3A
Other languages
Chinese (zh)
Other versions
CN104111848B (en
Inventor
邹德清
羌卫中
金海�
王皓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN201410305827.3A priority Critical patent/CN104111848B/en
Publication of CN104111848A publication Critical patent/CN104111848A/en
Application granted granted Critical
Publication of CN104111848B publication Critical patent/CN104111848B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

本发明公开了一种基于异步检查点的多线程软件动态升级方法,包括:基于动态插桩的方式能够在二进制级而非源码层次上向正在运行的源程序插入关键代码,使得升级不需要依赖特定编译器;基于异步检查点算法能够确保所有线程在动态升级前处于阻塞状态,从而能够一次性更新所有线程并避免新旧版本维护带来的开销;采用二进制重写的方式实现函数间接跳转,能够升级未在执行的待更新函数;利用堆栈重构的方式能够升级正在执行的待更新函数,使得动态升级消除了诸如更新循环体和主函数等带来的无法预计的等待时间。本发明能够为具有高可靠性需求的应用和服务(例如电子支付系统)将因版本维护宕机而导致的损失降到最低,减少增加冗余硬件带来的成本开销。

The invention discloses a method for dynamically upgrading multi-threaded software based on asynchronous checkpoints, including: the key code can be inserted into the running source program at the binary level instead of the source code level based on the dynamic insertion method, so that the upgrade does not need to rely on Specific compiler; based on the asynchronous checkpoint algorithm, it can ensure that all threads are blocked before dynamic upgrade, so that all threads can be updated at one time and avoid the overhead caused by the maintenance of the old and new versions; the binary rewriting method is used to realize the indirect function jump, Functions to be updated that are not being executed can be upgraded; functions to be updated that are being executed can be upgraded by means of stack reconstruction, so that dynamic upgrades eliminate unpredictable waiting times such as updating loop bodies and main functions. The invention can minimize the loss caused by version maintenance downtime for applications and services with high reliability requirements (such as electronic payment systems), and reduce the cost of adding redundant hardware.

Description

一种基于异步检查点的多线程软件动态升级方法A method for dynamic upgrade of multithreaded software based on asynchronous checkpoint

技术领域technical field

本发明属于软件可靠性研究中的安全领域,更具体地,涉及一种基于异步检查点的多线程软件动态升级方法。The invention belongs to the security field in software reliability research, and more specifically relates to a multi-thread software dynamic upgrading method based on asynchronous checkpoints.

背景技术Background technique

为了针对提供7/24小时服务可靠性,从软件的角度考虑,传统的软件更新方法通常要求停止软件的运行,应用更新后再次重启软件方可完成。这样的停止——重启方式不可避免地破坏了运行服务的执行,降低了软件的可用性。从硬件的角度,有的方案可以在增加服务器镜像的前提下实现动态迁移,待到升级完毕后,将数据重新同步回主服务器,从而保证应用(服务)的可靠性,然而这种方案需要购买额外的冗余硬件,大大的增加了维护成本。综上所述,基于异步检查点的多线程软件动态升级方案将能够很好的提升在线程序(服务)的可靠性,减少宕机时间,增加盈利。为了解决以上问题,动态软件更新(DSU)孕育而生,并且成为目前急切需要的新技术。在动态软件更新当中,多线程支持又是一个新的挑战,因为线程执行相同的函数并试图修改相同的数据,这样很难保证数据的一致性。In order to provide 7/24 hours service reliability, from the software point of view, the traditional software update method usually requires stopping the running of the software, and then restarting the software after the update is applied. Such a stop-restart approach inevitably disrupts the execution of running services and reduces software availability. From the perspective of hardware, some solutions can realize dynamic migration under the premise of adding server mirroring. After the upgrade is completed, the data will be resynchronized back to the main server to ensure the reliability of the application (service). However, this solution needs to be purchased. Additional redundant hardware greatly increases maintenance costs. To sum up, the multi-threaded software dynamic upgrade solution based on asynchronous checkpoints will be able to improve the reliability of online programs (services), reduce downtime, and increase profitability. In order to solve the above problems, Dynamic Software Update (DSU) was conceived and has become an urgently needed new technology. In dynamic software updates, multi-thread support is a new challenge, because threads execute the same function and try to modify the same data, so it is difficult to guarantee data consistency.

一般来讲,很多现存的方法都是基于更新点(待更新的数据和代码当前还未被调用的位置称为更新点)。这样在更新一个运行系统的时候只有在某些特定执行点才能应用,例如待更新的代码没有被执行,数据未被引用的时候,否则系统很容易出现不一致的状态。Generally speaking, many existing methods are based on the update point (the data to be updated and the position where the code is not currently called are called the update point). In this way, when updating a running system, it can only be applied at certain execution points, such as when the code to be updated is not executed and the data is not referenced, otherwise the system is prone to inconsistent states.

基于更新点的方法有几个缺点。首先能够找到安全更新点在很大程度上依赖于编译器或程序员的分析能力。对于像C语言一样灵活的语言,编译器经常很难分析指针和别名。因此,它们不得不做出保守的假设,分析结果中可能产生误报。虽然最近提出的建议有利于转换编译器使程序变得可更新,但是他们的方法仅适用于单线程应用程序,并且无法维持二进制兼容性。所以,它不能用于编译的二进制文件和当前的运行软件。其次,很难在多线程软件中找到更新点,一个繁忙的系统中某些模块甚至可能没有一个安全点。当涉及数据变化时,对于多线程软件无法分析其可更新性。如果不能及时到达或检测到更新点,某些安全更新将会延迟,脆弱的系统可能暴露在外部攻击之下。最后,对于一些基于更新点机制的动态更新系统,操作员可能在动态更新进程中没有任何控制权,在系统到达安全更新点应用更新时,操作员将一无所知。如果操作员无法知晓系统是否已经完成当前更新,另一个处于进展中的更新可能在不经意间应用。The update point based approach has several disadvantages. First of all, being able to find the security update point largely depends on the analysis ability of the compiler or programmer. For a language as flexible as C, compilers often have a hard time analyzing pointers and aliases. As a result, they have to make conservative assumptions, which can generate false positives in the analysis results. While recent proposals favor switching compilers to make programs updatable, their approach works only for single-threaded applications and fails to maintain binary compatibility. So, it cannot be used for compiled binaries and currently running software. Second, it is difficult to find update points in multi-threaded software, and some modules in a busy system may not even have a safe point. Updatable analysis is not possible for multi-threaded software when it comes to data changes. If the update point cannot be reached or detected in time, some security updates will be delayed and vulnerable systems may be exposed to external attacks. Finally, for some dynamic update systems based on the update point mechanism, the operator may not have any control over the dynamic update process, and the operator will have no idea when the system reaches the secure update point to apply the update. If the operator has no way of knowing whether the system has completed the current update, another update in progress may be applied inadvertently.

综上所述,现有的动态软件升级系统的方案存在如下不足:In summary, the existing dynamic software upgrade system solutions have the following deficiencies:

有的方案(例如UpStare)需要依赖特定的编译器,在重新编译源程序时添加相关的动态升级辅助代码,这对于已经部署的应用程序是行不通的;有的方案(例如Polus)无法更新正在执行的函数,需要等待函数调用完毕才能生效,这意味着如果主函数有改动,则直到程序退出应用程序将永远无法动态升级成新的版本;有的方案则只对单线程应用程序有效,显然在多线程应用程序如此流行的今天,这也是不实用的。Some solutions (such as UpStare) need to rely on a specific compiler, and add relevant dynamic upgrade auxiliary code when recompiling the source program, which is not feasible for deployed applications; some solutions (such as Polus) cannot update the The executed function needs to wait until the function is called to take effect, which means that if the main function is changed, the application will never be dynamically upgraded to a new version until the program exits; some solutions are only valid for single-threaded applications, obviously It's also not practical in today's day when multi-threaded applications are so prevalent.

发明内容Contents of the invention

针对现有技术的以上缺陷或改进需求,本发明提供了一种基于异步检查点的多线程软件动态升级方法,其目的在于,解决现有针对已经部署的多线程应用程序进行动态升级中出现的上述技术问题,确保升级的可行性,使得更新过程不会处于无限期的等待中。Aiming at the above defects or improvement needs of the prior art, the present invention provides a method for dynamically upgrading multi-threaded software based on asynchronous checkpoints. The above-mentioned technical problems ensure the feasibility of the upgrade, so that the update process will not be in an indefinite wait.

为实现上述目的,按照本发明的一个方面,提供了一种基于异步检查点的多线程软件动态升级方法,包括以下步骤:In order to achieve the above object, according to one aspect of the present invention, a method for dynamically upgrading multithreaded software based on asynchronous checkpoints is provided, including the following steps:

(1)获取待升级软件的新旧版本,分别提取新旧版本中的项目源文件,并分别将该新旧版本的项目源文件整合;(1) Obtain the old and new versions of the software to be upgraded, extract the project source files in the old and new versions respectively, and integrate the project source files of the old and new versions respectively;

(2)对整合后的新版本的项目源文件和旧版本的项目源文件进行对比,以生成初级补丁;(2) comparing the integrated new version of the project source file with the old version of the project source file to generate a primary patch;

(3)将异步检查点插入初级补丁中,以生成动态升级补丁,其中异步检查点中保存了待升级软件的新旧版本的延续点的映射关系;(3) Insert the asynchronous checkpoint into the primary patch to generate a dynamic upgrade patch, wherein the asynchronous checkpoint stores the mapping relationship between the continuation points of the old and new versions of the software to be upgraded;

(4)将生成的动态升级补丁加载到运行中的待升级软件的旧版本中;(4) load the dynamic upgrade patch that generates into the old version of the software to be upgraded in operation;

(5)接收用户的初始化请求,并根据该初始化请求使用动态升级补丁中待更新的函数名查找内存中对应的函数体,并将步骤(3)中的异步检查点插入该函数体中;(5) receiving the user's initialization request, and using the function name to be updated in the dynamic upgrade patch to search for the corresponding function body in the memory according to the initialization request, and inserting the asynchronous checkpoint in step (3) into the function body;

(6)接收用户的应用请求,并根据该应用请求利用异步检查点算法使待升级软件中的所有线程达到阻塞状态;(6) Receive the user's application request, and use the asynchronous checkpoint algorithm to make all threads in the software to be upgraded reach a blocked state according to the application request;

(7)对于待升级软件中的线程中未被使用和执行的函数及变量,采用二进制重写的方式实现函数的间接跳转,对于待升级软件中的线程中正在使用和执行的函数及变量,采用堆栈重构的方式进行映射和状态转换;(7) For the functions and variables that are not used and executed in the threads of the software to be upgraded, the binary rewriting method is used to realize the indirect jump of the functions. For the functions and variables that are being used and executed in the threads of the software to be upgraded , using stack reconstruction for mapping and state transition;

(8)根据动态升级补丁中异步检查点中保存的新旧版本的延续点的映射关系恢复执行所有线程,过程结束。(8) According to the mapping relationship of the continuation point of the old and new versions stored in the asynchronous checkpoint in the dynamic upgrade patch, all threads are resumed, and the process ends.

优选地,步骤(1)是采用通用中间语言中的合并功能进行项目源文件的整合。Preferably, step (1) is to integrate the project source files by using the merge function in the common intermediate language.

优选地,步骤(5)将异步检查点插入函数体中是利用动态插桩方式,插入函数体的位置是位于该函数体的头部、循环体的开头、函数调用之前。Preferably, step (5) inserts the asynchronous checkpoint into the function body by means of dynamic instrumentation, and the position of inserting the function body is at the head of the function body, the beginning of the loop body, and before the function call.

优选地,步骤(6)具体包括以下子步骤:Preferably, step (6) specifically includes the following sub-steps:

(6-1)接收用户的应用请求,该应用请求中包括待更新软件的进程ID、以及步骤(3)中动态升级补丁文件的路径;(6-1) receiving the user's application request, including the process ID of the software to be updated and the path of the dynamic upgrade patch file in step (3);

(6-2)初始化空的第一映射表和第二映射表,其中第一映射表表示线程已经获得的临界变量以及协助动态升级的锁,第二映射表表示线程希望获得的临界变量以及协助动态升级的锁;(6-2) Initialize the empty first mapping table and the second mapping table, wherein the first mapping table represents the critical variable that the thread has obtained and the lock that assists in dynamic upgrade, and the second mapping table represents the critical variable that the thread wishes to obtain and the assisting Dynamically upgraded locks;

(6-3)通过包装替换系统调用来追踪线程的共享临界变量和协助动态升级的锁,当系统每次对共享临界变量和协助动态升级的锁有操作时,查找步骤(6-2)中的第一映射表和第二映射表,然后进入步骤(6-4),若没有则将临界变量名和协助动态升级的锁的名称添加到第一映射表和第二映射表中,并在每个变量或锁的后面添加对其操作的线程ID,然后进入步骤(6-4)。(6-3) Track shared critical variables of threads and locks that assist dynamic upgrades by wrapping and replacing system calls. When the system operates on shared critical variables and locks that assist dynamic upgrades, look for step (6-2) The first mapping table and the second mapping table, then enter step (6-4), if not then add the name of the critical variable name and the lock that assists dynamic upgrade to the first mapping table and the second mapping table, and in each After each variable or lock, add the thread ID that operates on it, and then enter step (6-4).

(6-4)判断线程是占用协助动态升级的锁,还是占用共享临界变量,如果是前者则先将其线程ID添加到第二映射表中,如果第一映射表中协助动态升级的锁没有线程ID,则将其线程ID添加到第一映射表中对应的位置,并将该线程标记为协助状态,如果第一映射表中协助动态升级的锁有线程ID将该线程标记为阻塞状态;如果是后者则先将其线程ID添加到第二映射表中,如果第一映射表中对应的共享临界变量没有线程ID,则将其线程ID添加到第一映射表中对应的位置,并将该线程标记为协助状态,如果第一映射表中对应的共享临界变量有线程ID将该线程标记为阻塞状态;(6-4) Determine whether the thread occupies the lock that assists in dynamic upgrade, or occupies a shared critical variable. If it is the former, its thread ID is first added to the second mapping table. If there is no lock in the first mapping table that assists in dynamic upgrade Thread ID, then its thread ID is added to the corresponding position in the first mapping table, and this thread is marked as assisting state, if the lock that assists dynamic upgrade in the first mapping table has thread ID, this thread is marked as blocking state; If it is the latter, its thread ID is first added in the second mapping table, if the shared critical variable corresponding in the first mapping table does not have a thread ID, then its thread ID is added to the corresponding position in the first mapping table, and The thread is marked as an assist state, if the corresponding shared critical variable in the first mapping table has a thread ID, the thread is marked as a blocked state;

(6-5)持续检查所有线程的状态,当发现没有线程处于run状态时,则将标记为协助状态的线程阻塞,此时所有线程都进入阻塞状态,通知系统可以进行后续的动态升级操作。(6-5) Continuously check the status of all threads. When no thread is found to be in the running state, the thread marked as the assistance state will be blocked. At this time, all threads will enter the blocked state, and the notification system can perform subsequent dynamic upgrade operations.

按照本发明的另一方面,提供了一种基于异步检查点的多线程软件动态升级系统,包括:According to another aspect of the present invention, a multithreaded software dynamic upgrade system based on asynchronous checkpoints is provided, including:

第一模块,用于获取待升级软件的新旧版本,分别提取新旧版本中的项目源文件,并分别将该新旧版本的项目源文件整合;The first module is used to obtain the old and new versions of the software to be upgraded, respectively extract the project source files in the old and new versions, and integrate the project source files of the old and new versions respectively;

第二模块,用于对整合后的新版本的项目源文件和旧版本的项目源文件进行对比,以生成初级补丁;The second module is used to compare the integrated new version of the project source file with the old version of the project source file to generate a primary patch;

第三模块,用于将异步检查点插入初级补丁中,以生成动态升级补丁,其中异步检查点中保存了待升级软件的新旧版本的延续点的映射关系;The third module is used to insert the asynchronous checkpoint into the primary patch to generate a dynamic upgrade patch, wherein the asynchronous checkpoint stores the mapping relationship between the continuation points of the old and new versions of the software to be upgraded;

第四模块,用于将生成的动态升级补丁加载到运行中的待升级软件的旧版本中;The fourth module is used to load the generated dynamic upgrade patch into the running old version of the software to be upgraded;

第五模块,用于接收用户的初始化请求,并根据该初始化请求使用动态升级补丁中待更新的函数名查找内存中对应的函数体,并将第三模块中的异步检查点插入该函数体中;The fifth module is used to receive the user's initialization request, and according to the initialization request, use the function name to be updated in the dynamic upgrade patch to find the corresponding function body in the memory, and insert the asynchronous checkpoint in the third module into the function body ;

第六模块,用于接收用户的应用请求,并根据该应用请求利用异步检查点算法使待升级软件中的所有线程达到阻塞状态;The sixth module is used to receive the user's application request, and use the asynchronous checkpoint algorithm to make all the threads in the software to be upgraded reach a blocked state according to the application request;

第七模块,用于对于待升级软件中的线程中未被使用和执行的函数及变量,采用二进制重写的方式实现函数的间接跳转,对于待升级软件中的线程中正在使用和执行的函数及变量,采用堆栈重构的方式进行映射和状态转换;The seventh module is used to realize the indirect jump of functions in the way of binary rewriting for the functions and variables that are not used and executed in the threads of the software to be upgraded. For the functions and variables that are being used and executed in the threads of the software to be upgraded Functions and variables are mapped and state converted by means of stack reconstruction;

第八模块,用于根据动态升级补丁中异步检查点中保存的新旧版本的延续点的映射关系恢复执行所有线程,过程结束。The eighth module is used to resume execution of all threads according to the mapping relationship between the old and new versions of the continuation point stored in the asynchronous checkpoint in the dynamic upgrade patch, and the process ends.

总体而言,通过本发明所构思的以上技术方案与现有技术相比,能够取得下列有益效果:Generally speaking, compared with the prior art, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

(1)二进制兼容性(不依赖于特定编译器):本发明的方法并未使用程序改造或重建将程序变得可更新,它利用调试API获得补丁进程的控制权并修改运行程序的状态,这和调试器的实现原理相似。此外,不依靠更新点来消除类型上的许多制约因素,本发明的方法增加了更新的灵活性。(1) Binary compatibility (not dependent on a specific compiler): the method of the present invention does not use program transformation or reconstruction to make the program renewable, it utilizes the debugging API to obtain the control right of the patch process and revises the state of the running program, This is similar to the implementation principle of a debugger. Furthermore, the method of the present invention increases the flexibility of updates without relying on update points to eliminate many of the constraints on types.

(2)多线程支持:处理多线程软件的难点在于有可能几个线程同时访问更新中的数据,本发明放弃了基于更新点的方法而采用更新立即应用。其追踪试图向旧版本中的临界变量进行写访问并且采用一次性更新所有线程的方式保证同一时刻软件只执行调用同一版本的函数和变量,避免了数据的不一致性。(2) multi-thread support: the difficulty of processing multi-thread software is that several threads may access the data in the update simultaneously, and the present invention abandons the method based on the update point and adopts the update to apply immediately. Its tracking attempts to write access to the critical variables in the old version and adopts the method of updating all threads at one time to ensure that the software only executes and calls the functions and variables of the same version at the same time, avoiding data inconsistency.

(3)防止线程之间的死锁问题:考虑到有些软件在更新前有可能已经处于一个异常状态例如一些软件内部错误或是外部攻击。因此不考虑这些情况很有可能导致这些软件更新的失败,虽然要完全解决这些问题是不大可能的,在某些时候无法知晓正确的运行状态,但是本发明的方法可以包装替换系统调用来获悉各个线程是否处于阻塞状态,维护WANT和HAVE列表能够有效避免线程之间的死锁问题。(3) Prevent deadlock between threads: Consider that some software may already be in an abnormal state before updating, such as some software internal errors or external attacks. Therefore, not considering these situations is likely to cause the failure of these software updates. Although it is unlikely to completely solve these problems, the correct running state cannot be known at some point, but the method of the present invention can wrap and replace system calls to learn Whether each thread is in a blocked state, maintaining the WANT and HAVE lists can effectively avoid deadlock problems between threads.

(4)可用性和可管理性:为了减轻操作员的负担,本发明的方法开发了一种用户界面方便整个更新过程。操作员只需要告诉系统少量的信息(进程ID和补丁名称)就能应用更新。同时,打补丁的过程对于操作员也是可见的。为了帮助用户构建动态补丁,本发明的方法提供了一个源代码到源代码的编译器,它可以识别新旧版本代码的语义差别。通过一些简单的手动调整,动态补丁可以自动地生成。(4) Usability and manageability: In order to reduce the operator's burden, the method of the present invention develops a user interface to facilitate the whole updating process. The operator only needs to tell the system a small amount of information (process ID and patch name) to apply the update. At the same time, the patching process is also visible to the operator. In order to help users build dynamic patches, the method of the present invention provides a source code-to-source code compiler, which can identify the semantic difference between the old and new versions of the code. With some simple manual adjustments, dynamic patches can be generated automatically.

(5)低开销:由于使用二进制重写来指示旧版本到新版本的函数调用,这就只会产生函数间接寻址的一点点开销。而应用异步检查点算法一次性更新所有线程并完成堆栈重构是在所有线程都处于阻塞的状态下进行的,实际上,这样的开销是很小的,性能测试表明对于大多数应用程序它的开销小于5%。(5) Low overhead: Since binary rewriting is used to indicate the function call from the old version to the new version, this will only generate a little overhead of function indirect addressing. However, the application of asynchronous checkpoint algorithm to update all threads at one time and complete the stack reconstruction is carried out when all threads are blocked. In fact, such overhead is very small, and performance tests show that it is effective for most applications. The overhead is less than 5%.

附图说明Description of drawings

图1是本发明基于异步检查点的多线程软件动态升级方法的流程图。Fig. 1 is a flow chart of the multi-thread software dynamic upgrading method based on asynchronous checkpoint in the present invention.

图2(a)和(b)示出异步检查点算法能够解决的死锁问题。Figure 2(a) and (b) show the deadlock problem that the asynchronous checkpoint algorithm can solve.

图3示出函数间接跳转的实现原理。Fig. 3 shows the realization principle of function indirect jump.

图4示出堆栈重构的概况。Figure 4 shows an overview of stack reconstruction.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.

本发明的整体思路在于,用户可以根据新旧版本的开源软件生成初级动态升级补丁,对初级动态升级补丁进行加工并在常规编译器下编译得到动态升级补丁,然后加载动态升级补丁利用异步检查点算法使待更新软件的所有线程达到阻塞状态,对于未被执行使用的函数和变量采取间接跳转的方式进行更新,对于正在执行使用的函数和变量则采取一次性对所有线程进行堆栈重构的方式来更新。The overall idea of the present invention is that the user can generate the primary dynamic upgrade patch according to the new and old versions of open source software, process the primary dynamic upgrade patch and compile it under a conventional compiler to obtain the dynamic upgrade patch, and then load the dynamic upgrade patch using the asynchronous checkpoint algorithm Make all the threads of the software to be updated reach the blocking state, update the functions and variables that are not used by indirect jumps, and restructure the stacks of all threads at once for the functions and variables that are being used to update.

如图1所示,本发明基于异步检查点的多线程软件动态升级方法包括以下步骤:As shown in Figure 1, the multithreaded software dynamic upgrading method based on the asynchronous checkpoint of the present invention comprises the following steps:

(1)获取待升级软件的新旧版本,分别提取新旧版本中的项目源文件,并分别将该新旧版本的项目源文件整合;具体而言,是采用通用中间语言(Common Intermediate Language,简称CIL)中的合并(Merge)功能进行项目源文件的整合;(1) Obtain the old and new versions of the software to be upgraded, extract the project source files in the old and new versions respectively, and integrate the project source files of the new and old versions respectively; specifically, use Common Intermediate Language (CIL for short) Merge (Merge) function in the integration of project source files;

(2)对整合后的新版本的项目源文件和旧版本的项目源文件进行对比,以生成初级补丁;具体而言,是利用强大在线升级系统(Powerful LiveUpdating System,简称Polus)进行比对工作,生成的初级补丁是.c类型的程序文件;(2) Compare the integrated new version of the project source file with the old version of the project source file to generate a primary patch; specifically, use a powerful online upgrade system (Powerful LiveUpdating System, referred to as Polus) for comparison , the primary patch generated is a program file of type .c;

(3)将异步检查点插入初级补丁中,以生成动态升级补丁;具体而言,将异步检查点的代码插入.c类型的程序文件中,并使用常规编译器(比如GCC)对其进行编译,最终生成.so类型的程序文件;此外,异步检查点中保存了待升级软件的新旧版本的延续点(Continuation point)的映射关系;(3) Insert the asynchronous checkpoint into the primary patch to generate a dynamic upgrade patch; specifically, insert the code of the asynchronous checkpoint into a .c type program file, and compile it with a conventional compiler (such as GCC) , and finally generate a program file of the .so type; in addition, the asynchronous checkpoint saves the mapping relationship between the old and new versions of the software to be upgraded;

(4)将生成的动态升级补丁加载到运行中的待升级软件的旧版本中;(4) load the dynamic upgrade patch that generates into the old version of the software to be upgraded in operation;

(5)接收用户的初始化请求,并根据该初始化请求使用动态升级补丁中待更新的函数名查找内存中对应的函数体,并将步骤(3)中的异步检查点插入该函数体中;具体而言,将异步检查点插入函数体中是利用动态插桩方式,插入函数体的位置是位于该函数体的头部、循环体的开头、函数调用之前。(5) Receive the user's initialization request, and use the function name to be updated in the dynamic upgrade patch to find the corresponding function body in the memory according to the initialization request, and insert the asynchronous checkpoint in step (3) into the function body; specifically For example, the asynchronous checkpoint is inserted into the function body using dynamic instrumentation. The position of inserting the function body is at the head of the function body, the beginning of the loop body, and before the function call.

(6)接收用户的应用请求,并根据该应用请求利用异步检查点算法使待升级软件中的所有线程达到阻塞状态;本步骤具体包括以下子步骤:(6) Receive the user's application request, and use the asynchronous checkpoint algorithm to make all threads in the software to be upgraded reach a blocked state according to the application request; this step specifically includes the following sub-steps:

(6-1)接收用户的应用请求,该应用请求中包括待更新软件的进程ID、以及步骤(3)中动态升级补丁文件的路径;(6-1) receiving the user's application request, including the process ID of the software to be updated and the path of the dynamic upgrade patch file in step (3);

(6-2)初始化空的第一映射表(HAVE列表)和第二映射表(WANT列表),其中第一映射表表示线程已经获得的临界变量以及协助动态升级的锁(Lock),第二映射表表示线程希望获得的临界变量以及协助动态升级的锁;(6-2) Initialize the empty first mapping table (HAVE list) and the second mapping table (WANT list), wherein the first mapping table represents the critical variable that the thread has obtained and the lock (Lock) that assists dynamic upgrade, and the second The mapping table represents the critical variables that the thread wants to obtain and the locks that assist dynamic upgrades;

(6-3)通过包装替换(replaced with wrapper calls)系统调用来追踪线程的共享临界变量和协助动态升级的锁,当系统每次对共享临界变量和协助动态升级的锁有操作时,查找步骤(6-2)中的第一映射表和第二映射表,然后进入步骤(6-4),若没有则将临界变量名和协助动态升级的锁的名称添加到第一映射表和第二映射表中,并在每个变量或锁的后面添加对其操作的线程ID,然后进入步骤(6-4)。(6-3) Track the thread's shared critical variables and locks that assist dynamic upgrades by replacing with wrapper calls system calls. When the system operates on shared critical variables and locks that assist dynamic upgrades, the search steps The first mapping table and the second mapping table in (6-2), enter step (6-4) then, if not then add the name of critical variable name and the lock that assists dynamic upgrade to the first mapping table and the second mapping Table, and add the thread ID of its operation behind each variable or lock, and then enter step (6-4).

(6-4)判断线程是占用协助动态升级的锁,还是占用共享临界变量,如果是前者则先将其线程ID添加到WANT列表中,如果HAVE列表中协助动态升级的锁没有线程ID,则将其线程ID添加到HAVE列表中对应的位置,并将该线程标记为协助(cooperate)状态,如果HAVE列表中协助动态升级的锁有线程ID将该线程标记为阻塞(block)状态;如果是后者则先将其线程ID添加到WANT列表中,如果HAVE列表中对应的共享临界变量没有线程ID,则将其线程ID添加到HAVE列表中对应的位置,并将该线程标记为协助(run)状态,如果HAVE列表中对应的共享临界变量有线程ID将该线程标记为阻塞(block)状态。(6-4) Determine whether the thread is occupying a lock that assists in dynamic upgrades or a shared critical variable. If it is the former, first add its thread ID to the WANT list. If the lock in the HAVE list that assists in dynamic upgrades does not have a thread ID, then Add its thread ID to the corresponding position in the HAVE list, and mark the thread as an assist (cooperate) state, if the lock in the HAVE list assists dynamic upgrades with a thread ID, mark the thread as a blocking (block) state; if it is The latter first adds its thread ID to the WANT list, if the corresponding shared critical variable in the HAVE list does not have a thread ID, then adds its thread ID to the corresponding position in the HAVE list, and marks the thread as assisting (run ) state, if the corresponding shared critical variable in the HAVE list has a thread ID, the thread is marked as blocked (block) state.

(6-5)持续检查所有线程的状态,当发现没有线程处于run状态时,则将标记为协助状态的线程阻塞,此时所有线程都进入阻塞状态,通知系统可以进行后续的动态升级操作。(6-5) Continuously check the status of all threads. When no thread is found to be in the running state, the thread marked as the assistance state will be blocked. At this time, all threads will enter the blocked state, and the notification system can perform subsequent dynamic upgrade operations.

(7)对于待升级软件中的线程中未被使用和执行的函数及变量,采用二进制重写的方式实现函数的间接跳转,具体而言,将函数体开头的二进制代码替换成jmp指令,跳转到新版本函数,变量采用重定向的方式映射到新版本的内存地址;而对于待升级软件中的线程中正在使用和执行的函数及变量,采用堆栈重构的方式进行映射和状态转换,具体而言,首先保存现场,记录当前函数栈中的数据和寄存器的值,然后展开堆栈,根据现场信息和步骤(3)中的动态升级补丁中待更新函数的信息,重写函数参数、返回地址、前栈帧指针和局部变量,修改替换新的函数指令。(7) For the unused and executed functions and variables in the threads of the software to be upgraded, the binary rewriting method is used to realize the indirect jump of the function. Specifically, the binary code at the beginning of the function body is replaced with the jmp instruction, Jump to the new version of the function, and the variables are mapped to the memory address of the new version by redirection; for the functions and variables being used and executed in the threads in the software to be upgraded, the stack reconstruction method is used for mapping and state conversion , specifically, first save the scene, record the data in the current function stack and the value of the register, then expand the stack, and rewrite the function parameters, Return address, previous stack frame pointer and local variables, modify and replace new function instructions.

(8)根据动态升级补丁中异步检查点中保存的新旧版本的延续点的映射关系恢复执行所有线程,过程结束,此时运行软件现在执行和使用的函数及变量都是新的版本。(8) According to the mapping relationship of the continuation point of the old and new versions preserved in the asynchronous checkpoint in the dynamic upgrade patch, all threads are resumed and executed, and the process ends. At this moment, the functions and variables that are now executed and used by the running software are all new versions.

如图2(a)和(b)所示,线程a,b,c,d,e,f正常运行,在这个时候更新监控进程向应用程序发出将要更新的信号。线程a首先到达检查点,于是它获得了协助动态升级的锁,线程b,c,d也接着到达检查点,但是此时协助动态升级的锁已经被线程a获得,所以它们处于被阻塞的状态,更新监控进程通过协助动态升级的锁的异常捕获能够轻易的获悉这一情况,然而线程d在阻塞前占有了临界变量temp1,此时线程e恰好要访问临界变量temp1而被阻塞,但是更新监控进程通常情况下不能直接捕获线程e的状态,因为没有任何异常被抛出。然而通过WANT和HAVE列表可以轻易的发现线程e是被阻塞的,线程f处于继续执行的状态。也就是说,如果没有WANT和HAVE列表的支持,当线程f也到达阻塞状态时,更新监控进程并不知道所有线程都处于阻塞状态,它仍然会一直等待,导致应用程序的死锁,通过维护WANT和HAVE列表就可以成功避免更新过程中线程间的死锁问题。As shown in Figure 2 (a) and (b), threads a, b, c, d, e, f are running normally, at this time the update monitoring process sends a signal to the application program that it will be updated. Thread a arrives at the checkpoint first, so it acquires the lock to assist dynamic upgrade, and threads b, c, and d also arrive at the checkpoint, but at this time the lock to assist dynamic upgrade has been acquired by thread a, so they are in a blocked state , the update monitoring process can easily know this situation by assisting in the exception capture of dynamically upgraded locks. However, thread d occupies the critical variable temp1 before blocking. At this time, thread e happens to access the critical variable temp1 and is blocked. The process normally cannot capture the state of thread e directly, because no exception is thrown. However, through the WANT and HAVE lists, it can be easily found that thread e is blocked, and thread f is in the state of continuing execution. That is to say, without the support of the WANT and HAVE lists, when the thread f also reaches the blocked state, the update monitoring process does not know that all threads are blocked, and it will still wait forever, resulting in a deadlock of the application. The WANT and HAVE lists can successfully avoid the deadlock problem between threads during the update process.

本发明的方法本发明的方法通过重写函数开头指令的5个字节插入一条jmp指令,但是重写操作毁坏了一条或多条指令。在指令重写操作之外,本发明的方法在立即执行指令之前插入两个字节的两条nop指令,因为内核从EIP减去两个字节来重启系统调用,如果ptrace已经中断了一个系统调用的执行。为了在代码更新后不需要系统的帮助使得应用程序继续执行,本发明的方法应该保存已经被重写为jmp和nop指令的原始指令。然而,当应该被重写为nop的原始指令在另一个分支上时,修改过的指令也许会被直接执行,这有可能导致非法指令错误。于是,本发明的方法重写指令的另外4个或7个字节(两条nop指令要2个字节,一条短跳jmp指令要2个字节或者一条长跳jmp指令要5个字节)。短跳jmp指令用来将控制流跳转到另一个分支和不可能被直接重写为nop指令的指令。如图3所示,通过这种二进制重写的方式,在虚拟内存地址的函数体开头插入跳转指令,当程序再次调用该函数时,它将沿着函数体中的每一条指令顺序执行,而第一条指令已经被重写为jmp跳转指令,程序将跳到新版本函数的代码继续执行,这样相当于程序每次调用旧版本函数实际上却在执行新版本函数的指令。Method of the invention The method of the invention inserts a jmp instruction by rewriting the 5 bytes of the instruction at the beginning of the function, but the rewriting operation destroys one or more instructions. In addition to the instruction rewrite operation, the method of the present invention inserts two nop instructions of two bytes before the immediately executed instruction, because the kernel subtracts two bytes from EIP to restart the system call, if ptrace has interrupted a system The execution of the call. In order to make the application program continue to execute without the help of the system after the code update, the method of the present invention should preserve the original instructions that have been rewritten as jmp and nop instructions. However, when the original instruction that should be rewritten as a nop is on another branch, the modified instruction may be executed directly, which may cause an illegal instruction error. Then, the other 4 or 7 bytes of the method rewriting instruction of the present invention (two nop instructions need 2 bytes, a short jump jmp instruction needs 2 bytes or a long jump jmp instruction needs 5 bytes ). Short jump jmp instructions are used to jump control flow to another branch and instructions that cannot be directly rewritten as nop instructions. As shown in Figure 3, through this binary rewriting method, a jump instruction is inserted at the beginning of the function body at the virtual memory address. When the program calls the function again, it will execute sequentially along each instruction in the function body. The first instruction has been rewritten as a jmp jump instruction, and the program will jump to the code of the new version of the function to continue executing, which is equivalent to executing the instructions of the new version of the function every time the program calls the old version of the function.

堆栈重构包括两个主要步骤,堆栈信息的保存以及所有函数栈帧的恢复。在堆栈重构中恢复更新的状态前它保存现有堆栈的状态。为了减少升级补丁中堆栈重构辅助代码的大小,有效地保存和恢复堆栈帧的包装函数只在重建时运行的单独内存区里的文本段里生成。如图4所示,函数A、B正在执行并且都需要更新,这时候如果所有线程暂停处于阻塞状态,则本发明的方法开始保存现场,记录数据和寄存器的值,然后展开堆栈,根据动态升级补丁中待更新函数的信息,重新对函数栈帧中的变量赋值,修改替换新的函数指令,其中不需要更新的函数在堆栈中的部分没有太大变化,需要更新的函数如A、B其新版本的数据由旧版本的数据映射获取,寄存器、相对虚拟地址等值也要重新计算得到。Stack reconstruction consists of two main steps, preservation of stack information and restoration of all function stack frames. It saves the state of the existing stack before restoring the updated state in stack reconstruction. To reduce the size of the stack reconstruction helper code in upgrade patches, the wrapper functions that efficiently save and restore stack frames are only generated in text segments in a separate memory area that runs when rebuilding. As shown in Figure 4, functions A and B are executing and all need to be updated. At this time, if all threads are suspended and blocked, the method of the present invention starts to save the scene, records the value of data and registers, and then unrolls the stack, according to the dynamic upgrade. For the information of the function to be updated in the patch, re-assign the variables in the function stack frame, modify and replace the new function instructions, and the part of the function that does not need to be updated in the stack has not changed much, and the functions that need to be updated, such as A, B, etc. The data of the new version is obtained from the data mapping of the old version, and values such as registers and relative virtual addresses must also be recalculated.

本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。It is easy for those skilled in the art to understand that the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, All should be included within the protection scope of the present invention.

Claims (5)

1. the multi-thread software dynamic update method based on asynchronous checkpointing, is characterized in that, comprises the following steps:
(1) obtain the new and old edition of software to be upgraded, extract respectively the project source file in new and old edition, and respectively the project source file of this new and old edition is integrated;
(2) the project source file of redaction and the project source file of legacy version after integrating are contrasted, to generate elementary patch;
(3) asynchronous checkpointing is inserted in elementary patch, to generate dynamic update patch, the mapping relations of wherein having preserved the continuity point of the new and old edition of software to be upgraded in asynchronous checkpointing;
(4) the dynamic update patch of generation is loaded in the legacy version of operating software to be upgraded;
(5) receive user's initialization requests, and use function name to be updated in dynamic update patch to search function body corresponding in internal memory according to this initialization requests, and the asynchronous checkpointing in step (3) is inserted in this function body;
(6) receive user's application request, and utilize asynchronous checkpointing algorithm to make all threads in software to be upgraded reach blocked state according to this application request;
(7) for the function and the variable that are not used in the thread in software to be upgraded and carry out, the mode that adopts scale-of-two to rewrite realizes the indirect redirect of function, for the function and the variable that are using in the thread in software to be upgraded and carrying out, adopt the mode of storehouse reconstruct to shine upon and state conversion;
(8) recover to carry out all threads according to the mapping relations of the continuity point of the new and old edition of preserving in asynchronous checkpointing in dynamic update patch, process finishes.
2. multi-thread software dynamic update method according to claim 1, is characterized in that, step (1) is to adopt the pooling function in common intermediate language to carry out the integration of project source file.
3. multi-thread software dynamic update method according to claim 1, it is characterized in that, it is to utilize dynamic pitching pile mode that step (5) is inserted asynchronous checkpointing in function body, before inserting the position of function body and be the beginning, function call of the head that is positioned at this function body, loop body.
4. multi-thread software dynamic update method according to claim 1, is characterized in that, step (6) specifically comprises following sub-step:
(6-1) reception user's application request, this application request comprises the path of process ID and the middle dynamic update patch file of step (3) of software to be updated;
(6-2) the first mapping table of initialization sky and the second mapping table, wherein the first mapping table represents critical variable that thread has obtained and assists the lock of dynamic update, and the second mapping table represents that thread wishes the critical variable obtaining and the lock of assisting dynamic update;
(6-3) lock that calls to follow the trail of the shared critical variable of thread and assist dynamic update by packaging replacement system, in the time that system has operation to the lock of shared critical variable and assistance dynamic update at every turn, the first mapping table in finding step (6-2) and the second mapping table, then enter step (6-4), the title of the lock of critical variable name and assistance dynamic update is added in the first mapping table and the second mapping table if do not have, and after each variable or lock, add the Thread Id to its operation, then enter step (6-4).
(6-4) judge that thread is to take the lock of assisting dynamic update, still take shared critical variable, if the former first adds its Thread Id in the second mapping table to, if assist the lock of dynamic update there is no Thread Id in the first mapping table, its Thread Id is added to position corresponding in the first mapping table, and be assistance state by this thread marks, be blocked state if assist the lock of dynamic update to have Thread Id in the first mapping table by this thread marks; If latter first adds its Thread Id in the second mapping table to, if shared critical variable corresponding in the first mapping table does not have Thread Id, its Thread Id is added to position corresponding in the first mapping table, and be assistance state by this thread marks, if in the first mapping table corresponding shared critical variable to have Thread Id be blocked state by this thread marks;
(6-5) the lasting state that checks all threads, in the time finding there is no thread in run state, will be labeled as the thread block of assistance state, and now all threads all enter blocked state, and reporting system can carry out follow-up dynamic update operation.
5. the multi-thread software dynamic update system based on asynchronous checkpointing, is characterized in that, comprising:
The first module, for obtaining the new and old edition of software to be upgraded, extracts respectively the project source file in new and old edition, and respectively the project source file of this new and old edition is integrated;
The second module, for the project source file of redaction and the project source file of legacy version after integrating are contrasted, to generate elementary patch;
The 3rd module, for inserting asynchronous checkpointing on elementary patch, to generate dynamic update patch, the mapping relations of wherein having preserved the continuity point of the new and old edition of software to be upgraded in asynchronous checkpointing;
Four module, for being loaded into the dynamic update patch of generation the legacy version of operating software to be upgraded;
The 5th module, for receiving user's initialization requests, and is used function name to be updated in dynamic update patch to search function body corresponding in internal memory according to this initialization requests, and the asynchronous checkpointing in the 3rd module is inserted in this function body;
The 6th module, for receiving user's application request, and utilizes asynchronous checkpointing algorithm to make all threads in software to be upgraded reach blocked state according to this application request;
The 7th module, be used for for the function and the variable that are not used in the thread of software to be upgraded and carry out, the mode that adopts scale-of-two to rewrite realizes the indirect redirect of function, for the function and the variable that are using in the thread in software to be upgraded and carrying out, adopt the mode of storehouse reconstruct to shine upon and state conversion;
The 8th module, for recovering to carry out all threads according to the mapping relations of the continuity point of the new and old edition of preserving in dynamic update patch asynchronous checkpointing, process finishes.
CN201410305827.3A 2014-06-27 2014-06-27 Multi-thread software dynamic upgrading method based on asynchronous check points Expired - Fee Related CN104111848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410305827.3A CN104111848B (en) 2014-06-27 2014-06-27 Multi-thread software dynamic upgrading method based on asynchronous check points

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410305827.3A CN104111848B (en) 2014-06-27 2014-06-27 Multi-thread software dynamic upgrading method based on asynchronous check points

Publications (2)

Publication Number Publication Date
CN104111848A true CN104111848A (en) 2014-10-22
CN104111848B CN104111848B (en) 2017-04-26

Family

ID=51708648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410305827.3A Expired - Fee Related CN104111848B (en) 2014-06-27 2014-06-27 Multi-thread software dynamic upgrading method based on asynchronous check points

Country Status (1)

Country Link
CN (1) CN104111848B (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528231A (en) * 2016-01-21 2016-04-27 华中科技大学 Intermediate auxiliary function-based method and intermediate auxiliary function-based system for dynamically updating software
CN105787367A (en) * 2016-02-23 2016-07-20 华中科技大学 Patch security detecting method and system for software update
CN106201476A (en) * 2016-06-29 2016-12-07 北京金山安全软件有限公司 Method and device for constructing hash mapping table and electronic equipment
CN108897572A (en) * 2018-07-19 2018-11-27 北京理工大学 A kind of complicated type reconstructing method based on variable association tree
CN109408090A (en) * 2018-10-09 2019-03-01 广东美的制冷设备有限公司 Upgrade method, data converter and the readable storage medium storing program for executing of device software
CN109564525A (en) * 2016-06-28 2019-04-02 亚马逊技术有限公司 Asynchronous task management in on-demand network code performing environment
CN109766131A (en) * 2017-11-06 2019-05-17 上海宝信软件股份有限公司 The system and method for the intelligent automatic upgrading of software is realized based on multithreading
CN109918141A (en) * 2019-03-15 2019-06-21 Oppo广东移动通信有限公司 Thread execution method, thread execution device, terminal and storage medium
CN110442367A (en) * 2019-08-14 2019-11-12 腾讯云计算(北京)有限责任公司 The upgrade method and device of program, storage medium and electronic device
CN110489140A (en) * 2019-07-11 2019-11-22 平安科技(深圳)有限公司 Method for upgrading software, device, computer equipment and computer storage medium
CN111930413A (en) * 2020-05-22 2020-11-13 无锡中感微电子股份有限公司 Automatic patch generation method, device and system
CN112416379A (en) * 2021-01-21 2021-02-26 统信软件技术有限公司 Application program installation method and device, computing equipment and readable storage medium
CN112433747A (en) * 2020-12-16 2021-03-02 深圳乐播科技有限公司 Differential upgrading method and system suitable for Software Development Kit (SDK)
CN112740187A (en) * 2018-10-09 2021-04-30 华为技术有限公司 Method and system for debugging program
CN113326039A (en) * 2021-06-21 2021-08-31 深圳市网通兴技术发展有限公司 Asynchronous code generation method and system for medical code flow modeling
US11593270B1 (en) 2020-11-25 2023-02-28 Amazon Technologies, Inc. Fast distributed caching using erasure coded object parts
US11714682B1 (en) 2020-03-03 2023-08-01 Amazon Technologies, Inc. Reclaiming computing resources in an on-demand code execution system
US11714675B2 (en) 2019-06-20 2023-08-01 Amazon Technologies, Inc. Virtualization-based transaction handling in an on-demand network code execution system
US11836516B2 (en) 2018-07-25 2023-12-05 Amazon Technologies, Inc. Reducing execution times in an on-demand network code execution system using saved machine states
US11861386B1 (en) 2019-03-22 2024-01-02 Amazon Technologies, Inc. Application gateways in an on-demand network code execution system
US11875173B2 (en) 2018-06-25 2024-01-16 Amazon Technologies, Inc. Execution of auxiliary functions in an on-demand network code execution system
US11943093B1 (en) 2018-11-20 2024-03-26 Amazon Technologies, Inc. Network connection recovery after virtual machine transition in an on-demand network code execution system
US11968280B1 (en) 2021-11-24 2024-04-23 Amazon Technologies, Inc. Controlling ingestion of streaming data to serverless function executions
US12015603B2 (en) 2021-12-10 2024-06-18 Amazon Technologies, Inc. Multi-tenant mode for serverless code execution
CN119376620A (en) * 2024-09-27 2025-01-28 青海师范大学 A ZNS SSD data partial update method based on patch
US12321766B2 (en) 2014-09-30 2025-06-03 Amazon Technologies, Inc. Low latency computational capacity provisioning
US12327133B1 (en) 2019-03-22 2025-06-10 Amazon Technologies, Inc. Application gateways in an on-demand network code execution system
US12381878B1 (en) 2023-06-27 2025-08-05 Amazon Technologies, Inc. Architecture for selective use of private paths between cloud services
US12476978B2 (en) 2023-09-29 2025-11-18 Amazon Technologies, Inc. Management of computing services for applications composed of service virtual computing components

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030208750A1 (en) * 2002-03-29 2003-11-06 Tapper Gunnar D. Information exchange for process pair replacement in a cluster environment
CN1770108A (en) * 2004-11-05 2006-05-10 华为技术有限公司 Online software updating method
US7543136B1 (en) * 2005-07-13 2009-06-02 Nvidia Corporation System and method for managing divergent threads using synchronization tokens and program instructions that include set-synchronization bits
US20120079241A1 (en) * 2010-09-24 2012-03-29 William James Dally Instruction execution based on outstanding load operations

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030208750A1 (en) * 2002-03-29 2003-11-06 Tapper Gunnar D. Information exchange for process pair replacement in a cluster environment
CN1770108A (en) * 2004-11-05 2006-05-10 华为技术有限公司 Online software updating method
US7543136B1 (en) * 2005-07-13 2009-06-02 Nvidia Corporation System and method for managing divergent threads using synchronization tokens and program instructions that include set-synchronization bits
US20120079241A1 (en) * 2010-09-24 2012-03-29 William James Dally Instruction execution based on outstanding load operations

Cited By (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12321766B2 (en) 2014-09-30 2025-06-03 Amazon Technologies, Inc. Low latency computational capacity provisioning
CN105528231A (en) * 2016-01-21 2016-04-27 华中科技大学 Intermediate auxiliary function-based method and intermediate auxiliary function-based system for dynamically updating software
CN105528231B (en) * 2016-01-21 2019-03-05 华中科技大学 A kind of software dynamic upgrade method and system based on intermediate auxiliary function
CN105787367A (en) * 2016-02-23 2016-07-20 华中科技大学 Patch security detecting method and system for software update
CN105787367B (en) * 2016-02-23 2018-09-21 华中科技大学 A kind of the patch safety detecting method and system of software upgrading
CN109564525B (en) * 2016-06-28 2023-05-02 亚马逊技术有限公司 Asynchronous task management in an on-demand network code execution environment
CN109564525A (en) * 2016-06-28 2019-04-02 亚马逊技术有限公司 Asynchronous task management in on-demand network code performing environment
CN106201476A (en) * 2016-06-29 2016-12-07 北京金山安全软件有限公司 Method and device for constructing hash mapping table and electronic equipment
CN106201476B (en) * 2016-06-29 2019-06-21 珠海豹趣科技有限公司 A kind of method, apparatus and electronic equipment constructing Hash Map
CN109766131A (en) * 2017-11-06 2019-05-17 上海宝信软件股份有限公司 The system and method for the intelligent automatic upgrading of software is realized based on multithreading
US12314752B2 (en) 2018-06-25 2025-05-27 Amazon Technologies, Inc. Execution of auxiliary functions in an on-demand network code execution system
US11875173B2 (en) 2018-06-25 2024-01-16 Amazon Technologies, Inc. Execution of auxiliary functions in an on-demand network code execution system
CN108897572A (en) * 2018-07-19 2018-11-27 北京理工大学 A kind of complicated type reconstructing method based on variable association tree
CN108897572B (en) * 2018-07-19 2020-09-15 北京理工大学 Complex type reconstruction method based on variable association tree
US11836516B2 (en) 2018-07-25 2023-12-05 Amazon Technologies, Inc. Reducing execution times in an on-demand network code execution system using saved machine states
CN109408090A (en) * 2018-10-09 2019-03-01 广东美的制冷设备有限公司 Upgrade method, data converter and the readable storage medium storing program for executing of device software
CN112740187A (en) * 2018-10-09 2021-04-30 华为技术有限公司 Method and system for debugging program
CN109408090B (en) * 2018-10-09 2021-05-28 广东美的制冷设备有限公司 Upgrading method of equipment software, data converter and readable storage medium
US11943093B1 (en) 2018-11-20 2024-03-26 Amazon Technologies, Inc. Network connection recovery after virtual machine transition in an on-demand network code execution system
CN109918141A (en) * 2019-03-15 2019-06-21 Oppo广东移动通信有限公司 Thread execution method, thread execution device, terminal and storage medium
US12327133B1 (en) 2019-03-22 2025-06-10 Amazon Technologies, Inc. Application gateways in an on-demand network code execution system
US11861386B1 (en) 2019-03-22 2024-01-02 Amazon Technologies, Inc. Application gateways in an on-demand network code execution system
US11714675B2 (en) 2019-06-20 2023-08-01 Amazon Technologies, Inc. Virtualization-based transaction handling in an on-demand network code execution system
CN110489140A (en) * 2019-07-11 2019-11-22 平安科技(深圳)有限公司 Method for upgrading software, device, computer equipment and computer storage medium
CN110442367A (en) * 2019-08-14 2019-11-12 腾讯云计算(北京)有限责任公司 The upgrade method and device of program, storage medium and electronic device
US11714682B1 (en) 2020-03-03 2023-08-01 Amazon Technologies, Inc. Reclaiming computing resources in an on-demand code execution system
CN111930413B (en) * 2020-05-22 2023-07-21 无锡中感微电子股份有限公司 Automatic patch generation method, device and system
CN111930413A (en) * 2020-05-22 2020-11-13 无锡中感微电子股份有限公司 Automatic patch generation method, device and system
US11593270B1 (en) 2020-11-25 2023-02-28 Amazon Technologies, Inc. Fast distributed caching using erasure coded object parts
CN112433747A (en) * 2020-12-16 2021-03-02 深圳乐播科技有限公司 Differential upgrading method and system suitable for Software Development Kit (SDK)
CN112433747B (en) * 2020-12-16 2022-11-25 深圳乐播科技有限公司 Differential upgrading method and system suitable for Software Development Kit (SDK)
CN112416379A (en) * 2021-01-21 2021-02-26 统信软件技术有限公司 Application program installation method and device, computing equipment and readable storage medium
CN113326039A (en) * 2021-06-21 2021-08-31 深圳市网通兴技术发展有限公司 Asynchronous code generation method and system for medical code flow modeling
CN113326039B (en) * 2021-06-21 2022-02-18 深圳市网通兴技术发展有限公司 Asynchronous code generation method and system for medical code flow modeling
US11968280B1 (en) 2021-11-24 2024-04-23 Amazon Technologies, Inc. Controlling ingestion of streaming data to serverless function executions
US12015603B2 (en) 2021-12-10 2024-06-18 Amazon Technologies, Inc. Multi-tenant mode for serverless code execution
US12381878B1 (en) 2023-06-27 2025-08-05 Amazon Technologies, Inc. Architecture for selective use of private paths between cloud services
US12476978B2 (en) 2023-09-29 2025-11-18 Amazon Technologies, Inc. Management of computing services for applications composed of service virtual computing components
CN119376620A (en) * 2024-09-27 2025-01-28 青海师范大学 A ZNS SSD data partial update method based on patch
CN119376620B (en) * 2024-09-27 2025-04-18 青海师范大学 A ZNS SSD data partial update method based on patch

Also Published As

Publication number Publication date
CN104111848B (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN104111848B (en) Multi-thread software dynamic upgrading method based on asynchronous check points
Boos et al. Theseus: an experiment in operating system structure and state management
US8707287B2 (en) Method, computer program product, and system for non-blocking dynamic update of statically typed class-based object-oriented software
US7784044B2 (en) Patching of in-use functions on a running computer system
US7774636B2 (en) Method and system for kernel panic recovery
US10831616B2 (en) Resilient programming frameworks for iterative computations
US9558023B2 (en) Live application mobility from one operating system level to an updated operating system level and applying overlay files to the updated operating system
CN105528231B (en) A kind of software dynamic upgrade method and system based on intermediate auxiliary function
Chen et al. Dynamic software updating using a relaxed consistency model
Chen et al. Surviving sensor network software faults
US20100017581A1 (en) Low overhead atomic memory operations
US20200409841A1 (en) Multi-threaded pause-less replicating garbage collection
CN115268983A (en) Hot repair method and device for embedded Internet of things equipment vulnerability
US7310723B1 (en) Methods and systems employing a flag for deferring exception handling to a commit or rollback point
CN106020812A (en) DSP platform spacecraft software-oriented dynamic on-orbit maintenance method
JP4931711B2 (en) Kernel update method, information processing apparatus, program, and storage medium
US20140282527A1 (en) Applying or Removing Appropriate File Overlays During Live Application Mobility
US20140281731A1 (en) Managed runtime enabling condition percolation
Jain et al. DMTCP: Fixing the single point of failure of the ros master
US10884763B2 (en) Loading new code in the initial program load path to reduce system restarts
US20140282516A1 (en) Providing execution access to files not installed in a virtualized space
GB2537038A (en) Resilient programming frameworks for handling failures in parallel programs
CN121187669A (en) Descriptive table repairing method, device, equipment and medium based on boot loading
Dumitras et al. First ACM Workshop on Hot Topics in Software Upgrades (HotSWUp’08)
Süßkraut Automatic hardening against dependability and security software bugs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170426