Copy-on-write: Difference between revisions

Content deleted Content added
Nucleos (talk | contribs)
m In computer storage: wrong reference
Nucleos (talk | contribs)
working again on the intro
Line 4:
'''Copy-on-write''' ('''COW'''), also called '''implicit sharing'''<ref>{{cite web |title=Implicit Sharing |url=https://doc.qt.io/qt-5/implicit-sharing.html |website=Qt Project |access-date=10 November 2023 |archive-date=8 February 2024 |archive-url=https://web.archive.org/web/20240208175543/https://doc.qt.io/qt-5/implicit-sharing.html |url-status=live }}</ref> or '''shadowing''',<ref>{{cite journal |last=Rodeh |first=Ohad |title=B-Trees, Shadowing, and Clones |journal=ACM Transactions on Storage |volume=3 |issue=4 |date=1 February 2008 |page=1 |citeseerx=10.1.1.161.6863 |s2cid=207166167 |doi=10.1145/1326542.1326544 |url=http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf |archive-url=https://web.archive.org/web/20170102212904/http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf |archive-date=2 January 2017 |access-date=10 November 2023 }}</ref>, is a [[Resource management (computing)|resource-management]] technique<ref name="Linux">{{cite book |last1=Bovet |first1=Daniel Pierre |last2=Cesati |first2=Marco |date=1 January 2002 |title=Understanding the Linux Kernel |url=https://books.google.com/books?id=9yIEji1UheIC&q=%22copy%20on%20write%22&pg=PA295 |publisher=O'Reilly Media |isbn=9780596002138 |page=295 |access-date=10 November 2023 |archive-date=15 September 2024 |archive-url=https://web.archive.org/web/20240915132745/https://books.google.com/books?id=9yIEji1UheIC&q=%22copy%20on%20write%22&pg=PA295#v=snippet&q=%22copy%20on%20write%22&f=false |url-status=live }}</ref> used in [[computer programming|programming]] to manage shared data efficiently.
 
Instead of copying data immediatelyright away when multiple programs use it, the same data is shared between programs until one program tries to changemodify it. AtIf no thatchanges pointare made, ano private copy is madecreated, saving [[System resource#General resources|resources]]<ref name="Linux">{{cite book |last1=Bovet |first1=Daniel Pierre |last2=Cesati |first2=Marco |date=1 January 2002 |title=Understanding the Linux Kernel |url=https://books>.google.com/books?id=9yIEji1UheIC&q=%22copy%20on%20write%22&pg=PA295 |publisher=O'ReillyA Mediacopy |isbn=9780596002138is |page=295only |access-date=10made Novemberwhen 2023needed, |archive-date=15ensuring Septembereach 2024program |archive-url=https://web.archive.org/web/20240915132745/https://books.google.com/books?id=9yIEji1UheIC&q=%22copy%20on%20write%22&pg=PA295#v=snippet&q=%22copy%20on%20write%22&f=falsehas |url-status=liveits }}</ref>own byversion avoidingwhen unnecessarymodifications duplication until it's neededoccur. This technique is commonly applied to memory, files, and data structures.
 
==In virtual memory management==