IP Library Granted Patent US 12,632,276
Granted Patent B2
US 12,632,276 · App. 17/821,815 · Granted May 19, 2026

Coordinated hooking mechanism for checkpointing virtual machines

Inventors: Oluwatobi Ajila (Ottawa, CA); Vijay Sundaresan (North York, CA); Thomas J. Watson (Pflugerville, TX); Daniel Heidinga (Toronto, CA)
Assignee: International Business Machines Corporation
G06F9/45558G06F9/30189G06F9/4418G06F2009/45575
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,632,276
App. No.
17/821,815
Granted
May 19, 2026
Kind
B2
Abstract

Aspects of the invention include systems and methods configured to checkpoint an application executing on a virtual machine. Aspects include receiving from a first thread executing on a virtual machine a call to a checkpoint application program interface (API) and suspending, by the virtual machine, execution of all threads other than the first thread. Aspects also includes executing, by the virtual machine, all application checkpoint hooks and executing, by the virtual machine, all virtual machine checkpoint hooks. Aspects further include creating one or more checkpoint image files.

Claims (52)

1 . A computer-implemented method for checkpointing an application executing on a virtual machine, the method comprising:

registering, with the virtual machine, application checkpoint hooks from the application, wherein the application checkpoint hooks are portions of code of the application that are configured to perform application level compensation tasks;

receiving, from a first thread executing on the virtual machine, a call to a checkpoint application program interface (API), wherein the virtual machine having virtual machine checkpoint hooks and virtual machine checkpoint hooks are portions of code of the virtual machine that are configured to perform virtual machine compensation tasks;

suspending, by the virtual machine, execution of all threads other than the first thread, including:

performing a global suspend operation which suspends the execution of all threads;

walking a virtual machine thread list to add a CHECKPOINT_HALT_FLAG to all application threads other than the first thread; and

performing a global resume operation which resumes operation of all threads that do not have a CHECKPOINT_HALT_FLAG, thereby placing the virtual machine into a single-threaded operating mode in which only the first thread continues execution;

while in the single-threaded operating mode, executing, by the virtual machine, all application checkpoint hooks;

while in the single-threaded operating mode, executing, by the virtual machine, all virtual machine checkpoint hooks; and

creating one or more checkpoint image files in response to executing the application checkpoint hooks and the virtual machine checkpoint hooks.

2 . The computer-implemented method of claim 1 , further comprising aborting checkpointing the application based on detecting an error executing one or more of the application checkpoint hooks and the virtual machine checkpoint hooks.

3 . The computer-implemented method of claim 1 , further comprising:

receiving a request to restore the application based on the one or more checkpoint image files;

executing, by the virtual machine, all application restore hooks;

executing, by the virtual machine, all virtual machine restore hooks; and

resuming a multi-threaded operating mode by resuming all suspended threads.

4 . The computer-implemented method of claim 3 , wherein resuming all suspended threads includes performing a global suspend operation which suspends execution of all threads, walking a virtual machine thread list to remove the CHECKPOINTHALTFLAG from all application threads, and performing a global resume operation which resumes operation of all threads.

5 . A computer program product for checkpointing an application executing on a virtual machine comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by one or more processors to cause the one or more processors to perform operations comprising:

registering, with the virtual machine, application checkpoint hooks from the application, wherein the application checkpoint hooks are portions of code of the application that are configured to perform application level compensation tasks;

receiving, from a first thread executing on the virtual machine, a call to a checkpoint application program interface (API), wherein the virtual machine having virtual machine checkpoint hooks and virtual machine checkpoint hooks are portions of code of the virtual machine that are configured to perform virtual machine compensation tasks;

suspending, by the virtual machine, execution of all threads other than the first thread, including:

performing a global suspend operation which suspends the execution of all threads;

walking a virtual machine thread list to add a CHECKPOINT_HALT_FLAG to all application threads other than the first thread; and

performing a global resume operation which resumes operation of all threads that do not have a CHECKPOINTHALTFLAG, thereby placing the virtual machine into a single-threaded operating mode in which only the first thread continues execution;

while in the single-threaded operating mode, executing, by the virtual machine, all application checkpoint hooks;

while in the single-threaded operating mode, executing, by the virtual machine, all virtual machine checkpoint hooks; and

creating one or more checkpoint image files in response to executing the application checkpoint hooks and the virtual machine checkpoint hooks.

6 . The computer program product of claim 5 , wherein the operations further comprise aborting checkpointing the application based on detecting an error executing one or more of the application checkpoint hooks and the virtual machine checkpoint hooks.

7 . The computer program product of claim 5 , wherein the operations further comprise:

receiving a request to restore the application based on the one or more checkpoint image files;

executing, by the virtual machine, all application restore hooks;

executing, by the virtual machine, all virtual machine restore hooks; and

resuming a multi-threaded operating mode by resuming all suspended threads.

