Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.unix.wizards Subject: Re: What kinds of things would you want in the GNU OS? Message-ID: <31965@bu-cs.BU.EDU> Date: 29 May 89 21:08:26 GMT References: <106326@sun.Eng.Sun.COM> <31756@bu-cs.BU.EDU> <8565@chinet.chi.il.us> Reply-To: madd@bu-it.bu.edu (Jim Frost) Followup-To: comp.unix.wizards Organization: Software Tool & Die Lines: 21 In article <8565@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: |In article <31756@bu-cs.BU.EDU> madd@bu-it.bu.edu (Jim Frost) writes: |>There should be at least three ways to start multiprocessing: fork(), |>thread(), and spawn(). | |Can someone explain how a thread differs from a fork, and whether the |difference is desirable compared to forks with shared text, copy-on-write |data, and the ability to explicitly request shared memory for data? Fork causes duplication of the data area and stack area. Thread would only duplicate the stack area, the data area would be shared. Note that whether or not you do real copies or copy-on-write is pretty much implementation-dependent. The difference, that of shared data space (and often that creation is cheaper -- possibly *much* cheaper -- than fork) makes threading a powerful tool. jim frost software tool & die madd@bu-it.bu.edu