Persistence (computer science): Difference between revisions

Content deleted Content added
FrescoBot (talk | contribs)
m Bot: links syntax
Myrmornis (talk | contribs)
Replaced with a grammatically correct construction
Tags: Mobile edit Mobile web edit
 
(107 intermediate revisions by 84 users not shown)
Line 1:
{{about|state outliving processes|immutable data structures|Persistent data structure|concepts relating to the persistence of memory|The Persistence of Memory (disambiguation)}}
{{Unreferenced|date=October 2008}}
{{short description|Characteristic of state of a computer system that outlives the process that created it}}
'''Persistence''' in [[computer science]] refers to the characteristic of [[State (computer science)|state]] that outlives the [[Process (computing)|process]] that created it. Without this capability, [[State (computer science)|state]] would only exist in [[RAM]], and would be lost when this RAM loses power, such as a computer shutdown.{{Citation needed|date=December 2009}}
{{refimprove|date=September 2014}}
In [[computer science]], '''persistence''' refers to the characteristic of [[State (computer science)|state]] of a system that outlives (persists for longer than) the [[Process (computing)|process]] that created it. This is achieved in practice by storing the state as data in [[computer data storage]]. Programs have to transfer data to and from storage devices and have to provide mappings from the native [[Programming language|programming-language]] [[Data structure|data structures]] to the storage device data structures.<ref name="Conf1983">{{cite conference |url=http://archive.cs.st-andrews.ac.uk/papers/download/ABC+83b.pdf |title=PS-algol: A Language for Persistent Programming |last1=Atkinson |first1=M.P. |last2=Bailey |first2=P.J. |last3=Chisholm |first3=K.J. |last4=Cockshott |first4=W.P. |author4-link=Paul Cockshott |last5=Morrison |first5=R. |author-link=Ron Morrison |year=1983 |page= |conference=10th Australian National Computer Conference |book-title=Proceedings 10th Australian National Computer Conference |___location=Melbourne, Australia |pages=70–79}}</ref><ref>{{Cite web|url = http://people.inf.ethz.ch/balzers/publications/contracted_persistent_object_programming.pdf|title = Contracted Persistent Object Programming|date = November 17, 2005|access-date = September 21, 2015|website = University of Glasgow - School of CS - Research|publisher = ETH Zürich|last = Balzer|first = Stephanie|archive-url = https://web.archive.org/web/20061231214555/http://people.inf.ethz.ch/balzers/publications/contracted_persistent_object_programming.pdf|archive-date = December 31, 2006|url-status = dead}}</ref>
 
ThisPicture isediting achievedprograms inor practice[[Word byprocessor|word storingprocessors]], thefor example, achieve [[State (computer science)|state]] aspersistence databy insaving non-volatiletheir storagedocuments such as ato [[hardcomputer drive]] or [[flash memoryfile|files]].
 
Picture editing programs or word processors, for example, achieve [[State (computer science)|state]] persistence by saving their documents to files.
 
== Orthogonal or transparent persistence==
Persistence is said to be "[[Orthogonality#Computer_scienceComputer science|orthogonal]]" or "transparent" when it is implemented as an intrinsic property of the execution environment of a program. An orthogonal persistence environment does not require any specific actions by programs running in it to retrieve or save their [[State (computer science)|state]].
 
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''.
 
The advantage of orthogonal persistence environments is simpler and less error-prone programs.{{Citation needed|date=April 2015}}
 
The term "persistent" was first introduced by Atkinson and Morrison<ref name="Conf1983"/> 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. The use of the transitive verb "persist" (describing an action performed by a program) is a back-formation.
 
===Adoption===
Orthogonal persistence is widely adopted in operating systems for [[Hibernation (computing)|hibernation]] and in [[platform virtualization]] systems such as [[VMware]] and [[VirtualBox]] for state saving.
 
Research prototype languages such as [[PS-algol]], [[Napier88]], Fibonacci and pJama, successfully demonstrated the concepts along with the advantages to programmers.
 
==Persistence techniques==
 
===System images===
{{Main|System image}}
Using [[Systemsystem image|system images]]s is the simplest persistence techniquestrategy. Notebook [[Hibernate (OS feature)|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. 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.
 
'''Shortcomings''': Requires enough RAM to hold the entire system state. State changes made to a system after its last image was saved are lost in the case of a system failure or shutdown. 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.
 
===Journals===
Line 28 ⟶ 36:
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.
 
Journals are used by [[journaling file system]]s, [[System Prevalence|prevalent systems]] and [[database management system]]s where they are also called "transaction logs" or "redo logs".
 
'''Shortcomings''': JournalsWhen journals are oftenused combined with other persistence techniques so thatexclusively, the entire (potentially large) history of all system events does not have tomust be reapplied on every system startup. As a result, journals are often combined with other persistence techniques.
 
===System prevalence===
{{Main|System Prevalence}}
System prevalence is a technique that combines system images and transaction journals, mentioned above, to overcome their limitations.
 
'''Shortcomings:''' A prevalent system must have enough [[RAM]] to hold the entire system state.
 
===Dirty writes===
DirtyThis writestechnique refer tois the writing out to storage of only those portions of system state that have been modified (are dirty) since their last write. 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.
 
'''Shortcomings:''' This technique requires state changes to be intercepted within a program. This is achieved in a non-transparent way by requiring specific storage-API calls or in a transparent way with automatic [[program transformation]]. This results in code that is slower than native code and more complicated to debug.
Line 45 ⟶ 47:
== Persistence layers ==
Any [[Layer (object-oriented design)|software layer]] that makes it easier for a program to persist its state is generically called a persistence layer. Most persistence layers will not achieve persistence directly but will use an underlying [[database management system]].
 
===System prevalence===
{{Main|System Prevalenceprevalence}}
System prevalence is a technique that combines system images and transaction journals, mentioned above, to overcome their limitations.
 
'''Shortcomings:''' A prevalent system must have enough [[random-access memory|RAM]] to hold the entire system state.
 
== Database management systems (DBMSs) ==
Line 51 ⟶ 59:
 
==Persistent operating systems==
Persistent operating systems are [[operating system]]s that remain persistent even after a crash or unexpected shutdown. The computer stays in the same state even if you turn it off, behaving much like a TV or similar device. Operating systems that employ this ability include
* [[CapROS]], revisions of EROS
* [[Coyotos]], successor to EROS
* [[Extremely Reliable Operating System|EROS]], the successor to KeyKOS
* [[KeyKOS]]
* [[Extremely Reliable Operating System|EROS]], the successor to KeyKOS
* [[CapROSCoyotos]], revisionssuccessor ofto EROS
* [[Multics]] with its [[single-level store]]
* [[Phantom (operating system)OS|Phantom]]
* [[IBM System/38]]
* [[IBM i]]
* [[Grasshopper OS]] [https://web.archive.org/web/20150704211338/http://www-os.dcs.st-and.ac.uk/GH/ ]
* [[Lua OS]]
* [[tahrpuppy-6.0.5]]
 
== See also==
* [[Persistent data structure]]
* [[Persistent data structure]]
* [[Persistent identifier]]
* [[Persistent memory]]
* [[Copy-on-write]]
* [[Create, read, update and delete|CRUD]]
* [[Java Data Objects]]
* [[Java Persistence API]]
* [[System Prevalenceprevalence]]
* [[Orthogonality#Computer science|Orthogonality]]
* [[Persistent data structure]]
* [[Service Data Object]]
* [[Snapshot (computer storage)]]
 
== References ==
<references />
 
{{Authority control}}
 
{{DEFAULTSORT:Persistence (Computer Science)}}
Line 73 ⟶ 94:
[[Category:Computing terminology]]
[[Category:Computer programming]]
[[Category:ComputationalModels modelsof computation]]
 
[[ca:Persistència (informàtica)]]
[[de:Persistenz (Informatik)]]
[[es:Persistencia (informática)]]
[[fr:Persistance (informatique)]]
[[nl:Persistentie]]
[[ja:永続性 (計算機科学)]]
[[pt:Persistência]]