Implementing `fork' in a single address space

David Keppel pardo at cs.washington.edu
Sun Dec 10 06:30:19 AEST 1989


I'd like to write a micro-unix to run in a single Un*x address space.
I'm having problems figuring out how to implement `fork' correctly in
one address space.  Perhaps it's impossible.  I'm willing to have
stack frames point at the other guy's data, but the only ways that I
can think of to get stacks to return right are:

* To walk back the stack and patch up the retunr addresses -- scary!

* Have all stacks live at one place in the address space.  That
  requries swapping stacks at every context switch.

Perhaps a related question:

* Are there any pd (public-domain, or freeware) micro-unicies that I
  can look at?  I remember that you used to be able to get a 3-ring
  binder with the version 6 source, but I don't know if you had to
  have a source liscence and all that.

Thoughts?  Thanks!

	;-D on  ( Unix is a tratemark of Bell Laboratories )  Pardo
-- 
		    pardo at cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo



More information about the Comp.unix.questions mailing list