[comp.unix.questions] light-weight processes in Unix

dms@hermes.ai.mit.EDU (03/09/87)

We'd like to add some kind of light-weight process support to our Sun
3.2 system. What we would like to have is the ability to fork off a
procedure (not a fully linked program) that shares the full address
space of the parent process. The stack and heap for the child process
would be malloc'ed out of the parent's heap. There are, of course,
complications that would come up if both child and parent were using
shared data structures, such as the io buffers. Ignoring these (for
you could write code keeping this in mind), has anyone attempted to do
this? 

Thanks,
-Dave

bjorn@alberta.UUCP (03/13/87)

In article <4817@brl-adm.ARPA>, dms@hermes.ai.mit.EDU (David M. Siegel) writes:
> We'd like to add some kind of light-weight process support to our Sun
> 3.2 system. What we would like to have is the ability to fork off a
> procedure (not a fully linked program) that shares the full address
> space of the parent process. The stack and heap for the child process
> would be malloc'ed out of the parent's heap.

I have a package that does this.  It's called Sup-K(tm) (Small
unprotected Kernel).  It's not terrificly difficult to do:
similar to writing a kernel for a personal computer that
doesn't come equipped with a MMU.  In fact Sup-K could
be used as multitasking kernel on say Atari STs.  The current
version of Sup-k does round robin scheduling, but any old
scheduling algorithm can be used.  You do have to link your
program with a munged version of Sun's 'sigtramp' module in
order to be able to modify all of your process registers
on signal return, this however is transparent to the user
except for inclusion of the module at link time.  Apart from
that no modifications are needed to Sun code.  Sup-k can
easily be made to run on most BSD based systems (4.2 and up).

		Bjorn R. Bjornsson
		UUCP:	alberta!bjorn
		Phone:	(403)-439-9541
--
Sup-K is a trademark of Bijective Technology.

naim@nucsrl.UUCP (Naim Abdullah) (03/18/87)

dms@hermes.ai.mit.EDU writes:

>We'd like to add some kind of light-weight process support to our Sun
>3.2 system. What we would like to have is the ability to fork off a
>procedure (not a fully linked program) that shares the full address
>space of the parent process.

There was a paper on "Light Weight Processes in Unix" (I think that
was the title) in the Summer '85 Usenix conference in Portland, Oregon.
It was written by people at Sun and it involved linking your program
to a modified C library. They intend for the same primitives to work
in a kernel implemented by light weight processes, but I think they
have implemented only a user level version so far.

		 Naim Abdullah
		 Dept. of EECS,
		 Northwestern University
		 {ihnp4, chinet}!nucsrl!naim