From: cgf AT bbc DOT com (Christopher Faylor) Subject: Re: Crazy fork idea 2 Apr 1998 16:56:08 -0800 Message-ID: References: <199804022354 DOT PAA00556 AT rtl DOT cygnus DOT com> Reply-To: cgf AT bbc DOT com To: cygwin32-developers AT cygnus DOT com In article <199804022354 DOT PAA00556 AT rtl DOT cygnus DOT com>, Geoffrey Noer wrote: >I was reading the Win32 multi-threaded O'Reilly book and got a crazy >idea that may not be of benefit, but I'm not sure so I'll mention it. > >We could use shared memory for information like fds and mark it copy >on write. Then, when the parent process forks a child, the child >could just keep using the same shared memory until such a time as it >alters the information, at which time the OS would automatically >create a copy and have the child modify that instead. > >Opinions? Somebody brought up something similar to this a while ago in the mailing list. I think that Sergey mentioned that copy-on-write is not available under Windows 95. Big surprise. Otherwise, I think this would be perfect for fork(). I've been wondering if it wouldn't be a good idea to have two versions of cygwinb19.dll, though -- a Windows 95 version and a Windows NT version. I'm hoping to take a look at fork() next week. I have a couple of ideas for speeding it up. I think that it is possible to get by with fewer "context switches". -- http://www.bbc.com/ cgf AT bbc DOT com "Strange how unreal VMS=>UNIX Solutions Boston Business Computing the real can be."