Path: utzoo!utgpu!watmath!maytag!water!cgeisler From: cgeisler@water.waterloo.edu (Craig Eisler) Newsgroups: comp.sys.ibm.pc Subject: Fork and process creation Message-ID: <2361@water.waterloo.edu> Date: 25 May 89 18:43:49 GMT References: <2968@cps3xx.UUCP> <75800069@p.cs.uiuc.edu> <2332@water.waterloo.edu> <593@rna.UUCP> Reply-To: cgeisler@water.waterloo.edu (Craig Eisler) Organization: U. of Waterloo, Ontario Lines: 44 In article <593@rna.UUCP> kc@rna.UUCP (Kaare Christian) writes: >"An initial Send", whatever that is, must dupicate I/O connections, ^^^^ >signal handling and other aspects of the original process' state, All of these things have no place in a process creation primitive. Create() is the type of primitive the kernel needs to spawn a new process. Duplication of I/O connections is a job for a file server, not the kernel. >Forks make it easy to have pipes (cheapo, flexible ipc) ^^^ Pipes are a nice feature, but they are anything but cheap. They are file I/O. Too damn slow. Since you mention IPC, I assume you know what Send,Receive, and Reply are. If you want cheap communication, that is what you use. And you do not need fork to implement pipes. >Unix is still the only system that allows most programs to work together >easily, using ad hoc connections. Fork is an essential part of that >flexibility. I disagree. Fork is an unnecessary primitive. Of course, the UNIX kernel is filled with unnecessary primitives (270 or something similar). >And now a few numbers. How fast is "fast enough" for fork? >[times omitted] At a cost of 35ms for a fork, you can forget about using it in any kind of real time environment. In an operating system I implemented on a intel 186, process creation was 2.8 ms. And this was barely good enough for arbitrary process creation while trying run a system of trains in real time. Currently I am involved with the Multi-processor Systems Group here at the university, and we are designing a firmware (microcoded) kernel to run 4 68030's. There will be no fork, only process creation. All other features of fork have no reason for being in the kernel. craig -- Craig Eisler, Applied Math, University of Waterloo "Either way, I'm afraid to try it" - Calvin.