Nepedia
Back to Discover
Advanced Reader
💻

Application checkpointing

technology Maturity 5-7 Next article →

Application checkpointing is a vital technique used to provide fault tolerance in computing systems. Fault tolerance is the ability of a system to continue operating properly even when some of its components fail. Checkpointing works by creating a snapshot of an application's current state. This snapshot allows the system to restart from a specific point rather than starting over from the beginning after a failure. This process is essential for long-running applications. These applications often run on failure-prone systems where a crash could result in massive amounts of lost work.

The mechanism of checkpointing follows a specific sequence of steps. First, the system must stop the application's execution. Next, the system copies all required data from the volatile memory to a reliable, stable storage location. This stable storage is often a parallel file system. Once the data is safely stored, the application continues its execution. If a failure occurs, the application restarts by reading the latest checkpoint from the stable storage. It then resumes processing from that exact point in time.

In distributed computing environments, checkpointing becomes more complex because many processes work together. There are two primary approaches to managing this: coordinated and uncoordinated checkpointing. In coordinated checkpointing, all processes work together to ensure their checkpoints are consistent. This is often achieved using a two-phase commit protocol algorithm. In uncoordinated checkpointing, each individual process saves its own state independently. However, uncoordinated methods face the risk of the domino effect. This occurs when a lack of global consistency forces processes to roll back to earlier and earlier checkpoints. In extreme cases, the system may be forced to roll back to its initial state.

The history of checkpointing includes significant research into timing and implementation. In 1976 and 1979, E. Gelenbe published research regarding the optimum checkpoint interval and rollback recovery models. In 1994, researchers including J. S. Plank, M. Beck, G. Kingsley, and K. Li developed Libckpt. This was a tool for transparent checkpointing under Unix. These early developments laid the groundwork for modern automated systems. They moved the technology from manual user actions to automated processes capable of handling massive workloads.

Checkpointing is a significant I/O workload in distributed computing. While there is debate about its exact dominance, most experts agree it is a major task for data movement. In batch applications, checkpointing is often a compromise between cost and safety. For example, a system might process between 25 and 200 records before taking a checkpoint. This frequency depends on the complexity of the application and the resources needed to restart. Taking a checkpoint after every single record would be too expensive in terms of computer time. However, waiting too long increases the risk of losing too much work.

Many specialized tools have been developed to implement these concepts. The Fault Tolerance Interface, or FTI, is a library designed for computational scientists. It allows users to select specific data for protection to improve efficiency. Another tool is the Berkeley Lab Checkpoint/Restart, known as BLCR. Developed by the Future Technologies Group, BLCR aims to checkpoint applications without requiring changes to the application code. There is also DMTCP, which provides transparent checkpointing for groups of programs spread across many machines. Even modern container technology like Docker includes checkpoint and restore mechanisms.

Checkpointing also extends to very small, specialized hardware. Mementos is a system designed for batteryless embedded devices, such as RFID tags. These devices harvest energy from their surroundings and may face frequent power outages. Mementos senses available energy and decides when to checkpoint data into non-volatile memory. Similarly, a tool called Idetic helps developers of application-specific integrated circuits (ASICs) embed checkpoints into their hardware designs. This allows even tiny, transiently-powered chips to perform long computations by saving their state before power is lost.

633 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.