What kinds of things would you want in the GNU OS?
Jim Frost
madd at bu-cs.BU.EDU
Tue May 30 07:08:26 AEST 1989
In article <8565 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
|In article <31756 at bu-cs.BU.EDU> madd at 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 at bu-it.bu.edu
More information about the Comp.unix.wizards
mailing list