I made a visual explainer on how copy-on-write works in Linux.
When a 10 GB process calls
fork(), Linux does not immediately copy 10 GB of memory. It duplicates the page tables, points both processes at the same physical pages, marks them read-only, and waits for the first write.The video also covers things like page faults,
exec(), Redis snapshots, Android Zygote, lazy zero pages, memory overcommit, COW storms, and some CVEs, etcLink for anyone interested
Feedback welcome :)
https://redd.it/1v0uqx6
@r_linux