Persistence (computer science)
In computer science, persistence refers to the characteristic of state of a system that outlives (persists for longer than) the process that created it.[src] This is achieved in practice by storing the state as data in computer data storage.[src] Programs have to transfer data to and from storage devices and have to provide mappings from the native programming-language data structures to the storage device data structures.[src] Picture editing programs or word processors, for example, achieve state persistence by saving their documents to files.[src]
In computer science, persistence refers to the characteristic of state of a system that outlives (persists for longer than) the process that created it.[src] This is achieved in practice by storing the state as data in computer data storage.[src] Programs have to transfer data to and from storage devices and have to provide mappings from the native programming-language data structures to the storage device data structures.[src] Picture editing programs or word processors, for example, achieve state persistence by saving their documents to files.[src] == Orthogonal or transparent persistence== Persistence is said to be "orthogonal" or "transparent" when it is implemented as an intrinsic property of the execution environment of a program.[src] An orthogonal persistence environment does not require any specific actions by programs running in it to retrieve or save their state.[src] Non-orthogonal persistence requires data to be written and read to and from storage using specific instructions in a program, resulting in the use of persist as a transitive verb: On completion, the program persists the data.[src] The advantage of orthogonal persistence environments is simpler and less error-prone programs.[src] The term "persistent" was first introduced by Atkinson and Morrison in the sense of orthogonal persistence: they used an adjective rather than a verb to emphasize persistence as a property of the data, as distinct from an imperative action performed by a program.[src] The use of the transitive verb "persist" (describing an action performed by a program) is a back-formation.[src] ===Adoption=== Orthogonal persistence is widely adopted in operating systems for hibernation and in platform virtualization systems such as VMware and VirtualBox for state saving.[src] Research prototype languages such as PS-algol, Napier88, Fibonacci and pJama, successfully demonstrated the concepts along with the advantages to programmers.[src] ==Persistence techniques== ===System images=== Using system images is the simplest persistence strategy.[src] Notebook hibernation is an example of orthogonal persistence using a system image because it does not require any actions by the programs running on the machine.[src] An example of non-orthogonal persistence using a system image is a simple text editing program executing specific instructions to save an entire document to a file.[src] Shortcomings: Requires enough RAM to hold the entire system state.[src] State changes made to a system after its last image was saved are lost in the case of a system failure or shutdown.[src] Saving an image for every single change would be too time-consuming for most systems, so images are not used as the single persistence technique for critical systems.[src] ===Journals=== Using journals is the second simplest persistence technique.[src] Journaling is the process of storing events in a log before each one is applied to a system.[src] Such logs are called journals.[src] On startup, the journal is read and each event is reapplied to the system, avoiding data loss in the case of system failure or shutdown.[src] The entire "Undo/Redo" history of user commands in a picture editing program, for example, when written to a file, constitutes a journal capable of recovering the state of an edited picture at any point in time.[src] Journals are used by journaling file systems, prevalent systems and database management systems where they are also called "transaction logs" or "redo logs".[src] Shortcomings: When journals are used exclusively, the entire (potentially large) history of all system events must be reapplied on every system startup.[src] As a result, journals are often combined with other persistence techniques.[src] ===Dirty writes=== This technique is the writing to storage of only those portions of system state that have been modified (are dirty) since their last write.[src] Sophisticated document editing applications, for example, will use dirty writes to save only those portions of a document that were actually changed since the last save.[src] Shortcomings: This technique requires state changes to be intercepted within a program.[src] This is achieved in a non-transparent way by requiring specific storage-API calls or in a transparent way with automatic program transformation.[src] This results in code that is slower than native code and more complicated to debug.[src] ==System prevalence== System prevalence is a technique that combines system images and transaction journals, mentioned above, to overcome their limitations.[src] Shortcomings: A prevalent system must have enough RAM to hold the entire system state.[src] ==Persistent operating systems== Persistent operating systems are operating systems that remain persistent even after a crash or unexpected shutdown.[src] Operating systems that employ this ability include KeyKOS EROS, the successor to KeyKOS Coyotos, successor to EROS Multics with its single-level store Phantom IBM System/38 IBM i Grasshopper OS Lua OS tahrpuppy-6.0.5 == See also== Persistent data Persistent data structure Persistent identifier Persistent memory Copy-on-write CRUD Java Data Objects Java Persistence API System prevalence Orthogonality Service Data Object Snapshot (computer storage)[src]
39 sentences · 39 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Persistence (computer science)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/persistence-computer-science. Accessed 25 November 2026.
Chicago
"Persistence (computer science)." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/persistence-computer-science.
APA
encyclopegia.org. (2025). Persistence (computer science). Retrieved November 25, 2026, from https://encyclopegia.org/wiki/persistence-computer-science
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON