Copy-on-write: Difference between revisions

Content deleted Content added
top: rewrote the lead; it had become an incoherent jumble that failed to even state what COW consists of
Line 1:
{{one source|date=January 2013}}
'''Copy-on-write''' (sometimes referred to as "COW") is an [[Optimization (computer science)|optimization]] strategy used in [[computer programming]]. Copy-on-write stems from the understanding that when multiple separate tasks use initially identical copies of the samesome information (i.e., data stored in computer memory or disk storage), treating it as local data that they may occasionally need to modify, then it is not necessary to immediately create separate copies of that information for each process,task. insteadInstead they can all be given pointers to the same resource., Whenwith therethe areprovision manythat separate processes all usingon the samefirst resourceoccasion itwhere isthey possibleneed to makemodify significantthe resourcedata, savingsthey bymust sharingfirst resources this way. However, whencreate a local copy hason beenwhich modified,to perform the copy-on-writemodification paradigm(the hasoriginal noresource provisionremains thatunchanged). theWhen sharedthere resourceare hasmany inseparate theprocesses meantimeall notusing beenthe updatedsame byresource, anothereach taskwith ora tasks.small Copy-on-writelikelihood isof thereforehaving amenableto ifmodify onlyit theat latestall, updatethen it is importantpossible andto occasionalmake usesignificant ofresource asavings slightlyby stalesharing valueresources is notthis harmfulway. Copy-on-write is the name given to the processpolicy of identifyingthat whenwhenever a task attempts to make a change to the shared information, creatingit should first create a separate (private) copy of that information for the task and redirecting the task to making changes to the private copy to prevent its changes from becoming visible to all the other tasks. All ofIf this happenspolicy withinis enforced by the operating system kernel, makingthen the processfact of being given a reference to shared information rather than a private copy can be [[transparency (human–computer interaction)|transparent]] to bothall thetasks, taskwhether requestingthey theneed changeto andmodify the otherinformation tasks usingor the shared copynot.<ref name="Kongens Lyngby 2010">{{cite web |last=Kasampalis |first=Sakis |title=Copy On Write Based File Systems Performance Analysis And Implementation |url=http://faif.objectis.net/download-copy-on-write-based-file-systems |page=19 |format=pdf |year=2010 |deadurl=no |accessdate=11 January 2013}}</ref>
 
==Copy-on-write in virtual memory management==