Copy-on-write

Copy-on-write (COW), also called implicit sharing[1] or shadowing,[2] is a resource-management technique[3] used in programming to manage shared data efficiently. Instead of copying data right away when multiple programs use it, the same data is shared between programs until one tries to modify it. If no changes are made, no private copy is created, saving resources.[3] A copy is only made when needed, ensuring each program has its own version when modifications occur. This technique is commonly applied to memory, files, and data structures.

  1. ^ "Implicit Sharing". Qt Project. Archived from the original on 8 February 2024. Retrieved 10 November 2023.
  2. ^ Rodeh, Ohad (1 February 2008). "B-Trees, Shadowing, and Clones" (PDF). ACM Transactions on Storage. 3 (4): 1. CiteSeerX 10.1.1.161.6863. doi:10.1145/1326542.1326544. S2CID 207166167. Archived from the original (PDF) on 2 January 2017. Retrieved 10 November 2023.
  3. ^ a b Bovet, Daniel Pierre; Cesati, Marco (1 January 2002). Understanding the Linux Kernel. O'Reilly Media. p. 295. ISBN 9780596002138. Archived from the original on 15 September 2024. Retrieved 10 November 2023.