Lesson 3 of 6
What survives after the program stops?
You correct the meeting time in the Saturday note, and the window shows 11 a.m. The file on disk may still say 10 a.m. This lesson explains the difference between what a running process holds and what has been saved, and why "it worked" depends on which of those you looked at.
Numbered links identify sources. Underlined terms offer a definition without leaving the lesson.
State describes what the software holds at a particular moment
is the information that describes a system at a particular moment: the current note text, the cursor position, or which announcement is on the board. Some state is held in a running process's working memory. Some is saved in files or stored by another service. Calling something state does not tell you whether it will survive a restart.
For the editor in our example, the unsaved correction exists only in the process's memory. When that process ends, it no longer holds the correction. Opening the unchanged file again cannot recover text that was never saved. The process supplies resources such as working memory while the program runs. 2
Saving makes information available beyond that running process. The example uses a file on the laptop's storage, which can retain data while the computer is switched off. Keeping temporary edits and saved contents distinct lets you ask the right question after a failure: where was the latest version actually held?
Persistence means writing state somewhere that outlasts the process
is the property of surviving beyond the process that produced the information. A change persists when it has been written to storage, typically into a file, so that a later process can read it back. The Python language's own tutorial, which can be read without installing anything, describes the same basic choice every program faces with its results: display them, or write them to a file for later use. It also separates three operations that matter here: reading a file, replacing its contents and appending to its end. 4 In our editor example, Save replaces the file's text with the edited text. It does not save everything about the process, such as the cursor position. A program that keeps a log usually appends. Which operation ran determines what the file contains afterwards.
Our authored editor has no automatic save or recovery feature. Follow the correction through. You edit the Saturday note's time to 11 a.m. State: the process's memory holds 11 a.m. File: still 10 a.m. You choose Save. The editor writes its state over the file's contents. File: now 11 a.m., and the storage system records a new last-write timestamp, which is where the 9 September date in the first lesson's table came from. You close the editor. The process ends and its memory is released, and that no longer matters, because the file holds the change. You open the note again, in the same editor or a different one. A new process reads the file, and the text it displays starts from 11 a.m.
Now the failure case. Same edit, but the host loses power before Save. The process ends. Its memory, with the 11 a.m. text, is gone. The file still says 10 a.m. Nothing was lost from the file, and nothing was ever added to it. The correction existed only in working memory. Some applications save automatically at intervals or keep recovery copies. Whether yours does is a fact about that application, and an assistant's assurance that "your change is saved" is a generated sentence, not a receipt. Module 1's distinction between a claim and a confirmation from the software applies directly.
What a normal save does not establish
In this example, a completed Save writes the edited text into the file. It does not mean the previous contents are recoverable; replacing overwrote them. It does not mean a copy exists elsewhere; a backup is a separate operation to a separate place, and only checking that place shows it happened. And the tutorial's description of writing covers the ordinary case; it does not promise that a file survives every kind of failure, such as power failing during the write. 4 Those are three separate questions: what does the file say now, what did it say before, and where else does a copy exist? The last lesson of this module turns the second question into a habit.
Carry this forward
- State describes the information a system holds at a particular moment. Distinguish temporary state in working memory from state saved to storage.
- Persistence means the information was written to storage that outlasts the process. A save replaces or appends file contents.
- A visible edit does not by itself establish a saved change. Check the saved contents, including when an application reports that it saved automatically.
- A completed save does not establish a recoverable previous version or a copy elsewhere.
Lesson check
Choose an answer for each question.
This is a practice check. Answers reset when you leave this page. Results are not saved and do not place you in another module or award a qualification.
Saving keeps a change on one computer. Sending it to another is a different operation with its own evidence, which the next lesson traces.
Sources · Reviewed 2026-09-28
Sources support nearby explanations. Product details can change. Scenarios and model results are authored illustrations unless a lesson explicitly identifies a recorded execution. Module 7 identifies its offline code checks.