Learn the vocabulary of deferring a memory page's copy until the moment a process actually writes to it.
0 / 5 completed
1 / 5
At standup, a dev mentions two processes sharing the exact same underlying memory pages after a fork, with an actual private copy of a page only made the moment either process tries to write to it. What is this technique called?
Copy-on-write lets two processes share the exact same physical memory pages after a fork, deferring the actual cost of copying a page until the moment either process tries to write to it, at which point only that one page is duplicated for the writer. A memory leak is an unrelated concept about memory never being reclaimed. This deferred copying is exactly what makes forking a large process cheap, since most pages are often never written to before the child process replaces its memory entirely with a new program.
2 / 5
During a design review, the team relies on copy-on-write specifically so that forking a large parent process doesn't require immediately duplicating every one of its memory pages up front. Which capability does this provide?
Copy-on-write provides a fast, cheap fork, since only the pages that are actually written to afterward ever need a private copy made, while every untouched page keeps being shared directly between parent and child at no extra memory cost. Duplicating every single page immediately would make forking a large process slow and memory-hungry regardless of how much of that memory the child process actually ends up modifying. This deferred-copy behavior is exactly why fork is cheap enough to be used routinely for spawning new processes.
3 / 5
In a code review, a dev notices a data structure is duplicated in full every time it's passed to a function that might modify it, even though the vast majority of those calls never actually change anything. What does this represent?
This is a missed opportunity for copy-on-write, since sharing the same underlying structure across calls and only duplicating it the moment an actual write occurs would avoid the wasted duplication cost on every call that never modifies anything. A cache eviction policy is an unrelated concept about discarded cache entries. This eager-copy pattern is exactly the kind of unnecessary overhead copy-on-write is designed to eliminate, by shifting the duplication cost from every call to only the calls that truly need it.
4 / 5
An incident report shows a service's memory usage and latency both spiked under load because a large shared configuration object was being fully duplicated on every request, even though only a tiny fraction of requests ever actually modified it. What practice would prevent this?
Sharing the configuration object across requests and applying copy-on-write, so a private copy is only made for the rare request that actually writes to it, eliminates the wasted duplication cost on the overwhelming majority of requests that never modify it, which is exactly the fix for the spike described in this incident. Continuing to fully duplicate it on every request regardless of actual modification is exactly what caused the memory and latency spike under load. This deferred-copy pattern is the standard fix for any structure that's read far more often than it's written.
5 / 5
During a PR review, a teammate asks why the team relies on copy-on-write instead of simply always sharing the same structure directly across every process or request with no copying at all. What is the reasoning?
Always sharing a structure directly with no copying at all risks one writer's change silently corrupting what every other reader or process still expects to see, since they have no idea the underlying data changed out from under them. A private copy is therefore still genuinely needed at the exact moment a write happens, copy-on-write just defers paying that cost until it's actually necessary rather than paying it eagerly for every reader up front. The tradeoff is the small bookkeeping overhead of tracking which pages are still shared and which have already been privately copied.
What does the "Copy-on-Write Vocabulary" vocabulary exercise cover?
This exercise tests real IT vocabulary related to copy-on-write vocabulary through 5 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 5 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — this module shares real-world context with 9 other vocabulary modules. See "Related vocabulary" below to keep building a connected skill set.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.