8 . The computer program product of claim 7 , wherein resuming the multi-threaded operating mode includes performing a global suspend operation which suspends execution of all threads, walking a virtual machine thread list to remove the CHECKPOINTHALTFLAG from all application threads, and performing a global resume operation which resumes operation of all threads.

9 . A computer-implemented method for a-checkpointing an application in a managed runtime environment of a computing system, the computer-implemented process comprising:

registering, with the managed runtime environment, application checkpoint hooks from the application, wherein the application checkpoint hooks are portions of the code of the application that are configured to perform application level compensation tasks;

receiving, from a first thread executing on the managed runtime environment, a call to checkpoint application programming interface (API), wherein the managed runtime environment having a first set of managed runtime environment checkpoint hooks registered by a provider of the managed runtime environment and the first managed runtime environment checkpoint hooks are portions of code of the managed runtime environment that are configured to perform virtual machine compensation tasks;

suspending, by the managed runtime environment, execution of all threads other than the first thread, including:

performing a global suspend operation which suspends the execution of all threads,

walking a virtual machine thread list to add a CHECKPOINT_HALT_FLAG to all application threads other than the first thread, and

performing a global resume operation which resumes operation of all threads that do not have a CHECKPOINT_HALT_FLAG, thereby placing the managed runtime environment into a single-threaded operating mode in which only the first thread continues execution;

while in the single-threaded operating mode, executing, by the managed runtime environment, all application checkpoint hooks;

while in the single-threaded operating mode, executing, by the managed runtime environment, all managed runtime environment checkpoint hooks; and

creating, by the managed runtime environment, one or more checkpoint image files in response to executing the application checkpoint hooks and the managed runtime environment checkpoint hooks.

10 . The computer-implemented method of claim 9 , further comprising:

in response to receiving a request to restore the application, restoring the managed runtime environment to a state at a time of the checkpoint;

executing, by the managed runtime environment, a set of managed runtime environment restore hooks registered by the provider of the managed runtime environment;

executing, by the managed runtime environment, a set of application restore hooks registered by the application;

resuming a multi-threaded operating mode by resuming execution of the suspended threads by the managed runtime environment; and

completing return from the checkpoint application programming interface call.

11 . The computer-implemented method of claim 10 , wherein the set of application restore hooks are portions of code of the application that are configured to perform application level compensation tasks.

12 . The computer-implemented method of claim 10 , wherein the set of managed runtime environment restore hooks are portions of code of the managed runtime environment that are configured to perform virtual machine compensation tasks.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 25, 2023
From: RED HAT, INC.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 062481/0928 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 24, 2022
From: AJILA, OLUWATOBI; SUNDARESAN, VIJAY; WATSON, THOMAS J.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 060880/0213 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 24, 2022
From: HEIDINGA, DANIEL
To: RED HAT, INC.
Reel/Frame 060880/0526 →
Continuity (1)
Related Publication 20240069944A1 · Feb 29, 2024
References Cited (16)
US 10592346B1 · Backensto et al. · 2020 [cited by applicant]
US 11138035B1 · Parulkar · 2021 [cited by examiner]
US 20080216089A1 · Jia et al. · 2008 [cited by applicant]
US 20090228889A1 · Yoshida · 2009 [cited by examiner]
US 20110179311A1 · Nachimuthu · 2011 [cited by examiner]
US 20120066555A1 · Ganesh · 2012 [cited by examiner]
US 20200184069A1 · Strawser · 2020 [cited by examiner]
US 20220091872A1 · Huilgol · 2022 [cited by examiner]
US 20250005136A1 · Shamis · 2025 [cited by examiner]
Unknown Author (“CRIU”, web.archive.org/web/20220511050915/https://www.criu.org/Main_Page, Web page version retrieved dated May 11, 2022) (hereafter as “CRIU Documentation”) (Year: 2022). [cited by examiner]
Michael Bien (“CRaC—Coordinated Restore at Checkpoint”, mbien.dev/blog/tags/criu, Aug. 11, 2021). (Year: 2021). [cited by examiner]
D. Heidinga, “Everyone wants fast startup: introducing JVM snapshot+restore.” Eclipse. Nov. 2, 2020; 6 pages. [cited by applicant]
J. Cao et al., “Checkpointing as a Service in Heterogeneous Cloud Environments,” @ccs.neu.edu. May 7, 2015; 20 pages. [cited by applicant]
J. Hursey, “Coordinated Checkpoint/Restart Process Fault Tolerance for MPI Applications On HPC Systems.” Department of Computer Science Indiana University, Jul. 2010; 201 pages. [cited by applicant]
K. Arya, “User-Space Process Virtualization in the Context of Checkpoint-Restart and Virtual Machines.” Northeastern University, Aug. 2014; 200 pages. [cited by applicant]
No Author, “Java Thread Primitive Deprecation”, https://cr.openjdk.org/˜iris/se/12/latestSpec/api/java.base/java/ lang/doc-files/threadPrimitiveDeprecation.html, 5 pages. [cited by applicant]