Explain the advantage of copy-on-write region copying for UNIX, where a call to fork is typically followed by a call to exec. What should happen if a region that has been copied using copy-on- write is itself copied?

What will be an ideal response?

It would be wasteful to copy the forked process’s address space contents, since they are immediately replaced. With copy-on-write, only those few pages that are actually needed before calling exec will be copied.
Assume now that exec is not called. When a process forks, its child may in turn fork a child. Call these the parent, child and grandchild. Pages in the grandchild are logically copied from the child, whose pages are in turn logically copied from the parent. Initially, the grandchild’s pages may share a frame with the parent’s page. If, say, the child modifies a page, however, then the grandchild’s page must be made to share the child’s frame. A way must be found to manage chains of page dependencies, which have to be altered when pages are modified.

Computer Science & Information Technology

You might also like to view...

Before you print mailing labels, you need to create a database of recipients' names and addresses

Indicate whether the statement is true or false

Computer Science & Information Technology

Use the _____ element to code embedded styles on a web page

a. link b. style c. embed d. css

Computer Science & Information Technology