Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following (hypothetical) architecture. The CPU uses a 16-bit virtua

ID: 3824620 • Letter: C

Question

Consider the following (hypothetical) architecture. The CPU uses a 16-bit virtual (and physical) address space. Each page table entry takes 16 bits. Assume you want to use two-level paging and the goal is to make the size (in bytes) of the outer page table and each (inner page table equal to the page frame size. How would you need to partition the 16-bit virtual address to achieve this goal? Explain your answer. Describe the Copy-on Write technique. How can this technique be implemented under a paging-based memory management scheme?

Explanation / Answer

4. Copy on write:

"Copy on write" means more or less what it sounds like: everyone has a single shared copy of the same data until it's written, and then a copy is made. Usually, copy-on-write is used to resolve concurrency sorts of problems. In ZFS, for example, data blocks on disk are allocated copy-on-write; as long as there are no changes, you keep the original blocks; a change changed only the affected blocks. This means the minimum number of new blocks are allocated.

These changes are also usually implemented to be transactional, ie, they have the ACID properties. This eliminates some concurrency issues, because then you're guaranteed that all updates are atomic.

Copy-on-write (sometimes referred to as "COW") is an optimization strategy used in computer programming. The fundamental idea is that if multiple callers ask for resources which are initially indistinguishable, you can give them pointers to the same resource. This function can be maintained until a caller tries to modify its "copy" of the resource, at which point a true private copy is created to prevent the changes becoming visible to everyone else. All of this happens transparently to the callers. The primary advantage is that if a caller never makes any modifications, no private copy need ever be created.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote