mogoz

Copy on Write

tags
Algorithms , Systems , Filesystems

Copy on Write

  • It’s essentially a programming technique which is applicable in many contexts.
  • Filesystems
    • CoW as an alternative way to do journaling (brtfs uses CoW vs journaling in ext4)
    • You work on a copy. After you are done, the copy is then made the real file.
  • Memory Management
    • When new process is created, it’ll just point the PTE to the resource, only when it’s written to it’ll make a copy of it to an actual physical address. See mmap .

Zero Copy

  • This is different from CoW , but I decided to put them in the same page anyway.

The case of sendfile

Links to this note