Skip to content

Commit

Permalink
compute: Add redis example for copy-on-write
Browse files Browse the repository at this point in the history
Provide a real-world example for copy-on-write regarding Redis
snapshotting.

Signed-off-by: Alex Apostolescu <[email protected]>
  • Loading branch information
Alex-deVis authored and teodutu committed Feb 21, 2025
1 parent 0d2a058 commit 5db2ced
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chapters/compute/copy-on-write/reading/copy-on-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Then the process' page table points the page to the newly copied frame, as you c

![Copy-on-Write](../media/copy-on-write-final.svg)

For a real-world example of **Copy-on-Write** in action, take a look at [this brief paragraph](https://redis.io/docs/latest/develop/get-started/faq/#background-saving-fails-with-a-fork-error-on-linux) explaining how [Redis](https://redis.io/) uses this technique to snapshot its data without blocking the server.

**Be careful!**
Do not confuse **copy-on-write** with **demand paging**.
Remember from the [Data chapter](reading/working-with-memory.md) that **demand paging** means that when you allocate memory, the OS allocates virtual memory that remains unmapped to physical memory until it's used.
Expand Down

0 comments on commit 5db2ced

Please sign in to comment.