What kinds of things would you want in the GNU OS?

Doug Gwyn gwyn at smoke.BRL.MIL
Sun May 28 13:05:39 AEST 1989


In article <8565 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
>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?

As you seem to suspect, a "thread" has its own stack and state but
shares code and data with other threads, whereas a "fork" has its
own stack, state, and data but shares just the code with the other
branch of the fork.

The supposed advantage of a thread is that it's cheap to create one,
even compared with setting up copy-on-write for a fast fork().  The
obvious disadvantage is that the shared data space requires use of
concurrency controls among the parallel threads (e.g. monitors).
Unfortunately, really good concurrency controls don't seem to exist
at present.  Until someone devises a slick way to do this right in
high-level languages, I'll continue to prefer separate processes and
explicit data sharing.

By the way, Burroughs came close with their B5x00 and B6x00 series
Extended Algol implementations.



More information about the Comp.unix.wizards mailing list