[net.lang.c] multitasking in one process

rbj@icst-cmr (root) (04/29/86)

> > 	I an not aware of the situation for C++, but there is a stand alone
> > 	Multitasking package avaiable for C (for free).  It runs under Unix,
> > 	is compatible with dbx, and can be set to interleave the execution of
> > 	the arbitrary number of tasks every instruction if so desired.  It
> 
> I had the mispleasure of porting an application on a standalone
> 68000 to a Sun.  Only problem was that the application was a set of
> multitasking procedures that shared a lot of data structures.
> 
> For efficiency, my only choice was to get the whole mess to run as
> one UNIX process.  The result is an operating system in a process.
> 
> Unlike what is described above, scheduling is based upon timers,
> ASTs (ala VMS) or waiting for an event.  While a bitch to debug
> itself (mainly because of the 4.2 software timers), you can play
> with your whole system under dbx, watching every process.
> 
> It's certainly free.  Let me know if anyone is interested.  If
> there are enough requests, I might even document it and send it to
> mod.sources.
> 
> Don Libes         {seismo,umcp-cs}!nbs-amrf!libes

I once did a similar thing, except it was pretty much round robin
and each task checked it's input queue each cycle for work to do.
All we had to to was save our regs on our stack, point to the next
proc entry, switch stack ptrs (need assembly for this) restore
regs and go! Even this provided it's share of education tho!

How strange to be sending this cross town & back when I am only
a few hundred feet away from you physically (B358 Bldg 223).

	(Root Boy) Jim Cottrell		<rbj@icst-cmr>
	"One man gathers what another man spills"

libes@nbs-amrf.UUCP (Don Libes) (05/06/86)

> For efficiency, my only choice was to get the whole mess to run as
> one UNIX process.  The result is an operating system in a process.
> ...
> It's certainly free.  Let me know if anyone is interested.  If
> there are enough requests, I might even document it and send it to
> mod.sources.

Ok, enough.  I've gotten two dozen requests for this.  I now feel
very motivated to document this as promised and will do so over the
next few weeks.  I've also convinced my other half (Ed Barkmeyer)
to write up a description of the standalone 68k OS that this was
based on.  (He wrote it from scratch.  It's also free.)

Don Libes     {seismo,umcp-cs}!nbs-amrf!libes