Path: utzoo!utgpu!watserv1!watmath!att!rutgers!ucsd!pacbell.com!ames!sun-barr!newstop!texsun!texbell!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.arch Subject: Re: fork() vs vfork() and COW Message-ID: Date: 10 Jul 90 15:04:07 GMT References: <1122@sirius.ucs.adelaide.edu.au> <3830012@hpcupt1.HP.COM> <58053@bbn.BBN.COM> <476@exodus.Eng.Sun.COM> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 12 In article <476@exodus.Eng.Sun.COM> david@eng.sun.com (Big Ed's Gas Farm) writes: > % time ./a.out (fork) > 0.2u 4.3s 0:09 47% 0+140k 0+0io 0pf+0w > % time ./a.out x (vfork) > 0.0u 4.1s 0:04 92% 0+140k 0+0io 0pf+0w > fork() seems to take twice as long as vfork() for a small process. I don't know about that... look at more than the 0:09. Both fork and vfork took about the same amount of system time, which is where you'd expect to see the extra overhead. There's also an extra second or so missing from the fork version... what else was running on the machine? -- Peter da Silva. `-_-' +1 713 274 5180.