Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.arch Subject: Re: fork() vs vfork() and COW Message-ID: <3733@auspex.auspex.com> Date: 24 Jul 90 02:05:15 GMT References: <58053@bbn.BBN.COM> <476@exodus.Eng.Sun.COM> <58086@bbn.BBN.COM> Organization: Auspex Systems, Santa Clara Lines: 31 >Does SunOS 4.1 really have COW? Yes; so did 4.0. Was this really not generally known? >Where is it documented? *Virtual Memory Architecture in SunOS*, Summer 1987 USENIX Proceedings. *SunOS Virtual Memory Implementation*, some recent EUUG procedings (it even uses the phrase "copy-on-write", unlike some of the other references). SunOS 4.0 MMAP(2) manual page: MAP_SHARED and MAP_PRIVATE describe the disposition of write references to the memory object. If MAP_SHARED is speci- fied, write references will change the memory object. If MAP_PRIVATE is specified, the initial write reference will create a private copy of the memory object page and redirect the mapping to the copy. The mapping type is retained across a fork(2). etc.. (BTW, for those who insist on making some stupid BSD vs. S5 debate out of this, note that S5R4 has "vfork()", and that the S5R4 "vfork()" man page includes a warning from which one could possibly infer that it operates similarly to the 4.xBSD and SunOS 4.x "vfork()". This may have been done for the benefit of code written by people incapable of reading, or incapable of comprehending, the "don't depend on this sharing!" stuff in the BSD manual page....)