Penguin

Differences between version 2 and previous revision of CopyOnWrite.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Monday, October 7, 2002 7:25:23 pm by PerryLorier Revert
Older page: version 1 Last edited on Monday, October 7, 2002 7:24:10 pm by PerryLorier Revert
@@ -1 +1 @@
-When you fork(2), or otherwise share some memory it takes a lot of time to copy the memory causing latency, and potentially wasting memory that could be shared. The idea of CopyOnWrite is to use the [MMU] to mark a region of memory readonly, when something attempts to write to this memory it causes a processor exception to be generated, this exception then copies this page (usually 4k on Intel). In particular after fork(2), it's very common to exec (2), throwing away all the memory that would have been copied. 
+When you fork(2), or otherwise share some memory it takes a lot of time to copy the memory causing latency, and potentially wasting memory that could be shared. The idea of CopyOnWrite is to use the [MMU] to mark a region of memory readonly, when something attempts to write to this memory it causes a processor exception to be generated, this exception then copies this page (usually 4k on Intel). In particular after fork(2), it's very common to execve (2), throwing away all the memory that would have been copied.